File syn_blackbox.c¶
FileList > log > syn_blackbox.c
Go to the source code of this file
Zero-Heap Flight Telemetry Blackbox Binary Recorder Implementation.
#include "syntropic/log/syn_blackbox.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_blackbox_encode_delta (SYN_Blackbox * bb, const SYN_Blackbox_Record * record, uint8_t * buf_out, size_t * out_len) Encode a compact Predictive Delta Frame ('P') relative to last frame. |
| SYN_Status | syn_blackbox_encode_intra (SYN_Blackbox * bb, const SYN_Blackbox_Record * record, uint8_t * buf_out, size_t * out_len) Encode a full Intra Frame ('I') into raw binary log stream. |
| size_t | syn_blackbox_encode_varint (int32_t val, uint8_t * buf_out) Encode a 32-bit signed integer using ZigZag + LEB128 variable-length format. |
| SYN_Status | syn_blackbox_init (SYN_Blackbox * bb) Initialize Blackbox recorder. |
Public Functions Documentation¶
function syn_blackbox_encode_delta¶
Encode a compact Predictive Delta Frame ('P') relative to last frame.
SYN_Status syn_blackbox_encode_delta (
SYN_Blackbox * bb,
const SYN_Blackbox_Record * record,
uint8_t * buf_out,
size_t * out_len
)
Parameters:
bbPointer to Blackbox instance.recordPointer to flight state record.buf_outOutput buffer (must hold at least 32 bytes).out_lenPointer to receive encoded byte length.
Returns:
SYN_OK on success.
function syn_blackbox_encode_intra¶
Encode a full Intra Frame ('I') into raw binary log stream.
SYN_Status syn_blackbox_encode_intra (
SYN_Blackbox * bb,
const SYN_Blackbox_Record * record,
uint8_t * buf_out,
size_t * out_len
)
Parameters:
bbPointer to Blackbox instance.recordPointer to flight state record.buf_outOutput buffer (must hold at least 32 bytes).out_lenPointer to receive encoded byte length.
Returns:
SYN_OK on success.
function syn_blackbox_encode_varint¶
Encode a 32-bit signed integer using ZigZag + LEB128 variable-length format.
Parameters:
valSigned integer.buf_outOutput buffer (must hold at least 5 bytes).
Returns:
Number of bytes written to buffer (1..5).
function syn_blackbox_init¶
Initialize Blackbox recorder.
Parameters:
bbPointer to Blackbox instance.
Returns:
SYN_OK on success.
The documentation for this class was generated from the following file src/syntropic/log/syn_blackbox.c