Settings and values of a TinyCTSServer. Use TinyCTSServer, which adds the Bluetooth part.
More...
#include <TinyCTSServerBase.h>
|
| void | enableTimeSetting (bool requireEncryption=true) |
| | Allow the clients to set the time of the time source by writing the Current Time (and the time zone by writing the Local Time Information). Needs a time source that implements setTimeMs(). Call it before begin().
|
|
uint32_t | getTimeSetCount () const |
| | The number of times that a client has set the time.
|
|
void | setNotifyInterval (uint32_t ms) |
| | Notify the subscribed clients regularly in process(). 0 (default): only when the time was set or the time zone changed. The specification asks for a notification when the time changes by a larger step: use a long interval, e.g. 60000 ms.
|
|
void | setReferenceInfo (uint8_t source, uint8_t accuracy=255) |
| | Where the time comes from and how exact it is (125 ms steps).
|
|
void | setTimeIsLocal (bool local) |
| | The Current Time contains the local time (UTC + the offsets of the Local Time Information) instead of UTC (default). Some clients expect the local time. Call it before begin().
|
| void | setTimeZone (int utcOffsetMinutes, int dstMinutes=0) |
| | The time zone that is offered in the Local Time Information.
|
Settings and values of a TinyCTSServer. Use TinyCTSServer, which adds the Bluetooth part.
◆ currentTimeValue()
| size_t tiny_cts::TinyCTSServerBase::currentTimeValue |
( |
uint8_t | reason, |
|
|
uint8_t * | out ) |
|
inlineprotected |
The value of the Current Time: 10 bytes. While the time is not known, the date is unknown (all 0).
◆ enableTimeSetting()
| void tiny_cts::TinyCTSServerBase::enableTimeSetting |
( |
bool | requireEncryption = true | ) |
|
|
inline |
Allow the clients to set the time of the time source by writing the Current Time (and the time zone by writing the Local Time Information). Needs a time source that implements setTimeMs(). Call it before begin().
- Parameters
-
| requireEncryption | The clients must be paired (encrypted connection). Use false only in a trusted environment: everybody who is near the device can change the time! |
◆ notifyDue()
| bool tiny_cts::TinyCTSServerBase::notifyDue |
( |
| ) |
|
|
inlineprotected |
true if the notification interval is over (and starts the next one).
◆ onReferenceChanged()
| virtual void tiny_cts::TinyCTSServerBase::onReferenceChanged |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ onTimeZoneChanged()
| virtual void tiny_cts::TinyCTSServerBase::onTimeZoneChanged |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ setTimeFromWrite()
| bool tiny_cts::TinyCTSServerBase::setTimeFromWrite |
( |
const uint8_t * | data, |
|
|
size_t | len ) |
|
inlineprotected |
A client wrote the Current Time.
- Returns
- true if the time source was set.
◆ setTimeZone()
| void tiny_cts::TinyCTSServerBase::setTimeZone |
( |
int | utcOffsetMinutes, |
|
|
int | dstMinutes = 0 ) |
|
inline |
The time zone that is offered in the Local Time Information.
- Parameters
-
| utcOffsetMinutes | The standard time zone, e.g. 60 for CET. |
| dstMinutes | The summer time offset now: 0, 30, 60 or 120. |
◆ setTimeZoneFromWrite()
| bool tiny_cts::TinyCTSServerBase::setTimeZoneFromWrite |
( |
const uint8_t * | data, |
|
|
size_t | len ) |
|
inlineprotected |
A client wrote the Local Time Information.
- Returns
- true if the time zone was changed.
The documentation for this class was generated from the following file: