Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
tdf_logger.h File Reference

TDF logger task. More...

Go to the source code of this file.

Macros

#define TDF_LOGGER_TASK(define_mem, define_config, custom_logger)
 Generic TDF logger task.
 
#define TDF_LOGGER_ALT1_TASK(define_mem, define_config, custom_logger)
 TDF logger task, alternate instance 1.
 
#define TDF_LOGGER_ALT2_TASK(define_mem, define_config, custom_logger)
 TDF logger task, alternate instance 2.
 

Typedefs

typedef void(* tdf_logger_custom_log_t) (uint8_t tdf_loggers, uint64_t timestamp)
 Application callback for custom TDF logging.
 

Functions

void task_tdf_logger_fn (struct k_work *work)
 TDF logger runner function.
 
void task_tdf_logger_manual_run (uint8_t tdf_loggers, uint64_t timestamp, uint16_t tdfs, tdf_logger_custom_log_t custom_logger)
 Manually run the core TDF logging logic.
 

Detailed Description

TDF logger task.

Author
Jordan Yates jorda.nosp@m.n@em.nosp@m.beint.nosp@m..com

SPDX-License-Identifier: FSL-1.1-ALv2

Macro Definition Documentation

◆ TDF_LOGGER_ALT1_TASK

#define TDF_LOGGER_ALT1_TASK ( define_mem,
define_config,
custom_logger )
Value:
_TDF_LOGGER_TASK_INSTANCE("tdfl1", TASK_ID_TDF_LOGGER_ALT1, define_mem, define_config, \
custom_logger)
@ TASK_ID_TDF_LOGGER_ALT1
Definition infuse_task_ids.h:31

TDF logger task, alternate instance 1.

Behaves the exact same way as TDF_LOGGER_TASK, but with a different task ID. This allows multiple instance of TDF logging to run concurrently with each other.

Parameters
define_memDefine memory (None required)
define_configDefine task
custom_loggerCallback for custom logging
...Compile-time argument unused

◆ TDF_LOGGER_ALT2_TASK

#define TDF_LOGGER_ALT2_TASK ( define_mem,
define_config,
custom_logger )
Value:
_TDF_LOGGER_TASK_INSTANCE("tdfl2", TASK_ID_TDF_LOGGER_ALT2, define_mem, define_config, \
custom_logger)
@ TASK_ID_TDF_LOGGER_ALT2
Definition infuse_task_ids.h:32

TDF logger task, alternate instance 2.

Behaves the exact same way as TDF_LOGGER_TASK, but with a different task ID. This allows multiple instance of TDF logging to run concurrently with each other.

Parameters
define_memDefine memory (None required)
define_configDefine task
custom_loggerCallback for custom logging
...Compile-time argument unused

◆ TDF_LOGGER_TASK

#define TDF_LOGGER_TASK ( define_mem,
define_config,
custom_logger )
Value:
_TDF_LOGGER_TASK_INSTANCE("tdfl", TASK_ID_TDF_LOGGER, define_mem, define_config, \
custom_logger)
@ TASK_ID_TDF_LOGGER
Definition infuse_task_ids.h:24

Generic TDF logger task.

Parameters
define_memDefine memory (None required)
define_configDefine task
custom_loggerCallback for custom logging
...Compile-time argument unused

Typedef Documentation

◆ tdf_logger_custom_log_t

typedef void(* tdf_logger_custom_log_t) (uint8_t tdf_loggers, uint64_t timestamp)

Application callback for custom TDF logging.

Parameters
tdf_loggersTDF loggers to log to
timestampTime to use for logging

Function Documentation

◆ task_tdf_logger_fn()

void task_tdf_logger_fn ( struct k_work * work)

TDF logger runner function.

Parameters
workWork object

◆ task_tdf_logger_manual_run()

void task_tdf_logger_manual_run ( uint8_t tdf_loggers,
uint64_t timestamp,
uint16_t tdfs,
tdf_logger_custom_log_t custom_logger )

Manually run the core TDF logging logic.

Parameters
tdf_loggersTDF loggers to log to
timestampTime to use for logging
tdfsTDFs to log (TASK_TDF_LOGGER_LOG_*)
custom_loggerCustom logging function for TASK_TDF_LOGGER_LOG_CUSTOM