w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rw11Unit.hpp
Go to the documentation of this file.
1// $Id: Rw11Unit.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2019-06-07 1160 1.1.5 Stats() not longer const
8// 2018-12-16 1084 1.1.4 use =delete for noncopyable instead of boost
9// 2017-04-15 875 1.1.3 add VirtBase(), IsAttached(), AttachUrl()
10// 2017-04-07 868 1.1.2 Dump(): add detail arg
11// 2015-05-13 680 1.1.1 add Enabled()
12// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone()
13// 2013-05-01 513 1.0.1 add fAttachOpts, (Set)AttachOpts()
14// 2013-03-06 495 1.0 Initial version
15// 2013-02-13 488 0.1 First draft
16// ---------------------------------------------------------------------------
17
18
23#ifndef included_Retro_Rw11Unit
24#define included_Retro_Rw11Unit 1
25
26#include <string>
27
28#include "librtools/Rstats.hpp"
29#include "librtools/RerrMsg.hpp"
31
32#include "librtools/Rbits.hpp"
33#include "Rw11Cntl.hpp"
34
35namespace Retro {
36
37 class Rw11Virt; // forw decl to avoid circular incl
38
39 class Rw11Unit : public Rbits {
40 public:
41
42 Rw11Unit(Rw11Cntl* pcntl, size_t index);
43 virtual ~Rw11Unit();
44
45 Rw11Unit(const Rw11Unit&) = delete; // noncopyable
46 Rw11Unit& operator=(const Rw11Unit&) = delete; // noncopyable
47
48 size_t Index() const;
49 std::string Name() const;
50
51 void SetAttachOpts(const std::string& opts);
52 const std::string& AttachOpts() const;
53
54 Rw11Cntl& CntlBase() const;
55 Rw11Cpu& Cpu() const;
56 Rw11& W11() const;
57 RlinkServer& Server() const;
58 RlinkConnect& Connect() const;
59 RlogFile& LogFile() const;
60 virtual bool Enabled() const;
61
62 virtual Rw11Virt* VirtBase() const = 0;
63 bool IsAttached() const;
64 const std::string& AttachUrl() const;
65
66 virtual bool Attach(const std::string& url, RerrMsg& emsg);
67 virtual void Detach();
68
69 Rstats& Stats();
70 virtual void Dump(std::ostream& os, int ind=0, const char* text=0,
71 int detail=0) const;
72
73 // statistics counter indices
74 enum stats {
75 kDimStat = 0
76 };
77
78 protected:
79 virtual void AttachDone();
80 virtual void DetachCleanup();
81 virtual void DetachDone();
82
83 private:
85
86 protected:
88 size_t fIndex;
89 std::string fAttachOpts;
91 };
92
93} // end namespace Retro
94
95#include "Rw11Unit.ipp"
96
97#endif
FIXME_docs.
Definition: RerrMsg.hpp:25
FIXME_docs.
Definition: RlogFile.hpp:34
FIXME_docs.
Definition: Rstats.hpp:28
FIXME_docs.
Definition: Rw11Cntl.hpp:42
FIXME_docs.
Definition: Rw11Cpu.hpp:66
FIXME_docs.
Definition: Rw11Unit.hpp:39
Rw11Unit(const Rw11Unit &)=delete
void SetAttachOpts(const std::string &opts)
FIXME_docs.
Definition: Rw11Unit.ipp:39
RlogFile & LogFile() const
FIXME_docs.
Definition: Rw11Unit.ipp:96
bool IsAttached() const
FIXME_docs.
Definition: Rw11Unit.cpp:61
virtual bool Attach(const std::string &url, RerrMsg &emsg)
FIXME_docs.
Definition: Rw11Unit.cpp:82
virtual Rw11Virt * VirtBase() const =0
virtual void DetachDone()
FIXME_docs.
Definition: Rw11Unit.cpp:127
Rstats fStats
statistics
Definition: Rw11Unit.hpp:90
RlinkServer & Server() const
FIXME_docs.
Definition: Rw11Unit.ipp:80
virtual void DetachCleanup()
FIXME_docs.
Definition: Rw11Unit.cpp:121
size_t fIndex
unit number
Definition: Rw11Unit.hpp:88
virtual void Detach()
FIXME_docs.
Definition: Rw11Unit.cpp:91
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
Definition: Rw11Unit.cpp:99
Rw11Cntl & CntlBase() const
FIXME_docs.
Definition: Rw11Unit.ipp:56
Rstats & Stats()
FIXME_docs.
Definition: Rw11Unit.ipp:104
std::string Name() const
FIXME_docs.
Definition: Rw11Unit.ipp:31
size_t Index() const
FIXME_docs.
Definition: Rw11Unit.ipp:23
Rw11 & W11() const
FIXME_docs.
Definition: Rw11Unit.ipp:72
Rw11Unit & operator=(const Rw11Unit &)=delete
RlinkConnect & Connect() const
FIXME_docs.
Definition: Rw11Unit.ipp:88
virtual bool Enabled() const
FIXME_docs.
Definition: Rw11Unit.cpp:53
virtual void AttachDone()
FIXME_docs.
Definition: Rw11Unit.cpp:115
virtual ~Rw11Unit()
Destructor.
Definition: Rw11Unit.cpp:47
Rw11Unit()
default ctor blocker
Definition: Rw11Unit.hpp:84
std::string fAttachOpts
unit context options for attach
Definition: Rw11Unit.hpp:89
Rw11Cpu & Cpu() const
FIXME_docs.
Definition: Rw11Unit.ipp:64
const std::string & AttachOpts() const
FIXME_docs.
Definition: Rw11Unit.ipp:48
Rw11Cntl * fpCntlBase
plain Rw11Cntl ptr
Definition: Rw11Unit.hpp:87
const std::string & AttachUrl() const
FIXME_docs.
Definition: Rw11Unit.cpp:69
FIXME_docs.
Definition: Rw11Virt.hpp:34
FIXME_docs.
Definition: Rw11.hpp:31
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47