TinyCTS
Bluetooth Current Time Service client and server for Arduino
Loading...
Searching...
No Matches
tiny_cts::TinyCTSReferenceTimeInfo Class Reference

The Reference Time Information characteristic (0x2A14): where the time of the server comes from, how exact it is and how old. More...

#include <TinyCTSTypes.h>

Public Types

enum  Source : uint8_t {
  Unknown = 0 , NetworkTimeProtocol = 1 , GPS = 2 , RadioTimeSignal = 3 ,
  Manual = 4 , AtomicClock = 5 , CellularNetwork = 6
}
 Values of source.

Public Member Functions

int accuracyMs () const
 The accuracy in ms (the value is in 125 ms): -1 if not known.
size_t encode (uint8_t *out) const

Static Public Member Functions

static bool decode (const uint8_t *data, size_t len, TinyCTSReferenceTimeInfo &i)
static const char * sourceName (uint8_t source)
 The name of a source.

Public Attributes

uint8_t accuracy = 255
 in 125 ms (0-253), 254 = more than 31.5 s, 255 = unknown
uint8_t daysSinceUpdate = 255
 0-254, 255 = 255 days or more
uint8_t hoursSinceUpdate = 255
 0-23, 255 if the days are 255 or more
uint8_t source = Unknown

Static Public Attributes

static constexpr size_t Size = 4

Detailed Description

The Reference Time Information characteristic (0x2A14): where the time of the server comes from, how exact it is and how old.


The documentation for this class was generated from the following file: