30#ifndef included_Retro_RlinkPort
31#define included_Retro_RlinkPort 1
58 virtual int Read(uint8_t* buf,
size_t size,
const Rtime& timeout,
60 virtual int Write(
const uint8_t* buf,
size_t size,
RerrMsg& emsg);
63 int RawRead(uint8_t* buf,
size_t size,
bool exactsize,
75 void SetLogFile(
const std::shared_ptr<RlogFile>& splog);
82 virtual void Dump(std::ostream& os,
int ind=0,
const char* text=0,
88 static const int kErr = -2;
int RawRead(uint8_t *buf, size_t size, bool exactsize, const Rtime &timeout, Rtime &tused, RerrMsg &emsg)
FIXME_docs.
int RawWrite(const uint8_t *buf, size_t size, RerrMsg &emsg)
FIXME_docs.
virtual bool PollRead(const Rtime &timeout)
FIXME_docs.
Rtime fTsLastWrite
time stamp last write
static const int kEof
return code: end-of-file
void CloseFd(int &fd)
FIXME_docs.
int FdWrite() const
FIXME_docs.
void SetTraceLevel(uint32_t level)
FIXME_docs.
bool IsOpen() const
FIXME_docs.
const RparseUrl & Url() const
FIXME_docs.
Rstats & Stats()
FIXME_docs.
virtual ~RlinkPort()
Destructor.
static const int kErr
return code: IO error
RlinkPort()
Default constructor.
std::shared_ptr< RlogFile > fspLog
log file ptr
bool fXon
xon attribute set
static const int kTout
return code: time out
virtual int Read(uint8_t *buf, size_t size, const Rtime &timeout, RerrMsg &emsg)
FIXME_docs.
bool XonEnable() const
FIXME_docs.
virtual void Close()
FIXME_docs.
void SetLogFile(const std::shared_ptr< RlogFile > &splog)
FIXME_docs.
RlinkPort(const RlinkPort &)=delete
uint32_t TraceLevel() const
FIXME_docs.
virtual int Write(const uint8_t *buf, size_t size, RerrMsg &emsg)
FIXME_docs.
std::unique_ptr< RlinkPort > port_uptr_t
Rtime fTsLastRead
time stamp last write
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
uint32_t fTraceLevel
trace level
int FdRead() const
FIXME_docs.
RlinkPort & operator=(const RlinkPort &)=delete
virtual bool Open(const std::string &url, RerrMsg &emsg)=0
Declaration of class ReventLoop.