Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Task Runner Task API. More...
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <infuse/task_runner/schedule.h>
#include <infuse/data_logger/high_level/tdf.h>
Go to the source code of this file.
Data Structures | |
struct | task_config |
Constant task configuration. More... | |
struct | task_data |
Task runtime state. More... | |
Macros | |
#define | TASK_RUNNER_TASKS_DEFINE(config_name, data_name, ...) |
Instantiate tasks information for task runner. | |
#define | TASK_SCHEDULE_TDF_LOG_ARRAY(schedule, tdf_mask, tdf_id, tdf_num, tdf_time, period, data) |
Type safe wrapper around task_schedule_tdf_log_array. | |
#define | TASK_SCHEDULE_TDF_LOG(schedule, tdf_mask, tdf_id, tdf_time, data) |
Type safe wrapper around task_schedule_tdf_log. | |
Typedefs | |
typedef void(* | task_runner_task_fn) (const struct task_schedule *schedule, struct k_poll_signal *terminate, void *arg) |
Enumerations | |
enum | { TASK_EXECUTOR_THREAD , TASK_EXECUTOR_WORKQUEUE } |
enum | { TASK_FLAG_ARG_IS_DEVICE = BIT(0) } |
Functions | |
static struct task_data * | task_data_from_work (struct k_work *work) |
Get the parent task_data struct from the work pointer. | |
const struct task_schedule * | task_schedule_from_data (struct task_data *data) |
Retrieve the schedule associated with a task. | |
uint8_t * | task_schedule_persistent_storage (struct task_data *data) |
Retrieve per-schedule persistent memory. | |
void | task_workqueue_reschedule (struct task_data *task, k_timeout_t delay) |
Reschedule the task to run again after a delay. | |
static int | task_runner_task_block (struct k_poll_signal *terminate_signal, k_timeout_t timeout) |
Block on the termination signal for a duration. | |
static bool | task_schedule_tdf_requested (const struct task_schedule *schedule, uint8_t tdf_mask) |
Determine if a given TDF was requested by the schedule. | |
static void | task_schedule_tdf_log_core (const struct task_schedule *schedule, uint8_t tdf_mask, uint16_t tdf_id, uint8_t tdf_len, uint8_t tdf_num, enum tdf_data_format format, uint64_t time, uint32_t idx_period, const void *data) |
Log an array of TDFs as requested by a schedule as a diff array. | |
static void | task_schedule_tdf_log_array (const struct task_schedule *schedule, uint8_t tdf_mask, uint16_t tdf_id, uint8_t tdf_len, uint8_t tdf_num, uint64_t time, uint32_t period, const void *data) |
Log an array of TDFs as requested by a schedule. | |
static void | task_schedule_tdf_log (const struct task_schedule *schedule, uint8_t tdf_mask, uint16_t tdf_id, uint8_t tdf_len, uint64_t time, const void *data) |
Log a single TDF as requested by a schedule. | |
Task Runner Task API.
SPDX-License-Identifier: FSL-1.1-ALv2