The fetch timing the polling stores share: the one-shot catch-up, the cadence turn, the ask when the phone comes back, and what an init or a reconfigure does to them. More...
Go to the source code of this file.
Data Structures | |
| struct | StoreFetch |
| One store's polling state, its catch-up timer, and how it asks the phone. More... | |
Functions | |
| void | store_fetch_fire (void *data) |
| The one-shot fetch's timer callback. Clears the timer and asks the phone. | |
| void | store_fetch_stop (StoreFetch *fetch) |
| Cancel the one-shot fetch, if one is armed. | |
| void | store_fetch_arm (StoreFetch *fetch) |
| Arm the one-shot fetch after first_ms, unless one is already waiting. | |
| void | store_fetch_turn (StoreFetch *fetch, time_t now) |
| The store's turn on the face's cadence. Asks the phone when the deadline has come round. | |
| void | store_fetch_on_link (StoreFetch *fetch, int age_s) |
| What a store's link listener does. When the phone link has just come back, asks the phone if the reading is at least the store's own interval old, or never arrived. A drop does nothing, so the last reading stays on show. | |
| void | store_fetch_start (StoreFetch *fetch, int poll_min, bool live, time_t now) |
| What a store's init does with its polling. Takes the interval, then arms one fetch shortly after launch when polling is on, so the store is not blank while the first deadline is coming. | |
| void | store_fetch_reconfigure (StoreFetch *fetch, int poll_min, bool live, time_t now, bool empty) |
| What a store's reconfigure does with its polling. | |
The fetch timing the polling stores share: the one-shot catch-up, the cadence turn, the ask when the phone comes back, and what an init or a reconfigure does to them.
Each store keeps one StoreFetch and points it at its own request. The interval and deadline decisions stay in store_poll.h, so everything here is a guard around a timer or a request.