Mistake on this page?
Report an issue in GitHub or email us
Events.h
1 /* mbed Microcontroller Library
2  * Copyright (c) 2018-2018 ARM Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15 */
16 
17 #ifndef BLE_GAP_EVENTS_H
18 #define BLE_GAP_EVENTS_H
19 
20 #include "ble/blecommon.h"
21 #include "ble/BLETypes.h"
22 
23 namespace ble {
24 
25 /**
26  * @addtogroup ble
27  * @{
28  * @addtogroup gap
29  * @{
30  */
31 
32 /**
33  * Event generated when an advertising packet is seen during passive scanning
34  * or a scan response is received during active scanning.
35  *
36  * @see ble::Gap::EventHandler::onPeriodicAdvertisingReport()
37  */
39 #if !defined(DOXYGEN_ONLY)
40 
41  /** Create an advertising report event.
42  *
43  * @param type Type of advertising used.
44  * @param peerAddressType Peer address type of advertiser.
45  * @param peerAddress Peer address of advertiser.
46  * @param primaryPhy PHY used on the primary channels.
47  * @param secondaryPhy PHY used on secondary channels.
48  * @param SID Set identification number.
49  * @param txPower Transmission power reported by the packet.
50  * @param rssi Measured signal strength.
51  * @param periodicInterval Interval of periodic advertising.
52  * @param directAddressType Directed advertising target address type.
53  * @param directAddress Directed advertising target address.
54  * @param advertisingData Advertising payload.
55  */
57  const advertising_event_t &type,
58  const peer_address_type_t &peerAddressType,
59  const address_t &peerAddress,
60  const phy_t &primaryPhy,
61  const phy_t &secondaryPhy,
63  advertising_power_t txPower,
64  rssi_t rssi,
65  uint16_t periodicInterval,
66  const peer_address_type_t &directAddressType,
67  const address_t &directAddress,
68  const mbed::Span<const uint8_t> &advertisingData
69  ) :
70  type(type),
71  peerAddressType(peerAddressType),
72  peerAddress(peerAddress),
73  primaryPhy(primaryPhy),
74  secondaryPhy(secondaryPhy),
75  SID(SID),
76  txPower(txPower),
77  rssi(rssi),
78  periodicInterval(periodicInterval),
79  directAddressType(directAddressType),
80  directAddress(directAddress),
81  advertisingData(advertisingData)
82  {
83  }
84 
85 #endif
86 
87  /** Get event type. */
89  {
90  return type;
91  }
92 
93  /** Get peer address type. */
95  {
96  return peerAddressType;
97  }
98 
99  /** Get peer address. */
100  const address_t &getPeerAddress() const
101  {
102  return peerAddress;
103  }
104 
105  /** Get primary PHY. */
106  const phy_t &getPrimaryPhy() const
107  {
108  return primaryPhy;
109  }
110 
111  /** Get secondary PHY. */
112  const phy_t &getSecondaryPhy() const
113  {
114  return secondaryPhy;
115  }
116 
117  /** Get advertising set identifier. */
119  {
120  return SID;
121  }
122 
123  /** Get TX power. */
125  {
126  return txPower;
127  }
128 
129  /** Get received signal strength. */
130  rssi_t getRssi() const
131  {
132  return rssi;
133  }
134 
135  /** Indicate if periodic interval is valid */
137  return periodicInterval != 0;
138  }
139 
140  /** Get interval. */
142  {
143  return periodic_interval_t(periodicInterval);
144  }
145 
146  /** Get target address type in directed advertising. */
148  {
149  return directAddressType;
150  }
151 
152  /** Get target address in directed advertising. */
154  {
155  return directAddress;
156  }
157 
158  /** Get payload. */
160  {
161  return advertisingData;
162  }
163 
164 private:
165  advertising_event_t type;
166  peer_address_type_t peerAddressType;
167  address_t const &peerAddress;
168  phy_t primaryPhy;
169  phy_t secondaryPhy;
170  advertising_sid_t SID;
171  advertising_power_t txPower;
172  rssi_t rssi;
173  uint16_t periodicInterval;
174  peer_address_type_t directAddressType;
175  const address_t &directAddress;
176  mbed::Span<const uint8_t> advertisingData;
177 };
178 
179 /**
180  * Event generated when a connection initiation ends (successfully or not).
181  *
182  * @see ble::Gap::EventHandler::onConnectionComplete().
183  */
185 #if !defined(DOXYGEN_ONLY)
186 
187  /** Create a connection complete event.
188  *
189  * @param success BLE_ERROR_NONE if connection succeeded.
190  * @param connectionHandle Connection handle if successful.
191  * @param ownRole Role of the local device.
192  * @param peerAddressType Peer address type.
193  * @param peerAddress Peer address.
194  * @param localResolvablePrivateAddress Local address type if privacy enabled.
195  * @param peerResolvablePrivateAddress Peer address type if privacy enabled.
196  * @param connectionInterval Connection interval.
197  * @param connectionLatency Connection latency in events.
198  * @param supervisionTimeout Supervision timeout.
199  * @param masterClockAccuracy Peer clock accuracy in parts per million.
200  */
202  ble_error_t status,
203  connection_handle_t connectionHandle,
204  connection_role_t ownRole,
205  const peer_address_type_t &peerAddressType,
206  const address_t &peerAddress,
207  const address_t &localResolvablePrivateAddress,
208  const address_t &peerResolvablePrivateAddress,
209  conn_interval_t connectionInterval,
210  slave_latency_t connectionLatency,
211  supervision_timeout_t supervisionTimeout,
212  uint16_t masterClockAccuracy
213  ) :
214  status(status),
215  connectionHandle(connectionHandle),
216  ownRole(ownRole),
217  peerAddressType(peerAddressType),
218  peerAddress(peerAddress),
219  localResolvablePrivateAddress(localResolvablePrivateAddress),
220  peerResolvablePrivateAddress(peerResolvablePrivateAddress),
221  connectionInterval(connectionInterval),
222  connectionLatency(connectionLatency),
223  supervisionTimeout(supervisionTimeout),
224  masterClockAccuracy(masterClockAccuracy)
225  {
226  }
227 
228 #endif
229 
230  /** Get connection complete event status. */
232  {
233  return status;
234  }
235 
236  /** Get connection handle (valid only when successful). */
238  {
239  return connectionHandle;
240  }
241 
242  /** Get own role. */
244  {
245  return ownRole;
246  }
247 
248  /** Get peer address type. */
250  {
251  return peerAddressType;
252  }
253 
254  /** Get peer address. */
255  const address_t &getPeerAddress() const
256  {
257  return peerAddress;
258  }
259 
260  /** Get get local resolvable random address if privacy is used. */
262  {
263  return localResolvablePrivateAddress;
264  }
265 
266  /** Get peer resolvable private address if privacy is used. */
268  {
269  return peerResolvablePrivateAddress;
270  }
271 
272  /** Get connection interval. */
274  {
275  return connectionInterval;
276  }
277 
278  /** Get connection latency. */
280  {
281  return connectionLatency;
282  }
283 
284  /** Get supervision timeout. */
286  {
287  return supervisionTimeout;
288  }
289 
290  /** Get clock accuracy in parts per million. */
291  uint16_t getMasterClockAccuracy() const
292  {
293  return masterClockAccuracy;
294  }
295 
296 private:
297  ble_error_t status;
298  connection_handle_t connectionHandle;
299  connection_role_t ownRole;
300  peer_address_type_t peerAddressType;
301  const address_t &peerAddress;
302  const address_t &localResolvablePrivateAddress;
303  const address_t &peerResolvablePrivateAddress;
304  conn_interval_t connectionInterval;
305  slave_latency_t connectionLatency;
306  supervision_timeout_t supervisionTimeout;
307  uint16_t masterClockAccuracy;
308 };
309 
310 /**
311  * Event generated when you first receive a periodic advertisement.
312  *
313  * @see ble::Gap::EventHandler::onPeriodicAdvertisingSyncEstablished().
314  */
316 #if !defined(DOXYGEN_ONLY)
317 
318  /** Create advertising sync event.
319  *
320  * @param success BLE_ERROR_NONE if synchronisation was achieved.
321  * @param syncHandle Advertising sync handle.
322  * @param sid Advertising set identifier.
323  * @param peerAddressType Peer address type.
324  * @param peerAddress Peer address.
325  * @param peerPhy PHY used for advertisements.
326  * @param advertisingInterval Periodic advertising interval.
327  * @param masterClockAccuracy Peer clock accuracy in parts per million.
328  */
330  ble_error_t status,
331  periodic_sync_handle_t syncHandle,
332  advertising_sid_t sid,
333  const peer_address_type_t &peerAddressType,
334  const address_t &peerAddress,
335  const phy_t &peerPhy,
336  uint16_t advertisingInterval,
337  const clock_accuracy_t &peerClockAccuracy
338  ) :
339  status(status),
340  syncHandle(syncHandle),
341  sid(sid),
342  peerAddressType(peerAddressType),
343  peerAddress(peerAddress),
344  peerPhy(peerPhy),
345  advertisingInterval(advertisingInterval),
346  peerClockAccuracy(peerClockAccuracy)
347  {
348  }
349 
350 #endif
351 
352  /** Get sync establishment status. */
354  {
355  return status;
356  }
357 
358  /** Get periodic advertising sync handle. */
360  {
361  return syncHandle;
362  }
363 
364  /** Get advertising set identifier. */
366  {
367  return sid;
368  }
369 
370  /** Get peer address type. */
372  {
373  return peerAddressType;
374  }
375 
376  /** Get peer address. */
377  const address_t &getPeerAddress() const
378  {
379  return peerAddress;
380  }
381 
382  /** Get PHY used. */
383  const phy_t &getPeerPhy() const
384  {
385  return peerPhy;
386  }
387 
388  /** Get interval. */
389  uint16_t getAdvertisingInterval() const
390  {
391  return advertisingInterval;
392  }
393 
394  /** Get clock accuracy in parts per million. */
396  {
397  return peerClockAccuracy;
398  }
399 
400 private:
401  ble_error_t status;
402  periodic_sync_handle_t syncHandle;
403  advertising_sid_t sid;
404  peer_address_type_t peerAddressType;
405  const address_t &peerAddress;
406  phy_t peerPhy;
407  uint16_t advertisingInterval;
408  clock_accuracy_t peerClockAccuracy;
409 };
410 
411 /**
412  * Event generated when periodic advertising packet is received.
413  *
414  * @see ble::Gap::EventHandler::onPeriodicAdvertisingReport().
415  */
417 #if !defined(DOXYGEN_ONLY)
418 
419  /** Create periodic advertising report event.
420  *
421  * @param syncHandle Periodic advertising sync handle
422  * @param txPower TX power.
423  * @param rssi Received signal strength.
424  * @param dataStatus Status to indicate the completeness of the payload.
425  * @param payload Periodic advertisement payload.
426  */
428  periodic_sync_handle_t syncHandle,
429  advertising_power_t txPower,
430  rssi_t rssi,
431  advertising_data_status_t dataStatus,
432  const mbed::Span<const uint8_t> &payload
433  ) :
434  syncHandle(syncHandle),
435  txPower(txPower),
436  rssi(rssi),
437  dataStatus(dataStatus),
438  payload(payload)
439  {
440  }
441 
442 #endif
443 
444  /** Get periodic advertising sync handle. */
446  {
447  return syncHandle;
448  }
449 
450  /** Get TX power as reported by the advertising packet. */
452  {
453  return txPower;
454  }
455 
456  /** Get received signal strength. */
457  rssi_t getRssi() const
458  {
459  return rssi;
460  }
461 
462  /** Get data completeness status. */
464  {
465  return dataStatus;
466  }
467 
468  /** Get payload. */
470  {
471  return payload;
472  }
473 
474 private:
475  periodic_sync_handle_t syncHandle;
476  advertising_power_t txPower;
477  rssi_t rssi;
478  advertising_data_status_t dataStatus;
480 };
481 
482 /**
483  * Event generated when periodic advertising sync is lost.
484  *
485  * @see ble::Gap::EventHandler::onPeriodicAdvertisingSyncLoss().
486  */
488 #if !defined(DOXYGEN_ONLY)
489 
490  /** Create periodic advertising sync loss event.
491  *
492  * @param syncHandle Periodic advertising sync handle.
493  */
495  periodic_sync_handle_t syncHandle
496  ) :
497  syncHandle(syncHandle)
498  {
499  }
500 
501 #endif
502 
503  /** Get periodic sync handle. */
505  {
506  return syncHandle;
507  }
508 
509 private:
510  periodic_sync_handle_t syncHandle;
511 };
512 
513 /**
514  * Event generated when scan times out.
515  *
516  * @see ble::Gap::EventHandler::onScanTimeout().
517  */
518 struct ScanTimeoutEvent { };
519 
520 /**
521  * Event produced when advertising ends.
522  *
523  * @see ble::Gap::EventHandler::onAdvertisingEnd().
524  */
526 #if !defined(DOXYGEN_ONLY)
527 
528  /** Create advertising end event.
529  *
530  * @param advHandle Advertising set handle.
531  * @param connection Connection handle.
532  * @param completed_events Number of events created during before advertising end.
533  * @param connected True if connection has been established.
534  */
536  advertising_handle_t advHandle,
537  connection_handle_t connection,
538  uint8_t completed_events,
539  bool connected
540  ) :
541  advHandle(advHandle),
542  connection(connection),
543  completed_events(completed_events),
544  connected(connected)
545  {
546  }
547 
548 #endif
549 
550  /** Get advertising handle. */
552  {
553  return advHandle;
554  }
555 
556  /** Get connection handle (valid only if connected successfully). */
558  {
559  return connection;
560  }
561 
562  /** Get how many events advertising created. */
563  uint8_t getCompleted_events() const
564  {
565  return completed_events;
566  }
567 
568  /** Has the advertising ended with a connection. */
569  bool isConnected() const
570  {
571  return connected;
572  }
573 
574 private:
575  advertising_handle_t advHandle;
576  connection_handle_t connection;
577  uint8_t completed_events;
578  bool connected;
579 };
580 
581 /**
582  * Event produced when a peer requests a scan response from the advertiser.
583  *
584  * @see ble::Gap::EventHandler::onScanRequestReceived().
585  */
587 #if !defined(DOXYGEN_ONLY)
588 
589  /** Create scan request event.
590  *
591  * @param advHandle Advertising handle.
592  * @param peerAddressType Peer address type.
593  * @param peerAddress Peer address.
594  */
596  advertising_handle_t advHandle,
597  const peer_address_type_t &peerAddressType,
598  const address_t &peerAddress
599  ) :
600  advHandle(advHandle),
601  peerAddressType(peerAddressType),
602  peerAddress(peerAddress)
603  {
604  }
605 
606 #endif
607 
608  /** Get advertising handle. */
610  {
611  return advHandle;
612  }
613 
614  /** Get peer address type. */
616  {
617  return peerAddressType;
618  }
619 
620  /** Get peer address. */
621  const address_t &getPeerAddress() const
622  {
623  return peerAddress;
624  }
625 
626 private:
627  advertising_handle_t advHandle;
628  peer_address_type_t peerAddressType;
629  const address_t &peerAddress;
630 };
631 
632 /**
633  * Event produced when a disconnection is complete.
634  *
635  * @see ble::Gap::EventHandler::onDisconnectionComplete().
636  */
638 #if !defined(DOXYGEN_ONLY)
639 
641  connection_handle_t connectionHandle,
642  const disconnection_reason_t &reason
643  ) :
644  connectionHandle(connectionHandle), reason(reason)
645  {
646  }
647 
648 #endif
649 
650  /**
651  * Get the handle of the connection that has expired.
652  */
654  {
655  return connectionHandle;
656  }
657 
658  /**
659  * Get the reason of the disconnection.
660  */
662  {
663  return reason;
664  }
665 
666 private:
667  ble::connection_handle_t connectionHandle;
669 };
670 
671 /**
672  * Event received when a peer wants to change the connection parameters.
673  *
674  * @see ble::Gap::EventHandler::onUpdateConnectionParametersRequest().
675  */
677 #if !defined(DOXYGEN_ONLY)
678 
680  connection_handle_t connectionHandle,
681  const conn_interval_t &minConnectionInterval,
682  const conn_interval_t &maxConnectionInterval,
683  const slave_latency_t &slaveLatency,
684  const supervision_timeout_t &supervision_timeout
685  ) :
686  connectionHandle(connectionHandle),
687  minConnectionInterval(minConnectionInterval),
688  maxConnectionInterval(maxConnectionInterval),
689  slaveLatency(slaveLatency),
690  supervisionTimeout(supervision_timeout)
691  {
692  }
693 
694 #endif
695 
696  /**
697  * Get the connection handle.
698  */
700  {
701  return connectionHandle;
702  }
703 
704  /**
705  * Get the minimum connection interval requested.
706  */
708  {
709  return minConnectionInterval;
710  }
711 
712  /**
713  * Get the maximum connection interval requested.
714  */
716  {
717  return maxConnectionInterval;
718  }
719 
720  /**
721  * Get the slave latency requested.
722  */
724  {
725  return slaveLatency;
726  }
727 
728  /**
729  * Get the supervision timeout requested.
730  */
732  {
733  return supervisionTimeout;
734  }
735 
736 private:
737  ble::connection_handle_t connectionHandle;
738  ble::conn_interval_t minConnectionInterval;
739  ble::conn_interval_t maxConnectionInterval;
740  ble::slave_latency_t slaveLatency;
741  ble::supervision_timeout_t supervisionTimeout;
742 };
743 
744 /**
745  * Event received when connection parameters have been updated.
746  *
747  * @see ble::Gap::EventHandler::onConnectionParametersUpdateComplete().
748  */
750 #if !defined(DOXYGEN_ONLY)
751 
753  ble_error_t status,
754  connection_handle_t connectionHandle,
755  const conn_interval_t &connectionInterval,
756  const slave_latency_t &slaveLatency,
757  const supervision_timeout_t &supervisionTimeout
758  ) :
759  status(status),
760  connectionHandle(connectionHandle),
761  connectionInterval(connectionInterval),
762  slaveLatency(slaveLatency),
763  supervisionTimeout(supervisionTimeout)
764  {
765  }
766 
767 #endif
768 
769  /**
770  * Get the status of the operation. It is equal to BLE_ERROR_NONE in case of
771  * success.
772  */
774  {
775  return status;
776  }
777 
778  /**
779  * Get the handle of the connection that has been updated.
780  */
782  {
783  return connectionHandle;
784  }
785 
786  /**
787  * Get the new connection interval.
788  */
790  {
791  return connectionInterval;
792  }
793 
794  /**
795  * Get the new slave latency.
796  */
798  {
799  return slaveLatency;
800  }
801 
802  /**
803  * Get the new supervision timeout.
804  */
806  {
807  return supervisionTimeout;
808  }
809 
810 private:
811  ble_error_t status;
812  ble::connection_handle_t connectionHandle;
813  ble::conn_interval_t connectionInterval;
814  ble::slave_latency_t slaveLatency;
815  ble::supervision_timeout_t supervisionTimeout;
816 
817 };
818 
819 /**
820  * @}
821  * @}
822  */
823 
824 } // namespace ble
825 
826 #endif //BLE_GAP_EVENTS_H
const disconnection_reason_t & getReason() const
Get the reason of the disconnection.
Definition: Events.h:661
Event generated when a connection initiation ends (successfully or not).
Definition: Events.h:184
uint16_t getMasterClockAccuracy() const
Get clock accuracy in parts per million.
Definition: Events.h:291
rssi_t getRssi() const
Get received signal strength.
Definition: Events.h:457
periodic_sync_handle_t getSyncHandle() const
Get periodic advertising sync handle.
Definition: Events.h:359
Event produced when advertising ends.
Definition: Events.h:525
const clock_accuracy_t & getPeerClockAccuracy() const
Get clock accuracy in parts per million.
Definition: Events.h:395
Event received when connection parameters have been updated.
Definition: Events.h:749
ble_error_t getStatus() const
Get connection complete event status.
Definition: Events.h:231
Event generated when periodic advertising sync is lost.
Definition: Events.h:487
advertising_handle_t getAdvHandle() const
Get advertising handle.
Definition: Events.h:551
uintptr_t connection_handle_t
Opaque reference to a connection.
Definition: BLETypes.h:86
const peer_address_type_t & getPeerAddressType() const
Get peer address type.
Definition: Events.h:249
uint8_t getCompleted_events() const
Get how many events advertising created.
Definition: Events.h:563
const address_t & getPeerResolvablePrivateAddress() const
Get peer resolvable private address if privacy is used.
Definition: Events.h:267
advertising_power_t getTxPower() const
Get TX power.
Definition: Events.h:124
Event generated when an advertising packet is seen during passive scanning or a scan response is rece...
Definition: Events.h:38
connection_handle_t getConnectionHandle() const
Get the connection handle.
Definition: Events.h:699
const conn_interval_t & getMinConnectionInterval() const
Get the minimum connection interval requested.
Definition: Events.h:707
uint16_t periodic_sync_handle_t
Handle of a sync representing a periodic advertiser.
Definition: Types.h:141
bool isPeriodicIntervalPresent() const
Indicate if periodic interval is valid.
Definition: Events.h:136
const slave_latency_t & getSlaveLatency() const
Get the new slave latency.
Definition: Events.h:797
Enumeration of GAP roles.
Definition: Types.h:707
uint16_t getAdvertisingInterval() const
Get interval.
Definition: Events.h:389
Duration< uint16_t, 1250, Range< 0x06, 0xFFFF > > periodic_interval_t
Interval between two periodic advertising events.
Definition: Types.h:120
const conn_interval_t & getMaxConnectionInterval() const
Get the maximum connection interval requested.
Definition: Events.h:715
rssi_t getRssi() const
Get received signal strength.
Definition: Events.h:130
const peer_address_type_t & getPeerAddressType() const
Get peer address type.
Definition: Events.h:94
Enumeration of disconnection reasons received in a disconnection event.
Definition: Types.h:809
const advertising_data_status_t & getDataStatus() const
Get data completeness status.
Definition: Events.h:463
connection_handle_t getConnectionHandle() const
Get the handle of the connection that has been updated.
Definition: Events.h:781
const address_t & getPeerAddress() const
Get peer address.
Definition: Events.h:621
const conn_interval_t & getConnectionInterval() const
Get the new connection interval.
Definition: Events.h:789
uint8_t advertising_sid_t
Identify an advertising SID.
Definition: Types.h:374
connection_role_t getOwnRole() const
Get own role.
Definition: Events.h:243
const supervision_timeout_t & getSupervisionTimeout() const
Get the new supervision timeout.
Definition: Events.h:805
const peer_address_type_t & getPeerAddressType() const
Get peer address type.
Definition: Events.h:371
connection_handle_t getConnectionHandle() const
Get connection handle (valid only when successful).
Definition: Events.h:237
ble_error_t getStatus() const
Get sync establishment status.
Definition: Events.h:353
Used to indicate if the packet is complete and if it&#39;s truncated.
Definition: Types.h:219
const peer_address_type_t & getPeerAddressType() const
Get peer address type.
Definition: Events.h:615
int8_t rssi_t
Received signal strength.
Definition: Types.h:378
ble_error_t getStatus() const
Get the status of the operation.
Definition: Events.h:773
advertising_sid_t getSID() const
Get advertising set identifier.
Definition: Events.h:118
MAC address data type.
Definition: BLETypes.h:473
advertising_handle_t getAdvHandle() const
Get advertising handle.
Definition: Events.h:609
int8_t advertising_power_t
Describe the advertising power.
Definition: Types.h:387
const address_t & getDirectAddress() const
Get target address in directed advertising.
Definition: Events.h:153
Type that describes a bluetooth PHY(sical) transport.
Definition: BLETypes.h:628
const supervision_timeout_t & getSupervisionTimeout() const
Get the supervision timeout requested.
Definition: Events.h:731
const mbed::Span< const uint8_t > & getPayload() const
Get payload.
Definition: Events.h:159
uint8_t advertising_handle_t
Handle of an advertising set.
Definition: Types.h:134
Properties of an advertising event.
Definition: Types.h:252
Event generated when you first receive a periodic advertisement.
Definition: Events.h:315
const mbed::Span< const uint8_t > & getPayload() const
Get payload.
Definition: Events.h:469
periodic_interval_t getPeriodicInterval() const
Get interval.
Definition: Events.h:141
const phy_t & getSecondaryPhy() const
Get secondary PHY.
Definition: Events.h:112
const phy_t & getPeerPhy() const
Get PHY used.
Definition: Events.h:383
Type that describes a peer device address type.
Definition: BLETypes.h:580
Event generated when scan times out.
Definition: Events.h:518
Event produced when a disconnection is complete.
Definition: Events.h:637
const address_t & getPeerAddress() const
Get peer address.
Definition: Events.h:100
const peer_address_type_t & getDirectAddressType() const
Get target address type in directed advertising.
Definition: Events.h:147
advertising_power_t getTxPower() const
Get TX power as reported by the advertising packet.
Definition: Events.h:451
Event generated when periodic advertising packet is received.
Definition: Events.h:416
bool isConnected() const
Has the advertising ended with a connection.
Definition: Events.h:569
periodic_sync_handle_t getSyncHandle() const
Get periodic advertising sync handle.
Definition: Events.h:445
Event received when a peer wants to change the connection parameters.
Definition: Events.h:676
connection_handle_t getConnectionHandle() const
Get the handle of the connection that has expired.
Definition: Events.h:653
slave_latency_t getConnectionLatency() const
Get connection latency.
Definition: Events.h:279
Accuracy of the master clock.
Definition: Types.h:607
const phy_t & getPrimaryPhy() const
Get primary PHY.
Definition: Events.h:106
periodic_sync_handle_t getSyncHandle() const
Get periodic sync handle.
Definition: Events.h:504
connection_handle_t getConnection() const
Get connection handle (valid only if connected successfully).
Definition: Events.h:557
const address_t & getPeerAddress() const
Get peer address.
Definition: Events.h:255
conn_interval_t getConnectionInterval() const
Get connection interval.
Definition: Events.h:273
Entry namespace for all BLE API definitions.
const slave_latency_t & getSlaveLatency() const
Get the slave latency requested.
Definition: Events.h:723
const advertising_event_t & getType() const
Get event type.
Definition: Events.h:88
const address_t & getPeerAddress() const
Get peer address.
Definition: Events.h:377
Event produced when a peer requests a scan response from the advertiser.
Definition: Events.h:586
const address_t & getLocalResolvablePrivateAddress() const
Get get local resolvable random address if privacy is used.
Definition: Events.h:261
supervision_timeout_t getSupervisionTimeout() const
Get supervision timeout.
Definition: Events.h:285
Model BLE durations.
Definition: Duration.h:100
advertising_sid_t getSid() const
Get advertising set identifier.
Definition: Events.h:365
ble_error_t
Error codes for the BLE API.
Definition: blecommon.h:147
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.