De-multiplexing of the advertising data. More...
Data Structures | |
struct | ad_listener_t |
Macros | |
#define | ADL_WILDCARD_AD_TYPE 0u |
#define | ADL_WILDCARD_ADV_TYPE (ble_packet_type_t)0xFFu |
#define | AD_LISTENER(name) NRF_MESH_SECTION_ITEM_REGISTER_FLASH(ad_listeners, const ad_listener_t name) |
Define an AD listener. More... | |
Typedefs | |
typedef void(* | ad_handler_t) (const uint8_t *p_packet, uint32_t ad_packet_length, const nrf_mesh_rx_metadata_t *p_metadata) |
Functions | |
void | ad_listener_init (void) |
Initialize the AD listener module. | |
void | ad_listener_process (ble_packet_type_t adv_type, const uint8_t *p_payload, uint32_t payload_length, const nrf_mesh_rx_metadata_t *p_metadata) |
Process the incoming data from the scanner. More... | |
De-multiplexing of the advertising data.
Provides a listener-based interface for the incoming advertisement packets.
#define AD_LISTENER | ( | name | ) | NRF_MESH_SECTION_ITEM_REGISTER_FLASH(ad_listeners, const ad_listener_t name) |
Define an AD listener.
Its value should be assigned as part of the declaration:
Definition at line 84 of file ad_listener.h.
void ad_listener_process | ( | ble_packet_type_t | adv_type, |
const uint8_t * | p_payload, | ||
uint32_t | payload_length, | ||
const nrf_mesh_rx_metadata_t * | p_metadata | ||
) |
Process the incoming data from the scanner.
The function reads out the received frame from scanner, performs preliminary parsing of AD fields and sends out parsed AD frames to subscribers.
[in] | adv_type | Advertising type for the packet. |
[in] | p_payload | Pointer to the packet payload. |
[in] | payload_length | The length of the given payload. |
[in] | p_metadata | Metadata attached to the packet. |