nRF5 SDK for Mesh v1.0.1
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
 
struct  nrf_mesh_rx_metadata_instaburst_t
 Metadata structure for packets received with Instaburst. 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_beacon_timer_t
 Bluetooth Mesh beacon timer structure. 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...
 
typedef void(* nrf_mesh_net_beacon_cb_t) (const nrf_mesh_beacon_info_t *p_beacon, const uint8_t *p_netid, uint32_t iv_index, bool iv_update, bool key_refresh)
 Callback function for incoming network beacons. More...
 

Enumerations

enum  nrf_mesh_rx_source_t {
  NRF_MESH_RX_SOURCE_SCANNER, NRF_MESH_RX_SOURCE_GATT, NRF_MESH_RX_SOURCE_FRIEND, NRF_MESH_RX_SOURCE_LOW_POWER,
  NRF_MESH_RX_SOURCE_INSTABURST
}
 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...
 

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 76 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 79 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.

The default behaviour, which is always applied in addition to the callback function, is that the mesh will only relay new packets with a TTL larger than 1.

Warning
Devices claiming to be compliant with the Mesh Profile Specification v1.0 should not override the default relaying behaviour.
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 156 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 176 of file nrf_mesh.h.

◆ nrf_mesh_net_beacon_cb_t

typedef void(* nrf_mesh_net_beacon_cb_t) (const nrf_mesh_beacon_info_t *p_beacon, const uint8_t *p_netid, uint32_t iv_index, bool iv_update, bool key_refresh)

Callback function for incoming network beacons.

This can be used to take additional actions when a network beacon is received.

Parameters
[in]p_beaconPointer to the beacon information structure for the network the beacon was received for.
[in]p_netidNetwork ID used in the received beacon. This will point to the net_id field in either the p_beacon->secmat or the p_beacon->secmat_updated structs, and can be used to determine whether the beacon was sent with updated security credentials using the key refresh procedure.
[in]iv_indexIV index of the received beacon.
[in]iv_updateValue of the IV update flag in the received beacon.
[in]key_refreshValue of the key refresh flag in the received beacon.

Definition at line 297 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_FRIEND 

The packet came from a friend node.

NRF_MESH_RX_SOURCE_LOW_POWER 

The packet came from a low power node.

NRF_MESH_RX_SOURCE_INSTABURST 

The packet came from an Instaburst event.

Definition at line 82 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 183 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 337 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 353 of file nrf_mesh.h.


Documentation feedback | Developer Zone | Subscribe | Updated