Job scheduling callbacks and time utility functions for periodic execution.
More...
|
| typedef time_t(* | ScheduledJob) (void) |
| | Custom job scheduling function type.
|
| |
|
| MYRIOTA_USER_API int | ScheduleJob (ScheduledJob Job, time_t Time) |
| | Schedule a job to run at a specific time (or reset the schedule for an existing job).
|
| |
| MYRIOTA_USER_API time_t | ASAP (void) |
| | Returns the next scheduling time for a job that should run as soon as possible.
|
| |
| MYRIOTA_USER_API time_t | Never (void) |
| | Returns a time value used to indicate that a job should not be scheduled.
|
| |
| MYRIOTA_USER_API time_t | SecondsFromNow (unsigned Secs) |
| | Returns a value that is seconds from the current time.
|
| |
| MYRIOTA_USER_API time_t | MinutesFromNow (unsigned Mins) |
| | Returns a value that is minutes from the current time.
|
| |
| MYRIOTA_USER_API time_t | HoursFromNow (unsigned Hours) |
| | Returns a value that is hours from the current time.
|
| |
| MYRIOTA_USER_API time_t | DaysFromNow (unsigned Days) |
| | Returns a value that is days from the current time.
|
| |
| MYRIOTA_USER_API time_t | OnGPIOWakeup (void) |
| | Returns a value used to represent a GPIO wakeup events.
|
| |
| MYRIOTA_USER_API time_t | OnPulseCounterEvent (void) |
| | Returns a value used to represent a pulse counter events.
|
| |
| MYRIOTA_USER_API time_t | OnLeuartReceive (void) |
| | Returns a value used to represent a Leuart activity event.
|
| |
| MYRIOTA_USER_API time_t | BeforeSatelliteTransmit (time_t After, time_t Before) |
| | Return a time after After and before Before immediately prior to a satellite transmit opportunity.
|
| |
Job scheduling callbacks and time utility functions for periodic execution.
◆ ScheduledJob
| typedef time_t(* ScheduledJob) (void) |
Custom job scheduling function type.
Defines a function pointer type for scheduled jobs that return a time_t value indicating the next scheduled execution time.
◆ ScheduleJob()
| MYRIOTA_USER_API int ScheduleJob |
( |
ScheduledJob |
Job, |
|
|
time_t |
Time |
|
) |
| |
Schedule a job to run at a specific time (or reset the schedule for an existing job).
- Parameters
-
| Job | The job function to be scheduled. |
| Time | The time at which the job should run. |
- Returns
- 0 if the job was successfully scheduled, -1 if the maximum number of jobs is reached or an error occurs.
◆ ASAP()
| MYRIOTA_USER_API time_t ASAP |
( |
void |
| ) |
|
Returns the next scheduling time for a job that should run as soon as possible.
- Returns
- A time_t value representing the next scheduled time for the job if HasValidGNSSFix() is true; otherwise, returns 0.
◆ Never()
| MYRIOTA_USER_API time_t Never |
( |
void |
| ) |
|
Returns a time value used to indicate that a job should not be scheduled.
- Returns
- A time_t value representing a time far in the future, effectively representing "never" for scheduling purposes.
◆ SecondsFromNow()
| MYRIOTA_USER_API time_t SecondsFromNow |
( |
unsigned |
Secs | ) |
|
Returns a value that is seconds from the current time.
- Parameters
-
| Secs | The number of seconds from the current time to calculate the future time. |
- Returns
- A time_t value representing the time that is Secs seconds from now. If Secs is 0, returns the current time.
◆ MinutesFromNow()
| MYRIOTA_USER_API time_t MinutesFromNow |
( |
unsigned |
Mins | ) |
|
Returns a value that is minutes from the current time.
- Parameters
-
| Mins | The number of minutes from the current time to calculate the future time. |
- Returns
- A time_t value representing the time that is Mins minutes from now. If Mins is 0, returns the current time.
◆ HoursFromNow()
| MYRIOTA_USER_API time_t HoursFromNow |
( |
unsigned |
Hours | ) |
|
Returns a value that is hours from the current time.
- Parameters
-
| Hours | The number of hours from the current time to calculate the future time. |
- Returns
- A time_t value representing the time that is Hours hours from now. If Hours is 0, returns the current time.
◆ DaysFromNow()
| MYRIOTA_USER_API time_t DaysFromNow |
( |
unsigned |
Days | ) |
|
Returns a value that is days from the current time.
- Parameters
-
| Days | The number of days from the current time to calculate the future time. |
- Returns
- A time_t value representing the time that is Days days from now. If Days is 0, returns the current time.
◆ OnGPIOWakeup()
| MYRIOTA_USER_API time_t OnGPIOWakeup |
( |
void |
| ) |
|
Returns a value used to represent a GPIO wakeup events.
- Returns
- A time_t value representing the time for a GPIO wakeup event.
◆ OnPulseCounterEvent()
| MYRIOTA_USER_API time_t OnPulseCounterEvent |
( |
void |
| ) |
|
Returns a value used to represent a pulse counter events.
- Returns
- A time_t value representing the time for a pulse counter event.
◆ OnLeuartReceive()
| MYRIOTA_USER_API time_t OnLeuartReceive |
( |
void |
| ) |
|
Returns a value used to represent a Leuart activity event.
- Returns
- A time_t value representing the time for a Leuart activity event.
◆ BeforeSatelliteTransmit()
| MYRIOTA_USER_API time_t BeforeSatelliteTransmit |
( |
time_t |
After, |
|
|
time_t |
Before |
|
) |
| |
Return a time after After and before Before immediately prior to a satellite transmit opportunity.
Can be used to reduce latency between sensor reading and satellite transmission. If no opportunity is found between After and Before, then Before is returned.
- Parameters
-
| After | The start of the time interval to check for satellite passes. |
| Before | The end of the time interval to check for satellite passes. |
- Returns
- The time of the next satellite pass within the interval, or
Before if no pass is found.