RA Flexible Software Package Documentation
Release v5.2.0
|
|
The BLE Mesh Network Light Location Server module supports the following devices.
Configuration | Options | Default | Description |
---|
Configuration | Options | Default | Description |
---|---|---|---|
Interrupts | |||
Callback Provided when Timeout Occurs | Name Must Be a Valid C Symbol | NULL | Callback provided when mesh light lightness controller server ISR occurs |
Callback Provided when an Timeout ISR Occurs | Name Must Be a Valid C Symbol | NULL | Callback provided when mesh light lightness controller server timeout ISR occurs |
Name | Name Must Be a Valid C Symbol | g_rm_mesh_light_lc_srv0 | Module name. |
Data Structures | |
struct | rm_mesh_light_lc_srv_scenario_t |
struct | rm_mesh_light_lc_srv_mode_info_t |
struct | rm_mesh_light_lc_srv_om_info_t |
struct | rm_mesh_light_lc_srv_light_onoff_info_t |
struct | rm_mesh_light_lc_srv_property_id_info_t |
struct | rm_mesh_light_lc_srv_property_info_t |
struct | rm_mesh_light_lc_srv_extended_callback_args_t |
struct | rm_mesh_light_lc_srv_instance_ctrl_t |
Enumerations | |
enum | rm_ble_mesh_light_lc_srv_event_t |
enum | rm_ble_mesh_light_lc_srv_state_t |
enum | rm_mesh_light_lc_srv_light_state_t |
struct rm_mesh_light_lc_srv_scenario_t |
Light LC Server State Info
Data Fields | ||
---|---|---|
rm_ble_mesh_light_lc_srv_state_t | state |
Light LC Server Current Scenario |
uint32_t | remaining_time_in_ms |
Remaining Time in current scenario |
uint8_t | occupancy_mode |
Light LC Occupancy Mode Value |
uint8_t | mode |
Light LC Mode Value |
rm_mesh_light_lc_srv_light_state_t | present_light_state |
Current Light LC ONOFF State |
rm_mesh_light_lc_srv_light_state_t | target_light_state |
Target Light LC ONOFF State |
struct rm_mesh_light_lc_srv_mode_info_t |
struct rm_mesh_light_lc_srv_om_info_t |
struct rm_mesh_light_lc_srv_light_onoff_info_t |
Light LC Light OnOff State
struct rm_mesh_light_lc_srv_property_id_info_t |
struct rm_mesh_light_lc_srv_property_info_t |
struct rm_mesh_light_lc_srv_extended_callback_args_t |
Light LC Property state
Data Fields | ||
---|---|---|
rm_ble_mesh_access_model_handle_t * | p_handle | Access model handle. |
rm_ble_mesh_light_lc_srv_event_t | event_type | Application events defined for Light LC Server Model. |
uint8_t * | p_event_data | Event data. |
uint16_t | event_data_length | Event data length. |
struct rm_mesh_light_lc_srv_instance_ctrl_t |
BLE mesh light lc instance control block. DO NOT INITIALIZE. Initialization occurs when RM_MESH_LIGHT_LC_SRV_Open() is called.
Light LC light event
Light LC state
fsp_err_t RM_MESH_LIGHT_LC_SRV_Open | ( | rm_ble_mesh_model_server_ctrl_t *const | p_ctrl, |
rm_ble_mesh_model_server_cfg_t const *const | p_cfg | ||
) |
API to initialize Light_Lc Server model. This is to initialize Light_Lc Server model and to register with Access layer.
Implements rm_ble_mesh_model_server_api_t::open.
Example:
FSP_SUCCESS | Model opened successfully. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_ALREADY_OPEN | Model is already open. |
FSP_ERR_NOT_FOUND | The number of models has exceeded the limit. |
FSP_ERR_ABORTED | Model initialization is failed. |
fsp_err_t RM_MESH_LIGHT_LC_SRV_Close | ( | rm_ble_mesh_model_server_ctrl_t *const | p_ctrl | ) |
API to terminate Light_Lc Server model. This is to terminate Light_Lc Server model and to register with Access layer.
Implements rm_ble_mesh_model_server_api_t::close.
Example:
FSP_SUCCESS | Model successfully closed. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
fsp_err_t RM_MESH_LIGHT_LC_SRV_StateUpdate | ( | rm_ble_mesh_model_server_ctrl_t *const | p_ctrl, |
rm_ble_mesh_access_server_state_t const *const | p_state | ||
) |
API to send reply or to update state change. This is to send reply for a request or to inform change in state.
Implements rm_ble_mesh_model_server_api_t::stateUpdate.
Example:
FSP_SUCCESS | Updated server status successfully. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_state is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
FSP_ERR_APPROXIMATION | Lower layer is invalid state. |
FSP_ERR_NOT_FOUND | Input parameter is not found. |
FSP_ERR_INVALID_ADDRESS | Invalid source address. |
FSP_ERR_OUT_OF_MEMORY | Memory allocation is failed. |
FSP_ERR_OVERFLOW | TX queue is full. |
FSP_ERR_UNDERFLOW | TX queue is empty. |
FSP_ERR_ABORTED | Operation is failed. |
fsp_err_t RM_MESH_LIGHT_LC_SRV_SetTimeProperty | ( | rm_ble_mesh_model_server_ctrl_t *const | p_ctrl, |
rm_ble_mesh_model_server_device_property_t | property, | ||
uint32_t | time_in_ms | ||
) |
API to set Light LC Sever Specific Time Properties. This is to update the Light LC Module with any Light Control Time Properties values. Typically these LC Time properties will be needed to be updated or informed to the Light LC Module during Power-Up, Scene Recall/Restore related scenario or when ever the Local application desires to enforce an update in these device properties values. Currently this interface handles only Time related Device Properties of Light LC Module like: RM_BLE_MESH_MODEL_SERVER_DEVICE_PROPERTY_LIGHT_CONTROL_TIME_OCCUPANCY_DELAY RM_BLE_MESH_MODEL_SERVER_DEVICE_PROPERTY_LIGHT_CONTROL_TIME_FADE_ON RM_BLE_MESH_MODEL_SERVER_DEVICE_PROPERTY_LIGHT_CONTROL_TIME_RUN_ON RM_BLE_MESH_MODEL_SERVER_DEVICE_PROPERTY_LIGHT_CONTROL_TIME_FADE RM_BLE_MESH_MODEL_SERVER_DEVICE_PROPERTY_LIGHT_CONTROL_TIME_PROLONG RM_BLE_MESH_MODEL_SERVER_DEVICE_PROPERTY_LIGHT_CONTROL_TIME_FADE_STANDBY_AUTO RM_BLE_MESH_MODEL_SERVER_DEVICE_PROPERTY_LIGHT_CONTROL_TIME_FADE_STANDBY_MANUAL
[in] | p_ctrl | Pointer to control structure. |
[in] | property | LC Server Device Property ID |
[in] | time_in_ms | Related Device Property Value time in milliseconds |
Example:
FSP_SUCCESS | Set the Light Control Time Properties values successfully. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_MESH_LIGHT_LC_SRV_SetScenario | ( | rm_ble_mesh_model_server_ctrl_t *const | p_ctrl, |
rm_mesh_light_lc_srv_scenario_t const *const | p_scenario | ||
) |
API to locally trigger the Light LC Server state machine from the application. This typically is used in Power-Up or Scene Recall/Restore Scenario where the Application could trigger the Light LC Server from any desired LC State.
Example:
[in] | p_ctrl | Pointer to control structure. |
[in] | p_scenario | Pointer to rm_mesh_light_lc_srv_scenario_t where Light LC Server State Informations are present |
FSP_SUCCESS | Updated scenario successfully. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_scenario is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_MESH_LIGHT_LC_SRV_GetCurrentScenario | ( | rm_ble_mesh_model_server_ctrl_t *const | p_ctrl, |
rm_mesh_light_lc_srv_scenario_t *const | p_scenario | ||
) |
API to fetch the Light LC Server state machine related information from the Light LC Server Module. This typically is used in Power-Up or Scene Recall/Restore Scenario where the Application uses this to fetch and persistently store the Light LC State related details.
Example:
[in] | p_ctrl | Pointer to control structure. |
[out] | p_scenario | Pointer to rm_mesh_light_lc_srv_scenario_t where Light LC Server State Informations are present |
FSP_SUCCESS | Fetch information successfully. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_scenario is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
fsp_err_t RM_MESH_LIGHT_LC_SRV_ReportOccupancy | ( | rm_ble_mesh_model_server_ctrl_t *const | p_ctrl | ) |
API to report any occupancy to Light LC Server Model.
Example:
[in] | p_ctrl | Pointer to control structure. |
FSP_SUCCESS | Updated server status successfully. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
fsp_err_t RM_MESH_LIGHT_LC_SRV_ReportLightOnOff | ( | rm_ble_mesh_model_server_ctrl_t *const | p_ctrl, |
rm_mesh_light_lc_srv_light_state_t | state | ||
) |
API to report any Light ON or OFF to Light LC Server Model. There could be many triggering factors to this Light related ON/OFF events from the upper layer. This API could be used for the following scenarios
Example:
[in] | p_ctrl | Pointer to control structure. |
[in] | state | Desired state value of Light LC ONOFF. |
FSP_SUCCESS | Updated server status successfully. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |