The AIROC Mesh Sensor Server module provides a way for an application to implement a functionality for the devices that can be controlled using sensor.
More...
|
typedef void( | wiced_bt_mesh_sensor_server_config_callback_t )(uint8_t element_idx, uint16_t event, void *p_data) |
|
typedef void( | wiced_bt_mesh_sensor_server_report_callback_t )(uint16_t event, uint8_t element_idx, void *p_get_params, void *p_ref_data) |
|
|
void | wiced_bt_mesh_model_sensor_server_init (uint8_t element_idx, wiced_bt_mesh_sensor_server_report_callback_t *p_report_callback, wiced_bt_mesh_sensor_server_config_callback_t *p_config_change_callback, wiced_bool_t is_provisioned) |
| Sensor Senosr Module initialization. More...
|
|
wiced_bool_t | wiced_bt_mesh_model_sensor_server_message_handler (wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len) |
| Sensor Server Message Handler. More...
|
|
wiced_bool_t | wiced_bt_mesh_model_sensor_setup_server_message_handler (wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len) |
| Sensor Setup Server Message Handler. More...
|
|
wiced_result_t | wiced_bt_mesh_model_sensor_server_series_status_send (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_series_status_data_t *series_status_data) |
| Sensor Series Status send status. More...
|
|
wiced_result_t | wiced_bt_mesh_model_sensor_server_column_status_send (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_column_status_data_t *column_status_data) |
| Sensor Column Status send status. More...
|
|
uint16_t | wiced_bt_mesh_model_format_sensor_server_data (uint8_t element_idx, uint16_t property_id, uint8_t *p_buffer, uint16_t buffer_len) |
| Format Sensor Data. More...
|
|
wiced_result_t | wiced_bt_mesh_model_sensor_server_data (uint8_t element_idx, uint16_t property_id, void *p_ref_data) |
| Sensor Status send. More...
|
|
wiced_result_t | wiced_bt_mesh_model_sensor_server_setting_status_send (wiced_bt_mesh_event_t *p_event, uint16_t property_id, uint16_t setting_property_id) |
| Sensor Setting status. More...
|
|
The AIROC Mesh Sensor Server module provides a way for an application to implement a functionality for the devices that can be controlled using sensor.
To include the Mesh Models support for the Sensor Server module the application shall contain the WICED_BT_MESH_MODEL_SENSOR_SERVER
TBD
uint16_t wiced_bt_mesh_model_format_sensor_server_data |
( |
uint8_t |
element_idx, |
|
|
uint16_t |
property_id, |
|
|
uint8_t * |
p_buffer, |
|
|
uint16_t |
buffer_len |
|
) |
| |
Format Sensor Data.
An Application can call this function to format sensor data to be sent out. Function returns length of the data filled in the buffer. Property_id 0 means that we need to send data for all sensors of the element.
- Parameters
-
element_idx | Element Index where the sensor is located |
property_id | Property ID of the sensor for which sensor data shall be used. If Property ID is zero, the data will include all sensors of the element. |
p_buffer | Buffer to be filled with information |
buffer_len | size of the buffer |
- Returns
- number of bytess filled in the buffer.
Sensor Column Status send status.
- Parameters
-
p_event | Mesh event with the information about the message that has been received in the request, or created by the app for unsolicited message. |
column_status_data | pointer to the column data |
- Returns
- WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_sensor_server_data |
( |
uint8_t |
element_idx, |
|
|
uint16_t |
property_id, |
|
|
void * |
p_ref_data |
|
) |
| |
Sensor Status send.
- Parameters
-
element_idx | Element Index where the sensor is located |
property_id | Property ID of the sensor for which sensor data shall be reported. If Property ID is zero, the Status will include all sensors of the element. |
p_ref_data | If application is sending data based on the Get request from the library, the parameter should contain the values passed in the GET request. Should be zero otherwise. |
- Returns
- WICED_BT_SUCCESS if message has been queued for transmission.
void wiced_bt_mesh_model_sensor_server_init |
( |
uint8_t |
element_idx, |
|
|
wiced_bt_mesh_sensor_server_report_callback_t * |
p_report_callback, |
|
|
wiced_bt_mesh_sensor_server_config_callback_t * |
p_config_change_callback, |
|
|
wiced_bool_t |
is_provisioned |
|
) |
| |
Sensor Senosr Module initialization.
- Parameters
-
element_idx | Device element to where model is used |
p_report_callback | The application callback that will be executed on receiving a sensor get messages. |
p_config_change_callback | The application callback that will be executed to notify cadenence and setting changes. |
is_provisioned | If TRUE, the application is being restarted after being provisioned or after a power loss. If FALSE the model cleans up NVRAM on startup. |
- Returns
- None
wiced_bool_t wiced_bt_mesh_model_sensor_server_message_handler |
( |
wiced_bt_mesh_event_t * |
p_event, |
|
|
uint8_t * |
p_data, |
|
|
uint16_t |
data_len |
|
) |
| |
Sensor Server Message Handler.
An application or a parent model can call this models library function to process a message received from the Sensor Client device. The function parses the message and if appropriate calls the parent back to perform functionality.
- Parameters
-
p_event | Mesh event with information about received message. |
p_data | Pointer to the data portion of the message |
data_len | Length of the data in the message |
- Returns
- WICED_TRUE if the message is for this company ID/Model/Element Index combination, WICED_FALSE otherwise.
Sensor Series Status send status.
- Parameters
-
p_event | Mesh event with the information about the message that has been received in the request, or created by the app for unsolicited message. |
series_status_data | pointer to the series data |
- Returns
- WICED_BT_SUCCESS if message has been queued for transmission.
Sensor Setting status.
- Parameters
-
p_event | Mesh event with the information about the message that has been received in the request, or created by the app for unsolicited message. |
property_id | Property ID of the sensor for which Sensor Setting status shall be reported |
setting_property_id | Property ID of the Sensor Setting, that the Sensor Setting status shall be reported |
- Returns
- WICED_BT_SUCCESS if message has been queued for transmission.
wiced_bool_t wiced_bt_mesh_model_sensor_setup_server_message_handler |
( |
wiced_bt_mesh_event_t * |
p_event, |
|
|
uint8_t * |
p_data, |
|
|
uint16_t |
data_len |
|
) |
| |
Sensor Setup Server Message Handler.
An application or a parent model can call this models library function to process a message received from the Sensor Client device. The function parses the message and if appropriate calls the parent back to perform functionality.
- Parameters
-
p_event | Mesh event with information about received message. |
p_data | Pointer to the data portion of the message |
data_len | Length of the data in the message |
- Returns
- WICED_TRUE if the message is for this company ID/Model/Element Index combination, WICED_FALSE otherwise.