w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Retro::RlinkPacketBufSnd Class Reference

FIXME_docs. More...

#include <RlinkPacketBufSnd.hpp>

Inheritance diagram for Retro::RlinkPacketBufSnd:
[legend]
Collaboration diagram for Retro::RlinkPacketBufSnd:
[legend]

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
 
RlinkPacketBufoperator= (const RlinkPacketBuf &)=delete
 
size_t PktSize () const
 FIXME_docs.
 
uint32_t Flags () const
 FIXME_docs.
 
bool TestFlag (uint32_t mask) const
 FIXME_docs.
 
RstatsStats ()
 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
 

Detailed Description

FIXME_docs.

Definition at line 28 of file RlinkPacketBufSnd.hpp.

Member Enumeration Documentation

◆ stats

Enumerator
kStatNTxPktByt 

Tx packet bytes send.

kStatNTxEsc 

Tx esc escapes.

kStatNTxXEsc 

Tx xon escapes.

Definition at line 60 of file RlinkPacketBufSnd.hpp.

Constructor & Destructor Documentation

◆ RlinkPacketBufSnd()

Retro::RlinkPacketBufSnd::RlinkPacketBufSnd ( )

Default constructor.

Definition at line 43 of file RlinkPacketBufSnd.cpp.

References Retro::Rstats::Define(), Retro::RlinkPacketBuf::fStats, kStatNTxEsc, kStatNTxPktByt, and kStatNTxXEsc.

◆ ~RlinkPacketBufSnd()

Retro::RlinkPacketBufSnd::~RlinkPacketBufSnd ( )

Destructor.

Definition at line 56 of file RlinkPacketBufSnd.cpp.

Member Function Documentation

◆ SetXonEscape()

void Retro::RlinkPacketBufSnd::SetXonEscape ( bool  xon)
inline

FIXME_docs.

Definition at line 32 of file RlinkPacketBufSnd.ipp.

References fXonEscape.

Referenced by Retro::RlinkConnect::Open().

◆ XonEscape()

bool Retro::RlinkPacketBufSnd::XonEscape ( ) const
inline

FIXME_docs.

Definition at line 41 of file RlinkPacketBufSnd.ipp.

References fXonEscape.

◆ Init()

◆ PutWithCrc() [1/3]

void Retro::RlinkPacketBufSnd::PutWithCrc ( uint8_t  data)
inline

◆ PutWithCrc() [2/3]

void Retro::RlinkPacketBufSnd::PutWithCrc ( uint16_t  data)
inline

◆ PutWithCrc() [3/3]

void Retro::RlinkPacketBufSnd::PutWithCrc ( const uint16_t *  pdata,
size_t  count 
)

FIXME_docs.

Definition at line 75 of file RlinkPacketBufSnd.cpp.

References PutWithCrc().

◆ PutCrc()

void Retro::RlinkPacketBufSnd::PutCrc ( )
inline

◆ PutRawEsc()

void Retro::RlinkPacketBufSnd::PutRawEsc ( uint8_t  ec)
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().

◆ SndPacket()

◆ SndOob()

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().

◆ SndKeep()

bool Retro::RlinkPacketBufSnd::SndKeep ( RlinkPort port,
RerrMsg emsg 
)

FIXME_docs.

Definition at line 157 of file RlinkPacketBufSnd.cpp.

References fRawBuf, Init(), Retro::RlinkPacketBuf::kSymEsc, and SndRaw().

Referenced by Retro::RlinkConnect::Close().

◆ SndAttn()

bool Retro::RlinkPacketBufSnd::SndAttn ( RlinkPort port,
RerrMsg emsg 
)

FIXME_docs.

Definition at line 171 of file RlinkPacketBufSnd.cpp.

References fRawBuf, Init(), Retro::RlinkPacketBuf::kEcAttn, PutRawEsc(), and SndRaw().

Referenced by Retro::RlinkConnect::SndAttn().

◆ SndNak()

bool Retro::RlinkPacketBufSnd::SndNak ( RlinkPort port,
RerrMsg emsg 
)

FIXME_docs.

Definition at line 183 of file RlinkPacketBufSnd.cpp.

References fRawBuf, Init(), Retro::RlinkPacketBuf::kEcNak, PutRawEsc(), and SndRaw().

◆ SndUnJam()

bool Retro::RlinkPacketBufSnd::SndUnJam ( RlinkPort port,
RerrMsg emsg 
)

FIXME_docs.

Definition at line 195 of file RlinkPacketBufSnd.cpp.

References fRawBuf, Init(), Retro::RlinkPacketBuf::kEcEop, PutRawEsc(), and SndRaw().

◆ RawSize()

size_t Retro::RlinkPacketBufSnd::RawSize ( ) const
inline

FIXME_docs.

Definition at line 87 of file RlinkPacketBufSnd.ipp.

References fRawBuf.

◆ Dump()

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().

◆ SndRaw()

bool Retro::RlinkPacketBufSnd::SndRaw ( RlinkPort port,
RerrMsg emsg 
)
protected

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().

Member Data Documentation

◆ fXonEscape

bool Retro::RlinkPacketBufSnd::fXonEscape
protected

escape XON/XOFF

Definition at line 70 of file RlinkPacketBufSnd.hpp.

Referenced by Dump(), SetXonEscape(), SndPacket(), and XonEscape().

◆ fRawBuf

std::vector<uint8_t> Retro::RlinkPacketBufSnd::fRawBuf
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().


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