nRF5 SDK for Mesh v5.0.0
Data Structures | Typedefs | Enumerations

Core mesh type definitions. More...

Data Structures

struct  nrf_mesh_rx_metadata_scanner_t
 Metadata structure for packets received with the scanner. More...
 
struct  nrf_mesh_instaburst_event_id_t
 Event ID for an extended advertising event with Instaburst. More...
 
struct  nrf_mesh_rx_metadata_instaburst_t
 Metadata structure for packets received with Instaburst. More...
 
struct  nrf_mesh_rx_metadata_gatt_t
 
struct  nrf_mesh_rx_metadata_loopback_t
 Metadata structure for packets that originated on this device. More...
 
struct  nrf_mesh_rx_metadata_t
 RX packet metadata. More...
 
struct  nrf_mesh_adv_packet_rx_data_t
 Arguments structure for the RX callback function. More...
 
struct  nrf_mesh_application_secmat_t
 Application security material structure. More...
 
struct  nrf_mesh_network_secmat_t
 Network security material structure. More...
 
struct  nrf_mesh_beacon_secmat_t
 Security material for the Bluetooth Mesh network beacons. More...
 
struct  nrf_mesh_beacon_tx_info_t
 Run-time transmission information for individual beacons. More...
 
struct  nrf_mesh_beacon_info_t
 Information structure for the Bluetooth Mesh network beacons. More...
 
struct  nrf_mesh_secmat_t
 Bluetooth Mesh security material structure. More...
 
struct  nrf_mesh_address_t
 Bluetooth Mesh address. More...
 
struct  nrf_mesh_tx_params_t
 Mesh packet transmission parameters. More...
 
struct  nrf_mesh_init_params_t
 Initialization parameters structure. More...
 

Typedefs

typedef void(* nrf_mesh_assertion_handler_t) (uint32_t pc)
 Mesh assertion handler type. More...
 
typedef uint32_t nrf_mesh_tx_token_t
 TX Token type, used as a context parameter to notify the application of ended transmissions. More...
 
typedef bool(* nrf_mesh_relay_check_cb_t) (uint16_t src, uint16_t dst, uint8_t ttl)
 Callback function type for checking if a given packet should be relayed on to other nodes. More...
 
typedef void(* nrf_mesh_rx_cb_t) (const nrf_mesh_adv_packet_rx_data_t *p_rx_data)
 Advertisement received callback function type. More...
 

Enumerations

enum  nrf_mesh_rx_source_t { NRF_MESH_RX_SOURCE_SCANNER, NRF_MESH_RX_SOURCE_GATT, NRF_MESH_RX_SOURCE_INSTABURST, NRF_MESH_RX_SOURCE_LOOPBACK }
 RX packet type. More...
 
enum  nrf_mesh_key_refresh_phase_t { NRF_MESH_KEY_REFRESH_PHASE_0, NRF_MESH_KEY_REFRESH_PHASE_1, NRF_MESH_KEY_REFRESH_PHASE_2, NRF_MESH_KEY_REFRESH_PHASE_3 }
 Key refresh phase. More...
 
enum  net_state_iv_update_t { NET_STATE_IV_UPDATE_NORMAL, NET_STATE_IV_UPDATE_IN_PROGRESS }
 State of IV update procedure. More...
 
enum  nrf_mesh_address_type_t { NRF_MESH_ADDRESS_TYPE_INVALID, NRF_MESH_ADDRESS_TYPE_UNICAST, NRF_MESH_ADDRESS_TYPE_VIRTUAL, NRF_MESH_ADDRESS_TYPE_GROUP }
 Bluetooth Mesh address types. More...
 
enum  nrf_mesh_transmic_size_t { NRF_MESH_TRANSMIC_SIZE_SMALL, NRF_MESH_TRANSMIC_SIZE_LARGE, NRF_MESH_TRANSMIC_SIZE_DEFAULT, NRF_MESH_TRANSMIC_SIZE_INVALID }
 Message MIC size selection. More...
 

Detailed Description

Core mesh type definitions.

Typedef Documentation

◆ nrf_mesh_assertion_handler_t

typedef void(* nrf_mesh_assertion_handler_t) (uint32_t pc)

Mesh assertion handler type.

When an unexpected, fatal error occurs within the Mesh stack, it will call the Mesh assertion handler callback. The Mesh stack will be in an undefined state when this happens and the only way to recover will be to perform a reset, e.g. by using CMSIS NVIC_SystemReset().

Parameters
[in]pcThe program counter of the failed assertion.

Definition at line 102 of file nrf_mesh.h.

◆ nrf_mesh_tx_token_t

typedef uint32_t nrf_mesh_tx_token_t

TX Token type, used as a context parameter to notify the application of ended transmissions.

Definition at line 105 of file nrf_mesh.h.

◆ nrf_mesh_relay_check_cb_t

typedef bool(* nrf_mesh_relay_check_cb_t) (uint16_t src, uint16_t dst, uint8_t ttl)

Callback function type for checking if a given packet should be relayed on to other nodes.

The mesh can be initialized with this callback if the application wants to have control over which packets should be relayed to other nodes. This is done by passing the function pointer to nrf_mesh_init via the nrf_mesh_init_params_t struct.

With the default behavior, the mesh will only relay new packets with a TTL larger than 1. This behavior is always applied in addition to the callback function.

Warning
Devices claiming to be compliant with Bluetooth Mesh Profile Specification (MshPRFv1.0.1) should not override the default relaying behavior.
See also
nrf_mesh_init()
Parameters
[in]srcThe packet source address.
[in]dstThe packet destination address.
[in]ttlThe time-to-live value for the packet (6-bits).
Returns
true if the packet received should be relayed on to the other mesh nodes, false otherwise.

Definition at line 198 of file nrf_mesh.h.

◆ nrf_mesh_rx_cb_t

typedef void(* nrf_mesh_rx_cb_t) (const nrf_mesh_adv_packet_rx_data_t *p_rx_data)

Advertisement received callback function type.

This callback can be used to receive raw advertisement packets. This can be useful to listen for specific packets that are not handled by the mesh, such as beacon packets or regular BLE advertisements.

Parameters
[in]p_rx_dataReceived advertisement packet data and metadata.

Definition at line 218 of file nrf_mesh.h.

Enumeration Type Documentation

◆ nrf_mesh_rx_source_t

RX packet type.

Enumerator
NRF_MESH_RX_SOURCE_SCANNER 

The packet came from the scanner.

NRF_MESH_RX_SOURCE_GATT 

The packet came from a GATT connection.

NRF_MESH_RX_SOURCE_INSTABURST 

The packet came from an Instaburst event.

NRF_MESH_RX_SOURCE_LOOPBACK 

The packet came from this device.

Definition at line 108 of file nrf_mesh.h.

◆ nrf_mesh_key_refresh_phase_t

Key refresh phase.

See also
dsm_subnet_update(), dsm_subnet_update_swap_keys(), dsm_subnet_update_commit()
Enumerator
NRF_MESH_KEY_REFRESH_PHASE_0 

Key refresh phase 0.

Indicates normal device operation.

NRF_MESH_KEY_REFRESH_PHASE_1 

Key refresh phase 1.

Old keys are used for packet transmission, but new keys can be used to receive messages.

NRF_MESH_KEY_REFRESH_PHASE_2 

Key refresh phase 2.

New keys are used for packet transmission, but old keys can be used to receive messages.

NRF_MESH_KEY_REFRESH_PHASE_3 

Key refresh phase 3.

Used to complete a key refresh procedure and transition back to phase 0.

Definition at line 225 of file nrf_mesh.h.

◆ net_state_iv_update_t

State of IV update procedure.

Enumerator
NET_STATE_IV_UPDATE_NORMAL 

In normal operation.

NET_STATE_IV_UPDATE_IN_PROGRESS 

IV update procedure in progress.

Definition at line 341 of file nrf_mesh.h.

◆ nrf_mesh_address_type_t

Bluetooth Mesh address types.

Bluetooth Mesh defines 3 address types:

  • Unicast
     0xxx xxxx xxxx xxxx 
  • Virtual
     10xx xxxx xxxx xxxx 
  • Group
     11xx xxxx xxxx xxxx 
Enumerator
NRF_MESH_ADDRESS_TYPE_INVALID 

Invalid address.

NRF_MESH_ADDRESS_TYPE_UNICAST 

Unicast address.

NRF_MESH_ADDRESS_TYPE_VIRTUAL 

Virtual address.

NRF_MESH_ADDRESS_TYPE_GROUP 

Group address.

Definition at line 357 of file nrf_mesh.h.

◆ nrf_mesh_transmic_size_t

Message MIC size selection.

Enumerator
NRF_MESH_TRANSMIC_SIZE_SMALL 

Selects 4 byte MIC size for the transport PDU.

NRF_MESH_TRANSMIC_SIZE_LARGE 

Selects 8 byte MIC size for the transport PDU.

NRF_MESH_TRANSMIC_SIZE_DEFAULT 

Selects default stack configured MIC size for the transport PDU.

NRF_MESH_TRANSMIC_SIZE_INVALID 

Invalid size.

Definition at line 385 of file nrf_mesh.h.


Documentation feedback | Developer Zone | Subscribe | Updated