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.
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: services/URIBeacon2Service.h
- Revision:
- 181:bbb6ce1082c3
- Parent:
- 180:afcd2f9c2ada
- Child:
- 182:d16f8c11816b
diff -r afcd2f9c2ada -r bbb6ce1082c3 services/URIBeacon2Service.h
--- 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),
