43using namespace std::placeholders;
122 "Bad state: started, no lam, not enable, not found");
149 uint16_t(1)<<
fLam,
this);
174 throw Rexception(
"Rw11CntlLP11::SetRlim",
"Bad args: rlim too large");
188 os << bl << (text?text:
"--") <<
"Rw11CntlLP11 @ " <<
this << endl;
189 os << bl <<
" fPC_buf: " <<
fPC_buf << endl;
229 lmsg <<
"-I " <<
Name() <<
":"
254 bool rc =
fspUnit[0]->VirtWrite(&ochr, 1, emsg);
262 rc =
fspUnit[0]->VirtFlush(emsg);
263 }
else if (ochr ==
'\n') {
278 lmsg <<
"-E " <<
Name()
279 <<
": prim=1 call and queue busy";
295 for (
size_t i=0; i < done; i++) {
298 fumin = min(fumin,fuse);
299 fumax = max(fumax,fuse);
304 fRblkSize = max(uint16_t(4), max(uint16_t(done),fumax));
311 lmsg <<
"-E " <<
Name()
312 <<
": queue attempt while queue busy, prim=" << prim;
322 lmsg <<
"-I " <<
Name() <<
":"
323 <<
" pr,si,do=" << prim
size_t AddAttn()
FIXME_docs.
static const uint8_t kStat_M_RbNak
stat: rbnak flag set
static const uint8_t kStat_M_RbTout
stat: rbtout flag set
size_t BlockSize() const
FIXME_docs.
size_t BlockDone() const
FIXME_docs.
uint16_t * BlockPointer()
FIXME_docs.
void AddAttnHandler(attnhdl_t &&attnhdl, uint16_t mask, void *cdata=nullptr)
FIXME_docs.
void QueueAction(actnhdl_t &&actnhdl)
FIXME_docs.
void GetAttnInfo(AttnArgs &args, RlinkCommandList &clist)
FIXME_docs.
bool Exec(RlinkCommandList &clist, RerrMsg &emsg)
FIXME_docs.
I/O appicator to generate fill characters.
void Inc(size_t ind, double val=1.)
FIXME_docs.
void Define(size_t ind, const std::string &name, const std::string &text)
FIXME_docs.
Implemenation (inline) of Rw11CntlBase.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
std::shared_ptr< Rw11UnitLP11 > fspUnit[NU]
static const uint16_t kBUF_B_FUSE
buf.fuse bit mask
virtual void Start()
FIXME_docs.
uint16_t fItype
interface type
static const uint16_t kBUF_M_DATA
buf data mask
static const uint16_t kCSR
CSR reg offset.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
void SetRlim(uint16_t rlim)
FIXME_docs.
static const uint16_t kBUF_M_VAL
buf.val mask
uint16_t fRlim
interrupt rate limit
static const int kLam
LP11 default lam.
virtual void UnitSetup(size_t ind)
FIXME_docs.
bool Buffered() const
FIXME_docs.
uint16_t fRblkSize
rblk chunk size
static const uint16_t kIbaddr
LP11 default address.
bool fQueBusy
rcv queue busy
int AttnHandler(RlinkServer::AttnArgs &args)
FIXME_docs.
static const uint16_t kCSR_V_RLIM
csr.rlim shift
void Config(const std::string &name, uint16_t base, int lam)
FIXME_docs.
static const bool kProbeRem
probr rem active
static const bool kProbeInt
probe int active
static const uint16_t kCSR_M_ERROR
csr.err mask
static const uint16_t kCSR_B_TYPE
csr.type bit mask
void WriteChar(uint8_t ochr)
FIXME_docs.
Rw11CntlLP11()
Default constructor.
~Rw11CntlLP11()
Destructor.
static const uint16_t kFifoMaxSize
maximal fifo size
static const uint16_t kProbeOff
probe address offset (rcsr)
void ProcessBuf(const RlinkCommand &cmd, bool prim)
FIXME_docs.
static const uint16_t kBUF
BUF reg offset.
static const uint16_t kCSR_B_RLIM
csr.rlim bit mask
size_t fPC_buf
PrimClist: buf index.
static const uint16_t kCSR_V_TYPE
csr.type shift
void ProcessUnbuf(uint16_t buf)
FIXME_docs.
static const uint16_t kBUF_V_FUSE
buf.fuse shift
int RcvHandler()
FIXME_docs.
@ kStatNNull
send null char
int fLam
attn bit number (-1 of none)
uint32_t fTraceLevel
trace level; 0=off;1=cntl
RlinkCommandList fPrimClist
clist for attn primary info
uint16_t Base() const
FIXME_docs.
Rw11Probe fProbe
controller probe context
Rw11Cpu & Cpu() const
FIXME_docs.
void ConfigCntl(const std::string &name, uint16_t base, int lam, uint16_t probeoff, bool probeint, bool proberem)
FIXME_docs.
bool fStarted
true if Start() called
RlinkServer & Server() const
FIXME_docs.
const std::string & Name() const
FIXME_docs.
RlogFile & LogFile() const
FIXME_docs.
virtual void UnitSetupAll()
FIXME_docs.
uint16_t fBase
controller base address
void AllIAddrMapInsert(const std::string &name, uint16_t ibaddr)
FIXME_docs.
int AddRbibr(RlinkCommandList &clist, uint16_t ibaddr, size_t size)
FIXME_docs.
void ExecWibr(uint16_t ibaddr0, uint16_t data0, uint16_t ibaddr1=0, uint16_t data1=0, uint16_t ibaddr2=0, uint16_t data2=0)
FIXME_docs.
int AddRibr(RlinkCommandList &clist, uint16_t ibaddr)
FIXME_docs.
bool HasVirt() const
FIXME_docs.
bool Error() const
FIXME_docs.
RosPrintfS< bool > RosPrintf(bool value, const char *form=0, int width=0, int prec=0)
Creates a print object for the formatted output of a bool value.
Declaration of class ReventLoop.
bool Found() const
FIXME_docs.
uint16_t DataRem() const
FIXME_docs.