w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <RlinkPacketBufSnd.hpp>
Public Types | |
enum | stats { kStatNTxPktByt =0 , kStatNTxEsc , kStatNTxXEsc } |
Public Member Functions | |
RlinkPacketBufSnd () | |
Default constructor. | |
~RlinkPacketBufSnd () | |
Destructor. | |
void | SetXonEscape (bool xon) |
FIXME_docs. | |
bool | XonEscape () const |
FIXME_docs. | |
void | Init () |
FIXME_docs. | |
void | PutWithCrc (uint8_t data) |
FIXME_docs. | |
void | PutWithCrc (uint16_t data) |
FIXME_docs. | |
void | PutWithCrc (const uint16_t *pdata, size_t count) |
FIXME_docs. | |
void | PutCrc () |
FIXME_docs. | |
void | PutRawEsc (uint8_t ec) |
FIXME_docs. | |
bool | SndPacket (RlinkPort &port, RerrMsg &emsg) |
FIXME_docs. | |
bool | SndOob (RlinkPort &port, uint16_t addr, uint16_t data, RerrMsg &emsg) |
FIXME_docs. | |
bool | SndKeep (RlinkPort &port, RerrMsg &emsg) |
FIXME_docs. | |
bool | SndAttn (RlinkPort &port, RerrMsg &emsg) |
FIXME_docs. | |
bool | SndNak (RlinkPort &port, RerrMsg &emsg) |
FIXME_docs. | |
bool | SndUnJam (RlinkPort &port, RerrMsg &emsg) |
FIXME_docs. | |
size_t | RawSize () const |
FIXME_docs. | |
void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Public Member Functions inherited from Retro::RlinkPacketBuf | |
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. | |
Protected Member Functions | |
bool | SndRaw (RlinkPort &port, RerrMsg &emsg) |
FIXME_docs. | |
Protected Member Functions inherited from Retro::RlinkPacketBuf | |
void | SetFlagBit (uint32_t mask) |
FIXME_docs. | |
void | ClearFlagBit (uint32_t mask) |
FIXME_docs. | |
Protected Attributes | |
bool | fXonEscape |
escape XON/XOFF | |
std::vector< uint8_t > | fRawBuf |
raw data buffer | |
Protected Attributes inherited from Retro::RlinkPacketBuf | |
std::vector< uint8_t > | fPktBuf |
packet buffer | |
RlinkCrc16 | fCrc |
crc accumulator | |
uint32_t | fFlags |
request/response flags | |
Rstats | fStats |
statistics | |
Additional Inherited Members | |
Static Public Attributes inherited from Retro::RlinkPacketBuf | |
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 | |
FIXME_docs.
Definition at line 28 of file RlinkPacketBufSnd.hpp.
Enumerator | |
---|---|
kStatNTxPktByt | Tx packet bytes send. |
kStatNTxEsc | Tx esc escapes. |
kStatNTxXEsc | Tx xon escapes. |
Definition at line 60 of file RlinkPacketBufSnd.hpp.
Retro::RlinkPacketBufSnd::RlinkPacketBufSnd | ( | ) |
Default constructor.
Definition at line 43 of file RlinkPacketBufSnd.cpp.
References Retro::Rstats::Define(), Retro::RlinkPacketBuf::fStats, kStatNTxEsc, kStatNTxPktByt, and kStatNTxXEsc.
Retro::RlinkPacketBufSnd::~RlinkPacketBufSnd | ( | ) |
Destructor.
Definition at line 56 of file RlinkPacketBufSnd.cpp.
|
inline |
FIXME_docs.
Definition at line 32 of file RlinkPacketBufSnd.ipp.
References fXonEscape.
Referenced by Retro::RlinkConnect::Open().
|
inline |
void Retro::RlinkPacketBufSnd::Init | ( | ) |
FIXME_docs.
Definition at line 62 of file RlinkPacketBufSnd.cpp.
References Retro::RlinkCrc16::Clear(), Retro::RlinkPacketBuf::fCrc, Retro::RlinkPacketBuf::fFlags, Retro::RlinkPacketBuf::fPktBuf, and fRawBuf.
Referenced by Retro::RlinkConnect::EncodeRequest(), SndAttn(), SndKeep(), SndNak(), SndOob(), and SndUnJam().
|
inline |
FIXME_docs.
Definition at line 22 of file RlinkPacketBufSnd.ipp.
References Retro::RlinkCrc16::AddData(), Retro::RlinkPacketBuf::fCrc, and Retro::RlinkPacketBuf::fPktBuf.
Referenced by Retro::RlinkConnect::EncodeRequest(), and PutWithCrc().
|
inline |
FIXME_docs.
Definition at line 49 of file RlinkPacketBufSnd.ipp.
References Retro::RlinkCrc16::AddData(), Retro::RlinkPacketBuf::fCrc, and Retro::RlinkPacketBuf::fPktBuf.
void Retro::RlinkPacketBufSnd::PutWithCrc | ( | const uint16_t * | pdata, |
size_t | count | ||
) |
|
inline |
FIXME_docs.
Definition at line 63 of file RlinkPacketBufSnd.ipp.
References Retro::RlinkCrc16::Crc(), Retro::RlinkPacketBuf::fCrc, and Retro::RlinkPacketBuf::fPktBuf.
Referenced by Retro::RlinkConnect::EncodeRequest().
|
inline |
FIXME_docs.
Definition at line 76 of file RlinkPacketBufSnd.ipp.
References fRawBuf, Retro::RlinkPacketBuf::kSymEdPref, and Retro::RlinkPacketBuf::kSymEsc.
Referenced by SndAttn(), SndNak(), SndPacket(), and SndUnJam().
FIXME_docs.
Definition at line 85 of file RlinkPacketBufSnd.cpp.
References Retro::RlinkPacketBuf::fPktBuf, fRawBuf, Retro::RlinkPacketBuf::fStats, fXonEscape, Retro::Rstats::Inc(), Retro::RlinkPacketBuf::kEcEop, Retro::RlinkPacketBuf::kEcEsc, Retro::RlinkPacketBuf::kEcSop, Retro::RlinkPacketBuf::kEcXoff, Retro::RlinkPacketBuf::kEcXon, kStatNTxEsc, kStatNTxPktByt, kStatNTxXEsc, Retro::RlinkPacketBuf::kSymEsc, Retro::RlinkPacketBuf::kSymXoff, Retro::RlinkPacketBuf::kSymXon, Retro::RlinkPacketBuf::PktSize(), PutRawEsc(), and SndRaw().
Referenced by Retro::RlinkConnect::ExecPart().
bool Retro::RlinkPacketBufSnd::SndOob | ( | RlinkPort & | port, |
uint16_t | addr, | ||
uint16_t | data, | ||
RerrMsg & | emsg | ||
) |
FIXME_docs.
Definition at line 134 of file RlinkPacketBufSnd.cpp.
References fRawBuf, Init(), Retro::RlinkPacketBuf::kSymEsc, and SndRaw().
Referenced by Retro::RlinkConnect::SndOob().
FIXME_docs.
Definition at line 157 of file RlinkPacketBufSnd.cpp.
References fRawBuf, Init(), Retro::RlinkPacketBuf::kSymEsc, and SndRaw().
Referenced by Retro::RlinkConnect::Close().
FIXME_docs.
Definition at line 171 of file RlinkPacketBufSnd.cpp.
References fRawBuf, Init(), Retro::RlinkPacketBuf::kEcAttn, PutRawEsc(), and SndRaw().
Referenced by Retro::RlinkConnect::SndAttn().
FIXME_docs.
Definition at line 183 of file RlinkPacketBufSnd.cpp.
References fRawBuf, Init(), Retro::RlinkPacketBuf::kEcNak, PutRawEsc(), and SndRaw().
FIXME_docs.
Definition at line 195 of file RlinkPacketBufSnd.cpp.
References fRawBuf, Init(), Retro::RlinkPacketBuf::kEcEop, PutRawEsc(), and SndRaw().
|
inline |
void Retro::RlinkPacketBufSnd::Dump | ( | std::ostream & | os, |
int | ind = 0 , |
||
const char * | text = 0 , |
||
int | detail = 0 |
||
) | const |
FIXME_docs.
Definition at line 207 of file RlinkPacketBufSnd.cpp.
References Retro::RlinkPacketBuf::Dump(), fRawBuf, fXonEscape, and Retro::RosPrintf().
Referenced by Retro::RlinkConnect::Dump().
FIXME_docs.
Definition at line 232 of file RlinkPacketBufSnd.cpp.
References fRawBuf, Retro::RerrMsg::Init(), and Retro::RlinkPort::Write().
Referenced by SndAttn(), SndKeep(), SndNak(), SndOob(), SndPacket(), and SndUnJam().
|
protected |
escape XON/XOFF
Definition at line 70 of file RlinkPacketBufSnd.hpp.
Referenced by Dump(), SetXonEscape(), SndPacket(), and XonEscape().
|
protected |
raw data buffer
Definition at line 71 of file RlinkPacketBufSnd.hpp.
Referenced by Dump(), Init(), PutRawEsc(), RawSize(), SndAttn(), SndKeep(), SndNak(), SndOob(), SndPacket(), SndRaw(), and SndUnJam().