44 "over: blocks read file full");
46 "over: blocks read file part");
48 "over: blocks read from over");
84 auto it =
fBlkMap.lower_bound(lba);
86 if (it ==
fBlkMap.end() || it->first >= lba+nblk) {
91 for (
size_t i=0; i<nblk; i++) {
114 for (
size_t i=0; i<nblk; i++) {
131 emsg.
Init(
"Rw11VirtDiskOver::Flush()",
"file write protected");
151 uint32_t lbabeg =
fBlkMap.begin()->first;
154 nwrite += (it->second).NWrite();
155 auto itnext = next(it);
156 if (itnext ==
fBlkMap.end() || itnext->first != (it->first)+1) {
159 <<
" : nb=" <<
RosPrintf(it->first-lbabeg+1,
"d",8)
160 <<
" nw=" <<
RosPrintf(nwrite,
"d",8) << endl;
161 if (itnext !=
fBlkMap.end()) lbabeg = itnext->first;
176 os << bl << (text?text:
"--") <<
"Rw11VirtDiskOver @ " <<
this << endl;
178 os << bl <<
" fBlkMap.size: " <<
fBlkMap.size() << endl;
void Init(const std::string &meth, const std::string &text)
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.
virtual bool Write(size_t lba, size_t nblk, const uint8_t *data, RerrMsg &emsg)
FIXME_docs.
virtual bool Read(size_t lba, size_t nblk, uint8_t *data, RerrMsg &emsg)
FIXME_docs.
virtual bool Open(const std::string &url, RerrMsg &emsg)
FIXME_docs.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
virtual bool Open(const std::string &url, RerrMsg &emsg)
FIXME_docs.
virtual bool WProt() const
FIXME_docs.
virtual bool Write(size_t lba, size_t nblk, const uint8_t *data, RerrMsg &emsg)
FIXME_docs.
~Rw11VirtDiskOver()
Destructor.
void List(std::ostream &os) const
FIXME_docs.
bool Flush(RerrMsg &emsg)
FIXME_docs.
virtual bool Read(size_t lba, size_t nblk, uint8_t *data, RerrMsg &emsg)
FIXME_docs.
Rw11VirtDiskOver(Rw11Unit *punit)
Default constructor.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
size_t fBlkSize
block size in byte
bool fWProt
write protected
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.