ble/services/EddystoneService.h
int constructTLMFrame(uint8_t *Data, uint8_t maxSize) {
        uint32_t now = timeSinceBootTimer.read_ms();
        TlmTimeSinceBoot += (now - lastBootTimerRead) / 100;
        lastBootTimerRead = now;

        int index = 0;
        Data[index++] = FRAME_TYPE_TLM;                    // Eddystone frame type = Telemetry
        Data[index++] = TlmVersion;                        // TLM Version Number
        Data[index++] = (uint8_t)(TlmBatteryVoltage >> 8); // Battery Voltage[0]
        Data[index++] = (uint8_t)(TlmBatteryVoltage >> 0); // Battery Voltage[1]
        Data[index++] = (uint8_t)(TlmBeaconTemp >> 8);     // Beacon Temp[0]
        Data[index++] = (uint8_t)(TlmBeaconTemp >> 0);     // Beacon Temp[1]
        Data[index++] = (uint8_t)(TlmPduCount >> 24);      // PDU Count [0]
        Data[index++] = (uint8_t)(TlmPduCount >> 16);      // PDU Count [1]
        Data[index++] = (uint8_t)(TlmPduCount >> 8);       // PDU Count [2]
        Data[index++] = (uint8_t)(TlmPduCount >> 0);       // PDU Count [3]
        Data[index++] = (uint8_t)(TlmTimeSinceBoot >> 24); // Time Since Boot [0]
        Data[index++] = (uint8_t)(TlmTimeSinceBoot >> 16); // Time Since Boot [1]
        Data[index++] = (uint8_t)(TlmTimeSinceBoot >> 8);  // Time Since Boot [2]
        Data[index++] = (uint8_t)(TlmTimeSinceBoot >> 0);  // Time Since Boot [3]
        DBG("constructURLFrame: %d, %d", maxSize, index);
        return index;
    }
/*
    *  Construct TLM frame from private variables
    *  @param[in/out] Data pointer to array to store constructed frame in
    *  @param[in] maxSize number of bytes left in array, effectively how much emtpy space is available to write to
    *  @return number of bytes used. negative number indicates error message.
    */
Construct TLM frame from private variables
@param[in/out] Data pointer to array to store constructed frame in
@param[in] maxSize number of bytes left in array, effectively how much emtpy space is available to write to
@return number of bytes used. negative number indicates error message.
Construct TLM frame from private variables @param [ in / out ] Data pointer to array to store constructed frame in @param [ in ] maxSize number of bytes left in array effectively how much emtpy space is available to write to @return number of bytes used . negative number indicates error message .
int constructTLMFrame(uint8_t *Data, uint8_t maxSize) {
        uint32_t now = timeSinceBootTimer.read_ms();
        TlmTimeSinceBoot += (now - lastBootTimerRead) / 100;
        lastBootTimerRead = now;
        int index = 0;
        Data[index++] = FRAME_TYPE_TLM;                    
        Data[index++] = TlmVersion;                        
        Data[index++] = (uint8_t)(TlmBatteryVoltage >> 8); 
        Data[index++] = (uint8_t)(TlmBatteryVoltage >> 0); 
        Data[index++] = (uint8_t)(TlmBeaconTemp >> 8);     
        Data[index++] = (uint8_t)(TlmBeaconTemp >> 0);     
        Data[index++] = (uint8_t)(TlmPduCount >> 24);      
        Data[index++] = (uint8_t)(TlmPduCount >> 16);      
        Data[index++] = (uint8_t)(TlmPduCount >> 8);       
        Data[index++] = (uint8_t)(TlmPduCount >> 0);       
        Data[index++] = (uint8_t)(TlmTimeSinceBoot >> 24); 
        Data[index++] = (uint8_t)(TlmTimeSinceBoot >> 16); 
        Data[index++] = (uint8_t)(TlmTimeSinceBoot >> 8);  
        Data[index++] = (uint8_t)(TlmTimeSinceBoot >> 0);  
        DBG("constructURLFrame: %d, %d", maxSize, index);
        return index;
    }
int constructTLMFrame ( uint8_t * Data , uint8_t maxSize ) { uint32_t now = timeSinceBootTimer . read_ms ( ) ; TlmTimeSinceBoot += ( now - lastBootTimerRead ) / 100 ; lastBootTimerRead = now ; int index = 0 ; Data [ index ++ ] = FRAME_TYPE_TLM ; Data [ index ++ ] = TlmVersion ; Data [ index ++ ] = ( uint8_t ) ( TlmBatteryVoltage >> 8 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmBatteryVoltage >> 0 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmBeaconTemp >> 8 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmBeaconTemp >> 0 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmPduCount >> 24 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmPduCount >> 16 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmPduCount >> 8 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmPduCount >> 0 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmTimeSinceBoot >> 24 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmTimeSinceBoot >> 16 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmTimeSinceBoot >> 8 ) ; Data [ index ++ ] = ( uint8_t ) ( TlmTimeSinceBoot >> 0 ) ; DBG ( " " , maxSize , index ) ; return index ; }
Construct TLM frame from private variables
  @param[in/out] Data pointer to array to store constructed frame in
  @param[in] maxSize number of bytes left in array, effectively how much emtpy space is available to write to
  @return number of bytes used.
Construct TLM frame from private variables @param [ in / out ] Data pointer to array to store constructed frame in @param [ in ] maxSize number of bytes left in array effectively how much emtpy space is available to write to @return number of bytes used .
// Eddystone frame type = Telemetry // TLM Version Number // Battery Voltage[0] // Battery Voltage[1] // Beacon Temp[0] // Beacon Temp[1] // PDU Count [0] // PDU Count [1] // PDU Count [2] // PDU Count [3] // Time Since Boot [0] // Time Since Boot [1] // Time Since Boot [2] // Time Since Boot [3]