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