Encodes and writes HDLC frames. More...
#include <encoder.h>
Public Member Functions | |
constexpr | Encoder (stream::Writer &output) |
Construct an encoder which will write data to output . | |
Status | StartUnnumberedFrame (uint64_t address) |
Status | WriteData (ConstByteSpan data) |
Status | FinishFrame () |
Finishes a frame. Writes the frame check sequence and a terminating flag. | |
Encodes and writes HDLC frames.
|
inline |
Writes the header for an U-frame. After successfully calling StartUnnumberedFrame, WriteData may be called any number of times.
Status pw::hdlc::Encoder::WriteData | ( | ConstByteSpan | data | ) |
Writes data for an ongoing frame. Must only be called after a successful StartInformationFrame call, and prior to a FinishFrame() call.