Implements the various utilities needed at various locations in the sensor code, from model to mid app to top app. More...
Data Structures | |
struct | sensor_mpid_a_t |
Format A of the Marshalled Property ID (MPID) field. More... | |
struct | sensor_mpid_b_t |
Format B of the Marshalled Property ID (MPID) field. More... | |
Functions | |
static bool | sensor_property_id_supported (uint16_t *p_properties, uint16_t property_id) |
Look through the supported property_id list to check for property_id support. More... | |
static uint64_t | publish_period_get (access_model_handle_t model_handle) |
Gets the publish period for the given model in microseconds. More... | |
static void | sensor_mpid_a_create (uint16_t property_id, uint8_t data_bytes, uint8_t *p_buffer) |
Create format A of the Marshalled Property ID (MPID) field. More... | |
static void | sensor_mpid_b_create (uint16_t property_id, uint8_t data_bytes, uint8_t *p_buffer) |
Create format B of the Marshalled Property ID (MPID) field. More... | |
Implements the various utilities needed at various locations in the sensor code, from model to mid app to top app.
|
inlinestatic |
Look through the supported property_id list to check for property_id support.
[in] | p_properties | Pointer to an array of all supported properties. |
[in] | property_id | The Property ID to look for. |
Definition at line 106 of file sensor_utils.h.
References NRF_MESH_ASSERT.
|
inlinestatic |
Gets the publish period for the given model in microseconds.
[in] | model_handle | Model handle assigned to this instance. |
Definition at line 131 of file sensor_utils.h.
References access_model_publish_period_get(), ACCESS_PUBLISH_RESOLUTION_100MS, ACCESS_PUBLISH_RESOLUTION_10MIN, ACCESS_PUBLISH_RESOLUTION_10S, and ACCESS_PUBLISH_RESOLUTION_1S.
|
inlinestatic |
Create format A of the Marshalled Property ID (MPID) field.
See Bluetooth Mesh Model Specification (MshMDLv1.0.1) section 4.2.14 for more details.
[in] | property_id | The Property ID identifying a sensor. |
[in] | data_bytes | Length of the Property Value |
[out] | p_buffer | Pointer to buffer where the Marshalled Sensor data will be stored. |
Definition at line 178 of file sensor_utils.h.
References sensor_mpid_a_t::format, sensor_mpid_a_t::length, and sensor_mpid_a_t::property_id.
|
inlinestatic |
Create format B of the Marshalled Property ID (MPID) field.
See Bluetooth Mesh Model Specification (MshMDLv1.0.1) section 4.2.14 for more details.
[in] | property_id | The Property ID identifying a sensor. |
[in] | data_bytes | Length of the Property Value |
[out] | p_buffer | Pointer to buffer where the Marshalled Sensor data will be stored. |
Definition at line 198 of file sensor_utils.h.
References sensor_mpid_b_t::format, sensor_mpid_b_t::length, and sensor_mpid_b_t::property_id.