w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rw11UnitTape.hpp
Go to the documentation of this file.
1// $Id: Rw11UnitTape.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2015-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2017-04-07 868 1.0.1 Dump(): add detail arg
8// 2015-06-04 686 1.0 Initial version
9// 2015-05-17 683 0.1 First draft
10// ---------------------------------------------------------------------------
11
12
17#ifndef included_Retro_Rw11UnitTape
18#define included_Retro_Rw11UnitTape 1
19
20#include "Rw11VirtTape.hpp"
21
22#include "Rw11UnitVirt.hpp"
23
24namespace Retro {
25
26 class Rw11UnitTape : public Rw11UnitVirt<Rw11VirtTape> {
27 public:
28 Rw11UnitTape(Rw11Cntl* pcntl, size_t index);
30
31 virtual void SetType(const std::string& type);
32
33 const std::string& Type() const;
34 virtual bool Enabled() const;
35
36 void SetWProt(bool wprot);
37 void SetCapacity(size_t nbyte);
38 bool WProt() const;
39 size_t Capacity() const;
40
41 void SetPosFile(int posfile);
42 void SetPosRecord(int posrec);
43
44 bool Bot() const;
45 bool Eot() const;
46 bool Eom() const;
47
48 int PosFile() const;
49 int PosRecord() const;
50
51 bool VirtReadRecord(size_t nbyte, uint8_t* data, size_t& ndone,
52 int& opcode, RerrMsg& emsg);
53 bool VirtWriteRecord(size_t nbyte, const uint8_t* data,
54 int& opcode, RerrMsg& emsg);
55 bool VirtWriteEof(RerrMsg& emsg);
56 bool VirtSpaceForw(size_t nrec, size_t& ndone,
57 int& opcode, RerrMsg& emsg);
58 bool VirtSpaceBack(size_t nrec, size_t& ndone,
59 int& opcode, RerrMsg& emsg);
60 bool VirtRewind(int& opcode, RerrMsg& emsg);
61
62 virtual void Dump(std::ostream& os, int ind=0, const char* text=0,
63 int detail=0) const;
64
65 protected:
66 std::string fType;
67 bool fEnabled;
68 bool fWProt;
69 size_t fCapacity;
70 };
71
72} // end namespace Retro
73
74#include "Rw11UnitTape.ipp"
75
76#endif
FIXME_docs.
Definition: RerrMsg.hpp:25
FIXME_docs.
Definition: Rw11Cntl.hpp:42
bool VirtWriteRecord(size_t nbyte, const uint8_t *data, int &opcode, RerrMsg &emsg)
FIXME_docs.
bool Eom() const
FIXME_docs.
virtual void SetType(const std::string &type)
FIXME_docs.
virtual bool Enabled() const
FIXME_docs.
bool VirtSpaceForw(size_t nrec, size_t &ndone, int &opcode, RerrMsg &emsg)
FIXME_docs.
size_t fCapacity
capacity in byte (0=unlimited)
bool Eot() const
FIXME_docs.
bool fEnabled
unit enabled
std::string fType
drive type
void SetCapacity(size_t nbyte)
FIXME_docs.
void SetPosRecord(int posrec)
FIXME_docs.
bool VirtSpaceBack(size_t nrec, size_t &ndone, int &opcode, RerrMsg &emsg)
FIXME_docs.
int PosFile() const
FIXME_docs.
bool VirtRewind(int &opcode, RerrMsg &emsg)
FIXME_docs.
bool WProt() const
FIXME_docs.
bool Bot() const
FIXME_docs.
~Rw11UnitTape()
Destructor.
const std::string & Type() const
FIXME_docs.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
bool VirtWriteEof(RerrMsg &emsg)
FIXME_docs.
bool VirtReadRecord(size_t nbyte, uint8_t *data, size_t &ndone, int &opcode, RerrMsg &emsg)
FIXME_docs.
size_t Capacity() const
FIXME_docs.
bool fWProt
unit write protected
int PosRecord() const
FIXME_docs.
void SetWProt(bool wprot)
FIXME_docs.
void SetPosFile(int posfile)
FIXME_docs.
Implemenation (inline) of Rw11UnitVirt.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47