Skip to content

Struct baton_parser

ClassList > baton_parser

Incremental parser state for one byte stream. More...

  • #include <baton_protocol.h>

Public Attributes

Type Name
uint16_t crc
Running CRC over DST..PAYLOAD.
struct baton_frame frame
Frame being received; valid after feed returned 1.
uint16_t index
Bytes of the current field already received.
uint8_t state
Internal state; BATON_PARSER_IDLE between frames.

Detailed Description

The parser decodes directly into baton_parser::frame, so a decoded frame needs no second buffer. Keep one instance per input stream and initialize it before feeding bytes.

Public Attributes Documentation

variable crc

Running CRC over DST..PAYLOAD.

uint16_t baton_parser::crc;


variable frame

Frame being received; valid after feed returned 1.

struct baton_frame baton_parser::frame;


variable index

Bytes of the current field already received.

uint16_t baton_parser::index;


variable state

Internal state; BATON_PARSER_IDLE between frames.

uint8_t baton_parser::state;



The documentation for this class was generated from the following file inc/baton_protocol.h