nRF5 SDK for Mesh v3.2.0  08c60f6
AD type filtering

Enumerations

enum  ad_type_mode_t { AD_FILTER_WHITELIST_MODE, AD_FILTER_BLACKLIST_MODE }
 Possible working modes for AD type filter. More...
 

Functions

void bearer_adtype_filtering_set (bool onoff)
 Enable or disable AD type filtering. More...
 
void bearer_adtype_remove (uint8_t type)
 Remove the AD type from the list of accepted AD types. More...
 
void bearer_adtype_add (uint8_t type)
 Add the AD type to the list of accepted AD types. More...
 
void bearer_adtype_clear (void)
 Remove all set AD types from the list of accepted AD types.
 
void bearer_adtype_mode_set (ad_type_mode_t mode)
 Set mode of AD type filter. More...
 
uint32_t bearer_invalid_length_amount_get (void)
 Read out amount filtered packets with invalid length. More...
 
uint32_t bearer_adtype_filtered_amount_get (void)
 Read out amount filtered packets according AD type settings. More...
 

Detailed Description

Filtering of advertisement packets based on their AD types.

Enumeration Type Documentation

◆ ad_type_mode_t

Possible working modes for AD type filter.

AD_FILTER_WHITELIST_MODE is default mode.

Enumerator
AD_FILTER_WHITELIST_MODE 

Whitelist mode.

AD_FILTER_BLACKLIST_MODE 

Blacklist mode.

Definition at line 54 of file ad_type_filter.h.

Function Documentation

◆ bearer_adtype_filtering_set()

void bearer_adtype_filtering_set ( bool  onoff)

Enable or disable AD type filtering.

If enabled, only the packets with the AD types added via bearer_adtype_add() will be kept and processed by the bearer.

Parameters
[in]onoffAD type filtering state; set to true to enable AD Type filter, and false to disable

◆ bearer_adtype_remove()

void bearer_adtype_remove ( uint8_t  type)

Remove the AD type from the list of accepted AD types.

Parameters
[in]typeThe AD type that will be removed from the filter.
Note
This function has no effect if the AD type has not been added.

◆ bearer_adtype_add()

void bearer_adtype_add ( uint8_t  type)

Add the AD type to the list of accepted AD types.

Parameters
[in]typeThe AD type that will be added to the filter.
Note
Ad type filtering must be enabled (via a call to bearer_adtype_filtering_set) for the added AD types to have any effect.

◆ bearer_adtype_mode_set()

void bearer_adtype_mode_set ( ad_type_mode_t  mode)

Set mode of AD type filter.

Parameters
[in]modeMode of AD type filter.
Note
There are two possible modes. AD_FILTER_WHITELIST_MODE (default) mode enables receiving packets with AD in the list. AD_FILTER_BLACKLIST_MODE mode disables receiving packets with AD in the list.

◆ bearer_invalid_length_amount_get()

uint32_t bearer_invalid_length_amount_get ( void  )

Read out amount filtered packets with invalid length.

Returns
Amount of the filtered packets with an invalid length.

◆ bearer_adtype_filtered_amount_get()

uint32_t bearer_adtype_filtered_amount_get ( void  )

Read out amount filtered packets according AD type settings.

Returns
Amount of the filtered packets with unsuitable AD type.