RA Flexible Software Package Documentation  Release v5.2.0

 
BLE Mesh Network Light Hsl Server (rm_mesh_light_hsl_srv)

Functions

fsp_err_t RM_MESH_LIGHT_HSL_SRV_Open (rm_ble_mesh_model_server_ctrl_t *const p_ctrl, rm_ble_mesh_model_server_cfg_t const *const p_cfg)
 
fsp_err_t RM_MESH_LIGHT_HSL_SRV_Close (rm_ble_mesh_model_server_ctrl_t *const p_ctrl)
 
fsp_err_t RM_MESH_LIGHT_HSL_SRV_StateUpdate (rm_ble_mesh_model_server_ctrl_t *const p_ctrl, rm_ble_mesh_access_server_state_t const *const p_state)
 
fsp_err_t RM_MESH_LIGHT_HSL_SRV_HueServerStateUpdate (rm_ble_mesh_model_server_ctrl_t *const p_ctrl, rm_ble_mesh_access_server_state_t const *const p_state)
 
fsp_err_t RM_MESH_LIGHT_HSL_SRV_SaturationServerStateUpdate (rm_ble_mesh_model_server_ctrl_t *const p_ctrl, rm_ble_mesh_access_server_state_t const *const p_state)
 

Detailed Description

Overview

Target Devices

The BLE Mesh Network Light Hsl Server module supports the following devices.

Configuration

Build Time Configurations for rm_mesh_light_hsl_srv

The following build time configurations are defined in fsp_cfg/rm_mesh_light_hsl_srv_cfg.h:

ConfigurationOptionsDefaultDescription

Configurations for Networking > BLE Mesh Network modules > BLE Mesh Model Light HSL Server (rm_mesh_light_hsl_srv)

This module can be added to the Stacks tab via New Stack > Networking > BLE Mesh Network modules > BLE Mesh Model Light HSL Server (rm_mesh_light_hsl_srv).

ConfigurationOptionsDefaultDescription
Interrupts
Callback Provided when Timeout OccursName Must Be a Valid C SymbolNULL Callback provided when mesh light HSL server ISR occurs
Callback Provided when an Timeout ISR OccursName Must Be a Valid C SymbolNULL Callback provided when mesh light HSL server timeout ISR occurs
NameName Must Be a Valid C Symbolg_rm_mesh_light_hsl_srv0 Module name.

Data Structures

struct  rm_mesh_light_hsl_srv_info_t
 
struct  rm_mesh_light_hsl_srv_target_info_t
 
struct  rm_mesh_light_hsl_srv_default_info_t
 
struct  rm_mesh_light_hsl_srv_hue_info_t
 
struct  rm_mesh_light_hsl_srv_saturation_info_t
 
struct  rm_mesh_light_hsl_srv_range_info_t
 
struct  rm_mesh_light_hsl_srv_extended_cfg_t
 
struct  rm_mesh_light_hsl_srv_instance_ctrl_t
 

Data Structure Documentation

◆ rm_mesh_light_hsl_srv_info_t

struct rm_mesh_light_hsl_srv_info_t

Light HSL state is a composite state that includes the Light HSL Lighness, the Light HSL Hue and the Light HSL Saturation states

Data Fields
uint16_t hsl_lightness

The perceived lightness of a light emitted by the element

uint16_t target_hsl_lightness

Target Perceived lightness - used in the response path

uint16_t hsl_hue

The 16-bit value representing the hue

uint16_t target_hsl_hue

Target hue - used in the response path

uint16_t hsl_saturation

The saturation of a color light

uint16_t target_hsl_saturation

Target saturation - used in the response path

uint8_t tid

TID - Used in request path

uint8_t transition_time

Transition Time - Used in request path. Used as remaining time in response path.

uint8_t delay

Delay - Used in request path

uint16_t transition_time_handle

Transition Timer Handle

◆ rm_mesh_light_hsl_srv_target_info_t

struct rm_mesh_light_hsl_srv_target_info_t

Light HSL Target state is a composite state that includes the Light HSL Lighness, the Light HSL Hue and the Light HSL Saturation states

Data Fields
uint16_t hsl_lightness

The perceived lightness of a light emitted by the element

uint16_t hsl_hue

The 16-bit value representing the hue

uint16_t hsl_saturation

The saturation of a color light

◆ rm_mesh_light_hsl_srv_default_info_t

struct rm_mesh_light_hsl_srv_default_info_t

Light HSL Default state is a composite state that includes the Light HSL Lighness, the Light HSL Hue and the Light HSL Saturation states

Data Fields
uint16_t hsl_lightness

The perceived lightness of a light emitted by the element

uint16_t hsl_hue

The 16-bit value representing the hue

uint16_t hsl_saturation

The saturation of a color light

◆ rm_mesh_light_hsl_srv_hue_info_t

struct rm_mesh_light_hsl_srv_hue_info_t

Light HSL Hue

Data Fields
uint16_t hsl_hue

The 16-bit value representing the hue

◆ rm_mesh_light_hsl_srv_saturation_info_t

struct rm_mesh_light_hsl_srv_saturation_info_t

Light HSL Saturation

Data Fields
uint16_t hsl_saturation

The saturation of a color light

◆ rm_mesh_light_hsl_srv_range_info_t

struct rm_mesh_light_hsl_srv_range_info_t

Light HSL Range state is a composite state that includes Minimum and Maximum of the Light HSL Hue and the Light HSL Saturation states

Data Fields
uint16_t hue_range_min

The value of the Hue Range Min field of the Light HSL Hue Range state

uint16_t hue_range_max

The value of the Hue Range Max field of the Light HSL Hue Range state

uint16_t saturation_range_min

The value of the Saturation Range Min field of the Light HSL Saturation Range state

uint16_t saturation_range_max

The value of the Saturation Range Max field of the Light HSL Saturation Range state

uint8_t status

Status - Used only in response path

◆ rm_mesh_light_hsl_srv_extended_cfg_t

struct rm_mesh_light_hsl_srv_extended_cfg_t

BLE mesh light hsl extension for BLE mesh light hsl.

Data Fields
rm_ble_mesh_access_instance_t
const *
p_hue_access_instance Pointer to access instance for hue model.
rm_ble_mesh_access_instance_t
const *
p_saturation_access_instance Pointer to access instance for saturation model.

◆ rm_mesh_light_hsl_srv_instance_ctrl_t

struct rm_mesh_light_hsl_srv_instance_ctrl_t

BLE mesh light hsl instance control block. DO NOT INITIALIZE. Initialization occurs when RM_MESH_LIGHT_HSL_SRV_Open() is called.

Function Documentation

◆ RM_MESH_LIGHT_HSL_SRV_Open()

fsp_err_t RM_MESH_LIGHT_HSL_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_Hsl Server/Light_Hsl_Hue Server/Light_Hsl_Saturation Server model.

  1. This is to initialize Light_Hsl Server model and to register with Access layer.
  2. This is to initialize Light_Hsl_Hue Server model and to register with Access layer.
  3. This is to initialize Light_Hsl_Saturation Server model and to register with Access layer.

Implements rm_ble_mesh_model_server_api_t::open.

Example:

/* Open the module. */
err = RM_MESH_LIGHT_HSL_SRV_Open(&g_mesh_light_hsl_srv0_ctrl, &g_mesh_light_hsl_srv0_cfg);
Return values
FSP_SUCCESSModel opened successfully.
FSP_ERR_ASSERTIONPointer to control block or configuration structure is NULL.
FSP_ERR_ALREADY_OPENModel is already open.
FSP_ERR_NOT_FOUNDThe number of models has exceeded the limit.
FSP_ERR_ABORTEDModel initialization is failed.

◆ RM_MESH_LIGHT_HSL_SRV_Close()

fsp_err_t RM_MESH_LIGHT_HSL_SRV_Close ( rm_ble_mesh_model_server_ctrl_t *const  p_ctrl)

API to terminate Light_Hsl Server model. This is to terminate Light_Hsl Server model and to register with Access layer.

Implements rm_ble_mesh_model_server_api_t::close.

Example:

/* Close the module. */
err = RM_MESH_LIGHT_HSL_SRV_Close(&g_mesh_light_hsl_srv0_ctrl);
Return values
FSP_SUCCESSModel successfully closed.
FSP_ERR_ASSERTIONThe parameter p_ctrl is NULL.
FSP_ERR_NOT_OPENModel is not open.

◆ RM_MESH_LIGHT_HSL_SRV_StateUpdate()

fsp_err_t RM_MESH_LIGHT_HSL_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:

/* Update server status. */
err = RM_MESH_LIGHT_HSL_SRV_StateUpdate(&g_mesh_light_hsl_srv0_ctrl, &state);
Return values
FSP_SUCCESSUpdated server status successfully.
FSP_ERR_ASSERTIONThe parameter p_ctrl is NULL.
FSP_ERR_INVALID_POINTERThe parameter p_state is NULL.
FSP_ERR_NOT_OPENModel is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter is invalid.
FSP_ERR_APPROXIMATIONLower layer is invalid state.
FSP_ERR_NOT_FOUNDInput parameter is not found.
FSP_ERR_INVALID_ADDRESSInvalid source address.
FSP_ERR_OUT_OF_MEMORYMemory allocation is failed.
FSP_ERR_OVERFLOWTX queue is full.
FSP_ERR_UNDERFLOWTX queue is empty.
FSP_ERR_ABORTEDOperation is failed.

◆ RM_MESH_LIGHT_HSL_SRV_HueServerStateUpdate()

fsp_err_t RM_MESH_LIGHT_HSL_SRV_HueServerStateUpdate ( 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.

Parameters
[in]p_ctrlrm_mesh_light_hsl_srv control block.
[in]p_stateTo send reply for a request or to inform change in state.
Return values
FSP_SUCCESSOperation succeeded.
FSP_ERR_ASSERTIONThe parameter p_ctrl is NULL.
FSP_ERR_INVALID_POINTERThe parameter p_state is NULL.
FSP_ERR_NOT_OPENModel is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter is invalid.
FSP_ERR_APPROXIMATIONLower layer is invalid state.
FSP_ERR_NOT_FOUNDInput parameter is not found.
FSP_ERR_INVALID_ADDRESSInvalid source address.
FSP_ERR_OUT_OF_MEMORYMemory allocation is failed.
FSP_ERR_OVERFLOWTX queue is full.
FSP_ERR_UNDERFLOWTX queue is empty.
FSP_ERR_ABORTEDOperation is failed.

◆ RM_MESH_LIGHT_HSL_SRV_SaturationServerStateUpdate()

fsp_err_t RM_MESH_LIGHT_HSL_SRV_SaturationServerStateUpdate ( 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.

Parameters
[in]p_ctrlrm_mesh_light_hsl_srv control block.
[in]p_stateTo send reply for a request or to inform change in state.
Return values
FSP_SUCCESSOperation succeeded.
FSP_ERR_ASSERTIONThe parameter p_ctrl is NULL.
FSP_ERR_INVALID_POINTERThe parameter p_state is NULL.
FSP_ERR_NOT_OPENModel is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter is invalid.
FSP_ERR_APPROXIMATIONLower layer is invalid state.
FSP_ERR_NOT_FOUNDInput parameter is not found.
FSP_ERR_INVALID_ADDRESSInvalid source address.
FSP_ERR_OUT_OF_MEMORYMemory allocation is failed.
FSP_ERR_OVERFLOWTX queue is full.
FSP_ERR_UNDERFLOWTX queue is empty.
FSP_ERR_ABORTEDOperation is failed.