AceTime
2.3.0
Date and time classes for Arduino that support timezones from the TZ Database.
|
These classes provide a thin layer of indirection for accessing the data structures defined by ZoneInfoHigh.h
.
More...
#include <stdint.h>
#include <Arduino.h>
#include <AceCommon.h>
#include "compat.h"
#include "BrokerCommon.h"
#include "ZoneInfoHigh.h"
Go to the source code of this file.
Classes | |
class | ace_time::zoneinfohigh::ZoneContextBroker< ZC > |
Data broker for accessing a ZoneContext. More... | |
class | ace_time::zoneinfohigh::ZoneRuleBroker< ZC, ZR > |
Data broker for accessing ZoneRule. More... | |
class | ace_time::zoneinfohigh::ZonePolicyBroker< ZC, ZP, ZR > |
Data broker for accessing ZonePolicy. More... | |
class | ace_time::zoneinfohigh::ZoneEraBroker< ZC, ZE, ZP, ZR > |
Data broker for accessing ZoneEra. More... | |
class | ace_time::zoneinfohigh::ZoneInfoBroker< ZC, ZI, ZE, ZP, ZR > |
Data broker for accessing ZoneInfo. More... | |
class | ace_time::zoneinfohigh::ZoneRegistryBroker< ZI > |
Data broker for accessing the ZoneRegistry. More... | |
class | ace_time::zoneinfohigh::ZoneInfoStore< ZC, ZI, ZE, ZP, ZR > |
A storage object that creates an ZoneInfoBroker from a key that identifies the ZoneInfo. More... | |
Functions | |
int32_t | ace_time::zoneinfohigh::toDeltaSeconds (uint8_t deltaMinutes) |
Convert the deltaMinutes holding the RULES/DSTOFF field in ZoneEra or the SAVE field in ZoneRule to delta offset in seconds. | |
int32_t | ace_time::zoneinfohigh::toOffsetSeconds (uint16_t offsetCode, uint8_t offsetRemainder) |
Convert (code, remainder) holding the STDOFF field of ZoneEra into seconds. | |
uint32_t | ace_time::zoneinfohigh::timeCodeToSeconds (uint16_t code, uint8_t modifier) |
Convert (code, modifier) holding the UNTIL time in ZoneInfo or AT time in ZoneRule into seconds. More... | |
uint8_t | ace_time::zoneinfohigh::toSuffix (uint8_t modifier) |
Extract the 'w', 's' 'u' suffix from the 'modifier' field, so that they can be compared against kSuffixW, kSuffixS and kSuffixU. More... | |
These classes provide a thin layer of indirection for accessing the data structures defined by ZoneInfoHigh.h
.
The zoneinfo files are stored in flash memory (using the PROGMEM keyword), and cannot be accessed directly on microcontrollers using the Harvard architecture (e.g. AVR) where data and program live in 2 different address spaces. The data in flash memory must be accessed using helper routines in <pgmspace.h>. These classes abstract away this difference so that the code BasicZoneProcessor and ExtendedZoneProcessor can be written to be (mostly) agnostic to how the zoneinfo files are stored.
Definition in file BrokersHigh.h.
|
inline |
Convert (code, modifier) holding the UNTIL time in ZoneInfo or AT time in ZoneRule into seconds.
The code
parameter holds the AT or UNTIL time in units of 15 seconds. The lower 4-bits of modifier
holds the remainder seconds.
Definition at line 60 of file BrokersHigh.h.
|
inline |
Extract the 'w', 's' 'u' suffix from the 'modifier' field, so that they can be compared against kSuffixW, kSuffixS and kSuffixU.
Used for Zone.UNTIL and Rule.AT fields.
Definition at line 69 of file BrokersHigh.h.