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... | |
Core mesh type definitions.
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().
[in] | pc | The program counter of the failed assertion. |
Definition at line 76 of file nrf_mesh.h.
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.
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.
[in] | src | The packet source address |
[in] | dst | The packet destination address |
[in] | ttl | The time-to-live value for the packet (6-bits) |
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.
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.
[in] | p_rx_data | Received advertisement packet data and metadata. |
Definition at line 176 of file nrf_mesh.h.
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.
[in] | p_beacon | Pointer to the beacon information structure for the network the beacon was received for. |
[in] | p_netid | Network 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_index | IV index of the received beacon. |
[in] | iv_update | Value of the IV update flag in the received beacon. |
[in] | key_refresh | Value of the key refresh flag in the received beacon. |
Definition at line 297 of file nrf_mesh.h.
enum nrf_mesh_rx_source_t |
RX packet type.
Definition at line 82 of file nrf_mesh.h.
Key refresh phase.
Definition at line 183 of file nrf_mesh.h.
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.
Bluetooth Mesh address types.
Bluetooth Mesh defines 3 address types:
0xxx xxxx xxxx xxxx
10xx xxxx xxxx xxxx
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.