RA Flexible Software Package Documentation
Release v5.2.0
|
|
The BLE Mesh Network Network module supports the following devices.
Configuration | Options | Default | Description |
---|
Configuration | Options | Default | Description |
---|---|---|---|
General | |||
Name | Name Must Be a Valid C Symbol | g_rm_ble_mesh_network0 | Module name. |
Channel Number | Invalid Channel Number | 0 | Select channel corresponding to the channel number of the hardware. |
Ignore Netcache Wrapping |
| Dropped | Ignore netcache wrapping. |
RX Callback Event Enable |
| Disabled | Whether to enable the RX callback event or not. |
TX Callback Event Enable |
| Disabled | Whether to enable the TX callback event or not. |
Callback | Name Must Be a Valid C Symbol | NULL | Callback function name. |
Data Structures | |
struct | rm_ble_mesh_network_instance_ctrl_t |
struct rm_ble_mesh_network_instance_ctrl_t |
RM_BLE_MESH_NETWORK private control block. DO NOT MODIFY. Initialization occurs when RM_BLE_MESH_NETWORK_Open() is called.
fsp_err_t RM_BLE_MESH_NETWORK_Open | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_cfg_t const *const | p_cfg | ||
) |
Register Inerface with Network Layer. This routine registers interface with the Network Layer. Network Layer supports only one upper layer, hence this routine shall be called once.
Implements rm_ble_mesh_network_api_t::open.
Example:
FSP_SUCCESS | Module opened successfully. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_INVALID_STATE | Lower layer is invalid state. |
FSP_ERR_ALREADY_OPEN | Module is already open. |
fsp_err_t RM_BLE_MESH_NETWORK_Close | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl | ) |
Unregister Inerface with Network Layer. Implements rm_ble_mesh_network_api_t::close.
Example:
FSP_SUCCESS | Module successfully closed. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_NETWORK_BroadcastSecureBeacon | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_subnet_handle_t | subnet_handle | ||
) |
API to send Secure Network Beacon. This routine sends Secure Network Beacon for the given subnet handle.
Implements rm_ble_mesh_network_api_t::broadcastSecureBeacon.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Lower layer is invalid state. |
FSP_ERR_NOT_FOUND | Input parameter is not found. |
fsp_err_t RM_BLE_MESH_NETWORK_SendPduOnInterface | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_route_info_t const *const | p_route_info, | ||
rm_ble_mesh_network_header_t const *const | p_header, | ||
rm_ble_mesh_buffer_t const *const | p_buffer | ||
) |
Extension API to send Network PDUs on selected network interfaces. This routine sends NETWORK PDUs on all or selected Network Interfaces.
Implements rm_ble_mesh_network_api_t::sendPduOnInterface.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_route_info, p_header and p_buffer are NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_OUT_OF_MEMORY | Memory allocation is failed. |
FSP_ERR_OVERFLOW | TX queue is full. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_BLE_MESH_NETWORK_GetAddressType | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_address_t | addr, | ||
rm_ble_mesh_network_address_type_t *const | p_type | ||
) |
To get address type. This routine is to get address type for a given address.
Implements rm_ble_mesh_network_api_t::getAddressType.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_type is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_NETWORK_FetchProxyState | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_gatt_proxy_state_t *const | p_proxy_state | ||
) |
Check if the proxy module is ready to handle proxy messages/events. This routine returns the current state of the Proxy. The valid states of proxy are:
Implements rm_ble_mesh_network_api_t::fetchProxyState.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_proxy_state is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_NETWORK_SetProxyFilter | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_route_info_t const *const | p_route_info, | ||
rm_ble_mesh_proxy_filter_type_t | type | ||
) |
Set proxy server's filter type. This function is used by the Proxy Client to set the filter type on the Proxy Server.
Implements rm_ble_mesh_network_api_t::setProxyFilter.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_route_info is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_NETWORK_ConfigProxyFilter | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_route_info_t const *const | p_route_info, | ||
rm_ble_mesh_proxy_config_opcode_t | opcode, | ||
rm_ble_mesh_network_proxy_address_list_t *const | p_addr_list | ||
) |
Add or Delete/Remove addresses to/from proxy filter list. This function is used by the Proxy Client to add/delete Addresses to/from the Proxy Server's filter List.
Implements rm_ble_mesh_network_api_t::configProxyFilter.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_route_info and p_addr_list are NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_NETWORK_StartProxyServerAdv | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_subnet_handle_t | subnet_handle, | ||
rm_ble_mesh_network_gatt_proxy_adv_mode_t | proxy_adv_mode | ||
) |
Start connectable advertisements for a proxy server. This function is used by the Proxy Server to start Connectable Undirected Advertisements.
Implements rm_ble_mesh_network_api_t::startProxyServerAdv.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The internal parameter is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_OUT_OF_MEMORY | Memory allocation is failed. |
FSP_ERR_OVERFLOW | TX queue is full. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_BLE_MESH_NETWORK_StopProxyServerAdv | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl | ) |
Stop connectable advertisements for a proxy server. This function is used by the Proxy Server to stop Connectable Undirected Advertisements.
Implements rm_ble_mesh_network_api_t::stopProxyServerAdv.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_NETWORK_AllocateSeqNumber | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
uint32_t *const | p_seq_num | ||
) |
To allocate sequence number. This function is used to allocate Sequence Number.
Implements rm_ble_mesh_network_api_t::allocateSeqNumber.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_seq_num is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_NETWORK_GetSeqNumberState | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_seq_number_state_t *const | p_seq_num_state | ||
) |
To get current sequence number state. This function is used to get current Sequence Number state.
Implements rm_ble_mesh_network_api_t::getSeqNumberState.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_seq_num_state is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_NETWORK_SetSeqNumberState | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_seq_number_state_t const *const | p_seq_num_state | ||
) |
To set current sequence number state. This function is used to get current Sequence Number state, which acquiring lock. Used from persistent storage.
Implements rm_ble_mesh_network_api_t::setSeqNumberState.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_seq_num_state is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_NETWORK_ResetNetCache | ( | rm_ble_mesh_network_ctrl_t *const | p_ctrl | ) |
To reinitialize all Network Layer cache entries. This routine clears and reinitializes all Network Cache Entries. This needs to be invoked by the upper layer when the Network moves to a newer IV Index (Normal State) and the Sequence numbers are reset.
Implements rm_ble_mesh_network_api_t::resetNetCache.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |