RA Flexible Software Package Documentation
Release v5.2.0
|
|
The BLE Mesh Network Upper Trans 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_upper_trans0 | Module name. |
Channel Number | Invalid Channel Number | 0 | Select channel corresponding to the channel number of the hardware. |
Control Message Event Enable |
| Disabled | Whether to enable the control message event or not. |
Access Message Event Enable |
| Disabled | Whether to enable the access message event or not. |
Callback | Name Must Be a Valid C Symbol | NULL | Callback function name. |
Data Structures | |
struct | rm_ble_mesh_upper_trans_instance_ctrl_t |
struct rm_ble_mesh_upper_trans_instance_ctrl_t |
RM_BLE_MESH_UPPER_TRANS private control block. DO NOT MODIFY. Initialization occurs when RM_BLE_MESH_UPPER_TRANS_Open() is called.
fsp_err_t RM_BLE_MESH_UPPER_TRANS_Open | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_cfg_t const *const | p_cfg | ||
) |
Register Inerface with Transport Layer. This routine registers interface with the Transport Layer. Transport Layer supports single Application, hence this rouine shall be called once.
Implements rm_ble_mesh_upper_trans_api_t::open.
Example:
FSP_SUCCESS | Module opened successfully. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_ALREADY_OPEN | Module is already open. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_Close | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl | ) |
Unregister Inerface with Transport Layer. Implements rm_ble_mesh_upper_trans_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_INVALID_STATE | Lower layer is invalid state. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_SendAccessPdu | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_access_layer_pdu_t const *const | p_access_layer_pdu, | ||
rm_ble_mesh_lower_trans_reliable_t | reliable | ||
) |
API to send Access Layer PDUs. This routine sends Access Layer PDUs to peer device.
Implements rm_ble_mesh_upper_trans_api_t::sendAccessPdu.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_access_layer_pdu is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
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_NOT_FOUND | Input parameter is not found. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_SendControlPdu | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_control_pdu_t const *const | p_control_pdu | ||
) |
API to send transport Control PDUs. This routine sends transport Control PDUs to peer device.
Implements rm_ble_mesh_upper_trans_api_t::sendControlPdu.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_control_pdu is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
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_NOT_FOUND | Input parameter is not found. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_LpnSetupFriendship | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_friendship_setting_t const *const | p_setting | ||
) |
API to setup Friendship. This routine is used by the device acting as a low power node to setup a friendship procedure to any available friend nodes.
Implements rm_ble_mesh_upper_trans_api_t::lpnSetupFriendship.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_setting is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Lower layer is invalid state. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_LpnClearFriendship | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl | ) |
API to terminate friendship. This routine is used by the device acting as a low power node terminate friendship with an active Friend node.
Implements rm_ble_mesh_upper_trans_api_t::lpnClearFriendship.
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_UPPER_TRANS_LpnManageSubscription | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_control_opcode_t | action, | ||
uint16_t const *const | p_addr_list, | ||
uint16_t | count | ||
) |
API to manage friend subscription list. This routine is used by the device acting as a low power node add/remove addresses to/from the friends subscription list.
Implements rm_ble_mesh_upper_trans_api_t::lpnManageSubscription.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_addr_list 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_t RM_BLE_MESH_UPPER_TRANS_LpnPoll | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl | ) |
To trigger Friend Poll from application. This routine enables the application to trigger a Friend Poll even before the expiry of an active poll period configured during the friendship establishment. The poll peroid will get reset at this point.
Implements rm_ble_mesh_upper_trans_api_t::lpnPoll.
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_UPPER_TRANS_IsValidLpnElementAddress | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_address_t | addr, | ||
rm_ble_mesh_lower_trans_lpn_handle_t *const | p_lpn_handle | ||
) |
To check if address matches with any of the LPN. This routine checks if destination address in a received packet matches with any of the known element address of LPN.
Implements rm_ble_mesh_upper_trans_api_t::isValidLpnElementAddress.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_lpn_handle is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_NOT_FOUND | Input parameter is not found. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_IsValidLpnSubscriptionAddress | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_address_t | addr, | ||
rm_ble_mesh_lower_trans_lpn_handle_t *const | p_lpn_handle | ||
) |
To check if valid subscription address of an LPN to receive a packet. This routine checks if destination address in a received packet matches with any of the known subscription address of an LPN.
Implements rm_ble_mesh_upper_trans_api_t::isValidLpnSubscriptionAddress.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_lpn_handle is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_NOT_FOUND | Input parameter is not found. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_GetLpnPolltimeout | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_address_t | lpn_addr, | ||
uint32_t *const | p_poll_timeout | ||
) |
To get Poll Timeout of an LPN. This routine checks if LPN address is valid and then returns Poll Timeout configured for the LPN.
Implements rm_ble_mesh_upper_trans_api_t::getLpnPolltimeout.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_poll_timeout is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_GetFriendshipInfo | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_friend_role_t | role, | ||
uint16_t | lpn_index, | ||
rm_ble_mesh_upper_trans_friendship_info_t *const | p_node | ||
) |
To get the LPN node information. This routine fetches the node information of the LPN element at the given index
Implements rm_ble_mesh_upper_trans_api_t::getFriendshipInfo.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_node is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_LpnRegisterSecurityUpdate | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_network_subnet_handle_t | subnet_handle, | ||
uint8_t | flag, | ||
uint32_t | ivindex | ||
) |
To add the security update information. This routine updates the security state of the network to all the active LPN elements. This will be forwarded to the elements when it polls for the next packet available.
Implements rm_ble_mesh_upper_trans_api_t::lpnRegisterSecurityUpdate.
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_UPPER_TRANS_ClearAllLpn | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl | ) |
To clear information related to all LPNs. This routine clears information related to all LPNs.
Implements rm_ble_mesh_upper_trans_api_t::clearAllLpn.
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_UPPER_TRANS_SetHeartbeatPublication | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_heartbeat_publication_info_t *const | p_info | ||
) |
To set the Heartbeat publication data. This routine configures the Heartbeat publication information
Implements rm_ble_mesh_upper_trans_api_t::setHeartbeatPublication.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_info is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_GetHeartbeatPublication | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_heartbeat_publication_info_t *const | p_info | ||
) |
To get the Heartbeat publication data. This routine retrieves the Heartbeat publication information
Implements rm_ble_mesh_upper_trans_api_t::getHeartbeatPublication.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_info is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_SetHeartbeatSubscription | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_heartbeat_subscription_info_t *const | p_info | ||
) |
To set the Heartbeat subscription data. This routine configures the Heartbeat subscription information
Implements rm_ble_mesh_upper_trans_api_t::setHeartbeatSubscription.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_info is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_ADDRESS | Invalid source address. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_GetHeartbeatSubscription | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
rm_ble_mesh_upper_trans_heartbeat_subscription_info_t *const | p_info | ||
) |
To get the Heartbeat subscription data. This routine retrieves the Heartbeat subscription information
Implements rm_ble_mesh_upper_trans_api_t::getHeartbeatSubscription.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_info is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_UPPER_TRANS_TriggerHeartbeat | ( | rm_ble_mesh_upper_trans_ctrl_t *const | p_ctrl, |
uint8_t | change_in_feature_bit | ||
) |
To trigger Heartbeat send on change in feature. This routine triggers the Heartbeat send on change in state of supported features.
Implements rm_ble_mesh_upper_trans_api_t::triggerHeartbeat.
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_ARGUMENT | Input parameter is invalid. |
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_NOT_FOUND | Input parameter is not found. |
FSP_ERR_INVALID_POINTER | The internal parameter is NULL. |