w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <Rw11UnitTerm.hpp>
Public Types | |
enum | stats { kStatNPreAttDrop = Rw11Unit::kDimStat , kStatNRxFerr , kStatNRxChar , kStatNRxNull , kStatNRx8bit , kStatNRxLine , kStatNTxFerr , kStatNTxChar , kStatNTxNull , kStatNTx8bit , kStatNTxLine , kDimStat } |
Public Types inherited from Retro::Rw11Unit | |
enum | stats { kDimStat = 0 } |
Public Member Functions | |
Rw11UnitTerm (Rw11Cntl *pcntl, size_t index) | |
Constructor. | |
~Rw11UnitTerm () | |
Destructor. | |
const std::string & | ChannelId () const |
FIXME_docs. | |
void | SetTo7bit (bool to7bit) |
FIXME_docs. | |
void | SetToEnpc (bool toenpc) |
FIXME_docs. | |
void | SetTi7bit (bool ti7bit) |
FIXME_docs. | |
bool | To7bit () const |
FIXME_docs. | |
bool | ToEnpc () const |
FIXME_docs. | |
bool | Ti7bit () const |
FIXME_docs. | |
void | SetLog (const std::string &fname) |
FIXME_docs. | |
const std::string & | Log () const |
FIXME_docs. | |
void | StatIncRx (uint8_t ichr, bool ferr=false) |
FIXME_docs. | |
void | StatIncTx (uint8_t ochr, bool ferr=false) |
FIXME_docs. | |
virtual bool | RcvQueueEmpty () |
FIXME_docs. | |
virtual size_t | RcvQueueSize () |
FIXME_docs. | |
virtual uint8_t | RcvQueueNext () |
FIXME_docs. | |
virtual size_t | Rcv (uint8_t *buf, size_t count) |
FIXME_docs. | |
virtual bool | Snd (const uint8_t *buf, size_t count) |
FIXME_docs. | |
virtual bool | RcvCallback (const uint8_t *buf, size_t count) |
FIXME_docs. | |
virtual void | WakeupCntl ()=0 |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Public Member Functions inherited from Retro::Rw11UnitVirt< Rw11VirtTerm > | |
Rw11UnitVirt (Rw11Cntl *pcntl, size_t index) | |
Default constructor. | |
~Rw11UnitVirt () | |
Destructor. | |
bool | HasVirt () const |
FIXME_docs. | |
Rw11VirtTerm & | Virt () |
FIXME_docs. | |
const Rw11VirtTerm & | Virt () const |
FIXME_docs. | |
virtual Rw11Virt * | VirtBase () const |
FIXME_docs. | |
virtual bool | Attach (const std::string &url, RerrMsg &emsg) |
FIXME_docs. | |
virtual void | Detach () |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Public Member Functions inherited from Retro::Rw11Unit | |
Rw11Unit (Rw11Cntl *pcntl, size_t index) | |
Constructor. | |
virtual | ~Rw11Unit () |
Destructor. | |
Rw11Unit (const Rw11Unit &)=delete | |
Rw11Unit & | operator= (const Rw11Unit &)=delete |
size_t | Index () const |
FIXME_docs. | |
std::string | Name () const |
FIXME_docs. | |
void | SetAttachOpts (const std::string &opts) |
FIXME_docs. | |
const std::string & | AttachOpts () const |
FIXME_docs. | |
Rw11Cntl & | CntlBase () const |
FIXME_docs. | |
Rw11Cpu & | Cpu () const |
FIXME_docs. | |
Rw11 & | W11 () const |
FIXME_docs. | |
RlinkServer & | Server () const |
FIXME_docs. | |
RlinkConnect & | Connect () const |
FIXME_docs. | |
RlogFile & | LogFile () const |
FIXME_docs. | |
virtual bool | Enabled () const |
FIXME_docs. | |
virtual Rw11Virt * | VirtBase () const =0 |
bool | IsAttached () const |
FIXME_docs. | |
const std::string & | AttachUrl () const |
FIXME_docs. | |
virtual bool | Attach (const std::string &url, RerrMsg &emsg) |
FIXME_docs. | |
virtual void | Detach () |
FIXME_docs. | |
Rstats & | Stats () |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Protected Member Functions | |
virtual void | AttachDone () |
FIXME_docs. | |
Protected Member Functions inherited from Retro::Rw11Unit | |
virtual void | AttachDone () |
FIXME_docs. | |
virtual void | DetachCleanup () |
FIXME_docs. | |
virtual void | DetachDone () |
FIXME_docs. | |
Protected Attributes | |
bool | fTo7bit |
discard parity bit on output | |
bool | fToEnpc |
escape non-printables on output | |
bool | fTi7bit |
discard parity bit on input | |
std::deque< uint8_t > | fRcvQueue |
input queue | |
std::string | fLogFname |
log file name | |
std::ofstream | fLogStream |
log file stream | |
bool | fLogOptCrlf |
log file: crlf option given | |
bool | fLogCrPend |
log file: cr pending | |
bool | fLogLfLast |
log file: lf was last char | |
Protected Attributes inherited from Retro::Rw11UnitVirt< Rw11VirtTerm > | |
std::unique_ptr< Rw11VirtTerm > | fupVirt |
Protected Attributes inherited from Retro::Rw11Unit | |
Rw11Cntl * | fpCntlBase |
plain Rw11Cntl ptr | |
size_t | fIndex |
unit number | |
std::string | fAttachOpts |
unit context options for attach | |
Rstats | fStats |
statistics | |
Additional Inherited Members | |
Static Public Attributes inherited from Retro::Rbits | |
static const uint8_t | kBBit00 = 1u<< 0 |
static const uint8_t | kBBit01 = 1u<< 1 |
static const uint8_t | kBBit02 = 1u<< 2 |
static const uint8_t | kBBit03 = 1u<< 3 |
static const uint8_t | kBBit04 = 1u<< 4 |
static const uint8_t | kBBit05 = 1u<< 5 |
static const uint8_t | kBBit06 = 1u<< 6 |
static const uint8_t | kBBit07 = 1u<< 7 |
static const uint16_t | kWBit00 = 1u<< 0 |
static const uint16_t | kWBit01 = 1u<< 1 |
static const uint16_t | kWBit02 = 1u<< 2 |
static const uint16_t | kWBit03 = 1u<< 3 |
static const uint16_t | kWBit04 = 1u<< 4 |
static const uint16_t | kWBit05 = 1u<< 5 |
static const uint16_t | kWBit06 = 1u<< 6 |
static const uint16_t | kWBit07 = 1u<< 7 |
static const uint16_t | kWBit08 = 1u<< 8 |
static const uint16_t | kWBit09 = 1u<< 9 |
static const uint16_t | kWBit10 = 1u<<10 |
static const uint16_t | kWBit11 = 1u<<11 |
static const uint16_t | kWBit12 = 1u<<12 |
static const uint16_t | kWBit13 = 1u<<13 |
static const uint16_t | kWBit14 = 1u<<14 |
static const uint16_t | kWBit15 = 1u<<15 |
static const uint32_t | kLBit00 = 1u<< 0 |
static const uint32_t | kLBit01 = 1u<< 1 |
static const uint32_t | kLBit02 = 1u<< 2 |
static const uint32_t | kLBit03 = 1u<< 3 |
static const uint32_t | kLBit04 = 1u<< 4 |
static const uint32_t | kLBit05 = 1u<< 5 |
static const uint32_t | kLBit06 = 1u<< 6 |
static const uint32_t | kLBit07 = 1u<< 7 |
static const uint32_t | kLBit08 = 1u<< 8 |
static const uint32_t | kLBit09 = 1u<< 9 |
static const uint32_t | kLBit10 = 1u<<10 |
static const uint32_t | kLBit11 = 1u<<11 |
static const uint32_t | kLBit12 = 1u<<12 |
static const uint32_t | kLBit13 = 1u<<13 |
static const uint32_t | kLBit14 = 1u<<14 |
static const uint32_t | kLBit15 = 1u<<15 |
static const uint32_t | kLBit16 = 1u<<16 |
static const uint32_t | kLBit17 = 1u<<17 |
static const uint32_t | kLBit18 = 1u<<18 |
static const uint32_t | kLBit19 = 1u<<19 |
static const uint32_t | kLBit20 = 1u<<20 |
static const uint32_t | kLBit21 = 1u<<21 |
static const uint32_t | kLBit22 = 1u<<22 |
static const uint32_t | kLBit23 = 1u<<23 |
static const uint32_t | kLBit24 = 1u<<24 |
static const uint32_t | kLBit25 = 1u<<25 |
static const uint32_t | kLBit26 = 1u<<26 |
static const uint32_t | kLBit27 = 1u<<27 |
static const uint32_t | kLBit28 = 1u<<28 |
static const uint32_t | kLBit29 = 1u<<29 |
static const uint32_t | kLBit30 = 1u<<30 |
static const uint32_t | kLBit31 = 1u<<31 |
FIXME_docs.
Definition at line 34 of file Rw11UnitTerm.hpp.
Definition at line 68 of file Rw11UnitTerm.hpp.
Retro::Rw11UnitTerm::Rw11UnitTerm | ( | Rw11Cntl * | pcntl, |
size_t | index | ||
) |
Constructor.
Definition at line 47 of file Rw11UnitTerm.cpp.
References Retro::Rstats::Define(), Retro::Rw11Unit::fStats, kStatNPreAttDrop, kStatNRx8bit, kStatNRxChar, kStatNRxFerr, kStatNRxLine, kStatNRxNull, kStatNTx8bit, kStatNTxChar, kStatNTxFerr, kStatNTxLine, and kStatNTxNull.
Retro::Rw11UnitTerm::~Rw11UnitTerm | ( | ) |
Destructor.
Definition at line 76 of file Rw11UnitTerm.cpp.
const std::string & Retro::Rw11UnitTerm::ChannelId | ( | ) | const |
FIXME_docs.
Definition at line 82 of file Rw11UnitTerm.cpp.
References Retro::Rw11VirtTerm::ChannelId(), Retro::Rw11UnitVirt< Rw11VirtTerm >::HasVirt(), and Retro::Rw11UnitVirt< Rw11VirtTerm >::Virt().
Referenced by Retro::RtclRw11UnitTerm::SetupGetSet().
|
inline |
FIXME_docs.
Definition at line 23 of file Rw11UnitTerm.ipp.
References fTo7bit.
Referenced by Retro::RtclRw11UnitTerm::SetupGetSet().
|
inline |
FIXME_docs.
Definition at line 32 of file Rw11UnitTerm.ipp.
References fToEnpc.
Referenced by Retro::RtclRw11UnitTerm::SetupGetSet().
|
inline |
FIXME_docs.
Definition at line 41 of file Rw11UnitTerm.ipp.
References fTi7bit.
Referenced by Retro::RtclRw11UnitTerm::SetupGetSet().
|
inline |
FIXME_docs.
Definition at line 50 of file Rw11UnitTerm.ipp.
References fTo7bit.
Referenced by Retro::RtclRw11CntlTermBase< TC >::M_default(), and Retro::RtclRw11UnitTerm::SetupGetSet().
|
inline |
FIXME_docs.
Definition at line 58 of file Rw11UnitTerm.ipp.
References fToEnpc.
Referenced by Retro::RtclRw11CntlTermBase< TC >::M_default(), and Retro::RtclRw11UnitTerm::SetupGetSet().
|
inline |
FIXME_docs.
Definition at line 66 of file Rw11UnitTerm.ipp.
References fTi7bit.
Referenced by Retro::RtclRw11CntlTermBase< TC >::M_default(), and Retro::RtclRw11UnitTerm::SetupGetSet().
void Retro::Rw11UnitTerm::SetLog | ( | const std::string & | fname | ) |
FIXME_docs.
Definition at line 92 of file Rw11UnitTerm.cpp.
References Retro::Rtools::CreateBackupFile(), Retro::RparseUrl::FindOpt(), fLogCrPend, fLogFname, fLogLfLast, fLogOptCrlf, fLogStream, Retro::RparseUrl::Path(), and Retro::RparseUrl::Set().
Referenced by Retro::RtclRw11UnitTerm::SetupGetSet().
|
inline |
FIXME_docs.
Definition at line 74 of file Rw11UnitTerm.ipp.
References fLogFname.
Referenced by Retro::RtclRw11UnitTerm::SetupGetSet().
void Retro::Rw11UnitTerm::StatIncRx | ( | uint8_t | ichr, |
bool | ferr = false |
||
) |
FIXME_docs.
Definition at line 130 of file Rw11UnitTerm.cpp.
References Retro::Rw11Unit::fStats, fTi7bit, Retro::Rstats::Inc(), kStatNRx8bit, kStatNRxChar, kStatNRxFerr, kStatNRxLine, and kStatNRxNull.
void Retro::Rw11UnitTerm::StatIncTx | ( | uint8_t | ochr, |
bool | ferr = false |
||
) |
FIXME_docs.
Definition at line 147 of file Rw11UnitTerm.cpp.
References Retro::Rw11Unit::fStats, fTo7bit, Retro::Rstats::Inc(), kStatNTx8bit, kStatNTxChar, kStatNTxFerr, kStatNTxLine, and kStatNTxNull.
|
inlinevirtual |
FIXME_docs.
Definition at line 82 of file Rw11UnitTerm.ipp.
References fRcvQueue.
Referenced by RcvQueueNext().
|
inlinevirtual |
|
virtual |
FIXME_docs.
Definition at line 164 of file Rw11UnitTerm.cpp.
References fRcvQueue, and RcvQueueEmpty().
|
virtual |
|
virtual |
FIXME_docs.
Definition at line 188 of file Rw11UnitTerm.cpp.
References fLogCrPend, fLogLfLast, fLogOptCrlf, fLogStream, Retro::Rw11Unit::fStats, fTo7bit, fToEnpc, Retro::Rw11UnitVirt< Rw11VirtTerm >::HasVirt(), Retro::Rstats::Inc(), kStatNPreAttDrop, Retro::Rw11Unit::Name(), Retro::Rw11VirtTerm::Snd(), and Retro::Rw11UnitVirt< Rw11VirtTerm >::Virt().
|
virtual |
FIXME_docs.
Definition at line 268 of file Rw11UnitTerm.cpp.
References Retro::Rw11Unit::Connect(), fRcvQueue, fTi7bit, and WakeupCntl().
Referenced by AttachDone(), and Retro::RtclRw11UnitTerm::M_type().
|
pure virtual |
Implemented in Retro::Rw11UnitTermBase< TC >, Retro::Rw11UnitTermBase< Rw11CntlDL11 >, and Retro::Rw11UnitTermBase< Rw11CntlDZ11 >.
Referenced by RcvCallback().
|
virtual |
FIXME_docs.
Reimplemented from Retro::Rw11UnitVirt< Rw11VirtTerm >.
Reimplemented in Retro::Rw11UnitDL11, Retro::Rw11UnitDZ11, Retro::Rw11UnitTermBase< TC >, Retro::Rw11UnitTermBase< Rw11CntlDL11 >, and Retro::Rw11UnitTermBase< Rw11CntlDZ11 >.
Definition at line 287 of file Rw11UnitTerm.cpp.
References Retro::Rw11Unit::Connect(), Retro::Rw11UnitVirt< TV >::Dump(), fLogCrPend, fLogFname, fLogLfLast, fLogOptCrlf, fLogStream, fRcvQueue, fTi7bit, fTo7bit, fToEnpc, and Retro::RosPrintf().
Referenced by Retro::Rw11UnitTermBase< TC >::Dump().
|
protectedvirtual |
FIXME_docs.
Reimplemented from Retro::Rw11Unit.
Reimplemented in Retro::Rw11UnitTermBase< TC >, Retro::Rw11UnitTermBase< Rw11CntlDL11 >, and Retro::Rw11UnitTermBase< Rw11CntlDZ11 >.
Definition at line 334 of file Rw11UnitTerm.cpp.
References RcvCallback(), Retro::Rw11VirtTerm::SetupRcvCallback(), and Retro::Rw11UnitVirt< Rw11VirtTerm >::Virt().
Referenced by Retro::Rw11UnitTermBase< TC >::AttachDone().
|
protected |
discard parity bit on output
Definition at line 87 of file Rw11UnitTerm.hpp.
Referenced by Dump(), SetTo7bit(), Snd(), StatIncTx(), and To7bit().
|
protected |
escape non-printables on output
Definition at line 88 of file Rw11UnitTerm.hpp.
Referenced by Dump(), SetToEnpc(), Snd(), and ToEnpc().
|
protected |
discard parity bit on input
Definition at line 89 of file Rw11UnitTerm.hpp.
Referenced by Dump(), RcvCallback(), SetTi7bit(), StatIncRx(), and Ti7bit().
|
protected |
input queue
Definition at line 90 of file Rw11UnitTerm.hpp.
Referenced by Dump(), Rcv(), RcvCallback(), RcvQueueEmpty(), RcvQueueNext(), and RcvQueueSize().
|
protected |
log file name
Definition at line 91 of file Rw11UnitTerm.hpp.
|
protected |
log file stream
Definition at line 92 of file Rw11UnitTerm.hpp.
|
protected |
log file: crlf option given
Definition at line 93 of file Rw11UnitTerm.hpp.
|
protected |
log file: cr pending
Definition at line 94 of file Rw11UnitTerm.hpp.
|
protected |
log file: lf was last char
Definition at line 95 of file Rw11UnitTerm.hpp.