AceTime 2.4.0 Date and time classes for Arduino that support timezones from the TZ Database.

Classes | Functions
BrokersLow.h File Reference

These classes provide a thin layer of indirection for accessing the data structures defined by `ZoneInfoLow.h`. More...

`#include <stdint.h>`
`#include <Arduino.h>`
`#include <AceCommon.h>`
`#include "compat.h"`
`#include "BrokerCommon.h"`
`#include "ZoneInfoLow.h"`
Include dependency graph for BrokersLow.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
class | ace_time::zoneinfolow::ZoneContextBroker< ZC >
| Data broker for accessing a ZoneContext. More...
class | ace_time::zoneinfolow::ZoneRuleBroker< ZC, ZR >
| Data broker for accessing ZoneRule. More...
class | ace_time::zoneinfolow::ZonePolicyBroker< ZC, ZP, ZR >
| Data broker for accessing ZonePolicy. More...
class | ace_time::zoneinfolow::ZoneEraBroker< ZC, ZE, ZP, ZR >
| Data broker for accessing ZoneEra. More...
class | ace_time::zoneinfolow::ZoneInfoBroker< ZC, ZI, ZE, ZP, ZR >
| Data broker for accessing ZoneInfo. More...
class | ace_time::zoneinfolow::ZoneRegistryBroker< ZI >
| Data broker for accessing the ZoneRegistry. More...
class | ace_time::zoneinfolow::ZoneInfoStore< ZC, ZI, ZE, ZP, ZR >
| A storage object that creates an ZoneInfoBroker from a key that identifies the ZoneInfo. More...

## Functions
int16_t | ace_time::zoneinfolow::toDeltaMinutes (uint8_t deltaCode)
| Convert the `deltaCode` holding the RULES/DSTOFF field in ZoneEra or the SAVE field in ZoneRule to the delta offset in minutes. More...
int16_t | ace_time::zoneinfolow::toOffsetMinutes (uint8_t offsetCode, uint8_t deltaCode)
| Convert the `offsetCode` and `deltaCode` holding the STDOFF field of the ZoneEra into minutes. More...
uint16_t | ace_time::zoneinfolow::timeCodeToMinutes (uint8_t code, uint8_t modifier)
| Convert (code, modifier) fields representing the UNTIL time in ZoneInfo or AT time in ZoneRule in one minute resolution. More...
uint8_t | ace_time::zoneinfolow::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...

## Detailed Description

These classes provide a thin layer of indirection for accessing the data structures defined by `ZoneInfoLow.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 BrokersLow.h.

## Function Documentation

## ◆ timeCodeToMinutes()

uint16_t ace_time::zoneinfolow::timeCodeToMinutes | ( | uint8_t | code,
|  | uint8_t | modifier
| ) |  |
| inline

Convert (code, modifier) fields representing the UNTIL time in ZoneInfo or AT time in ZoneRule in one minute resolution.

The `code` parameter holds the AT or UNTIL time in minutes component in units of 15 minutes. The lower 4-bits of `modifier` holds the remainder minutes.

Definition at line 70 of file BrokersLow.h.

## ◆ toDeltaMinutes()

int16_t ace_time::zoneinfolow::toDeltaMinutes | ( | uint8_t | deltaCode | ) |
| inline

Convert the `deltaCode` holding the RULES/DSTOFF field in ZoneEra or the SAVE field in ZoneRule to the delta offset in minutes.

The lower 4-bits stores minutes in units of 15-minutes, shifted by 1h, so can represent the interval [-01:00 to 02:45].

deltaMinutes = deltaCode * 15m - 1h

Definition at line 49 of file BrokersLow.h.

## ◆ toOffsetMinutes()

int16_t ace_time::zoneinfolow::toOffsetMinutes | ( | uint8_t | offsetCode,
|  | uint8_t | deltaCode
| ) |  |
| inline

Convert the `offsetCode` and `deltaCode` holding the STDOFF field of the ZoneEra into minutes.

The `offsetCode` is rounded towards -infinity in 15-minute multiples. The upper 4-bits of `deltaCode` holds the (unsigned) remainder in one-minute increments.

Definition at line 59 of file BrokersLow.h.

## ◆ toSuffix()

uint8_t ace_time::zoneinfolow::toSuffix | ( | uint8_t | modifier | ) |
| 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 79 of file BrokersLow.h.