w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Retro::Rw11VirtTapeTap Class Reference

FIXME_docs. More...

#include <Rw11VirtTapeTap.hpp>

Inheritance diagram for Retro::Rw11VirtTapeTap:
[legend]
Collaboration diagram for Retro::Rw11VirtTapeTap:
[legend]

Public Member Functions

 Rw11VirtTapeTap (Rw11Unit *punit)
 Default constructor.
 
virtual bool Open (const std::string &url, RerrMsg &emsg)
 FIXME_docs.
 
virtual bool ReadRecord (size_t nbyt, uint8_t *data, size_t &ndone, int &opcode, RerrMsg &emsg)
 FIXME_docs.
 
virtual bool WriteRecord (size_t nbyt, const uint8_t *data, int &opcode, RerrMsg &emsg)
 FIXME_docs.
 
virtual bool WriteEof (RerrMsg &emsg)
 FIXME_docs.
 
virtual bool SpaceForw (size_t nrec, size_t &ndone, int &opcode, RerrMsg &emsg)
 FIXME_docs.
 
virtual bool SpaceBack (size_t nrec, size_t &ndone, int &opcode, RerrMsg &emsg)
 FIXME_docs.
 
virtual bool Rewind (int &opcode, RerrMsg &emsg)
 FIXME_docs.
 
virtual void Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const
 FIXME_docs.
 
- Public Member Functions inherited from Retro::Rw11VirtTape
 Rw11VirtTape (Rw11Unit *punit)
 Default constructor.
 
void SetCapacity (size_t nbyte)
 FIXME_docs.
 
size_t Capacity () const
 FIXME_docs.
 
virtual bool ReadRecord (size_t nbyte, uint8_t *data, size_t &ndone, int &opcode, RerrMsg &emsg)=0
 
virtual bool WriteRecord (size_t nbyte, const uint8_t *data, int &opcode, RerrMsg &emsg)=0
 
virtual bool WriteEof (RerrMsg &emsg)=0
 
virtual bool SpaceForw (size_t nrec, size_t &ndone, int &opcode, RerrMsg &emsg)=0
 
virtual bool SpaceBack (size_t nrec, size_t &ndone, int &opcode, RerrMsg &emsg)=0
 
virtual bool Rewind (int &opcode, RerrMsg &emsg)=0
 
void SetPosFile (int posfile)
 FIXME_docs.
 
void SetPosRecord (int posrec)
 FIXME_docs.
 
bool Bot () const
 FIXME_docs.
 
bool Eot () const
 FIXME_docs.
 
bool Eom () const
 FIXME_docs.
 
int PosFile () const
 FIXME_docs.
 
int PosRecord () const
 FIXME_docs.
 
virtual void Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const
 FIXME_docs.
 
- Public Member Functions inherited from Retro::Rw11Virt
 Rw11Virt (Rw11Unit *punit)
 Default constructor.
 
virtual ~Rw11Virt ()
 Destructor.
 
 Rw11Virt (const Rw11Virt &)=delete
 
Rw11Virtoperator= (const Rw11Virt &)=delete
 
Rw11UnitUnit () const
 FIXME_docs.
 
Rw11CntlCntl () const
 FIXME_docs.
 
Rw11CpuCpu () const
 FIXME_docs.
 
Rw11W11 () const
 FIXME_docs.
 
RlinkServerServer () const
 FIXME_docs.
 
RlogFileLogFile () const
 FIXME_docs.
 
virtual bool WProt () const
 FIXME_docs.
 
const RparseUrlUrl () const
 FIXME_docs.
 
virtual bool Open (const std::string &url, RerrMsg &emsg)=0
 
RstatsStats ()
 FIXME_docs.
 
virtual void Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const
 FIXME_docs.
 

Static Public Attributes

static const uint32_t kMetaEof = 0x00000000
 EOF marker.
 
static const uint32_t kMetaEom = 0xffffffff
 EOM marker.
 
static const uint32_t kMeta_M_Perr = 0x80000000
 
static const uint32_t kMeta_M_Mbz = 0x7fff0000
 
static const uint32_t kMeta_B_Rlen = 0x0000ffff
 

Protected Member Functions

bool Seek (size_t seekpos, int dir, RerrMsg &emsg)
 FIXME_docs.
 
bool Read (size_t nbyt, uint8_t *data, RerrMsg &emsg)
 FIXME_docs.
 
bool Write (size_t nbyt, const uint8_t *data, bool back, RerrMsg &emsg)
 FIXME_docs.
 
bool CheckSizeForw (size_t nbyt, const char *text, RerrMsg &emsg)
 FIXME_docs.
 
bool CheckSizeBack (size_t nbyt, const char *text, RerrMsg &emsg)
 FIXME_docs.
 
void UpdatePos (size_t nbyt, int dir)
 FIXME_docs.
 
bool ParseMeta (uint32_t meta, size_t &rlen, bool &perr, RerrMsg &emsg)
 FIXME_docs.
 
size_t BytePadding (size_t rlen)
 FIXME_docs.
 
bool SetBad ()
 FIXME_docs.
 
bool BadTapeMsg (const char *meth, RerrMsg &emsg)
 FIXME_docs.
 
void IncPosRecord (int delta)
 FIXME_docs.
 

Protected Attributes

RfileFd fFd
 file number
 
size_t fSize
 file size
 
size_t fPos
 file position
 
bool fBad
 BAD file format flag.
 
bool fPadOdd
 do odd byte padding
 
bool fTruncPend
 truncate on next write
 
- Protected Attributes inherited from Retro::Rw11VirtTape
size_t fCapacity
 capacity in byte (0=unlimited)
 
bool fBot
 tape at bot
 
bool fEot
 tape beyond eot
 
bool fEom
 tape beyond medium
 
int fPosFile
 tape pos: #files (-1=unknown)
 
int fPosRecord
 tape pos: #record (-1=unknown)
 
- Protected Attributes inherited from Retro::Rw11Virt
Rw11UnitfpUnit
 back ref to unit
 
RparseUrl fUrl
 
bool fWProt
 write protected
 
Rstats fStats
 statistics
 

Additional Inherited Members

- Public Types inherited from Retro::Rw11VirtTape
enum  stats {
  kStatNVTReadRec = Rw11Virt::kDimStat , kStatNVTReadByt , kStatNVTReadEof , kStatNVTReadEom ,
  kStatNVTReadPErr , kStatNVTReadLErr , kStatNVTWriteRec , kStatNVTWriteByt ,
  kStatNVTWriteEof , kStatNVTSpaForw , kStatNVTSpaBack , kStatNVTRewind ,
  kDimStat
}
 
enum  OpCode {
  kOpCodeOK = 0 , kOpCodeBot , kOpCodeEof , kOpCodeEom ,
  kOpCodeRecLenErr , kOpCodeBadParity , kOpCodeBadFormat
}
 
- Public Types inherited from Retro::Rw11Virt
enum  stats { kDimStat = 0 }
 
- Static Public Member Functions inherited from Retro::Rw11VirtTape
static std::unique_ptr< Rw11VirtTapeNew (const std::string &url, Rw11Unit *punit, RerrMsg &emsg)
 FIXME_docs.
 

Detailed Description

FIXME_docs.

Definition at line 27 of file Rw11VirtTapeTap.hpp.

Constructor & Destructor Documentation

◆ Rw11VirtTapeTap()

Retro::Rw11VirtTapeTap::Rw11VirtTapeTap ( Rw11Unit punit)
explicit

Default constructor.

Definition at line 48 of file Rw11VirtTapeTap.cpp.

Member Function Documentation

◆ Open()

◆ ReadRecord()

◆ WriteRecord()

bool Retro::Rw11VirtTapeTap::WriteRecord ( size_t  nbyt,
const uint8_t *  data,
int &  opcode,
RerrMsg emsg 
)
virtual

◆ WriteEof()

◆ SpaceForw()

◆ SpaceBack()

◆ Rewind()

◆ Dump()

void Retro::Rw11VirtTapeTap::Dump ( std::ostream &  os,
int  ind = 0,
const char *  text = 0,
int  detail = 0 
) const
virtual

FIXME_docs.

Reimplemented from Retro::Rw11VirtTape.

Definition at line 417 of file Rw11VirtTapeTap.cpp.

References Retro::Rw11VirtTape::Dump(), fBad, Retro::Rfd::Fd(), fFd, fPadOdd, fPos, fSize, fTruncPend, and Retro::RosPrintf().

◆ Seek()

bool Retro::Rw11VirtTapeTap::Seek ( size_t  seekpos,
int  dir,
RerrMsg emsg 
)
protected

FIXME_docs.

Definition at line 436 of file Rw11VirtTapeTap.cpp.

References fFd, Retro::RfileFd::Seek(), and UpdatePos().

Referenced by ReadRecord(), Rewind(), SpaceBack(), SpaceForw(), and Write().

◆ Read()

bool Retro::Rw11VirtTapeTap::Read ( size_t  nbyt,
uint8_t *  data,
RerrMsg emsg 
)
protected

FIXME_docs.

Definition at line 456 of file Rw11VirtTapeTap.cpp.

References fFd, Retro::RfileFd::Read(), and UpdatePos().

Referenced by ReadRecord(), SpaceBack(), and SpaceForw().

◆ Write()

bool Retro::Rw11VirtTapeTap::Write ( size_t  nbyt,
const uint8_t *  data,
bool  back,
RerrMsg emsg 
)
protected

FIXME_docs.

Definition at line 467 of file Rw11VirtTapeTap.cpp.

References fFd, fPos, fSize, fTruncPend, Seek(), Retro::RfileFd::Truncate(), UpdatePos(), and Retro::RfileFd::WriteAll().

Referenced by WriteEof(), and WriteRecord().

◆ CheckSizeForw()

bool Retro::Rw11VirtTapeTap::CheckSizeForw ( size_t  nbyt,
const char *  text,
RerrMsg emsg 
)
protected

FIXME_docs.

Definition at line 490 of file Rw11VirtTapeTap.cpp.

References fPos, fSize, and Retro::RerrMsg::Init().

Referenced by ReadRecord(), and SpaceForw().

◆ CheckSizeBack()

bool Retro::Rw11VirtTapeTap::CheckSizeBack ( size_t  nbyt,
const char *  text,
RerrMsg emsg 
)
protected

FIXME_docs.

Definition at line 501 of file Rw11VirtTapeTap.cpp.

References fPos, and Retro::RerrMsg::Init().

Referenced by SpaceBack().

◆ UpdatePos()

void Retro::Rw11VirtTapeTap::UpdatePos ( size_t  nbyt,
int  dir 
)
protected

FIXME_docs.

Definition at line 512 of file Rw11VirtTapeTap.cpp.

References Retro::Rw11VirtTape::fBot, Retro::Rw11VirtTape::fCapacity, Retro::Rw11VirtTape::fEot, and fPos.

Referenced by Read(), Seek(), and Write().

◆ ParseMeta()

bool Retro::Rw11VirtTapeTap::ParseMeta ( uint32_t  meta,
size_t &  rlen,
bool &  perr,
RerrMsg emsg 
)
protected

FIXME_docs.

Definition at line 531 of file Rw11VirtTapeTap.cpp.

References Retro::RerrMsg::Init(), kMeta_B_Rlen, kMeta_M_Mbz, and kMeta_M_Perr.

Referenced by ReadRecord(), SpaceBack(), and SpaceForw().

◆ BytePadding()

size_t Retro::Rw11VirtTapeTap::BytePadding ( size_t  rlen)
inlineprotected

FIXME_docs.

Definition at line 21 of file Rw11VirtTapeTap.ipp.

References fPadOdd.

Referenced by ReadRecord(), SpaceBack(), and SpaceForw().

◆ SetBad()

bool Retro::Rw11VirtTapeTap::SetBad ( )
inlineprotected

FIXME_docs.

Definition at line 29 of file Rw11VirtTapeTap.ipp.

References fBad.

Referenced by ReadRecord(), Rewind(), SpaceBack(), SpaceForw(), WriteEof(), and WriteRecord().

◆ BadTapeMsg()

bool Retro::Rw11VirtTapeTap::BadTapeMsg ( const char *  meth,
RerrMsg emsg 
)
protected

FIXME_docs.

Definition at line 546 of file Rw11VirtTapeTap.cpp.

References Retro::RerrMsg::Init().

Referenced by ReadRecord(), SpaceBack(), SpaceForw(), WriteEof(), and WriteRecord().

◆ IncPosRecord()

void Retro::Rw11VirtTapeTap::IncPosRecord ( int  delta)
inlineprotected

FIXME_docs.

Definition at line 38 of file Rw11VirtTapeTap.ipp.

References Retro::Rw11VirtTape::fPosRecord.

Referenced by ReadRecord(), SpaceBack(), SpaceForw(), and WriteRecord().

Member Data Documentation

◆ kMetaEof

const uint32_t Retro::Rw11VirtTapeTap::kMetaEof = 0x00000000
static

EOF marker.

Definition at line 49 of file Rw11VirtTapeTap.hpp.

Referenced by ReadRecord(), SpaceBack(), SpaceForw(), and WriteEof().

◆ kMetaEom

const uint32_t Retro::Rw11VirtTapeTap::kMetaEom = 0xffffffff
static

EOM marker.

Definition at line 50 of file Rw11VirtTapeTap.hpp.

Referenced by ReadRecord(), SpaceBack(), SpaceForw(), WriteEof(), and WriteRecord().

◆ kMeta_M_Perr

const uint32_t Retro::Rw11VirtTapeTap::kMeta_M_Perr = 0x80000000
static

Definition at line 51 of file Rw11VirtTapeTap.hpp.

Referenced by ParseMeta().

◆ kMeta_M_Mbz

const uint32_t Retro::Rw11VirtTapeTap::kMeta_M_Mbz = 0x7fff0000
static

Definition at line 52 of file Rw11VirtTapeTap.hpp.

Referenced by ParseMeta().

◆ kMeta_B_Rlen

const uint32_t Retro::Rw11VirtTapeTap::kMeta_B_Rlen = 0x0000ffff
static

Definition at line 53 of file Rw11VirtTapeTap.hpp.

Referenced by ParseMeta().

◆ fFd

RfileFd Retro::Rw11VirtTapeTap::fFd
protected

file number

Definition at line 71 of file Rw11VirtTapeTap.hpp.

Referenced by Dump(), Open(), Read(), Seek(), and Write().

◆ fSize

size_t Retro::Rw11VirtTapeTap::fSize
protected

file size

Definition at line 72 of file Rw11VirtTapeTap.hpp.

Referenced by CheckSizeForw(), Dump(), Open(), ReadRecord(), SpaceForw(), and Write().

◆ fPos

size_t Retro::Rw11VirtTapeTap::fPos
protected

file position

Definition at line 73 of file Rw11VirtTapeTap.hpp.

Referenced by CheckSizeBack(), CheckSizeForw(), Dump(), Open(), ReadRecord(), SpaceBack(), SpaceForw(), UpdatePos(), and Write().

◆ fBad

bool Retro::Rw11VirtTapeTap::fBad
protected

BAD file format flag.

Definition at line 74 of file Rw11VirtTapeTap.hpp.

Referenced by Dump(), Open(), ReadRecord(), Rewind(), SetBad(), SpaceBack(), SpaceForw(), WriteEof(), and WriteRecord().

◆ fPadOdd

bool Retro::Rw11VirtTapeTap::fPadOdd
protected

do odd byte padding

Definition at line 75 of file Rw11VirtTapeTap.hpp.

Referenced by BytePadding(), Dump(), Open(), and WriteRecord().

◆ fTruncPend

bool Retro::Rw11VirtTapeTap::fTruncPend
protected

truncate on next write

Definition at line 76 of file Rw11VirtTapeTap.hpp.

Referenced by Dump(), Open(), Rewind(), SpaceBack(), and Write().


The documentation for this class was generated from the following files: