|
PebbleOS
|
Scheduled app launches. More...
Data Structures | |
| struct | WakeupInfo |
| Wakeup event passed to the app it launches. More... | |
Macros | |
| #define | WAKEUP_EVENT_WINDOW 60 |
| Time reserved around each event, in seconds, in which no other event can be scheduled. | |
| #define | MAX_WAKEUP_EVENTS_PER_APP 8 |
| Maximum number of events per app. | |
| #define | WAKEUP_CATCHUP_WINDOW (WAKEUP_EVENT_WINDOW / 2) |
| Reduced gap, in seconds, between events caught up after a time change or after the service was disabled (e.g. | |
Typedefs | |
| typedef int32_t | WakeupId |
| WakeupId is an identifier for a wakeup event. | |
Functions | |
| void | wakeup_init (void) |
| Initialize the service. | |
| void | wakeup_enable (bool enabled) |
| Enable or disable the service. | |
| TimerID | wakeup_get_current (void) |
| Get the timer used to schedule events, for tests. | |
| WakeupId | wakeup_get_next_scheduled (void) |
| Get the next scheduled event, for tests. | |
| void | wakeup_migrate_timezone (int utc_diff) |
| Convert events scheduled in local time to UTC after the timezone was set. | |
| void | wakeup_handle_significant_clock_change (void) |
| Handle a significant time change (over 15 s, timezone or DST). | |
| void | wakeup_handle_clock_change (void) |
| Handle any time change, including small RTC calibrations. | |
Scheduled app launches.
Kernel side of the app wakeup API. Events are stored in the "wakeup" settings file and the next one is scheduled with a new_timer. When an event fires, its app is launched with APP_LAUNCH_WAKEUP, or receives a PEBBLE_WAKEUP_EVENT if already running. Events missed while the watch was off can be reported with a popup.
| struct WakeupInfo |
Wakeup event passed to the app it launches.
| Data Fields | ||
|---|---|---|
| WakeupId | wakeup_id | Event identifier, its scheduling timestamp. |
| int32_t | wakeup_reason | Reason given by the app when scheduling the event. |
| #define MAX_WAKEUP_EVENTS_PER_APP 8 |
Maximum number of events per app.
| #define WAKEUP_CATCHUP_WINDOW (WAKEUP_EVENT_WINDOW / 2) |
Reduced gap, in seconds, between events caught up after a time change or after the service was disabled (e.g.
low power mode).
| #define WAKEUP_EVENT_WINDOW 60 |
Time reserved around each event, in seconds, in which no other event can be scheduled.
| typedef int32_t WakeupId |
WakeupId is an identifier for a wakeup event.
| void wakeup_enable | ( | bool | enabled | ) |
Enable or disable the service.
While disabled no event fires; pending ones are caught up when re-enabled.
| enabled | True to enable. |
| TimerID wakeup_get_current | ( | void | ) |
Get the timer used to schedule events, for tests.
| WakeupId wakeup_get_next_scheduled | ( | void | ) |
Get the next scheduled event, for tests.
| void wakeup_handle_clock_change | ( | void | ) |
Handle any time change, including small RTC calibrations.
Reschedules the next event without deleting events or showing popups.
| void wakeup_handle_significant_clock_change | ( | void | ) |
Handle a significant time change (over 15 s, timezone or DST).
Deletes past events, shows missed event popups and reschedules, on KernelBG.
| void wakeup_init | ( | void | ) |
Initialize the service.
Deletes expired events, shows a popup for apps that missed an event while the watch was off and asked to be notified, and schedules the next event.
| void wakeup_migrate_timezone | ( | int | utc_diff | ) |
Convert events scheduled in local time to UTC after the timezone was set.
| utc_diff | Local time minus UTC, in seconds. |