Wallbot_CaaS
Dependencies: MPU6050 mbed PID
Fork of BLE_MPU6050_test6_challenge_sb by
GapAdvertisingParams Class Reference
This class provides a wrapper for the core advertising parameters, including the advertising type (Connectable Undirected, Non Connectable Undirected, etc.), as well as the advertising and timeout intervals. More...
#include <GapAdvertisingParams.h>
Public Types | |
enum | AdvertisingType { ADV_CONNECTABLE_UNDIRECTED, ADV_CONNECTABLE_DIRECTED, ADV_SCANNABLE_UNDIRECTED, ADV_NON_CONNECTABLE_UNDIRECTED } |
Encapsulates the peripheral advertising modes, which determine how the device appears to other central devices in hearing range. More... | |
Public Member Functions | |
GapAdvertisingParams (AdvertisingType advType=GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED, uint16_t interval=GAP_ADV_PARAMS_INTERVAL_MIN_NONCON, uint16_t timeout=0) | |
Instantiates a new GapAdvertisingParams instance. | |
virtual | ~GapAdvertisingParams (void) |
Detailed Description
This class provides a wrapper for the core advertising parameters, including the advertising type (Connectable Undirected, Non Connectable Undirected, etc.), as well as the advertising and timeout intervals.
- See the following for more information on advertising types:
Bluetooth
Core Specification 4.0 (Vol. 6), Part B, Section 2.3.1Bluetooth
Core Specification 4.0 (Vol. 3), Part C, Section 9.3
Definition at line 35 of file GapAdvertisingParams.h.
Member Enumeration Documentation
enum AdvertisingType |
Encapsulates the peripheral advertising modes, which determine how the device appears to other central devices in hearing range.
- See the following for more information on advertising types:
Bluetooth
Core Specification 4.0 (Vol. 6), Part B, Section 2.3.1Bluetooth
Core Specification 4.0 (Vol. 3), Part C, Section 9.3
- Enumerator:
Definition at line 55 of file GapAdvertisingParams.h.
Constructor & Destructor Documentation
GapAdvertisingParams | ( | AdvertisingType | advType = GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED , |
uint16_t | interval = GAP_ADV_PARAMS_INTERVAL_MIN_NONCON , |
||
uint16_t | timeout = 0 |
||
) |
Instantiates a new GapAdvertisingParams instance.
- Parameters:
-
[in] advType The GAP advertising mode to use for this device. Valid values are defined in AdvertisingType:
- ADV_NON_CONNECTABLE_UNDIRECTED
- All connections to the peripheral device will be refused.
- ADV_CONNECTABLE_DIRECTED
- Only connections from a pre-defined central device will be accepted.
- ADV_CONNECTABLE_UNDIRECTED
- Any central device can connect to this peripheral.
- ADV_SCANNABLE_UNDIRECTED
- Any central device can connect to this peripheral, and the secondary Scan Response payload will be included or available to central devices.
- See Bluetooth Core Specification 4.0 (Vol. 3), Part C, Section 9.3 and Core Specification 4.0 (Vol. 6), Part B, Section 2.3.1 for further information on GAP connection modes
- Parameters:
-
[in] interval Advertising interval between 0x0020 and 0x4000 in 0.625ms units (20ms to 10.24s). If using non-connectable mode (ADV_NON_CONNECTABLE_UNDIRECTED) this min value is 0x00A0 (100ms). To reduce the likelihood of collisions, the link layer perturbs this interval by a pseudo-random delay with a range of 0 ms to 10 ms for each advertising event.
- Decreasing this value will allow central devices to detect your peripheral faster at the expense of more power being used by the radio due to the higher data transmit rate.
- This field must be set to 0 if connectionMode is equal to ADV_CONNECTABLE_DIRECTED
- See Bluetooth Core Specification, Vol 3., Part C, Appendix A for suggested advertising intervals.
- Parameters:
-
[in] timeout Advertising timeout between 0x1 and 0x3FFF (1 and 16383) in seconds. Enter 0 to disable the advertising timeout.
- EXAMPLE
Definition at line 85 of file GapAdvertisingParams.cpp.
~GapAdvertisingParams | ( | void | ) | [virtual] |
Destructor
Definition at line 127 of file GapAdvertisingParams.cpp.
Generated on Tue Jul 12 2022 18:33:11 by 1.7.2