Button initiated config service

Dependencies:   BLE_API_EddystoneConfigService_2 mbed nRF51822

Fork of BLE_EddystoneBeaconConfigService_3 by URIBeacon

Files at this revision

API Documentation at this revision

Comitter:
mbedAustin
Date:
Fri Jul 17 21:43:56 2015 +0000
Parent:
11:73ea4ef7f5a4
Child:
13:91c356fa928e
Commit message:
added functions to update TLM field values.

Changed in this revision

ZipBeaconConfigService.h Show annotated file Show diff for this revision Revisions of this file
--- a/ZipBeaconConfigService.h	Fri Jul 17 21:06:30 2015 +0000
+++ b/ZipBeaconConfigService.h	Fri Jul 17 21:43:56 2015 +0000
@@ -330,6 +330,46 @@
         
         return index;
     }
+    
+    /*
+    *  Update the TLM frame battery voltage value
+    *  @param[in] voltagemv Voltage to update the TLM field battery voltage with (in mV)
+    *  @return nothing
+    */
+    void updateTlmBatteryVoltage(uint16_t voltagemv){
+        TlmBatteryVoltage = voltagemv;
+        return;        
+    }
+    
+    /*
+    *  Update the TLM frame beacon temperature 
+    *  @param[in] temp Temperature of beacon (in 8.8fpn)
+    *  @return nothing
+    */
+    void updateTlmBeaconTemp(uint16_t temp){
+        TlmBeaconTemp = temp;
+        return;        
+    }
+    
+    /*
+    *  Update the TLM frame PDU Count field
+    *  @param[in] pduCount Number of Advertisiting frames sent since powerup
+    *  @return nothing
+    */
+    void updateTlmPduCount(uint32_t pduCount){
+        TlmPduCount = pduCount;
+        return;        
+    }
+    
+    /*
+    *  Update the TLM frame Time since boot in 0.1s incriments
+    *  @param[in] timeSinceBoot Time since boot in 0.1s incriments
+    *  @return nothing
+    */
+    void updateTlmTimeSinceBoot(uint32_t timeSinceBoot){
+        TlmTimeSinceBoot = timeSinceBoot;
+        return;        
+    }
 
     /* Helper function to switch to the non-connectible normal mode for ZipBeacon. This gets called after a timeout. */
     void setupZipBeaconAdvertisements()
@@ -439,6 +479,7 @@
         params.beaconPeriod     = 1000;
         memcpy(params.uidNamespaceID, defaultUidNamespaceID, UID_NAMESPACEID_SIZE);
         memcpy(params.uidInstanceID,  defaultUidInstanceID,  UID_INSTANCEID_SIZE);
+        params.tlmVersion = 0;
         updateCharacteristicValues();
     }