17 #ifndef BLE_GAP_EVENTS_H 18 #define BLE_GAP_EVENTS_H 20 #include "ble/blecommon.h" 21 #include "ble/BLETypes.h" 22 #include "platform/Span.h" 40 #if !defined(DOXYGEN_ONLY) 61 const phy_t &primaryPhy,
62 const phy_t &secondaryPhy,
66 uint16_t periodicInterval,
72 peerAddressType(peerAddressType),
73 peerAddress(peerAddress),
74 primaryPhy(primaryPhy),
75 secondaryPhy(secondaryPhy),
79 periodicInterval(periodicInterval),
80 directAddressType(directAddressType),
81 directAddress(directAddress),
82 advertisingData(advertisingData)
97 return peerAddressType;
138 return periodicInterval != 0;
150 return directAddressType;
156 return directAddress;
162 return advertisingData;
174 uint16_t periodicInterval;
186 #if !defined(DOXYGEN_ONLY) 208 const address_t &localResolvablePrivateAddress,
209 const address_t &peerResolvablePrivateAddress,
213 uint16_t masterClockAccuracy
216 connectionHandle(connectionHandle),
218 peerAddressType(peerAddressType),
219 peerAddress(peerAddress),
220 localResolvablePrivateAddress(localResolvablePrivateAddress),
221 peerResolvablePrivateAddress(peerResolvablePrivateAddress),
222 connectionInterval(connectionInterval),
223 connectionLatency(connectionLatency),
224 supervisionTimeout(supervisionTimeout),
225 masterClockAccuracy(masterClockAccuracy)
240 return connectionHandle;
252 return peerAddressType;
264 return localResolvablePrivateAddress;
270 return peerResolvablePrivateAddress;
276 return connectionInterval;
282 return connectionLatency;
288 return supervisionTimeout;
294 return masterClockAccuracy;
303 const address_t &localResolvablePrivateAddress;
304 const address_t &peerResolvablePrivateAddress;
308 uint16_t masterClockAccuracy;
317 #if !defined(DOXYGEN_ONLY) 336 const phy_t &peerPhy,
337 uint16_t advertisingInterval,
341 syncHandle(syncHandle),
343 peerAddressType(peerAddressType),
344 peerAddress(peerAddress),
346 advertisingInterval(advertisingInterval),
347 peerClockAccuracy(peerClockAccuracy)
374 return peerAddressType;
392 return advertisingInterval;
398 return peerClockAccuracy;
408 uint16_t advertisingInterval;
418 #if !defined(DOXYGEN_ONLY) 435 syncHandle(syncHandle),
438 dataStatus(dataStatus),
489 #if !defined(DOXYGEN_ONLY) 498 syncHandle(syncHandle)
527 #if !defined(DOXYGEN_ONLY) 539 uint8_t completed_events,
542 advHandle(advHandle),
543 connection(connection),
544 completed_events(completed_events),
566 return completed_events;
578 uint8_t completed_events;
588 #if !defined(DOXYGEN_ONLY) 601 advHandle(advHandle),
602 peerAddressType(peerAddressType),
603 peerAddress(peerAddress)
618 return peerAddressType;
639 #if !defined(DOXYGEN_ONLY) 645 connectionHandle(connectionHandle), reason(reason)
656 return connectionHandle;
678 #if !defined(DOXYGEN_ONLY) 687 connectionHandle(connectionHandle),
688 minConnectionInterval(minConnectionInterval),
689 maxConnectionInterval(maxConnectionInterval),
690 slaveLatency(slaveLatency),
691 supervisionTimeout(supervision_timeout)
702 return connectionHandle;
710 return minConnectionInterval;
718 return maxConnectionInterval;
734 return supervisionTimeout;
751 #if !defined(DOXYGEN_ONLY) 761 connectionHandle(connectionHandle),
762 connectionInterval(connectionInterval),
763 slaveLatency(slaveLatency),
764 supervisionTimeout(supervisionTimeout)
784 return connectionHandle;
792 return connectionInterval;
808 return supervisionTimeout;
827 #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.