RA Flexible Software Package Documentation
Release v5.2.0
|
|
Interface for BLE Mesh Upper Trans functions.
The BLE Mesh Upper Trans middleware provides a high-level transfer interface for BLE Mesh services.
Typedefs | |
typedef void | rm_ble_mesh_upper_trans_ctrl_t |
struct rm_ble_mesh_upper_trans_access_layer_pdu_t |
Access PDU
Data Fields | ||
---|---|---|
rm_ble_mesh_network_address_t | src_addr | Source address. |
rm_ble_mesh_network_address_t | dst_addr | Destination address. |
uint8_t * | p_label | Label UUID, representing Virtual Address of Destination. |
rm_ble_mesh_network_subnet_handle_t | subnet_handle | Handle identifying the subnet. |
rm_ble_mesh_network_appkey_handle_t | appkey_handle | Handle identifying the AppKey to be used for Transport Layer encryption. |
uint8_t | ttl | Time to Live. |
void * | p_parameter | Transport parameter, based on the type and header. |
struct rm_ble_mesh_upper_trans_control_pdu_t |
Control PDU
Data Fields | ||
---|---|---|
rm_ble_mesh_network_address_t | src_addr | Source address. |
rm_ble_mesh_network_address_t | dst_addr | Destination address. |
rm_ble_mesh_network_subnet_handle_t | subnet_handle | Handle identifying the subnet. |
uint8_t | ttl | Time to Live. |
rm_ble_mesh_upper_trans_control_opcode_t | opcode | Control Packet Opcode. |
void * | p_parameter | Transport parameter, based on the type and header. |
struct rm_ble_mesh_upper_trans_friendship_setting_t |
Low Power Node setting
Data Fields | ||
---|---|---|
rm_ble_mesh_network_subnet_handle_t | subnet_handle |
The subnet to initiate the friendship procedure |
uint8_t | criteria |
Friend criteria that is required. RSSI, Receive Window, MessageQueue size requirements can be established. |
uint8_t | rx_delay |
Receive delay in milliseconds that the LPN will wait before listening to response for any request. |
uint32_t | poll_timeout |
Timeout in milliseconds after which the LPN will send Poll PDU to check for data from the friend. |
uint32_t | setup_timeout |
Timeout in milliseconds for which the Friend Establishment procedure is to be tried. |
struct rm_ble_mesh_upper_trans_friendship_info_t |
Low Power Node element information
Data Fields | ||
---|---|---|
rm_ble_mesh_network_subnet_handle_t | subnet_handle |
Main subnet handle of the element |
rm_ble_mesh_network_address_t | addr |
Peer LPN/Friend Address |
uint16_t | lpn_counter |
Low Power Node Counter |
uint16_t | friend_counter |
Friend Counter |
struct rm_ble_mesh_upper_trans_heartbeat_publication_info_t |
Hearbeat Publication state
Data Fields | ||
---|---|---|
rm_ble_mesh_network_address_t | daddr |
Destination address for heartbeat messages |
uint8_t | count_log |
Count to control the number of periodic heartbeat transport messages to be sent |
uint8_t | period_log |
Period to control the cadence of periodic heartbeat transport messages |
uint8_t | ttl |
TTL value to be used when sending heartbeat messages |
uint16_t | features |
Features that trigger sending heartbeat messages when changed |
uint16_t | netkey_index |
Global NetKey index of the NetKey to be used to send heartbeat messages |
struct rm_ble_mesh_upper_trans_heartbeat_subscription_info_t |
Hearbeat Subscription state
Data Fields | ||
---|---|---|
rm_ble_mesh_network_address_t | saddr |
Source address for heartbeat messages that a node shall process |
rm_ble_mesh_network_address_t | daddr |
Destination address for heartbeat messages |
uint8_t | count_log |
Counter that tracks the number of periodic heartbeat transport message received since receiving the most recent configure heartbeat Subscription Set message |
uint8_t | period_log |
Period that controls the period for processing periodical heartbeat transport control messages |
uint16_t | min_hops |
Minimum hops value registered when receiving heartbeat messages since receiving the most recent configure heartbeat Subscription Set message |
uint16_t | max_hops |
Maximum hops value registered when receiving heartbeat messages since receiving the most recent configure heartbeat Subscription Set message |
struct rm_ble_mesh_upper_trans_callback_args_t |
BLE Mesh Network callback parameter definition
Data Fields | ||
---|---|---|
rm_ble_mesh_upper_trans_event_t | event | Event code. |
rm_ble_mesh_network_header_t * | p_header | Event code. |
rm_ble_mesh_network_subnet_handle_t | subnet_handle | Associated Subnet Handle. |
rm_ble_mesh_network_appkey_handle_t | appkey_handle | Associated AppKey Handle. |
rm_ble_mesh_error_code_t | result | Event result. |
rm_ble_mesh_buffer_t | event_data | |
void const * | p_context | Context provided to user during callback. |
struct rm_ble_mesh_upper_trans_cfg_t |
BLE MESH configuration parameters.
Data Fields | |
uint32_t | channel |
Select a channel corresponding to the channel number of the hardware. More... | |
rm_ble_mesh_upper_trans_control_message_evnet_t | control_message_evnet |
Whether to enable the control message event or not. | |
rm_ble_mesh_upper_trans_access_message_evnet_t | access_message_evnet |
Whether to enable the access message event or not. | |
rm_ble_mesh_lower_trans_instance_t const * | p_mesh_lower_trans_instance |
Instance structure of BLE Mesh Bearer. | |
void(* | p_callback )(rm_ble_mesh_upper_trans_callback_args_t *p_args) |
Callback. | |
void const * | p_context |
Placeholder for user data. Passed to the user callback in ble_abs_callback_args_t. | |
void const * | p_extend |
Placeholder for user extension. | |
uint32_t rm_ble_mesh_upper_trans_cfg_t::channel |
Select a channel corresponding to the channel number of the hardware.
the parameters for initialization.
struct rm_ble_mesh_upper_trans_api_t |
BLE MESH functions implemented at the HAL layer will follow this API.
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::open) (rm_ble_mesh_upper_trans_ctrl_t *const p_ctrl, rm_ble_mesh_upper_trans_cfg_t const *const p_cfg) |
Register interface with Transport Layer.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to pin configuration structure. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::close) (rm_ble_mesh_upper_trans_ctrl_t *const p_ctrl) |
Unregister interface with Transport Layer.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_access_layer_pdu | Pointer to Access Layer PDUs. |
[in] | reliable | If requires lower transport ACK, set reliable as RM_BLE_MESH_LOWER_TRANS_RELIABLE_ENABLE. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_control_pdu | Pointer to control PDUs. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_setting | Pointer to friendship settings. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::lpnClearFriendship) (rm_ble_mesh_upper_trans_ctrl_t *const p_ctrl) |
API to terminate friendship.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | action | Will be one of RM_BLE_MESH_UPPER_TRANS_CONTROL_OPCODE_FRIEND_SUBSCRN_LIST_ADD or RM_BLE_MESH_UPPER_TRANS_CONTROL_OPCODE_FRIEND_SUBSCRN_LIST_REMOVE. |
[in] | p_addr_list | Pointer to the packed list of addresses to be managed. |
[in] | count | Number of addresses given. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::lpnPoll) (rm_ble_mesh_upper_trans_ctrl_t *const p_ctrl) |
To trigger Friend Poll from application.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | addr | Unicast address to search. |
[out] | p_lpn_handle | Pointer to an LPN Handle, which will be filled if match found. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | addr | Address to search. |
[out] | p_lpn_handle | Pointer to an LPN Handle, which will be filled if match found. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | lpn_addr | LPN address to search. |
[out] | p_poll_timeout | Pointer to a memory where poll timeout of the LPN to be filled (if match found). |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | role | Local friendship role. |
[in] | lpn_index | Index of the LPN element. |
[out] | p_node | Pointer to copy the information. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | subnet_handle | Handle to identify the network. |
[in] | flag | Flag indicating the Key Refresh and IV Update state. |
[in] | ivindex | Current IV index of the network. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::clearAllLpn) (rm_ble_mesh_upper_trans_ctrl_t *const p_ctrl) |
To clear information related to all LPNs.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_info | Heartbeat Publication information data as in rm_ble_mesh_upper_trans_heartbeat_publication_info_t. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_info | Heartbeat Publication information data as in rm_ble_mesh_upper_trans_heartbeat_publication_info_t. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_info | Heartbeat Publication information data as in rm_ble_mesh_upper_trans_heartbeat_subscription_info_t. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_info | Heartbeat Publication information data as in rm_ble_mesh_upper_trans_heartbeat_subscription_info_t. |
fsp_err_t(* rm_ble_mesh_upper_trans_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | change_in_feature_bit | Bit mask of the changed feature field. |
struct rm_ble_mesh_upper_trans_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
rm_ble_mesh_upper_trans_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
rm_ble_mesh_upper_trans_cfg_t const * |
p_cfg | Pointer to the configuration structure for this instance. |
rm_ble_mesh_upper_trans_api_t const * |
p_api | Pointer to the API structure for this instance. |
typedef void rm_ble_mesh_upper_trans_ctrl_t |
BLE MESH control block. Allocate an instance specific control block to pass into the BLE MESH API calls.
Tranport Layer Control Packet Opcodes
RFU: 0x02 - 0x0F
Callback Event