ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
pc_field Struct Reference

One field of a frame. Frames are static const pc_field[], so they live in rodata. More...

#include <frame.h>

Public Attributes

uint8_t kind
 a pc_fk
 
uint8_t width
 min digits (DEC/HEX/OCT), significant digits (G), decimals (FIX)
 
uint16_t len
 PC_FK_LIT: byte length of lit; gated by check_frame_specs.py.
 
const char * lit
 PC_FK_LIT only.
 

Detailed Description

One field of a frame. Frames are static const pc_field[], so they live in rodata.

len carries a literal's length, written out in the spec and verified by ci_tooling/check/check_frame_specs.py. A spec is fixed when the code is written, so having the engine re-scan each literal for its NUL at runtime is the same waste as re-parsing a format string: measured at +54% on a response frame and +184% on a literal-only one.

Definition at line 79 of file frame.h.

Member Data Documentation

◆ kind

uint8_t pc_field::kind

a pc_fk

Definition at line 81 of file frame.h.

Referenced by pc_frame_vbuild().

◆ width

uint8_t pc_field::width

min digits (DEC/HEX/OCT), significant digits (G), decimals (FIX)

Definition at line 82 of file frame.h.

◆ len

uint16_t pc_field::len

PC_FK_LIT: byte length of lit; gated by check_frame_specs.py.

Definition at line 83 of file frame.h.

◆ lit

const char* pc_field::lit

PC_FK_LIT only.

Definition at line 84 of file frame.h.


The documentation for this struct was generated from the following file: