TinyCTS
Bluetooth Current Time Service client and server for Arduino
Loading...
Searching...
No Matches
TinyCTSTypes.h File Reference

The data of the Bluetooth Current Time Service (CTS, 0x1805): UUIDs and the encoding of the characteristics Current Time (0x2A2B), Local Time Information (0x2A0F) and Reference Time Information (0x2A14). No Bluetooth stack is needed: this file is used by the library and the command line tool. More...

Go to the source code of this file.

Classes

class  tiny_cts::TinyCTSCurrentTime
 The Current Time characteristic (0x2A2B): 10 bytes with the date and time (Exact Time 256), the day of week, fractions of a second and the reason for the last adjustment. More...
class  tiny_cts::TinyCTSLocalTimeInfo
 The Local Time Information characteristic (0x2A0F): the time zone and the daylight saving time (DST) offset. Local time = UTC + time zone + DST. More...
class  tiny_cts::TinyCTSReferenceTimeInfo
 The Reference Time Information characteristic (0x2A14): where the time of the server comes from, how exact it is and how old. More...

Functions

void tiny_cts::ctsCivilFromDays (int32_t z, int32_t &y, unsigned &m, unsigned &d)
 The date of a number of days since 1970-01-01.
int32_t tiny_cts::ctsDaysFromCivil (int32_t y, unsigned m, unsigned d)
 Number of days since 1970-01-01 of a date in the proleptic Gregorian calendar.
void tiny_cts::ctsGmtime (time_t t, std::tm &tm)
 gmtime_r() where it exists, gmtime_s() on Windows

Variables

constexpr uint16_t tiny_cts::CTS_CURRENT_TIME_UUID = 0x2A2B
 16 bit UUID of the Current Time characteristic (read, notify, write)
constexpr uint16_t tiny_cts::CTS_LOCAL_TIME_INFO_UUID = 0x2A0F
 16 bit UUID of the Local Time Information characteristic (read, write)
constexpr uint16_t tiny_cts::CTS_REFERENCE_TIME_INFO_UUID = 0x2A14
 16 bit UUID of the Reference Time Information characteristic (read)
constexpr uint16_t tiny_cts::CTS_SERVICE_UUID = 0x1805
 16 bit UUID of the Current Time Service

Detailed Description

The data of the Bluetooth Current Time Service (CTS, 0x1805): UUIDs and the encoding of the characteristics Current Time (0x2A2B), Local Time Information (0x2A0F) and Reference Time Information (0x2A14). No Bluetooth stack is needed: this file is used by the library and the command line tool.