Comms CCF
This is a simple communication layer based on COBS, CBOR and FNV-1A
Loading...
Searching...
No Matches
Cobs::Decoder Class Reference

Decodes data as a state-machine. More...

#include <cobs.hpp>

Public Member Functions

bool feed (uint8_t byte)
uint8_t get (uint8_t byte) const

Detailed Description

Decodes data as a state-machine.

Member Function Documentation

◆ feed()

bool Cobs::Decoder::feed ( uint8_t byte)

Feeds a character to the state-machine, returning whether that character is to be emitted, or only causing an internal transition

We reached an unescaped zero byte, our caller should already know we are at the end – reset for decoding next frame

And don't say skip, to emit the null and not process the next byte

◆ get()

uint8_t Cobs::Decoder::get ( uint8_t byte) const

Get the current character, should be called before feed, with the same byte that will be fed. But it is only valid if feed returns true, otherwise it should be ignored.


The documentation for this class was generated from the following files: