RA Flexible Software Package Documentation  Release v5.2.0

 
BLE Mesh Network Health Server (rm_mesh_health_srv)

Functions

fsp_err_t RM_MESH_HEALTH_SERVER_Open (rm_ble_mesh_health_server_ctrl_t *const p_ctrl, rm_ble_mesh_health_server_cfg_t const *const p_cfg)
 
fsp_err_t RM_MESH_HEALTH_SERVER_Close (rm_ble_mesh_health_server_ctrl_t *const p_ctrl)
 
fsp_err_t RM_MESH_HEALTH_SERVER_ReportFault (rm_ble_mesh_health_server_ctrl_t *const p_ctrl, const rm_ble_mesh_access_model_handle_t *const model_handle, uint8_t test_id, uint16_t company_id, uint8_t fault_code)
 
fsp_err_t RM_MESH_HEALTH_SERVER_PublishCurrentStatus (rm_ble_mesh_health_server_ctrl_t *const p_ctrl, uint8_t *status, uint16_t length)
 

Detailed Description

Overview

Target Devices

The BLE Mesh Network Health Server module supports the following devices.

Configuration

Build Time Configurations for rm_mesh_health_srv

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

ConfigurationOptionsDefaultDescription

Configurations for Networking > BLE Mesh Network modules > BLE Mesh Model Health Server (rm_mesh_health_srv)

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

ConfigurationOptionsDefaultDescription
Interrupts
Callback Provided when Timeout OccursName Must Be a Valid C SymbolNULL Callback provided when mesh health server ISR occurs
NameName Must Be a Valid C Symbolg_rm_mesh_health_srv0 Module name.
Company IDInvalid Company Id0 Select company id.
Number of Self TestsInvalid Number of Self Tests0 Select number of self tests.
Self TestsName Must Be a Valid C SymbolNULL Self test

Data Structures

struct  rm_mesh_health_server_instance_ctrl_t
 

Data Structure Documentation

◆ rm_mesh_health_server_instance_ctrl_t

struct rm_mesh_health_server_instance_ctrl_t

BLE mesh health server instance control block. DO NOT INITIALIZE. Initialization occurs when RM_MESH_HEALTH_SERVER_Open() is called.

Function Documentation

◆ RM_MESH_HEALTH_SERVER_Open()

fsp_err_t RM_MESH_HEALTH_SERVER_Open ( rm_ble_mesh_health_server_ctrl_t *const  p_ctrl,
rm_ble_mesh_health_server_cfg_t const *const  p_cfg 
)

API to initialize Health Server model. This is to initialize Health Server model and to register with Access layer.

Implements rm_ble_mesh_health_server_api_t::open.

Example:

/* Open the module. */
err = RM_MESH_HEALTH_SERVER_Open(&g_mesh_health_srv0_ctrl, &g_mesh_health_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_HEALTH_SERVER_Close()

fsp_err_t RM_MESH_HEALTH_SERVER_Close ( rm_ble_mesh_health_server_ctrl_t *const  p_ctrl)

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

Implements rm_ble_mesh_health_server_api_t::close.

Example:

/* Close the module. */
err = RM_MESH_HEALTH_SERVER_Close(&g_mesh_health_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_HEALTH_SERVER_ReportFault()

fsp_err_t RM_MESH_HEALTH_SERVER_ReportFault ( rm_ble_mesh_health_server_ctrl_t *const  p_ctrl,
const rm_ble_mesh_access_model_handle_t *const  model_handle,
uint8_t  test_id,
uint16_t  company_id,
uint8_t  fault_code 
)

API to report self-test fault. This is to report fault observed during self-test procedure.

Parameters
[in]p_ctrlrm_mesh_health_srv control block.
[in]model_handleModel Handle identifying the Health Server model instance.
[in]test_idIdentifier of the self-test.
[in]company_idCompany Identifier.
[in]fault_codeFault value indicating the error.
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.

◆ RM_MESH_HEALTH_SERVER_PublishCurrentStatus()

fsp_err_t RM_MESH_HEALTH_SERVER_PublishCurrentStatus ( rm_ble_mesh_health_server_ctrl_t *const  p_ctrl,
uint8_t *  status,
uint16_t  length 
)

API to publish current status.

Parameters
[in]p_ctrlrm_mesh_health_srv control block.
[in]statusCurrent status.
[in]lengthLength of status.
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.