17 #ifndef MBED_GAP_SCAN_PARAMETERS_H__ 18 #define MBED_GAP_SCAN_PARAMETERS_H__ 21 #include "ble/blecommon.h" 68 bool active_scanning =
false 70 interval(scan_interval),
72 active_scanning(active_scanning)
100 return active_scanning;
106 bool active_scanning;
123 bool active_scanning =
false,
127 own_address_type(own_address_type),
128 scanning_filter_policy(scanning_filter_policy),
130 phy_1m_configuration(),
131 phy_coded_configuration()
135 phy_1m_configuration = conf;
137 #if BLE_FEATURE_PHY_MANAGEMENT 139 phy_coded_configuration = conf;
141 #endif // BLE_FEATURE_PHY_MANAGEMENT 151 own_address_type = address;
160 return own_address_type;
170 scanning_filter_policy = filter_policy;
179 #if BLE_FEATURE_WHITELIST 180 return scanning_filter_policy;
183 #endif // BLE_FEATURE_WHITELIST 194 #if BLE_FEATURE_PHY_MANAGEMENT 195 phys.set_1m(enable_1m);
196 phys.set_coded(enable_coded);
197 #endif // BLE_FEATURE_PHY_MANAGEMENT 224 interval, window, active_scanning
234 return phy_1m_configuration;
250 #if BLE_FEATURE_PHY_MANAGEMENT 251 phys.set_coded(
true);
253 interval, window, active_scanning
255 #endif // BLE_FEATURE_PHY_MANAGEMENT 264 return phy_1m_configuration;
ScanParameters & setCodedPhyConfiguration(scan_interval_t interval, scan_window_t window, bool active_scanning)
Set the coded PHY scan configuration.
own_address_type_t getOwnAddressType() const
Get the address type used during scan requests.
phy_configuration_t getCodedPhyConfiguration() const
Get the coded PHY scan configuration.
Scan configuration of a physical channel.
Use the random device address.
scanning_filter_policy_t getFilter() const
Get the filter to use during scanning.
Rep value() const
Return the duration in TB units.
ScanParameters & set1mPhyConfiguration(scan_interval_t interval, scan_window_t window, bool active_scanning)
Set the 1M scan configuration.
const scan_interval_t & getWindow() const
Get the scan window.
Scanning policy filter mode.
ScanParameters & setFilter(scanning_filter_policy_t filter_policy)
Set the filter to apply during scanning.
ScanParameters & setPhys(bool enable_1m, bool enable_coded)
Enable or disable PHYs that should be used during scanning.
Parameters defining the scan process.
const scan_window_t & getInterval() const
Get the scan interval.
Type that describes a bluetooth PHY(sical) transport.
ScanParameters & setOwnAddressType(own_address_type_t address)
Set the address type used for scan requests.
Type that describe a set of PHY(sical) transports.
Accept all advertising packets except directed advertising packets not addressed to this device...
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.
phy_set_t getPhys() const
Get the PHYs to use during scanning.
static Duration min()
Return the minimum duration.
Type used to model the own address used during the following GAP operations: advertising, scanning and initiating.
Entry namespace for all BLE API definitions.
bool isActiveScanningSet() const
Return if active scanning is set.
phy_configuration_t get1mPhyConfiguration() const
Get the 1M scan configuration.
phy_configuration_t(scan_interval_t scan_interval=scan_interval_t::min(), scan_window_t scan_window=scan_window_t::min(), bool active_scanning=false)
Construct a phy_configuration_t.