# SFBFrame Class Reference

Handles packet framing and deframing. More...

`#include <SFBFrame.h>`

Collaboration diagram for SFBFrame:

[legend]

## Public Types
enum | FrameTypes { STANDARD_PACKET, BYTE_PER_PACKET, MAX_FRAME_TYPES }
## Public Member Functions
| SFBFrame (SFBRxByteBuffer &r, SFBTxByteBuffer &t, PacketBuffer &p)
u8 * | pollForRxPacket ()
bool | txCanAddByte ()
| Returns true if there's definitely room to store a byte now.
void | txDataByte (u8 data)
| Add another data byte to current tx packet.
void | txEndPacket ()
void | reset ()
| Performs a resetRx() and a resetTx().
void | resetRx ()
| Reset the RX side of the frame.
void | resetTx ()
| Reset the TX side of the frame.
void | setRxFrameType (u32 frameType)
void | setTxFrameType (u32 frameType)
u32 | getRxFrameType ()
u32 | getTxFrameType ()

## Detailed Description

Handles packet framing and deframing.

## Member Function Documentation

void SFBFrame::resetRx | ( |  | ) |

Reset the RX side of the frame.

Any pending inbound packets are discarded, and sync is lost.

void SFBFrame::resetTx | ( |  | ) |

Reset the TX side of the frame.

Any pending outbound packets are discarded.

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

- src/include/SFBFrame.h
- src/components/library/SFBFrame.cpp