JBImprov
Improv Wi-Fi provisioning over serial and Bluetooth LE
Loading...
Searching...
No Matches
JBImprovSerialParser Class Reference

Incremental parser for Improv frames in a serial byte stream. More...

#include <JBImprovProtocol.h>

Public Member Functions

void reset ()
 Forget any partial frame.
bool feed (uint8_t byte)
 Process one received byte.
bool inFrame () const
 true while a frame has been started but not finished.
JBImprovPacketType type () const
 Packet type of the last complete frame.
const uint8_t * data () const
 Data of the last complete frame.
uint8_t length () const
 Number of bytes in data().

Detailed Description

Incremental parser for Improv frames in a serial byte stream.

Bytes that aren't part of a valid frame are skipped, so the same port can carry log output and other data.

Member Function Documentation

◆ feed()

bool JBImprovSerialParser::feed ( uint8_t byte)

Process one received byte.

Returns
true when the byte completed a valid frame. Read it with type(), data() and length() before the next call.

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