|
OpenThread_app
|
CoAP URI definitions for the light device. More...
Functions | |
| otapp_coap_uri_t * | ad_light_uri_getList (void) |
| Get the static list of CoAP URIs exposed by the light device. | |
| uint8_t | ad_light_uri_getListSize (void) |
| Get the number of URIs provided by the light device. | |
| void | ad_light_uri_init (ot_app_devDrv_t *devDrv) |
| Initialize light URIs and connect them to the driver API. | |
CoAP URI definitions for the light device.
This module defines the CoAP resources that expose the light device functionality to the network. Typical endpoints:
For each URI the module configures:
The URI table is registered in the OpenThread Application Framework via the driver callbacks configured in ad_light_init().
| otapp_coap_uri_t * ad_light_uri_getList | ( | void | ) |
Get the static list of CoAP URIs exposed by the light device.
The returned pointer refers to a statically allocated array of otapp_coap_uri_t structures. The array describes all URIs handled by this device, including their handlers and observe settings.
| uint8_t ad_light_uri_getListSize | ( | void | ) |
Get the number of URIs provided by the light device.
This value must match the size of the array returned by ad_light_uri_getList() and is used by the framework to iterate over the URI table.
| void ad_light_uri_init | ( | ot_app_devDrv_t * | devDrv | ) |
Initialize light URIs and connect them to the driver API.
This function should be called during device initialization (from ad_light_init()). It:
devDrv for use inside URI handlers when sending responses or notifications.| devDrv | Pointer to the OpenThread application driver instance. Must be a valid pointer returned by ot_app_drv_getInstance(). |