A Thing Specification Language (TSL) model is a data model that IoT Platform defines for a product. You can configure Link SDK for C to submit device properties and events, and receive commands from IoT Platform to set properties and call services.
Prerequisites
- The device authentication information is obtained.
- A TSL model is added.
- Link SDK for C is obtained.
When you customize an SDK on the SDK customization page, set Advanced Capabilities to Thing model.
- A development environment is prepared.
Background information
- For more information about TSL models, see What is a TSL model?.
- For more information about data formats, see Device properties, events, and services.
Process
The application program calls the API operations of Link SDK for C to the connection of the MQTT protocol to communicate with IoT Platform for TSL data.
The following figure shows the process. In this example, the ./demos/data_model_basic_demo.c application program is used.
For more information about TSL model-specific API operations, see aiot_dm_api.h.
Examples
- For more information about examples, see Example.
- For more information about error codes, see aiot_dm_api.h..