Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Public Member Functions
ScanParameters Class Reference
Ble » Gap

Parameters defining the scan process. More...

#include <ScanParameters.h>

Data Structures

struct  phy_configuration_t
 Scan configuration of a physical channel. More...
 

Public Member Functions

 ScanParameters (phy_t phy=phy_t::LE_1M, scan_window_t scan_interval=scan_interval_t::min(), scan_interval_t scan_window=scan_window_t::min(), bool active_scanning=false, own_address_type_t own_address_type=own_address_type_t::RANDOM, scanning_filter_policy_t scanning_filter_policy=scanning_filter_policy_t::NO_FILTER)
 Construct a ScanParameters object that operates on a selected PHY. More...
 
ScanParameterssetOwnAddressType (own_address_type_t address)
 Set the address type used for scan requests. More...
 
own_address_type_t getOwnAddressType () const
 Get the address type used during scan requests. More...
 
ScanParameterssetFilter (scanning_filter_policy_t filter_policy)
 Set the filter to apply during scanning. More...
 
scanning_filter_policy_t getFilter () const
 Get the filter to use during scanning. More...
 
ScanParameterssetPhys (bool enable_1m, bool enable_coded)
 Enable or disable PHYs that should be used during scanning. More...
 
phy_set_t getPhys () const
 Get the PHYs to use during scanning. More...
 
ScanParametersset1mPhyConfiguration (scan_interval_t interval, scan_window_t window, bool active_scanning)
 Set the 1M scan configuration. More...
 
phy_configuration_t get1mPhyConfiguration () const
 Get the 1M scan configuration. More...
 
ScanParameterssetCodedPhyConfiguration (scan_interval_t interval, scan_window_t window, bool active_scanning)
 Set the coded PHY scan configuration. More...
 
phy_configuration_t getCodedPhyConfiguration () const
 Get the coded PHY scan configuration. More...
 

Detailed Description

Parameters defining the scan process.

The scan process is defined by two main parameters:

To scan continuously, the scan window and the scan interval should have the same value.

To get extra data from the advertising device, the scanner can send scan requests to the advertiser; the advertiser may respond with scan responses. It is possible to select what type of address is used to issue the scan request.

With Bluetooth 5, devices can advertise on more physical channels, and by extension, they can scan on more physical channels. It is possible to define independent scan parameters for every scannable physical channel.

Definition at line 51 of file ScanParameters.h.

Constructor & Destructor Documentation

ScanParameters ( phy_t  phy = phy_t::LE_1M,
scan_window_t  scan_interval = scan_interval_t::min(),
scan_interval_t  scan_window = scan_window_t::min(),
bool  active_scanning = false,
own_address_type_t  own_address_type = own_address_type_t::RANDOM,
scanning_filter_policy_t  scanning_filter_policy = scanning_filter_policy_t::NO_FILTER 
)

Construct a ScanParameters object that operates on a selected PHY.

Parameters
phyThe phy to configure.
scan_intervalThe scan interval.
scan_windowThe scan window.
active_scanningactive scanning flag.
own_address_typeAddress type used in scan requests.
scanning_filter_policyFilter applied.

Definition at line 119 of file ScanParameters.h.

Member Function Documentation

phy_configuration_t get1mPhyConfiguration ( ) const

Get the 1M scan configuration.

Definition at line 223 of file ScanParameters.h.

phy_configuration_t getCodedPhyConfiguration ( ) const

Get the coded PHY scan configuration.

Definition at line 251 of file ScanParameters.h.

scanning_filter_policy_t getFilter ( ) const

Get the filter to use during scanning.

Definition at line 174 of file ScanParameters.h.

own_address_type_t getOwnAddressType ( ) const

Get the address type used during scan requests.

Definition at line 155 of file ScanParameters.h.

phy_set_t getPhys ( ) const

Get the PHYs to use during scanning.

Definition at line 195 of file ScanParameters.h.

ScanParameters& set1mPhyConfiguration ( scan_interval_t  interval,
scan_window_t  window,
bool  active_scanning 
)

Set the 1M scan configuration.

Parameters
intervalThe scan interval to use.
windowThe scan window to use.
active_scanningThe active scanning flag.
Returns
A reference to this object.

Definition at line 207 of file ScanParameters.h.

ScanParameters& setCodedPhyConfiguration ( scan_interval_t  interval,
scan_window_t  window,
bool  active_scanning 
)

Set the coded PHY scan configuration.

Parameters
intervalThe scan interval to use.
windowThe scan window to use.
active_scanningThe active scanning flag.
Returns
A reference to this object.

Definition at line 235 of file ScanParameters.h.

ScanParameters& setFilter ( scanning_filter_policy_t  filter_policy)

Set the filter to apply during scanning.

Parameters
filter_policyThe filter to apply during scanning.
Returns
A reference to this object.

Definition at line 165 of file ScanParameters.h.

ScanParameters& setOwnAddressType ( own_address_type_t  address)

Set the address type used for scan requests.

Parameters
addressThe type of address to use during scan requests.
Returns
A reference to this object.

Definition at line 146 of file ScanParameters.h.

ScanParameters& setPhys ( bool  enable_1m,
bool  enable_coded 
)

Enable or disable PHYs that should be used during scanning.

Parameters
enable_1mTrue to enable the 1M phy and false to disable it.
enable_codedTrue to enable the coded phy and false to disable it.
Returns
A reference to this object.

Definition at line 185 of file ScanParameters.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.