Infineon Logo AIROC BTSDK v4.1 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Mesh Sensor Client

The AIROC Mesh Sensor Client module provides a way for an application to control Sensor Servers in the mesh network. More...

Typedefs

typedef void( wiced_bt_mesh_sensor_client_callback_t )(uint16_t event, wiced_bt_mesh_event_t *p_event, void *p_data)
 Sensor Client callback is called by the Mesh Models library on receiving a message from the peer. More...
 

Functions

void wiced_bt_mesh_model_sensor_client_init (uint8_t element_idx, wiced_bt_mesh_sensor_client_callback_t *p_callback, wiced_bool_t is_provisioned)
 Sensor Client Module initialization. More...
 
wiced_bool_t wiced_bt_mesh_model_sensor_client_message_handler (wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)
 Sensor client Message Handler. More...
 
wiced_result_t wiced_bt_mesh_model_sensor_client_descriptor_send_get (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_get_t *desc_get_data)
 Sensor Descriptor get. More...
 
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_send_get (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_get_t *sensor_get)
 Sensor Data get. More...
 
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_column_send_get (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_column_get_data_t *column_data)
 Sensor Column get. More...
 
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_series_send_get (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_series_get_data_t *series_data)
 Sensor Series get. More...
 
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_setting_send_get (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_setting_get_data_t *setting_data)
 Sensor Setting get. More...
 
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_settings_send_get (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_get_t *settings_data)
 Sensor Settings get. More...
 
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_setting_send_set (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_setting_set_data_t *setting_data)
 Sensor Setting set. More...
 
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_cadence_send_get (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_get_t *cadence_data)
 Sensor Cadence get. More...
 
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_cadence_send_set (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_sensor_cadence_set_data_t *cadence_set)
 Sensor Cadence set. More...
 

Detailed Description

The AIROC Mesh Sensor Client module provides a way for an application to control Sensor Servers in the mesh network.

To include the Mesh Models support for the Sensor Client module the application shall contain the WICED_BT_MESH_MODEL_SENSOR_CLIENT

TBD

Typedef Documentation

typedef void( wiced_bt_mesh_sensor_client_callback_t)(uint16_t event, wiced_bt_mesh_event_t *p_event, void *p_data)

Sensor Client callback is called by the Mesh Models library on receiving a message from the peer.

Parameters
eventThe event that the application should process (see Mesh Light LC Events)
p_eventinformation about the message received. The same pointer should be used in the reply if required.
p_dataPointer to the data to send
Returns
None

Function Documentation

wiced_result_t wiced_bt_mesh_model_sensor_client_descriptor_send_get ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_sensor_get_t desc_get_data 
)

Sensor Descriptor get.

Parameters
p_eventMesh event with the information about the message that has been received in the request, or created by the app for unsolicited message.
desc_get_datapointer to descriptor get values
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
void wiced_bt_mesh_model_sensor_client_init ( uint8_t  element_idx,
wiced_bt_mesh_sensor_client_callback_t p_callback,
wiced_bool_t  is_provisioned 
)

Sensor Client Module initialization.

Parameters
element_idxDevice element to where model is used
p_callbackThe application callback function that will be executed by the mesh models library when application action is required, or when a reply for the application request has been received.
is_provisionedIf 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_client_message_handler ( wiced_bt_mesh_event_t p_event,
uint8_t *  p_data,
uint16_t  data_len 
)

Sensor client Message Handler.

An application or a parent model can call this models library function to process a message received from the Sensor Server device. The function parses the message and if appropriate calls the parent back to perform functionality.

Parameters
p_eventMesh event with information about received message.
p_dataPointer to the data portion of the message
data_lenLength of the data in the message
Returns
WICED_TRUE if the message is for this company ID/Model/Element Index combination, WICED_FALSE otherwise.
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_cadence_send_get ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_sensor_get_t cadence_data 
)

Sensor Cadence get.

Parameters
p_eventMesh event with the information about the message that has been received in the request, or created by the app for unsolicited message.
cadence_datapointer to data portion of the cadence get message
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_cadence_send_set ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_sensor_cadence_set_data_t cadence_set 
)

Sensor Cadence set.

Parameters
p_eventMesh event with the information about the message that has been received in the request, or created by the app for unsolicited message.
cadence_setpointer to data portion of the cadence set message
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_column_send_get ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_sensor_column_get_data_t column_data 
)

Sensor Column get.

Parameters
p_eventMesh event with the information about the message that has been received in the request, or created by the app for unsolicited message.
column_datapointer to data portion of the sensor column get message
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_send_get ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_sensor_get_t sensor_get 
)

Sensor Data get.

Parameters
p_eventMesh event with the information about the message that has been received in the request, or created by the app for unsolicited message.
sensor_getpointer to the sensor data to be received
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_series_send_get ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_sensor_series_get_data_t series_data 
)

Sensor Series get.

Parameters
p_eventMesh event with the information about the message that has been received in the request, or created by the app for unsolicited message.
series_datapointer to data portion of the sensor series get message
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_setting_send_get ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_sensor_setting_get_data_t setting_data 
)

Sensor Setting get.

Parameters
p_eventMesh event with the information about the message that has been received in the request, or created by the app for unsolicited message.
setting_datapointer to data portion of the sensor setting get message
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_setting_send_set ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_sensor_setting_set_data_t setting_data 
)

Sensor Setting set.

Parameters
p_eventMesh event with the information about the message that has been received in the request, or created by the app for unsolicited message.
setting_datapointer to data portion of the sensor settings get message
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_sensor_client_sensor_settings_send_get ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_sensor_get_t settings_data 
)

Sensor Settings get.

Parameters
p_eventMesh event with the information about the message that has been received in the request, or created by the app for unsolicited message.
settings_datapointer to data portion of the sensor settings get message
Returns
WICED_BT_SUCCESS if message has been queued for transmission.