w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <RlinkPacketBuf.hpp>
Public Member Functions | |
RlinkPacketBuf () | |
Default constructor. | |
~RlinkPacketBuf () | |
Destructor. | |
RlinkPacketBuf (const RlinkPacketBuf &)=delete | |
RlinkPacketBuf & | operator= (const RlinkPacketBuf &)=delete |
size_t | PktSize () const |
FIXME_docs. | |
uint32_t | Flags () const |
FIXME_docs. | |
bool | TestFlag (uint32_t mask) const |
FIXME_docs. | |
Rstats & | Stats () |
FIXME_docs. | |
void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Static Public Attributes | |
static const uint32_t | kFlagSopSeen = 1<<0 |
sop was seen | |
static const uint32_t | kFlagEopSeen = 1<<1 |
eop was seen | |
static const uint32_t | kFlagNakSeen = 1<<2 |
nak was seen | |
static const uint32_t | kFlagAttnSeen = 1<<3 |
attn was seen | |
static const uint32_t | kFlagErrTout = 1<<16 |
err: timeout on read | |
static const uint32_t | kFlagErrIO = 1<<17 |
err: IO error on read | |
static const uint32_t | kFlagErrFrame = 1<<18 |
err: frame error | |
static const uint32_t | kFlagErrClobber = 1<<19 |
err: clobbered esc | |
static const uint8_t | kSymEsc = 0xCA |
VHDL def escape 1100 1010. | |
static const uint8_t | kSymFill = 0xD5 |
VHDL def fill 1101 0101. | |
static const uint8_t | kSymXon = 0x11 |
VHDL def xon 0001 0001. | |
static const uint8_t | kSymXoff = 0x13 |
VHDL def xoff 0001 0011. | |
static const uint8_t | kSymEdPref = 0x40 |
VHDL def ed_pref 0100 0000. | |
static const uint8_t | kEcSop = 0x00 |
VHDL def ec_sop 000. | |
static const uint8_t | kEcEop = 0x01 |
VHDL def ec_eop 001. | |
static const uint8_t | kEcNak = 0x02 |
VHDL def ec_nak 010. | |
static const uint8_t | kEcAttn = 0x03 |
VHDL def ec_attn 011. | |
static const uint8_t | kEcXon = 0x04 |
VHDL def ec_xon 100. | |
static const uint8_t | kEcXoff = 0x05 |
VHDL def ec_xoff 101. | |
static const uint8_t | kEcFill = 0x06 |
VHDL def ec_fill 110. | |
static const uint8_t | kEcEsc = 0x07 |
VHDL def ec_esc 111. | |
static const uint8_t | kEcClobber = 0xff |
invalid Ecode | |
static const uint8_t | kNcCcrc = 0x00 |
VHDL def nak_ccrc 000. | |
static const uint8_t | kNcDcrc = 0x01 |
VHDL def nak_dcrc 001. | |
static const uint8_t | kNcFrame = 0x02 |
VHDL def nak_frame 010. | |
static const uint8_t | kNcUnused = 0x03 |
VHDL def nak_unused 011. | |
static const uint8_t | kNcCmd = 0x04 |
VHDL def nak_cmd 100. | |
static const uint8_t | kNcCnt = 0x05 |
VHDL def nak_cnt 101. | |
static const uint8_t | kNcRtOvlf = 0x06 |
VHDL def nak_rtovfl 110. | |
static const uint8_t | kNcRtWblk = 0x07 |
VHDL def nak_rtwblk 111. | |
static const uint8_t | kNcInval = 0x08 |
invalid NAK | |
Protected Member Functions | |
void | SetFlagBit (uint32_t mask) |
FIXME_docs. | |
void | ClearFlagBit (uint32_t mask) |
FIXME_docs. | |
Protected Attributes | |
std::vector< uint8_t > | fPktBuf |
packet buffer | |
RlinkCrc16 | fCrc |
crc accumulator | |
uint32_t | fFlags |
request/response flags | |
Rstats | fStats |
statistics | |
FIXME_docs.
Definition at line 36 of file RlinkPacketBuf.hpp.
Retro::RlinkPacketBuf::RlinkPacketBuf | ( | ) |
Default constructor.
Definition at line 77 of file RlinkPacketBuf.cpp.
Retro::RlinkPacketBuf::~RlinkPacketBuf | ( | ) |
Destructor.
Definition at line 87 of file RlinkPacketBuf.cpp.
|
delete |
|
delete |
|
inline |
FIXME_docs.
Definition at line 23 of file RlinkPacketBuf.ipp.
References fPktBuf.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill(), and Retro::RlinkPacketBufSnd::SndPacket().
|
inline |
|
inline |
FIXME_docs.
Definition at line 48 of file RlinkPacketBuf.ipp.
References fFlags.
Referenced by Retro::RlinkPacketBufRcv::PacketState(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
inline |
FIXME_docs.
Definition at line 56 of file RlinkPacketBuf.ipp.
References fStats.
Referenced by Retro::RlinkConnect::RcvStats(), and Retro::RlinkConnect::SndStats().
void Retro::RlinkPacketBuf::Dump | ( | std::ostream & | os, |
int | ind = 0 , |
||
const char * | text = 0 , |
||
int | detail = 0 |
||
) | const |
FIXME_docs.
Definition at line 93 of file RlinkPacketBuf.cpp.
References Retro::RlinkCrc16::Crc(), Retro::Rstats::Dump(), fCrc, fFlags, fPktBuf, fStats, and Retro::RosPrintf().
Referenced by Retro::RlinkPacketBufRcv::Dump(), and Retro::RlinkPacketBufSnd::Dump().
|
inlineprotected |
FIXME_docs.
Definition at line 31 of file RlinkPacketBuf.ipp.
References fFlags.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill(), Retro::RlinkPacketBufRcv::ProcessDataIdle(), and Retro::RlinkPacketBufRcv::ReadData().
|
inlineprotected |
|
static |
sop was seen
Definition at line 55 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::PacketState(), and Retro::RlinkPacketBufRcv::ProcessDataIdle().
|
static |
eop was seen
Definition at line 56 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
nak was seen
Definition at line 57 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
attn was seen
Definition at line 58 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill(), and Retro::RlinkPacketBufRcv::ProcessDataIdle().
|
static |
err: timeout on read
Definition at line 59 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ReadData().
|
static |
err: IO error on read
Definition at line 60 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ReadData().
|
static |
err: frame error
Definition at line 61 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
err: clobbered esc
Definition at line 62 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def escape 1100 1010.
Definition at line 65 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill(), Retro::RlinkPacketBufRcv::ProcessDataIdle(), Retro::RlinkPacketBufSnd::PutRawEsc(), Retro::RlinkPacketBufSnd::SndKeep(), Retro::RlinkPacketBufSnd::SndOob(), and Retro::RlinkPacketBufSnd::SndPacket().
|
static |
VHDL def fill 1101 0101.
Definition at line 66 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def xon 0001 0001.
Definition at line 67 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill(), and Retro::RlinkPacketBufSnd::SndPacket().
|
static |
VHDL def xoff 0001 0011.
Definition at line 68 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill(), and Retro::RlinkPacketBufSnd::SndPacket().
|
static |
VHDL def ed_pref 0100 0000.
Definition at line 69 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::GetEcode(), and Retro::RlinkPacketBufSnd::PutRawEsc().
|
static |
VHDL def ec_sop 000.
Definition at line 70 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::GetEcode(), Retro::RlinkPacketBufRcv::ProcessDataIdle(), and Retro::RlinkPacketBufSnd::SndPacket().
|
static |
VHDL def ec_eop 001.
Definition at line 71 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::GetEcode(), Retro::RlinkPacketBufRcv::ProcessDataFill(), Retro::RlinkPacketBufSnd::SndPacket(), and Retro::RlinkPacketBufSnd::SndUnJam().
|
static |
VHDL def ec_nak 010.
Definition at line 72 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::GetEcode(), Retro::RlinkPacketBufRcv::ProcessDataFill(), and Retro::RlinkPacketBufSnd::SndNak().
|
static |
VHDL def ec_attn 011.
Definition at line 73 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::GetEcode(), Retro::RlinkPacketBufRcv::ProcessDataIdle(), and Retro::RlinkPacketBufSnd::SndAttn().
|
static |
VHDL def ec_xon 100.
Definition at line 74 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill(), and Retro::RlinkPacketBufSnd::SndPacket().
|
static |
VHDL def ec_xoff 101.
Definition at line 75 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill(), and Retro::RlinkPacketBufSnd::SndPacket().
|
static |
VHDL def ec_fill 110.
Definition at line 76 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def ec_esc 111.
Definition at line 77 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::ProcessDataFill(), and Retro::RlinkPacketBufSnd::SndPacket().
|
static |
invalid Ecode
Definition at line 78 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::GetEcode(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def nak_ccrc 000.
Definition at line 79 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkConnect::DecodeResponse(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def nak_dcrc 001.
Definition at line 80 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkConnect::DecodeResponse(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def nak_frame 010.
Definition at line 81 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkConnect::DecodeResponse(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def nak_unused 011.
Definition at line 82 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkConnect::DecodeResponse(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def nak_cmd 100.
Definition at line 83 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkConnect::DecodeResponse(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def nak_cnt 101.
Definition at line 84 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkConnect::DecodeResponse(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def nak_rtovfl 110.
Definition at line 85 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkConnect::DecodeResponse(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
VHDL def nak_rtwblk 111.
Definition at line 86 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkConnect::DecodeResponse(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
static |
invalid NAK
Definition at line 87 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkConnect::DecodeResponse(), and Retro::RlinkPacketBufRcv::ProcessDataFill().
|
protected |
packet buffer
Definition at line 94 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::AcceptPacket(), Retro::RlinkPacketBufRcv::CheckCrc(), Retro::RlinkPacketBufRcv::CheckSize(), Dump(), Retro::RlinkPacketBufRcv::GetWithCrc(), Retro::RlinkPacketBufSnd::Init(), PktSize(), Retro::RlinkPacketBufRcv::ProcessDataFill(), Retro::RlinkPacketBufSnd::PutCrc(), Retro::RlinkPacketBufSnd::PutWithCrc(), and Retro::RlinkPacketBufSnd::SndPacket().
|
protected |
crc accumulator
Definition at line 95 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::AcceptPacket(), Retro::RlinkPacketBufRcv::CheckCrc(), Dump(), Retro::RlinkPacketBufRcv::GetWithCrc(), Retro::RlinkPacketBufSnd::Init(), Retro::RlinkPacketBufSnd::PutCrc(), and Retro::RlinkPacketBufSnd::PutWithCrc().
|
protected |
request/response flags
Definition at line 96 of file RlinkPacketBuf.hpp.
Referenced by Retro::RlinkPacketBufRcv::AcceptPacket(), ClearFlagBit(), Dump(), Flags(), Retro::RlinkPacketBufSnd::Init(), SetFlagBit(), and TestFlag().
|
protected |
statistics
Definition at line 97 of file RlinkPacketBuf.hpp.
Referenced by Dump(), Retro::RlinkPacketBufRcv::GetEcode(), Retro::RlinkPacketBufRcv::ProcessDataFill(), Retro::RlinkPacketBufRcv::ProcessDataIdle(), Retro::RlinkPacketBufRcv::RlinkPacketBufRcv(), Retro::RlinkPacketBufSnd::RlinkPacketBufSnd(), Retro::RlinkPacketBufSnd::SndPacket(), and Stats().