Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Task Runner runner APIs

Task Runner runner API . More...

Functions

void task_runner_init (const struct task_schedule *schedules, struct task_schedule_state *schedule_states, uint8_t num_schedules, const struct task_config *tasks, struct task_data *task_states, uint8_t num_tasks)
 Initialise the task runner with a schedule list.
 
void task_runner_iterate (atomic_t *app_states, uint32_t uptime, uint32_t gps_time, uint8_t battery_charge)
 Iterate the task runner.
 
struct k_work_delayable * task_runner_start_auto_iterate (void)
 Automatically iterate the task runner.
 
uint8_t task_runner_watchdog_channel (void)
 Get the watchdog channel associated with the task runner.
 

Detailed Description

Task Runner runner API .

Function Documentation

◆ task_runner_init()

void task_runner_init ( const struct task_schedule * schedules,
struct task_schedule_state * schedule_states,
uint8_t num_schedules,
const struct task_config * tasks,
struct task_data * task_states,
uint8_t num_tasks )

#include <infuse/task_runner/runner.h>

Initialise the task runner with a schedule list.

Parameters
schedulesTask schedules to evaluate
schedule_statesState for each schedule in schedules
num_schedulesNumber of schedules and states
tasksConstant task configuration
task_statesState for each task in task_config
num_tasksNumber of tasks

◆ task_runner_iterate()

void task_runner_iterate ( atomic_t * app_states,
uint32_t uptime,
uint32_t gps_time,
uint8_t battery_charge )

#include <infuse/task_runner/runner.h>

Iterate the task runner.

Warning
MUST be called once a second
Parameters
app_statesApplication states
uptimeCurrent device uptime in seconds
gps_timeCurrent epoch time (GPS time) in seconds
battery_chargeBattery charge percentage

◆ task_runner_start_auto_iterate()

struct k_work_delayable * task_runner_start_auto_iterate ( void )

#include <infuse/task_runner/runner.h>

Automatically iterate the task runner.

Automatically calls task_runner_iterate once a second forever. Also calls infuse_states_tick if CONFIG_INFUSE_APPLICATION_STATES is enabled.

Warning
Do NOT call task_runner_iterate after this function.
Return values
Workitem that performs the iteration

◆ task_runner_watchdog_channel()

uint8_t task_runner_watchdog_channel ( void )

#include <infuse/task_runner/runner.h>

Get the watchdog channel associated with the task runner.

Returns
uint8_t Infuse-IoT watchdog channel