|
Ersa Wearable Platform
Embedded smartwatch firmware and application framework
|
Classes | |
| struct | CalEvent |
| struct | CalTodo |
Functions | |
| void | begin () |
| size_t | eventCount () |
| const CalEvent & | getEvent (size_t index) |
| size_t | todoCount () |
| const CalTodo & | getTodo (size_t index) |
| void | toggleTodo (size_t index) |
| bool | isSyncing () |
| const char * | lastStatus () |
| time_t | parseHttpDateToEpoch (const char *str) |
| bool | fetchHttpUtc (time_t &outUtc, uint32_t timeoutMs=ersa::config::HTTP_TIME_TIMEOUT_MS) |
| bool | fetchNtpUtc (time_t &outUtc, uint32_t timeoutMs=ersa::config::NTP_SYNC_TIMEOUT_MS) |
| bool | fetchTimeWithFallbacks (time_t &outUtc, bool &isHttpFallback, bool updateStatus=true) |
| bool | startBootTimeSync () |
| void | tick () |
| bool | syncNtp () |
| bool | syncAll () |
Variables | |
| constexpr size_t | MAX_EVENTS_PER_DAY = 6 |
| constexpr size_t | CALENDAR_CACHE_DAYS = 7 |
| constexpr size_t | MAX_EVENTS = MAX_EVENTS_PER_DAY * CALENDAR_CACHE_DAYS |
| constexpr size_t | MAX_TODOS = 12 |
| void NetSync::begin | ( | ) |
Load cached items and initialize synchronization state.
| size_t NetSync::eventCount | ( | ) |
Return the number of currently retained calendar entries.
| bool NetSync::fetchHttpUtc | ( | time_t & | outUtc, |
| uint32_t | timeoutMs = ersa::config::HTTP_TIME_TIMEOUT_MS |
||
| ) |
| bool NetSync::fetchNtpUtc | ( | time_t & | outUtc, |
| uint32_t | timeoutMs = ersa::config::NTP_SYNC_TIMEOUT_MS |
||
| ) |
| bool NetSync::fetchTimeWithFallbacks | ( | time_t & | outUtc, |
| bool & | isHttpFallback, | ||
| bool | updateStatus = true |
||
| ) |
| const CalEvent & NetSync::getEvent | ( | size_t | index | ) |
Return a cached event by index; callers must check eventCount() first.
| const CalTodo & NetSync::getTodo | ( | size_t | index | ) |
Return a cached task by index; callers must check todoCount() first.
| bool NetSync::isSyncing | ( | ) |
Report whether a sync operation currently owns Wi-Fi resources.
| const char * NetSync::lastStatus | ( | ) |
Return a borrowed status string describing the latest sync outcome.
| time_t NetSync::parseHttpDateToEpoch | ( | const char * | str | ) |
| bool NetSync::startBootTimeSync | ( | ) |
Start a non-blocking boot fallback when no phone/manual time has arrived.
| bool NetSync::syncAll | ( | ) |
Run time and configured CalDAV synchronization for explicit user requests.
| bool NetSync::syncNtp | ( | ) |
Run a synchronous NTP/HTTP time sync for explicit foreground requests.
| void NetSync::tick | ( | ) |
Apply completed boot-sync results from the UI task, preserving source priority.
| size_t NetSync::todoCount | ( | ) |
Return the number of currently retained task entries.
| void NetSync::toggleTodo | ( | size_t | index | ) |
Toggle a task's local completion bit and persist the updated cache.
|
constexpr |
Number of calendar days represented by the bounded cache.
|
constexpr |
Total fixed event capacity across the cache window.
|
constexpr |
Maximum events retained for one local calendar day.
|
constexpr |
Maximum task entries retained in RAM and persistent cache.