IoT Platform allows you to define features for products. You can use a TSL model to describe product features, including properties, services, and events. The TSL model makes it easy to manage products and data transmission. After you create a product, you can define a TSL model to describe product features. Devices under this product automatically inherit its features.
- In the product list, select the product and click View.
- On the Product Details page, click Define Feature.
- In the Self-Defined Feature section, click Add Self-defined Feature.
- As shown below, add a property to define a switch.
- As shown below, add a property to define a counter.
- As shown below, add a service to support numerical calculations.
Value A is defined as follows:
- Value B is defined as follows:
The output parameter indicates the calculation result.
- As shown below, add an event to define a hardware error.
The output parameter indicates the error code.
- Click View TSL and choose Full TSL to view the TSL definitions in JSON format.