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

The AIROC Mesh Location Client module provides a way for an application to configure the device with a Global or a Local Location data or to retrieve this data. More...

Typedefs

typedef void( wiced_bt_mesh_location_client_callback_t )(uint16_t event, wiced_bt_mesh_event_t *p_event, void *p_data)
 Location Client callback. More...
 

Functions

void wiced_bt_mesh_model_location_client_init (wiced_bt_mesh_location_client_callback_t *p_callback, wiced_bool_t is_provisioned)
 Location Client Module initialization. More...
 
wiced_bool_t wiced_bt_mesh_model_location_client_message_handler (wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)
 Location Client Message Handler. More...
 
wiced_result_t wiced_bt_mesh_model_location_client_send_global_get (wiced_bt_mesh_event_t *p_event)
 The application can call this function to send Global Location Get client message to the server. More...
 
wiced_result_t wiced_bt_mesh_model_location_client_send_global_set (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_location_global_data_t *p_location_data)
 The application can call this function to send Set Global Location client message to the server. More...
 
wiced_result_t wiced_bt_mesh_model_location_client_send_local_get (wiced_bt_mesh_event_t *p_event)
 The application can call this function to send Get Location client message to the server. More...
 
wiced_result_t wiced_bt_mesh_model_location_client_send_local_set (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_location_local_data_t *p_location_data)
 The application can call this function to send Set Location client message to the server. More...
 

Detailed Description

The AIROC Mesh Location Client module provides a way for an application to configure the device with a Global or a Local Location data or to retrieve this data.

The module can also process unsolicited status messages from mesh nodes.

On startup the application should call wiced_bt_mesh_model_location_client_init function providing the callback that will be called when location status message is received. The application can call the appropriate Get or Set function to retrieve or setup the Global or Local Location data on a specific mesh node.

Typedef Documentation

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

Location Client callback.

The Location Client callback is called by the Mesh Models library on receiving a message from the peer. Depending on the event, the p_data can contain he Global Location Data (see wiced_bt_mesh_location_global_data_t) or the Local Location Data (see wiced_bt_mesh_location_local_data_t). The application is responsible for releasing the p_event when it completes processing of the data.

Parameters
eventThe event that the application should process (see Mesh Location Events)
p_eventinformation about the message received including the message source address.
p_dataPointer to the data to send
Returns
None

Function Documentation

void wiced_bt_mesh_model_location_client_init ( wiced_bt_mesh_location_client_callback_t p_callback,
wiced_bool_t  is_provisioned 
)

Location Client Module initialization.

Parameters
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_location_client_message_handler ( wiced_bt_mesh_event_t p_event,
uint8_t *  p_data,
uint16_t  data_len 
)

Location Client Message Handler.

The Mesh Core library calls this function for each message received. The function returns WICED_TRUE if the message is destined for this specific model and successfully processed, and returns WICED_FALSE otherwise. 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_location_client_send_global_get ( wiced_bt_mesh_event_t p_event)

The application can call this function to send Global Location Get client message to the server.

The application can call this function to send Local Location Get client message to the server.

Parameters
p_eventMesh event created by the app for unsolicited message.
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_location_client_send_global_set ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_location_global_data_t p_location_data 
)

The application can call this function to send Set Global Location client message to the server.

Parameters
p_eventMesh event with the information about the message that has been created by the app for unsolicited message.
p_dataPointer to the data to send
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_location_client_send_local_get ( wiced_bt_mesh_event_t p_event)

The application can call this function to send Get Location client message to the server.

Parameters
p_eventMesh event created by the app for unsolicited message.
Returns
WICED_BT_SUCCESS if message has been queued for transmission.
wiced_result_t wiced_bt_mesh_model_location_client_send_local_set ( wiced_bt_mesh_event_t p_event,
wiced_bt_mesh_location_local_data_t p_location_data 
)

The application can call this function to send Set Location client message to the server.

Parameters
p_eventMesh event created by the app for unsolicited message.
p_dataPointer to the data to send
Returns
WICED_BT_SUCCESS if message has been queued for transmission.