45 fPreExecCB(move(precb)),
46 fPostExecCB(move(postcb)),
78 if (chunk==0 || chunk>cmax) chunk = cmax;
90 SetupRdma(
false, addr, block, size, mode);
102 SetupRdma(
true, addr,
const_cast<uint16_t*
>(block), size, mode);
114 os << bl << (text?text:
"--") <<
"Rw11Rdma @ " <<
this << endl;
117 os << bl <<
" fStatus: " <<
fStatus << endl;
124 os << bl <<
" fpBlock: " <<
fpBlock << endl;
133 size_t size, uint16_t mode)
136 throw Rexception(
"Rw11Rdma::SetupRdma",
"Bad state: Rdma already active");
173 size_t ncmd = clist.
Size();
182 size_t nwdone = clist[ncmd-1].BlockDone();
190 if (nwnext != nwdone) {
size_t Size() const
FIXME_docs.
size_t BlockSizePrudent() const
FIXME_docs.
void QueueAction(actnhdl_t &&actnhdl)
FIXME_docs.
bool Exec(RlinkCommandList &clist, RerrMsg &emsg)
FIXME_docs.
I/O appicator to generate fill characters.
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
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.
bool IsStarted() const
FIXME_docs.
int AddWMem(RlinkCommandList &clist, uint32_t addr, const uint16_t *buf, size_t size, uint16_t mode=kCPAH_M_22BIT, bool singleblk=false)
FIXME_docs.
int AddRMem(RlinkCommandList &clist, uint32_t addr, uint16_t *buf, size_t size, uint16_t mode=kCPAH_M_22BIT, bool singleblk=false)
FIXME_docs.
int RdmaHandler()
FIXME_docs.
virtual void PostRdmaHook(size_t nwdone)
FIXME_docs.
virtual ~Rw11Rdma()
Destructor.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
Rw11Cntl & CntlBase() const
FIXME_docs.
postcb_t fPostExecCB
post Exec callback
enum status fStatus
dma status
size_t fNWordRest
words to be done
void SetupRdma(bool iswmem, uint32_t addr, uint16_t *block, size_t size, uint16_t mode)
FIXME_docs.
bool IsActive() const
FIXME_docs.
@ kStatNQueWMem
WMem chains queued.
@ kStatNExtClist
clist extended
@ kStatNRdmaWMem
WMem chunks done.
@ kStatNRdmaRMem
RMem chunks done.
@ kStatNFailRdma
Rdma failures.
@ kStatNQueRMem
RMem chains queued.
Rw11Rdma(Rw11Cntl *pcntl, precb_t &&precb, postcb_t &&postcb)
Constructor.
std::function< void(int, size_t, RlinkCommandList &, size_t)> postcb_t
precb_t fPreExecCB
pre Exec callback
uint32_t fAddr
current mem address
RlinkServer & Server() const
FIXME_docs.
@ kStatusBusyLast
last chunk to come
@ kStatusFailRdma
last rdma transfer failed
@ kStatusBusy
more chunks to come
@ kStatusDone
all chunks done and ok
void QueueWMem(uint32_t addr, const uint16_t *block, size_t size, uint16_t mode)
FIXME_docs.
bool fIsWMem
is memory write
uint16_t fMode
current mode
Rw11Cpu & Cpu() const
FIXME_docs.
std::function< void(int, size_t, size_t, RlinkCommandList &)> precb_t
size_t fChunksize
channel chunk size
void QueueRMem(uint32_t addr, uint16_t *block, size_t size, uint16_t mode)
FIXME_docs.
size_t fNWordMax
transfer chunk size
void SetChunkSize(size_t chunk)
FIXME_docs.
virtual void PreRdmaHook()
FIXME_docs.
uint16_t * fpBlock
current buffer pointer
size_t fNWordDone
words transfered
RlinkConnect & Connect() 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.