File syn_datalog.c¶
FileList > log > syn_datalog.c
Go to the source code of this file
#include "../util/syn_assert.h"#include "syn_datalog.h"
Public Functions¶
| Type | Name |
|---|---|
| void | syn_datalog_init (SYN_DataLog * log, uint8_t * buf, size_t size) Initialize a datalogger. |
| size_t | syn_datalog_read (SYN_DataLog * log, uint16_t * out_id, void * out_data, size_t max_len) Read the next telemetry frame from the logger. |
| bool | syn_datalog_write (SYN_DataLog * log, uint16_t id, const void * data, uint16_t len) Write a telemetry frame to the logger. |
Public Functions Documentation¶
function syn_datalog_init¶
Initialize a datalogger.
Parameters:
logPointer to logger instance.bufCaller-provided backing array.sizeSize of backing array in bytes.
function syn_datalog_read¶
Read the next telemetry frame from the logger.
Parameters:
logPointer to logger instance.out_id[out] Stream ID of read frame.out_data[out] Buffer to store payload.max_lenMaximum size of out_data.
Returns:
Number of payload bytes read, or 0 if empty or buffer too small.
function syn_datalog_write¶
Write a telemetry frame to the logger.
Parameters:
logPointer to logger instance.idStream ID.dataPayload to write.lenPayload size in bytes.
Returns:
true if written, false if buffer is full (frame dropped).
The documentation for this class was generated from the following file src/syntropic/log/syn_datalog.c