17 #ifndef BLE_GAP_TYPES_H 18 #define BLE_GAP_TYPES_H 20 #include "ble/common/Duration.h" 21 #include "ble/common/Bounded.h" 22 #include "ble/SafeEnum.h" 60 typedef Duration<uint16_t, 10000, Range<0x00, 0xFFFF>, Value<uint16_t, 0x0000> >
scan_duration_t;
186 #if !defined(DOXYGEN_ONLY) 189 ADV_DIRECT_IND = 0x01,
191 ADV_NONCONN_IND = 0x03,
192 ADV_DIRECT_IND_LOW_DUTY_CYCLE = 0x04
213 INCOMPLETE_MORE_DATA = 0x01,
214 INCOMPLETE_DATA_TRUNCATED = 0x02
226 #if !defined(DOXYGEN_ONLY) 252 SCANNABLE_ADVERTISING_BIT = 1,
253 DIRECTED_ADVERTISING_BIT = 2,
254 SCAN_RESPONSE_BIT = 3,
256 DATA_STATUS_INDEX = 5,
257 DATA_STATUS_MASK = 0x03
262 #if !defined(DOXYGEN_ONLY) 280 return static_cast<bool>(value & (1 << CONNECTABLE_BIT));
289 return static_cast<bool>(value & (1 << SCANNABLE_ADVERTISING_BIT));
298 return static_cast<bool>(value & (1 << DIRECTED_ADVERTISING_BIT));
307 return static_cast<bool>(value & (1 << SCAN_RESPONSE_BIT));
316 return static_cast<bool>(value & (1 << LEGACY_PDU_BIT));
326 (value >> DATA_STATUS_INDEX) & DATA_STATUS_MASK
336 return data_status() == advertising_data_status_t::COMPLETE;
397 FILTER_SCAN_REQUESTS = 0x01,
403 FILTER_CONNECTION_REQUEST = 0x02,
409 FILTER_SCAN_AND_CONNECTION_REQUESTS = 0x03
439 FILTER_ADVERTISING = 0x01,
448 NO_FILTER_INCLUDE_UNRESOLVABLE_DIRECTED = 2,
460 FILTER_ADVERTISING_INCLUDE_UNRESOLVABLE_DIRECTED = 3
554 RESOLVABLE_PRIVATE_ADDRESS_PUBLIC_FALLBACK = 0x02,
561 RESOLVABLE_PRIVATE_ADDRESS_RANDOM_FALLBACK = 0x03,
677 #if !defined(DOXYGEN_ONLY) 730 #if !defined(DOXYGEN_ONLY) 752 AUTHENTICATION_FAILURE = 0x05,
757 USER_TERMINATION = 0x13,
762 LOW_RESOURCES = 0x14,
772 UNSUPPORTED_REMOTE_FEATURE = 0x1A,
777 PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED = 0x29,
782 UNACCEPTABLE_CONNECTION_PARAMETERS = 0x3B
805 AUTHENTICATION_FAILURE = 0x05,
810 CONNECTION_TIMEOUT = 0x08,
815 REMOTE_USER_TERMINATED_CONNECTION = 0x13,
820 REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES = 0x14,
825 REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF = 0x15,
831 LOCAL_HOST_TERMINATED_CONNECTION = 0x16,
836 UNACCEPTABLE_CONNECTION_PARAMETERS = 0x3B
891 PERFORM_AUTHENTICATION_PROCEDURE
965 #endif //BLE_GAP_TYPES_H Disable duplicate filtering.
type
enumeration of initiator_filter_policy_t values.
type
struct scoped enum wrapped by the class
advertising_data_status_t data_status() const
Payload completeness status.
Duration< uint16_t, 10000, Range< 0x00, 0xFFFF >, Value< uint16_t, 0x0000 > > scan_duration_t
Scan process duration.
disconnection_reason_t(type value)
Construct a new instance of disconnection_reason_t.
Device is scannable but not connectable.
Advertising policy filter modes.
If a bond is present in the secure database and the address resolution fails, then reject the connect...
Device is not connectable and not scannable.
target_peer_address_type_t(type value)
Create a new target_peer_address_type_t.
Device is connectable, scannable and doesn't expect connection from a specific peer.
Duration< uint16_t, 10000, Range< 0x0A, 0x0C80 > > supervision_timeout_t
Time after which a connection is loss of devices have not exchanged data.
uint16_t periodic_sync_handle_t
Handle of a sync representing a periodic advertiser.
Enumeration of GAP roles.
Scanning policy filter mode.
type
enumeration of local_disconnection_reason_t values.
Perform the pairing procedure if the initiator resolvable address failed the resolution process...
Duration< uint16_t, 1250, Range< 0x06, 0xFFFF > > periodic_interval_t
Interval between two periodic advertising events.
type
enumeration of clock_accuracy_t values.
Do not resolve the address of the initiator and accept the connection request.
bool scannable_advertising() const
Is advertising scannable.
Enumeration of disconnection reasons received in a disconnection event.
Duration< uint16_t, 1250, Range< 0x06, 0x0C80 > > conn_interval_t
Time interval between two connection events.
bool scan_response() const
Is this a scan response.
Device is connectable and expects connection from a specific peer (sent at long user set intervals)...
Duration< uint16_t, 625, Range< 0, 0xFFFF > > conn_event_length_t
Duration of a connection event.
uint8_t advertising_sid_t
Identify an advertising SID.
scanning_filter_policy_t(type value)
Construct a new instance of scanning_filter_policy_t.
uint8_t value() const
Explicit access to the inner value of the SafeEnum instance.
type
enumeration of duplicates_filter_t values
type
enumeration of advertising_filter_policy_t values
Device is connectable and expects connection from a specific peer.
bool use_non_resolvable_random_address
Indicates if nonresolvable random address should be used when the central or observer sends scan requ...
Duration< uint16_t, 10000, Range< 0x0A, 0x4000 > > sync_timeout_t
Time after which a periodic sync link is considered lost if the receiver hasn't received anything fro...
clock_accuracy_t(type value)
Construct a new clock_accuracy_t value.
Used to indicate if the packet is complete and if it's truncated.
Helper class used to define safe enumerations.
int8_t rssi_t
Received signal strength.
Partial advertising payload, more to come.
SafeEnum(uint8_t value)
Construction of an enumeration value.
Type of an address to connect to.
advertising_data_status_t(type value)
Construct a new advertising_data_status_t value.
advertising_filter_policy_t(type value)
Construct a advertising_filter_policy_t.
bool use_non_resolvable_random_address
Indicates if nonresolvable random address should be used when the peripheral advertises nonconnectabl...
int8_t advertising_power_t
Describe the advertising power.
Duration< uint16_t, 1280000, Range< 0x00, 0xFFFF > > scan_period_t
Time interval between two scan processes.
bool complete() const
Is payload complete.
Do not resolve the address received in advertising packets.
Enumeration of disconnection reasons that should be transmited to the peer.
resolution_strategy_t
Resolution strategy for initiator resolvable addresses when a connection request is received...
own_address_type_t(type value)
Construct a new instance of own_address_type_t.
connection_role_t(type value)
Construct a new instance of role_t.
duplicates_filter_t(type value)
Construct a new duplicates_filter_t value.
uint8_t advertising_handle_t
Handle of an advertising set.
Duration< uint16_t, 625, Range< 0x04, 0xFFFF > > scan_interval_t
Time interval between two scans.
Properties of an advertising event.
bool directed_advertising() const
Is advertising directed.
Resolve the resolvable addresses in the advertising packet and forward advertising packet to the appl...
initiator_filter_policy_t(type value)
Construct a initiator_filter_policy_t.
Duration< uint32_t, 625, Range< 0x20, 0xFFFFFF > > adv_interval_t
Time interval between two advertisements.
Scanning policy filter mode.
type
enumeration of target_peer_address_type_t values.
resolution_strategy_t
Resolution strategy of resolvable addresses received in advertising packets.
The whitelist is not used to determine which advertiser to connect to.
Advertising payload complete.
type
enumeration of advertising_type_t values
type
enumeration of advertising_data_status_t values
local_disconnection_reason_t(type value)
Construct a new instance of disconnection_reason_t.
Bounded< uint16_t, 0, 0x01F3 > slave_latency_t
Number of connection events that can be skipped by the slave.
bool more_data_to_come() const
Is there more data coming.
Encapsulates the peripheral advertising modes.
Accuracy of the master clock.
bool connectable() const
Is advertising connectable.
Duration< uint16_t, 625, Range< 0x04, 0xFFFF > > scan_window_t
Duration of a scan.
Privacy configuration of the central role.
advertising_type_t(type value)
Construct a new advertising_type_t value.
Enable duplicate filtering.
Privacy Configuration of the peripheral role.
bool truncated() const
Is the payload truncated.
type
enumeration of disconnection_reason_t values.
Type used to model the own address used during the following GAP operations: advertising, scanning and initiating.
Entry namespace for all BLE API definitions.
type
enumeration of scanning_filter_policy_t values
type
enumeration of own_address_type_t values.
uint16_t get_ppm()
Get clock accuracy.
bool legacy_advertising() const
Is this legacy advertising.
Duration< uint16_t, 10000, Range< 0x00, 0xFFFF >, Value< uint16_t, 0x0000 > > adv_duration_t
Advertising process duration.
Filter policy that you can use during connection initiation.