RA Flexible Software Package Documentation  Release v5.2.0

 
BLE Mesh Bearer Platform Interface

Detailed Description

Interface for BLE Mesh Bearer Platform functions.

Summary

The BLE Mesh interface for the BLE Mesh Bearer Platform (BLE MESH BEARER PLATFORM) peripheral provides BLE Mesh Bearer Platform functionality.

Data Structures

struct  rm_mesh_bearer_platform_cfg_t
 
struct  rm_mesh_bearer_platform_api_t
 
struct  rm_mesh_bearer_platform_instance_t
 

Typedefs

typedef void rm_mesh_bearer_platform_ctrl_t
 

Enumerations

enum  rm_mesh_bearer_platform_device_address_type_t
 
enum  rm_mesh_bearer_platform_state_t
 
enum  rm_mesh_bearer_platform_gatt_mode_t
 

Data Structure Documentation

◆ rm_mesh_bearer_platform_cfg_t

struct rm_mesh_bearer_platform_cfg_t

MESH BEARER PLATFORM configuration parameters.

Data Fields
uint32_t channel Select a channel corresponding to the channel number of the hardware.

the parameters for initialization.

rm_mesh_bearer_platform_device_address_type_t device_address_type Device address type.
rm_ble_mesh_bearer_instance_t
const *
p_bearer_instance Instance structure of BLE Mesh Bearer.
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.

◆ rm_mesh_bearer_platform_api_t

struct rm_mesh_bearer_platform_api_t

MESH BEARER PLATFORM functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* open )(rm_mesh_bearer_platform_ctrl_t *const p_ctrl, rm_mesh_bearer_platform_cfg_t const *const p_cfg)
 
fsp_err_t(* close )(rm_mesh_bearer_platform_ctrl_t *const p_ctrl)
 
fsp_err_t(* setScanResponseData )(rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint8_t *p_data, uint8_t len)
 
fsp_err_t(* connect )(rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint8_t *p_remote_address, uint8_t address_type, rm_mesh_bearer_platform_gatt_mode_t mode)
 
fsp_err_t(* discoverService )(rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint16_t handle, rm_mesh_bearer_platform_gatt_mode_t mode)
 
fsp_err_t(* configureNotification )(rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint16_t handle, rm_mesh_bearer_platform_state_t state, rm_mesh_bearer_platform_gatt_mode_t mode)
 
fsp_err_t(* disconnect )(rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint16_t handle)
 

Field Documentation

◆ open

fsp_err_t(* rm_mesh_bearer_platform_api_t::open) (rm_mesh_bearer_platform_ctrl_t *const p_ctrl, rm_mesh_bearer_platform_cfg_t const *const p_cfg)

Open Bearer Platform middleware.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to configuration structure.

◆ close

fsp_err_t(* rm_mesh_bearer_platform_api_t::close) (rm_mesh_bearer_platform_ctrl_t *const p_ctrl)

Close Bearer Platform middleware.

Parameters
[in]p_ctrlPointer to control structure.

◆ setScanResponseData

fsp_err_t(* rm_mesh_bearer_platform_api_t::setScanResponseData) (rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint8_t *p_data, uint8_t len)

Set scan response data in connectable and scannable undirected advertising event.

Parameters
[in]p_ctrlPointer to control structure.
[out]p_dataPointer to scan response data.
[in]lenData length.

◆ connect

fsp_err_t(* rm_mesh_bearer_platform_api_t::connect) (rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint8_t *p_remote_address, uint8_t address_type, rm_mesh_bearer_platform_gatt_mode_t mode)

Request to create connection.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_remote_addressPointer to remote device address.
[in]address_typeAddress type.
[in]modeGATT interface mode, either RM_MESH_BEARER_PLATFORM_GATT_MODE_PROVISION or RM_MESH_BEARER_PLATFORM_GATT_MODE_PROXY.

◆ discoverService

fsp_err_t(* rm_mesh_bearer_platform_api_t::discoverService) (rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint16_t handle, rm_mesh_bearer_platform_gatt_mode_t mode)

Start service discovery for Mesh GATT service.

Parameters
[in]p_ctrlPointer to control structure.
[in]handleConnection handle to identify device.
[in]modeGATT interface mode, either RM_MESH_BEARER_PLATFORM_GATT_MODE_PROVISION or RM_MESH_BEARER_PLATFORM_GATT_MODE_PROXY.

◆ configureNotification

fsp_err_t(* rm_mesh_bearer_platform_api_t::configureNotification) (rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint16_t handle, rm_mesh_bearer_platform_state_t state, rm_mesh_bearer_platform_gatt_mode_t mode)

Configure GATT notification of Mesh GATT service.

Parameters
[in]p_ctrlPointer to control structure.
[in]handleConnection handle to identify device.
[in]stateNotification configuration flag; enable if RM_MESH_BEARER_PLATFORM_STATE_ENABLE, or disable if RM_MESH_BEARER_PLATFORM_STATE_DISABLE.
[in]modeGATT interface mode, either RM_MESH_BEARER_PLATFORM_GATT_MODE_PROVISION or RM_MESH_BEARER_PLATFORM_GATT_MODE_PROXY.

◆ disconnect

fsp_err_t(* rm_mesh_bearer_platform_api_t::disconnect) (rm_mesh_bearer_platform_ctrl_t *const p_ctrl, uint16_t handle)

Terminate Connection.

Parameters
[in]p_ctrlPointer to control structure.
[in]handleConnection handle to identify device.

◆ rm_mesh_bearer_platform_instance_t

struct rm_mesh_bearer_platform_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
rm_mesh_bearer_platform_ctrl_t * p_ctrl Pointer to the control structure for this instance.
rm_mesh_bearer_platform_cfg_t
const *
p_cfg Pointer to the configuration structure for this instance.
rm_mesh_bearer_platform_api_t
const *
p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ rm_mesh_bearer_platform_ctrl_t

MESH BEARER PLATFORM control block. Allocate an instance specific control block to pass into the BLE MESH API calls.

Enumeration Type Documentation

◆ rm_mesh_bearer_platform_device_address_type_t

Device address type

Enumerator
RM_MESH_BEARER_PLATFORM_DEVICE_ADDRESS_TYPE_PUBLIC 

Public device address type

RM_MESH_BEARER_PLATFORM_DEVICE_ADDRESS_TYPE_RANDOM 

Random device address type

◆ rm_mesh_bearer_platform_state_t

State

Enumerator
RM_MESH_BEARER_PLATFORM_STATE_ENABLE 

State enable

RM_MESH_BEARER_PLATFORM_STATE_DISABLE 

state Disable

◆ rm_mesh_bearer_platform_gatt_mode_t

GATT mode

Enumerator
RM_MESH_BEARER_PLATFORM_GATT_MODE_PROVISION 

Provision GATT mode

RM_MESH_BEARER_PLATFORM_GATT_MODE_PROXY 

Proxy GATT mode