AIROC™ BTSDK v4.7 - Documentation | ||||
The AIROC Mesh Light LC Server module provides a way for an application to implement a Light Control Server device which can be a client to a Sensor Server model and controls the Light Lightness Actual state via defined state bindings. More...
Typedefs | |
typedef void( | wiced_bt_mesh_light_lc_server_callback_t )(uint8_t element_idx, uint16_t event, void *p_data) |
Light Control Setup Server callback is called by the Mesh Models library on receiving a message from the peer Application or higher level model should be able process messages for the Light LC Setup server model as well as bound models including generic Light Lightness, Power On/Off, Generic Level and Generic On/Off. More... | |
Functions | |
wiced_bool_t | wiced_bt_mesh_model_light_lc_server_message_handler (wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len) |
Light LC Server Message Handler. More... | |
wiced_bool_t | wiced_bt_mesh_model_light_lc_setup_server_message_handler (wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len) |
Light LC Setup Server Message Handler. More... | |
wiced_result_t | wiced_bt_mesh_model_light_lc_server_send_status (wiced_bt_mesh_event_t *p_event, wiced_bt_mesh_light_lightness_status_data_t *p_data) |
An application or a a parent model can call this function to send Light Lightness Status message to the Client. More... | |
void | wiced_bt_mesh_model_light_lc_mode_changed (uint8_t element_idx, wiced_bt_mesh_light_lc_mode_set_data_t *p_status) |
Light LC Server Mode Changed. More... | |
void | wiced_bt_mesh_model_light_lc_occupancy_mode_changed (uint8_t element_idx, wiced_bt_mesh_light_lc_occupancy_mode_set_data_t *p_status) |
Light LC Server Occupancy Mode Changed. More... | |
void | wiced_bt_mesh_model_light_lc_occupancy_detected (uint8_t element_idx) |
Light LC Server Occupancy Detected. More... | |
void | wiced_bt_mesh_model_light_lc_onoff_changed (uint8_t element_idx, wiced_bt_mesh_onoff_set_data_t *p_status) |
Light LC Server OnOff Changed. More... | |
void | wiced_bt_mesh_model_light_lc_property_changed (uint8_t element_idx) |
Light LC Property Changed. More... | |
uint16_t | wiced_bt_mesh_model_light_lc_server_scene_store_handler (uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len) |
Light LC Server Scene Store Handler. More... | |
uint16_t | wiced_bt_mesh_model_light_lc_server_scene_recall_handler (uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len, uint32_t transition_time, uint32_t delay) |
Light LC Server Scene Store Handler. More... | |
void | wiced_bt_mesh_model_light_lc_server_init (uint8_t element_idx, wiced_bt_mesh_light_lc_server_callback_t *p_callback, wiced_bool_t is_provisioned) |
Light LC Setup Server Module initialization. More... | |
The AIROC Mesh Light LC Server module provides a way for an application to implement a Light Control Server device which can be a client to a Sensor Server model and controls the Light Lightness Actual state via defined state bindings.
To include the Mesh Models support for the LC Server module the application shall contain the WICED_BT_MESH_MODEL_LIGHT_LC_SERVER
TBD
typedef void( wiced_bt_mesh_light_lc_server_callback_t)(uint8_t element_idx, uint16_t event, void *p_data) |
Light Control Setup Server callback is called by the Mesh Models library on receiving a message from the peer Application or higher level model should be able process messages for the Light LC Setup server model as well as bound models including generic Light Lightness, Power On/Off, Generic Level and Generic On/Off.
event | The event that the application should process (see LIGHT_LIGHTNESS_EVENT Light Lightness Events, On/Off Events, LEVEL_EVENT Level Events") |
p_event | information about the message received. The same pointer should be used in the reply if required. |
p_data | Pointer to the data structure specific to the event |
void wiced_bt_mesh_model_light_lc_mode_changed | ( | uint8_t | element_idx, |
wiced_bt_mesh_light_lc_mode_set_data_t * | p_status | ||
) |
Light LC Server Mode Changed.
Application should call this function when LC Mode is changed locally
element_idx | Element index where the LC Model is located |
p_status | Pointer to the structure with the new mode |
void wiced_bt_mesh_model_light_lc_occupancy_detected | ( | uint8_t | element_idx | ) |
Light LC Server Occupancy Detected.
Application should call this function when LC Occupancy is detected locally
element_idx | Element index where the LC Model is located |
void wiced_bt_mesh_model_light_lc_occupancy_mode_changed | ( | uint8_t | element_idx, |
wiced_bt_mesh_light_lc_occupancy_mode_set_data_t * | p_status | ||
) |
Light LC Server Occupancy Mode Changed.
Application should call this function when LC Occupancy Mode is changed locally
element_idx | Element index where the LC Model is located |
p_status | Pointer to the structure with the new mode |
void wiced_bt_mesh_model_light_lc_onoff_changed | ( | uint8_t | element_idx, |
wiced_bt_mesh_onoff_set_data_t * | p_status | ||
) |
Light LC Server OnOff Changed.
Application should call this function when LC Light OnOff is changed locally
element_idx | Element index where the LC Model is located |
p_status | Pointer to the structure with the new Light OnOff State |
void wiced_bt_mesh_model_light_lc_property_changed | ( | uint8_t | element_idx | ) |
Light LC Property Changed.
Application should call this function when an LC LC property is changed locally
element_idx | Element index where the LC Model is located |
void wiced_bt_mesh_model_light_lc_server_init | ( | uint8_t | element_idx, |
wiced_bt_mesh_light_lc_server_callback_t * | p_callback, | ||
wiced_bool_t | is_provisioned | ||
) |
Light LC Setup Server Module initialization.
A Mesh application which contains Light LC Setup Server (for example a dimmable bulb) should call this function for each element where the Light LC Server is present (for example for each bulb).
element_idx | Device element to where model is used |
p_callback | Application or Parent model callback that will be executed on receiving a message |
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. |
wiced_bool_t wiced_bt_mesh_model_light_lc_server_message_handler | ( | wiced_bt_mesh_event_t * | p_event, |
uint8_t * | p_data, | ||
uint16_t | data_len | ||
) |
Light LC Server 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.
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 |
uint16_t wiced_bt_mesh_model_light_lc_server_scene_recall_handler | ( | uint8_t | element_idx, |
uint8_t * | p_buffer, | ||
uint16_t | buffer_len, | ||
uint32_t | transition_time, | ||
uint32_t | delay | ||
) |
Light LC Server Scene Store Handler.
When Scene Server receives Scene Recall message it calls this function with data previously stored in the NVRAM.
element_idx | Element index for which scene information is being recalled |
p_buffer | Pointer to a buffer where model's data is located |
buf_size | Maximum amount of data a model can get from the buffer |
transition_time | Specified time in milliseconds to transition to the target state |
delay | Specifies time in milliseconds before starting to transition to the target state |
uint16_t wiced_bt_mesh_model_light_lc_server_scene_store_handler | ( | uint8_t | element_idx, |
uint8_t * | p_buffer, | ||
uint16_t | buffer_len | ||
) |
Light LC Server Scene Store Handler.
The mesh Scene Server calls this function so that the module can store required data for the scene.
element_idx | Element index for which scene information is being stored |
p_buffer | Pointer to a buffer where data should be stored |
buf_size | Maximum amount of data a model can store |
wiced_result_t wiced_bt_mesh_model_light_lc_server_send_status | ( | wiced_bt_mesh_event_t * | p_event, |
wiced_bt_mesh_light_lightness_status_data_t * | p_data | ||
) |
An application or a a parent model can call this function to send Light Lightness Status message to the Client.
The mesh event should contain information if this is a reply or an unsolicited message.
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. |
p_data | Pointer to the status data |
wiced_bool_t wiced_bt_mesh_model_light_lc_setup_server_message_handler | ( | wiced_bt_mesh_event_t * | p_event, |
uint8_t * | p_data, | ||
uint16_t | data_len | ||
) |
Light LC Setup Server 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.
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 |