17 #ifndef BLE_GAP_EVENTS_H 18 #define BLE_GAP_EVENTS_H 20 #include "ble/blecommon.h" 21 #include "ble/BLETypes.h" 39 #if !defined(DOXYGEN_ONLY) 60 const phy_t &primaryPhy,
61 const phy_t &secondaryPhy,
65 uint16_t periodicInterval,
71 peerAddressType(peerAddressType),
72 peerAddress(peerAddress),
73 primaryPhy(primaryPhy),
74 secondaryPhy(secondaryPhy),
78 periodicInterval(periodicInterval),
79 directAddressType(directAddressType),
80 directAddress(directAddress),
81 advertisingData(advertisingData)
96 return peerAddressType;
137 return periodicInterval != 0;
149 return directAddressType;
155 return directAddress;
161 return advertisingData;
173 uint16_t periodicInterval;
185 #if !defined(DOXYGEN_ONLY) 207 const address_t &localResolvablePrivateAddress,
208 const address_t &peerResolvablePrivateAddress,
212 uint16_t masterClockAccuracy
215 connectionHandle(connectionHandle),
217 peerAddressType(peerAddressType),
218 peerAddress(peerAddress),
219 localResolvablePrivateAddress(localResolvablePrivateAddress),
220 peerResolvablePrivateAddress(peerResolvablePrivateAddress),
221 connectionInterval(connectionInterval),
222 connectionLatency(connectionLatency),
223 supervisionTimeout(supervisionTimeout),
224 masterClockAccuracy(masterClockAccuracy)
239 return connectionHandle;
251 return peerAddressType;
263 return localResolvablePrivateAddress;
269 return peerResolvablePrivateAddress;
275 return connectionInterval;
281 return connectionLatency;
287 return supervisionTimeout;
293 return masterClockAccuracy;
302 const address_t &localResolvablePrivateAddress;
303 const address_t &peerResolvablePrivateAddress;
307 uint16_t masterClockAccuracy;
316 #if !defined(DOXYGEN_ONLY) 335 const phy_t &peerPhy,
336 uint16_t advertisingInterval,
340 syncHandle(syncHandle),
342 peerAddressType(peerAddressType),
343 peerAddress(peerAddress),
345 advertisingInterval(advertisingInterval),
346 peerClockAccuracy(peerClockAccuracy)
373 return peerAddressType;
391 return advertisingInterval;
397 return peerClockAccuracy;
407 uint16_t advertisingInterval;
417 #if !defined(DOXYGEN_ONLY) 434 syncHandle(syncHandle),
437 dataStatus(dataStatus),
488 #if !defined(DOXYGEN_ONLY) 497 syncHandle(syncHandle)
526 #if !defined(DOXYGEN_ONLY) 538 uint8_t completed_events,
541 advHandle(advHandle),
542 connection(connection),
543 completed_events(completed_events),
565 return completed_events;
577 uint8_t completed_events;
587 #if !defined(DOXYGEN_ONLY) 600 advHandle(advHandle),
601 peerAddressType(peerAddressType),
602 peerAddress(peerAddress)
617 return peerAddressType;
638 #if !defined(DOXYGEN_ONLY) 644 connectionHandle(connectionHandle), reason(reason)
655 return connectionHandle;
677 #if !defined(DOXYGEN_ONLY) 686 connectionHandle(connectionHandle),
687 minConnectionInterval(minConnectionInterval),
688 maxConnectionInterval(maxConnectionInterval),
689 slaveLatency(slaveLatency),
690 supervisionTimeout(supervision_timeout)
701 return connectionHandle;
709 return minConnectionInterval;
717 return maxConnectionInterval;
733 return supervisionTimeout;
750 #if !defined(DOXYGEN_ONLY) 760 connectionHandle(connectionHandle),
761 connectionInterval(connectionInterval),
762 slaveLatency(slaveLatency),
763 supervisionTimeout(supervisionTimeout)
783 return connectionHandle;
791 return connectionInterval;
807 return supervisionTimeout;
826 #endif //BLE_GAP_EVENTS_H const disconnection_reason_t & getReason() const
Get the reason of the disconnection.
Event generated when a connection initiation ends (successfully or not).
uint16_t getMasterClockAccuracy() const
Get clock accuracy in parts per million.
rssi_t getRssi() const
Get received signal strength.
periodic_sync_handle_t getSyncHandle() const
Get periodic advertising sync handle.
Event produced when advertising ends.
const clock_accuracy_t & getPeerClockAccuracy() const
Get clock accuracy in parts per million.
Event received when connection parameters have been updated.
ble_error_t getStatus() const
Get connection complete event status.
Event generated when periodic advertising sync is lost.
advertising_handle_t getAdvHandle() const
Get advertising handle.
uintptr_t connection_handle_t
Opaque reference to a connection.
const peer_address_type_t & getPeerAddressType() const
Get peer address type.
uint8_t getCompleted_events() const
Get how many events advertising created.
const address_t & getPeerResolvablePrivateAddress() const
Get peer resolvable private address if privacy is used.
advertising_power_t getTxPower() const
Get TX power.
Event generated when an advertising packet is seen during passive scanning or a scan response is rece...
connection_handle_t getConnectionHandle() const
Get the connection handle.
const conn_interval_t & getMinConnectionInterval() const
Get the minimum connection interval requested.
uint16_t periodic_sync_handle_t
Handle of a sync representing a periodic advertiser.
bool isPeriodicIntervalPresent() const
Indicate if periodic interval is valid.
const slave_latency_t & getSlaveLatency() const
Get the new slave latency.
Enumeration of GAP roles.
uint16_t getAdvertisingInterval() const
Get interval.
Duration< uint16_t, 1250, Range< 0x06, 0xFFFF > > periodic_interval_t
Interval between two periodic advertising events.
const conn_interval_t & getMaxConnectionInterval() const
Get the maximum connection interval requested.
rssi_t getRssi() const
Get received signal strength.
const peer_address_type_t & getPeerAddressType() const
Get peer address type.
Enumeration of disconnection reasons received in a disconnection event.
const advertising_data_status_t & getDataStatus() const
Get data completeness status.
connection_handle_t getConnectionHandle() const
Get the handle of the connection that has been updated.
const address_t & getPeerAddress() const
Get peer address.
const conn_interval_t & getConnectionInterval() const
Get the new connection interval.
uint8_t advertising_sid_t
Identify an advertising SID.
connection_role_t getOwnRole() const
Get own role.
const supervision_timeout_t & getSupervisionTimeout() const
Get the new supervision timeout.
const peer_address_type_t & getPeerAddressType() const
Get peer address type.
connection_handle_t getConnectionHandle() const
Get connection handle (valid only when successful).
ble_error_t getStatus() const
Get sync establishment status.
Used to indicate if the packet is complete and if it's truncated.
const peer_address_type_t & getPeerAddressType() const
Get peer address type.
int8_t rssi_t
Received signal strength.
ble_error_t getStatus() const
Get the status of the operation.
advertising_sid_t getSID() const
Get advertising set identifier.
advertising_handle_t getAdvHandle() const
Get advertising handle.
int8_t advertising_power_t
Describe the advertising power.
const address_t & getDirectAddress() const
Get target address in directed advertising.
Type that describes a bluetooth PHY(sical) transport.
const supervision_timeout_t & getSupervisionTimeout() const
Get the supervision timeout requested.
const mbed::Span< const uint8_t > & getPayload() const
Get payload.
uint8_t advertising_handle_t
Handle of an advertising set.
Properties of an advertising event.
Event generated when you first receive a periodic advertisement.
const mbed::Span< const uint8_t > & getPayload() const
Get payload.
periodic_interval_t getPeriodicInterval() const
Get interval.
const phy_t & getSecondaryPhy() const
Get secondary PHY.
const phy_t & getPeerPhy() const
Get PHY used.
Type that describes a peer device address type.
Event generated when scan times out.
Event produced when a disconnection is complete.
const address_t & getPeerAddress() const
Get peer address.
const peer_address_type_t & getDirectAddressType() const
Get target address type in directed advertising.
advertising_power_t getTxPower() const
Get TX power as reported by the advertising packet.
Event generated when periodic advertising packet is received.
bool isConnected() const
Has the advertising ended with a connection.
periodic_sync_handle_t getSyncHandle() const
Get periodic advertising sync handle.
Event received when a peer wants to change the connection parameters.
connection_handle_t getConnectionHandle() const
Get the handle of the connection that has expired.
slave_latency_t getConnectionLatency() const
Get connection latency.
Accuracy of the master clock.
const phy_t & getPrimaryPhy() const
Get primary PHY.
periodic_sync_handle_t getSyncHandle() const
Get periodic sync handle.
connection_handle_t getConnection() const
Get connection handle (valid only if connected successfully).
const address_t & getPeerAddress() const
Get peer address.
conn_interval_t getConnectionInterval() const
Get connection interval.
Entry namespace for all BLE API definitions.
const slave_latency_t & getSlaveLatency() const
Get the slave latency requested.
const advertising_event_t & getType() const
Get event type.
const address_t & getPeerAddress() const
Get peer address.
Event produced when a peer requests a scan response from the advertiser.
const address_t & getLocalResolvablePrivateAddress() const
Get get local resolvable random address if privacy is used.
supervision_timeout_t getSupervisionTimeout() const
Get supervision timeout.
advertising_sid_t getSid() const
Get advertising set identifier.
ble_error_t
Error codes for the BLE API.