High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Fri May 23 15:21:16 2014 +0100
Parent:
44:959ac8f4b3f7
Child:
46:33d87f468a0d
Commit message:
minor improvement to the API

Changed in this revision

GapAdvertisingParams.cpp Show annotated file Show diff for this revision Revisions of this file
GapAdvertisingParams.h Show annotated file Show diff for this revision Revisions of this file
--- a/GapAdvertisingParams.cpp	Fri May 23 14:52:12 2014 +0100
+++ b/GapAdvertisingParams.cpp	Fri May 23 15:21:16 2014 +0100
@@ -129,33 +129,3 @@
 GapAdvertisingParams::~GapAdvertisingParams(void)
 {
 }
-
-/**************************************************************************/
-/*!
-    \brief returns the current Advertising Type value
-*/
-/**************************************************************************/
-GapAdvertisingParams::AdvertisingType GapAdvertisingParams::getAdvertisingType(void) const
-{
-    return _advType;
-}
-
-/**************************************************************************/
-/*!
-    \brief returns the current Advertising Delay (in units of 0.625ms)
-*/
-/**************************************************************************/
-uint16_t GapAdvertisingParams::getInterval(void) const
-{
-    return _interval;
-}
-
-/**************************************************************************/
-/*!
-    \brief returns the current Advertising Timeout (in seconds)
-*/
-/**************************************************************************/
-uint16_t GapAdvertisingParams::getTimeout(void) const
-{
-    return _timeout;
-}
--- 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__