21#ifndef included_Retro_RlinkPacketBufRcv
22#define included_Retro_RlinkPacketBufRcv 1
53 void GetWithCrc(uint16_t* pdata,
size_t count);
59 void Dump(std::ostream& os,
int ind=0,
const char* text=0,
bool CheckNak() const
FIXME_docs.
bool CheckCrc()
FIXME_docs.
uint8_t GetEcode()
FIXME_docs.
uint8_t fNakCode
code of active nak
void GetWithCrc(uint8_t &data)
FIXME_docs.
@ kPktError
erroneous packet
@ kPktAttn
attn notify packet (ATTN+EOP)
@ kPktPend
pending, still being filled
@ kPktResp
response packet (SOP+EOP)
int NakIndex() const
FIXME_docs.
int fNakIndex
index of active nak (-1 if no)
enum rcv_state fRcvState
receive FSM state
@ kStatNRxNak
Rx NAK commas seen.
@ kStatNRxNakCnt
Rx NAK Cnt seen.
@ kStatNRxNakDcrc
Rx NAK Dcrc seen.
@ kStatNRxNakRtOvlf
Rx NAK RtOvlf seen.
@ kStatNRxDrop
Rx bytes dropped.
@ kStatNRxEsc
Rx data escapes.
@ kStatNRxNakRtWblk
Rx NAK RtWblk seen.
@ kStatNRxEop
Rx EOP commas seen.
@ kStatNRxNakCcrc
Rx NAK Ccrc seen.
@ kStatNRxNakFrame
Rx NAK Frame seen.
@ kStatNRxPktByt
Rx packet bytes rcvd.
@ kStatNRxSop
Rx SOP commas seen.
@ kStatNRxNakCmd
Rx NAK Cmd seen.
@ kStatNRxNakUnused
Rx NAK Unused seen.
@ kStatNRxNakInval
Rx NAK invalid seen.
@ kStatNRxAttn
Rx ATTN commas seen.
@ kStatNRxClobber
Rx clobbered escapes.
std::vector< uint8_t > fDropData
dropped data buffer
RlinkPacketBufRcv()
Default constructor.
void ProcessDataIdle()
FIXME_docs.
void FlushRaw()
FIXME_docs.
~RlinkPacketBufRcv()
Destructor.
uint8_t fRawBuf[4096]
raw data buffer
uint8_t NakCode() const
FIXME_docs.
void ProcessDataFill()
FIXME_docs.
bool CheckSize(size_t nbyte) const
FIXME_docs.
bool ProcessData()
FIXME_docs.
bool fEscSeen
last char was Escape
void AcceptPacket()
FIXME_docs.
pkt_state PacketState()
FIXME_docs.
@ kRcvIdle
wait for SOP or ATTN
@ kRcvError
packet framing error
@ kRcvFill
fill packet till EOP seen
@ kRcvDone
packet ok, EOP seen
size_t fNDone
number of pkt bytes processed
int ReadData(RlinkPort &port, const Rtime &timeout, RerrMsg &emsg)
FIXME_docs.
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
Declaration of class ReventLoop.