File syn_blackbox.h¶
FileList > log > syn_blackbox.h
Go to the source code of this file
Zero-Heap Flight Telemetry Blackbox Binary Recorder. More...
#include "syntropic/common/syn_defs.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>
Classes¶
| Type | Name |
|---|---|
| struct | SYN_Blackbox |
| struct | SYN_Blackbox_Record |
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. |
Macros¶
| Type | Name |
|---|---|
| define | SYN_BLACKBOX_FRAME_DELTA 'P' |
| define | SYN_BLACKBOX_FRAME_INTRA 'I' |
| define | SYN_BLACKBOX_FRAME_SLOW '[**S**](syn__x25519_8c.md#function-s)' |
Detailed Description¶
High-speed binary logger for SPI Flash or SD Card logging. Frame Formats: * 'H' (Header): ASCII configuration settings and flight controller parameters. * 'I' (Intra Frame): Full uncompressed 32-bit state vector (Gyro, Accel, Motor outputs, Setpoints). * 'P' (Predictive Delta Frame): Compact variable-length ZigZag delta encoded frame.
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.
Macro Definition Documentation¶
define SYN_BLACKBOX_FRAME_DELTA¶
Delta frame identifier 'P' (predictive delta-encoded)
define SYN_BLACKBOX_FRAME_INTRA¶
Intra frame identifier 'I' (full uncompressed frame)
define SYN_BLACKBOX_FRAME_SLOW¶
Slow frame identifier 'S' (low-rate status fields)
The documentation for this class was generated from the following file src/syntropic/log/syn_blackbox.h