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

TDF Data Logger. More...

#include <stdint.h>
#include <zephyr/device.h>
#include <zephyr/sys/util.h>
#include <infuse/tdf/tdf.h>

Go to the source code of this file.

Macros

#define TDF_DATA_LOGGER_LOG(logger_mask, tdf_id, tdf_time, data)
 Type safe wrapper around tdf_data_logger_log.
 
#define TDF_DATA_LOGGER_LOG_ARRAY(logger_mask, tdf_id, tdf_num, tdf_time, period, data)
 Type safe wrapper around tdf_data_logger_log_array.
 

Enumerations

enum  tdf_data_logger_mask {
  TDF_DATA_LOGGER_FLASH = BIT(_TDF_DATA_LOGGER_FLASH_OFFSET) , TDF_DATA_LOGGER_REMOVABLE = BIT(_TDF_DATA_LOGGER_REMOVABLE_OFFSET) , TDF_DATA_LOGGER_SERIAL = BIT(_TDF_DATA_LOGGER_SERIAL_OFFSET) , TDF_DATA_LOGGER_UDP = BIT(_TDF_DATA_LOGGER_UDP_OFFSET) ,
  TDF_DATA_LOGGER_BT_ADV = BIT(_TDF_DATA_LOGGER_BT_ADV_OFFSET) , TDF_DATA_LOGGER_BT_PERIPHERAL = BIT(_TDF_DATA_LOGGER_BT_PERIPHERAL_OFFSET)
}
 TDF data logger backends. More...
 

Functions

int tdf_data_logger_log_core_dev (const struct device *dev, 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)
 Add multiple TDFs to a data logger.
 
void tdf_data_logger_log_core (uint8_t logger_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)
 Add multiple TDFs to multiple data loggers.
 
static int tdf_data_logger_log_array_dev (const struct device *dev, uint16_t tdf_id, uint8_t tdf_len, uint8_t tdf_num, uint64_t time, uint32_t period, const void *data)
 Add multiple TDFs to a data logger.
 
static void tdf_data_logger_log_array (uint8_t logger_mask, uint16_t tdf_id, uint8_t tdf_len, uint8_t tdf_num, uint64_t time, uint32_t period, const void *data)
 Add multiple TDFs to multiple data loggers.
 
static int tdf_data_logger_log_dev (const struct device *dev, uint16_t tdf_id, uint8_t tdf_len, uint64_t time, const void *data)
 Add a single TDF to a data logger.
 
static void tdf_data_logger_log (uint8_t logger_mask, uint16_t tdf_id, uint8_t tdf_len, uint64_t time, const void *data)
 Add a single TDF to multiple data loggers.
 
int tdf_data_logger_block_bytes_pending (const struct device *dev)
 Query the number of bytes pending on the current block.
 
int tdf_data_logger_block_bytes_remaining (const struct device *dev)
 Query the number of bytes remaining until the logger block will be flushed.
 
int tdf_data_logger_flush_dev (const struct device *dev)
 Flush any pending TDFs to backend.
 
void tdf_data_logger_flush (uint8_t logger_mask)
 Flush any pending TDFs to multiple backends.
 
int tdf_data_logger_remote_id_set (const struct device *dev, uint64_t remote_id)
 Set the remote ID associated with the logger.
 

Detailed Description

TDF Data Logger.

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

SPDX-License-Identifier: FSL-1.1-ALv2