Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Diff: GapAdvertisingParams.h
- Revision:
- 45:8a9919adb207
- Parent:
- 43:ac154ac74a30
--- a/GapAdvertisingParams.h Fri May 23 14:52:12 2014 +0100
+++ b/GapAdvertisingParams.h Fri May 23 15:21:16 2014 +0100
@@ -83,6 +83,10 @@
uint16_t timeout = 0);
virtual ~GapAdvertisingParams(void);
+ void setAdvertisingType(AdvertisingType newAdvType);
+ void setInterval(uint16_t newInterval);
+ void setTimeout(uint16_t newTimeout);
+
virtual AdvertisingType getAdvertisingType(void) const;
virtual uint16_t getInterval(void) const;
virtual uint16_t getTimeout(void) const;
@@ -93,4 +97,54 @@
uint16_t _timeout;
};
+inline void
+GapAdvertisingParams::setAdvertisingType(AdvertisingType newAdvType) {
+ _advType = newAdvType;
+}
+
+inline void
+GapAdvertisingParams::setInterval(uint16_t newInterval) {
+ _interval = newInterval;
+}
+
+inline void
+GapAdvertisingParams::setTimeout(uint16_t newTimeout) {
+ _timeout = newTimeout;
+}
+
+
+/**************************************************************************/
+/*!
+ \brief returns the current Advertising Type value
+*/
+/**************************************************************************/
+inline GapAdvertisingParams::AdvertisingType
+GapAdvertisingParams::getAdvertisingType(void) const
+{
+ return _advType;
+}
+
+/**************************************************************************/
+/*!
+ \brief returns the current Advertising Delay (in units of 0.625ms)
+*/
+/**************************************************************************/
+inline uint16_t
+GapAdvertisingParams::getInterval(void) const
+{
+ return _interval;
+}
+
+/**************************************************************************/
+/*!
+ \brief returns the current Advertising Timeout (in seconds)
+*/
+/**************************************************************************/
+inline uint16_t
+GapAdvertisingParams::getTimeout(void) const
+{
+ return _timeout;
+}
+
+
#endif // ifndef __GAP_ADVERTISING_PARAMS_H__
