RA Flexible Software Package Documentation
Release v5.3.0
|
|
Interface for BLE Mesh Bearer functions.
The BLE Mesh Bearer interface for the BLE Mesh Bearer (BLE MESH BEARER) peripheral provides BLE Mesh Bearer functionality.
Data Structures | |
struct | rm_ble_mesh_bearer_info_t |
struct | rm_ble_mesh_bearer_beacon_info_t |
struct | rm_ble_mesh_bearer_ch_info_t |
struct | rm_ble_mesh_bearer_ntf_callback_args_t |
struct | rm_ble_mesh_bearer_beacon_callback_args_t |
struct | rm_ble_mesh_bearer_cfg_t |
struct | rm_ble_mesh_bearer_api_t |
struct | rm_ble_mesh_bearer_instance_t |
Macros | |
#define | RM_BLE_MESH_BEARER_HANDLE_INVALID |
#define | RM_BLE_MESH_BEARER_MAX_PDU_SIZE |
#define | RM_BLE_MESH_BEARER_SUBTYPE_GATT_T_MASK_BIT_OFFSET |
Typedefs | |
typedef uint8_t | rm_ble_mesh_bearer_handle_t |
typedef void | rm_ble_mesh_bearer_ctrl_t |
struct rm_ble_mesh_bearer_info_t |
Bearer information to register
Data Fields | |
rm_ble_mesh_buffer_t * | binfo |
fsp_err_t(* | bearer_send )(rm_ble_mesh_bearer_handle_t *, uint8_t, void *, uint16_t) |
void(* | bearer_recv )(rm_ble_mesh_bearer_handle_t *, uint8_t *, uint16_t, rm_ble_mesh_buffer_t *info) |
void(* | bearer_sleep )(rm_ble_mesh_bearer_handle_t *) |
void(* | bearer_wakeup )(rm_ble_mesh_bearer_handle_t *, uint8_t mode) |
rm_ble_mesh_buffer_t* rm_ble_mesh_bearer_info_t::binfo |
Bearer Information
fsp_err_t(* rm_ble_mesh_bearer_info_t::bearer_send) (rm_ble_mesh_bearer_handle_t *, uint8_t, void *, uint16_t) |
Data Send routine
void(* rm_ble_mesh_bearer_info_t::bearer_recv) (rm_ble_mesh_bearer_handle_t *, uint8_t *, uint16_t, rm_ble_mesh_buffer_t *info) |
Data Receive routine
void(* rm_ble_mesh_bearer_info_t::bearer_sleep) (rm_ble_mesh_bearer_handle_t *) |
Bearer Sleep Interface
void(* rm_ble_mesh_bearer_info_t::bearer_wakeup) (rm_ble_mesh_bearer_handle_t *, uint8_t mode) |
Bearer Wakeup Interface
struct rm_ble_mesh_bearer_beacon_info_t |
Bearer Beacon type data structure
Data Fields | ||
---|---|---|
uint8_t | action |
Beacon Action
|
uint8_t | type |
Beacon type
|
uint8_t * | bcon_data |
Beacon Broadcast Data |
uint16_t | bcon_datalen |
Beacon Broadcast Data length |
rm_ble_mesh_buffer_t * | uri |
URI information in case of Unprovisioned Beacons |
struct rm_ble_mesh_bearer_ch_info_t |
struct rm_ble_mesh_bearer_ntf_callback_args_t |
BEARER Application Asynchronous Notification Callback.
BEARER calls the registered callback to indicate events occurred to the application.
Data Fields | ||
---|---|---|
rm_ble_mesh_bearer_handle_t * | p_handle | Bearer handle identifier. |
rm_ble_mesh_bearer_interface_event_t | event | Bearer interface event. |
uint8_t * | p_data | Data associated with the event if any or NULL. |
uint16_t | data_length | Size of the event data. 0 if event data is NULL. |
struct rm_ble_mesh_bearer_beacon_callback_args_t |
struct rm_ble_mesh_bearer_cfg_t |
BLE MESH BEARER configuration parameters.
Data Fields | ||
---|---|---|
uint32_t | channel |
Select a channel corresponding to the channel number of the hardware. the parameters for initialization. |
rm_ble_mesh_instance_t const * | p_mesh_instance | Instance structure of BLE Mesh. |
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. |
struct rm_ble_mesh_bearer_api_t |
BLE MESH BEARER functions implemented at the HAL layer will follow this API.
fsp_err_t(* rm_ble_mesh_bearer_api_t::open) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, rm_ble_mesh_bearer_cfg_t const *const p_cfg) |
Open bearer middleware.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to pin configuration structure. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::close) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl) |
Close bearer middleware.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::registerInterface) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, rm_ble_mesh_bearer_type_t brr_type, rm_ble_mesh_bearer_ntf_callback_result_t(*p_callback)( rm_ble_mesh_bearer_ntf_callback_args_t *p_args)) |
Register Interface with Bearer Layer
[in] | p_ctrl | Pointer to control structure. |
[in] | brr_type | Bearer Type. |
[in] | p_callback | Pointer to details describing application notification callback. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::registerBeaconHandler) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, rm_ble_mesh_bearer_beacon_type_t bcon_type, void( *p_handler)( rm_ble_mesh_bearer_beacon_callback_args_t *p_args)) |
Register Beacon Interface with Bearer Layer
[in] | p_ctrl | Pointer to control structure. |
[in] | bcon_type | Beacon type - Unprovisioned Device or Secure Network. |
[in] | p_handler | Pointer to callback handler to be registered for the given beacon type. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::addBearer) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, rm_ble_mesh_bearer_type_t brr_type, rm_ble_mesh_bearer_info_t const *const p_brr_info, rm_ble_mesh_bearer_handle_t *const p_brr_handle) |
Add a bearer to Bearer Layer
[in] | p_ctrl | Pointer to control structure. |
[in] | brr_type | Bearer Type. |
[in] | p_brr_info | Pointer to details describing the Bearer being added. |
[out] | p_brr_handle | Pointer to handle to the bearer that is added. Used in data APIs. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::removeBearer) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, rm_ble_mesh_bearer_type_t brr_type, rm_ble_mesh_bearer_handle_t const *const p_brr_handle) |
Remove a bearer from Bearer Layer
[in] | p_ctrl | Pointer to control structure. |
[in] | brr_type | Bearer Type. |
[in] | p_brr_handle | Pointer to handle to the bearer is removed. Used in data APIs. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::observeBeacon) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, uint8_t bcon_type, uint8_t enable) |
Observe ON/OFF for the beacon type
[in] | p_ctrl | Pointer to control structure. |
[in] | bcon_type | Type of beacon to observe - Active/Passive. |
[in] | enable | Enable or Disable the observation procedure. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::bcastUnprovisionedBeacon) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, uint8_t type, uint8_t const *const p_dev_uuid, uint16_t oob_info, rm_ble_mesh_buffer_t const *const p_uri) |
API to send Unprovisioned Device Beacon
[in] | p_ctrl | Pointer to control structure. |
[in] | type | Active or Passive Broadcast type. |
[in] | p_dev_uuid | Pointer to device UUID uniquely identifying this device. |
[in] | oob_info | OOB Information. |
[in] | p_uri | Pointer to optional Parameter. NULL if not present. Points to the length and payload pointer of the URI string to be advertised interleaving with the unprovisioned beacon. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::broadcastBeacon) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, uint8_t type, uint8_t const *const p_packet, uint16_t length) |
API to broadcast a beacon
[in] | p_ctrl | Pointer to control structure. |
[in] | type | The type of beacon. |
[in] | p_packet | Pointer to beacon data. |
[in] | length | Beacon data length. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::startProxyAdv) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, uint8_t type, uint8_t const *const p_data, uint16_t datalen) |
API to send Proxy Device ADV
[in] | p_ctrl | Pointer to control structure. |
[in] | type | Proxy ADV Type: 0x00 - Network ID 0x01 - Node Identity |
[in] | p_data | Pointer to data to be advertised by Proxy. If the "type" is: 0x00 - Network ID - 8 Bytes of Network ID 0x01 - Node Identity - 8 Bytes Hash, 8 Bytes Random number |
[in] | datalen | Length of the data to be advertised by Proxy. If the "type" is: 0x00 - Network ID - 8 Bytes of Network ID 0x01 - Node Identity - 8 Bytes Hash, 8 Bytes Random number |
fsp_err_t(* rm_ble_mesh_bearer_api_t::sendPdu) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, rm_ble_mesh_bearer_handle_t const *const p_brr_handle, rm_ble_mesh_bearer_type_t brr_type, rm_ble_mesh_buffer_t const *const p_buffer) |
Send a bearer PDU
[in] | p_ctrl | Pointer to control structure. |
[in] | p_brr_handle | Pointer to bearer handle on which PDU is to be sent. |
[in] | brr_type | Bearer Type. |
[in] | p_buffer | Pointer to PDU data to be sent. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::getPacketRssi) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, uint8_t *p_rssi_value) |
Get the RSSI of current received packet being processed.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_rssi_value | Pointer to RSSI value. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::sleep) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl) |
Put the bearer to sleep.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_ble_mesh_bearer_api_t::wakeup) (rm_ble_mesh_bearer_ctrl_t *const p_ctrl, uint8_t mode) |
Wakeup the bearer.
[in] | p_ctrl | Pointer to control structure. |
[in] | mode | Identifies the mode (BRR_TX/BRR_RX) for which bearer is requested for wakeup. |
struct rm_ble_mesh_bearer_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
rm_ble_mesh_bearer_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
rm_ble_mesh_bearer_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
rm_ble_mesh_bearer_api_t const * | p_api | Pointer to the API structure for this instance. |
#define RM_BLE_MESH_BEARER_HANDLE_INVALID |
Invalid Bearer handle identifier
#define RM_BLE_MESH_BEARER_MAX_PDU_SIZE |
Maximum PDU size for data received over bearer
#define RM_BLE_MESH_BEARER_SUBTYPE_GATT_T_MASK_BIT_OFFSET |
GATT Bearer Message Type Masks
typedef uint8_t rm_ble_mesh_bearer_handle_t |
Bearer handle identifier
typedef void rm_ble_mesh_bearer_ctrl_t |
BLE MESH BEARER control block. Allocate an instance specific control block to pass into the BLE MESH API calls.
Bearer Interface Event
Bearer Type definitions
Bearer Beacon type definitions