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