w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rw11Cntl.hpp
Go to the documentation of this file.
1// $Id: Rw11Cntl.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.2.6 Stats() not longer const
8// 2019-05-04 1146 1.2.5 UnitSetupAll(): now virtual
9// 2019-04-14 1131 1.2.4 add UnitSetup(), UnitSetupAll()
10// 2018-12-16 1084 1.2.3 use =delete for noncopyable instead of boost
11// 2017-04-15 874 1.2.2 NUnit() now pure; add UnitBase()
12// 2017-04-02 865 1.2.1 Dump(): add detail arg
13// 2017-02-04 848 1.2 add ProbeFound(),ProbeDataInt,Rem()
14// 2015-05-15 680 1.1.1 add NUnit() as virtual
15// 2014-12-30 625 1.1 adopt to Rlink V4 attn logic
16// 2013-03-06 495 1.0 Initial version
17// 2013-02-05 483 0.1 First draft
18// ---------------------------------------------------------------------------
19
20
25#ifndef included_Retro_Rw11Cntl
26#define included_Retro_Rw11Cntl 1
27
28#include <string>
29
30#include "librtools/Rstats.hpp"
33#include "Rw11Probe.hpp"
34
35#include "librtools/Rbits.hpp"
36#include "Rw11Cpu.hpp"
37
38namespace Retro {
39
40 class Rw11Unit; // forw decl to avoid circular incl
41
42 class Rw11Cntl : public Rbits {
43 public:
44
45 explicit Rw11Cntl(const std::string& type);
46 virtual ~Rw11Cntl();
47
48 Rw11Cntl(const Rw11Cntl&) = delete; // noncopyable
49 Rw11Cntl& operator=(const Rw11Cntl&) = delete; // noncopyable
50
51 void SetCpu(Rw11Cpu* pcpu);
52 Rw11Cpu& Cpu() const;
53 Rw11& W11() const;
54 RlinkServer& Server() const;
55 RlinkConnect& Connect() const;
56 RlogFile& LogFile() const;
57
58 const std::string& Type() const;
59 const std::string& Name() const;
60 uint16_t Base() const;
61 int Lam() const;
62
63 void SetEnable(bool ena);
64 bool Enable() const;
65
66 virtual bool Probe();
67 bool ProbeFound() const;
68 uint16_t ProbeDataInt() const;
69 uint16_t ProbeDataRem() const;
70 const Rw11Probe& ProbeStatus() const;
71
72 virtual void Start();
73 bool IsStarted() const;
74
75 virtual size_t NUnit() const = 0;
76 virtual Rw11Unit& UnitBase(size_t index) const = 0;
77 virtual bool BootCode(size_t unit, std::vector<uint16_t>& code,
78 uint16_t& aload, uint16_t& astart);
79 virtual void UnitSetup(size_t ind);
80 virtual void UnitSetupAll();
81
82 void SetTraceLevel(uint32_t level);
83 uint32_t TraceLevel() const;
84
85 std::string UnitName(size_t index) const;
86
87 Rstats& Stats();
88 virtual void Dump(std::ostream& os, int ind=0, const char* text=0,
89 int detail=0) const;
90
91 // statistics counter indices
92 enum stats {
96 };
97
98 protected:
99 void ConfigCntl(const std::string& name, uint16_t base, int lam,
100 uint16_t probeoff, bool probeint, bool proberem);
101
102 private:
104
105 protected:
107 std::string fType;
108 std::string fName;
109 uint16_t fBase;
110 int fLam;
111 bool fEnable;
112 bool fStarted;
114 uint32_t fTraceLevel;
117 };
118
119} // end namespace Retro
120
121#include "Rw11Cntl.ipp"
122
123#endif
FIXME_docs.
Definition: RlogFile.hpp:34
FIXME_docs.
Definition: Rstats.hpp:28
FIXME_docs.
Definition: Rw11Cntl.hpp:42
const Rw11Probe & ProbeStatus() const
FIXME_docs.
Definition: Rw11Cntl.ipp:136
bool ProbeFound() const
FIXME_docs.
Definition: Rw11Cntl.ipp:112
Rw11Cntl & operator=(const Rw11Cntl &)=delete
Rw11 & W11() const
FIXME_docs.
Definition: Rw11Cntl.ipp:40
Rw11Cpu * fpCpu
cpu back pointer
Definition: Rw11Cntl.hpp:106
virtual ~Rw11Cntl()
Destructor.
Definition: Rw11Cntl.cpp:59
const std::string & Type() const
FIXME_docs.
Definition: Rw11Cntl.ipp:72
int fLam
attn bit number (-1 of none)
Definition: Rw11Cntl.hpp:110
uint32_t fTraceLevel
trace level; 0=off;1=cntl
Definition: Rw11Cntl.hpp:114
std::string fType
controller type
Definition: Rw11Cntl.hpp:107
RlinkCommandList fPrimClist
clist for attn primary info
Definition: Rw11Cntl.hpp:115
uint16_t ProbeDataInt() const
FIXME_docs.
Definition: Rw11Cntl.ipp:120
void SetEnable(bool ena)
FIXME_docs.
Definition: Rw11Cntl.cpp:65
RlinkConnect & Connect() const
FIXME_docs.
Definition: Rw11Cntl.ipp:56
uint16_t Base() const
FIXME_docs.
Definition: Rw11Cntl.ipp:88
Rstats fStats
statistics
Definition: Rw11Cntl.hpp:116
virtual void UnitSetup(size_t ind)
FIXME_docs.
Definition: Rw11Cntl.cpp:105
Rw11Probe fProbe
controller probe context
Definition: Rw11Cntl.hpp:113
int Lam() const
FIXME_docs.
Definition: Rw11Cntl.ipp:96
std::string UnitName(size_t index) const
FIXME_docs.
Definition: Rw11Cntl.cpp:122
Rw11Cntl(const Rw11Cntl &)=delete
Rw11Cpu & Cpu() const
FIXME_docs.
Definition: Rw11Cntl.ipp:32
void ConfigCntl(const std::string &name, uint16_t base, int lam, uint16_t probeoff, bool probeint, bool proberem)
FIXME_docs.
Definition: Rw11Cntl.cpp:156
bool Enable() const
FIXME_docs.
Definition: Rw11Cntl.ipp:104
virtual bool BootCode(size_t unit, std::vector< uint16_t > &code, uint16_t &aload, uint16_t &astart)
FIXME_docs.
Definition: Rw11Cntl.cpp:93
Rstats & Stats()
FIXME_docs.
Definition: Rw11Cntl.ipp:169
bool fStarted
true if Start() called
Definition: Rw11Cntl.hpp:112
bool fEnable
enable flag
Definition: Rw11Cntl.hpp:111
RlinkServer & Server() const
FIXME_docs.
Definition: Rw11Cntl.ipp:48
std::string fName
controller name
Definition: Rw11Cntl.hpp:108
virtual void Start()
FIXME_docs.
Definition: Rw11Cntl.cpp:84
bool IsStarted() const
FIXME_docs.
Definition: Rw11Cntl.ipp:144
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
Definition: Rw11Cntl.cpp:133
void SetTraceLevel(uint32_t level)
FIXME_docs.
Definition: Rw11Cntl.ipp:152
const std::string & Name() const
FIXME_docs.
Definition: Rw11Cntl.ipp:80
uint16_t ProbeDataRem() const
FIXME_docs.
Definition: Rw11Cntl.ipp:128
uint32_t TraceLevel() const
FIXME_docs.
Definition: Rw11Cntl.ipp:161
virtual Rw11Unit & UnitBase(size_t index) const =0
RlogFile & LogFile() const
FIXME_docs.
Definition: Rw11Cntl.ipp:64
void SetCpu(Rw11Cpu *pcpu)
FIXME_docs.
Definition: Rw11Cntl.ipp:23
virtual void UnitSetupAll()
FIXME_docs.
Definition: Rw11Cntl.cpp:113
Rw11Cntl()
default ctor blocker
Definition: Rw11Cntl.hpp:103
virtual bool Probe()
FIXME_docs.
Definition: Rw11Cntl.cpp:76
virtual size_t NUnit() const =0
uint16_t fBase
controller base address
Definition: Rw11Cntl.hpp:109
FIXME_docs.
Definition: Rw11Cpu.hpp:66
FIXME_docs.
Definition: Rw11Unit.hpp:39
FIXME_docs.
Definition: Rw11.hpp:31
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47
FIXME_docs.
Definition: Rw11Probe.hpp:23