76 size_t ind =
fList.size();
77 fList.push_back(move(upcmd));
94 size_t ind =
fList.size();
105 upcmd->CmdRreg(addr);
115 upcmd->CmdRblk(addr, size);
125 upcmd->CmdRblk(addr, block, size);
135 upcmd->CmdWreg(addr, data);
143 const std::vector<uint16_t>& block)
146 upcmd->CmdWblk(addr, block);
156 upcmd->CmdWblk(addr, move(block));
167 upcmd->CmdWblk(addr, block, size);
197 upcmd->CmdInit(addr, data);
207 throw Rexception(
"RlinkCommandList::SetLastExpectStatus()",
208 "Bad state: list empty");
209 fList.back()->SetExpectStatus(stat, statmsk);
219 throw Rexception(
"RlinkCommandList::SetLastExpectData()",
220 "Bad state: list empty");
232 throw Rexception(
"RlinkCommandList::SetLastExpectDone()",
233 "Bad state: list empty");
245 throw Rexception(
"RlinkCommandList::SetLastExpectBlock()",
246 "Bad state: list empty");
258 throw Rexception(
"RlinkCommandList::SetLastExpectBlock()",
259 "Bad state: list empty");
269 const std::vector<uint16_t>& blockmsk)
272 throw Rexception(
"RlinkCommandList::SetLastExpectBlock()",
273 "Bad state: list empty");
283 std::vector<uint16_t>&& blockmsk)
286 throw Rexception(
"RlinkCommandList::SetLastExpectBlock()",
287 "Bad state: list empty");
299 throw Rexception(
"RlinkCommandList::SetLastExpect()",
300 "Bad state: list empty");
301 fList.back()->SetExpect(move(upexp));
320 size_t dbase,
size_t sbase)
const
322 for (
auto& upcmd:
fList) upcmd->Print(os, pamap, abase, dbase, sbase);
333 os << bl << (text?text:
"--") <<
"RlinkCommandList @ " <<
this << endl;
335 os << bl <<
" fLaboIndex: " <<
fLaboIndex << endl;
336 for (
size_t i=0; i<
Size(); i++) {
338 string pref(
"fList[");
340 fList[i]->Dump(os, ind+2, pref.c_str());
342 os << bl <<
" [" <<
RosPrintf(i,
"d",2) <<
"]: "
343 <<
fList[i]->CommandInfo() << endl;
356 if (&rhs ==
this)
return *
this;
359 for (
auto& upcmd: rhs.
fList) AddCommand(*upcmd);
369 return *fList.at(ind);
377 return *fList.at(ind);
void SetDone(uint16_t done, bool check=true)
FIXME_docs.
void SetBlock(const std::vector< uint16_t > &block)
FIXME_docs.
void SetData(uint16_t data, uint16_t datamsk=0)
FIXME_docs.
size_t AddWreg(uint16_t addr, uint16_t data)
FIXME_docs.
size_t AddCommand(cmd_uptr_t &&upcmd)
FIXME_docs.
RlinkCommandList & operator=(const RlinkCommandList &rhs)
FIXME_docs.
int fLaboIndex
index of active labo (-1 if no)
size_t AddAttn()
FIXME_docs.
size_t Size() const
FIXME_docs.
size_t AddInit(uint16_t addr, uint16_t data)
FIXME_docs.
size_t AddRblk(uint16_t addr, size_t size)
FIXME_docs.
RlinkCommandList()
Default constructor.
void SetLastExpectStatus(uint8_t stat, uint8_t statmsk=0xff)
FIXME_docs.
void SetLastExpectBlock(const std::vector< uint16_t > &block)
FIXME_docs.
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
size_t AddWblk(uint16_t addr, const std::vector< uint16_t > &block)
FIXME_docs.
RlinkCommand & operator[](size_t ind)
FIXME_docs.
size_t AddRreg(uint16_t addr)
FIXME_docs.
std::unique_ptr< RlinkCommand > cmd_uptr_t
void Print(std::ostream &os, const RlinkAddrMap *pamap=0, size_t abase=16, size_t dbase=16, size_t sbase=16) const
FIXME_docs.
std::vector< cmd_uptr_t > fList
vector of commands
void SetLastExpectDone(uint16_t done)
FIXME_docs.
void SetLastExpect(exp_uptr_t &&upexp)
FIXME_docs.
std::unique_ptr< RlinkCommandExpect > exp_uptr_t
void SetLastExpectData(uint16_t data, uint16_t datamsk=0xffff)
FIXME_docs.
~RlinkCommandList()
Destructor.
size_t AddLabo()
FIXME_docs.
RlinkCommandExpect & EnsureExpect()
FIXME_docs.
I/O appicator to generate fill characters.
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.