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
Revision 181:bbb6ce1082c3, committed 2014-11-28
- Comitter:
- rgrover1
- Date:
- Fri Nov 28 14:11:23 2014 +0000
- Parent:
- 180:afcd2f9c2ada
- Child:
- 182:d16f8c11816b
- Commit message:
- Synchronized with git rev e5145420
Author: Rohit Grover
add a comment header for setupService
Changed in this revision
| services/URIBeacon2Service.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/services/URIBeacon2Service.h Fri Nov 28 14:11:23 2014 +0000
+++ b/services/URIBeacon2Service.h Fri Nov 28 14:11:23 2014 +0000
@@ -40,6 +40,24 @@
NUM_POWER_MODES
};
+ /**
+ * Singleton factory.
+ *
+ * @param[ref] ble
+ * BLEDevice object for the underlying controller.
+ * @param[in] urldata
+ * URI as a null-terminated string.
+ * @param[in] flagsIn
+ * UriBeacon Flags.
+ * @param[in] effectiveTxPowerIn
+ * UriBeacon Tx Power Level in dBm.
+ * @param[in] beaconPeriodIn
+ * The period in milliseconds that a UriBeacon packet is
+ * transmitted. A value of zero disables UriBeacon
+ * transmissions.
+ * @return
+ * Pointer to the singleton uribeacon service if the initialization goes well; else NULL.
+ */
static URIBeacon2Service *setupService(BLEDevice &ble_, const char *urldata, uint8_t flagsIn = 0, int8_t effectiveTxPowerIn = 0, uint16_t beaconPeriodIn = 1000) {
if ((urldata == NULL) || (strlen(urldata) == 0)) {
return NULL;
@@ -91,20 +109,6 @@
}
private:
- /**
- * @param[ref] ble
- * BLEDevice object for the underlying controller.
- * @param[in] urldata
- * URI as a null-terminated string.
- * @param[in] flagsIn
- * UriBeacon Flags.
- * @param[in] effectiveTxPowerIn
- * UriBeacon Tx Power Level in dBm.
- * @param[in] beaconPeriodIn
- * The period in milliseconds that a UriBeacon packet is
- * transmitted. A value of zero disables UriBeacon
- * transmissions.
- */
URIBeacon2Service(BLEDevice &ble_, const char *urldata, uint8_t flagsIn = 0, int8_t effectiveTxPowerIn = 0, uint16_t beaconPeriodIn = 1000) :
ble(ble_),
payloadIndex(0),
