w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rw11.hpp
Go to the documentation of this file.
1// $Id: Rw11.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2013-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2018-12-16 1084 1.1.3 use =delete for noncopyable instead of boost
8// 2018-12-07 1078 1.1.2 use std::shared_ptr instead of boost
9// 2017-04-07 868 1.1.1 Dump(): add detail arg
10// 2014-12-29 624 1.1 adopt to Rlink V4 attn logic
11// 2013-03-06 495 1.0 Initial version
12// 2013-01-27 478 0.1 First draft
13// ---------------------------------------------------------------------------
14
15
20#ifndef included_Retro_Rw11
21#define included_Retro_Rw11 1
22
23#include <memory>
24
26
27namespace Retro {
28
29 class Rw11Cpu; // forw decl to avoid circular incl
30
31 class Rw11 {
32 public:
33
34 Rw11();
35 virtual ~Rw11();
36
37 Rw11(const Rw11&) = delete; // noncopyable
38 Rw11& operator=(const Rw11&) = delete; // noncopyable
39
40 void SetServer(const std::shared_ptr<RlinkServer>& spserv);
41 const std::shared_ptr<RlinkServer>& ServerSPtr() const;
42 RlinkServer& Server() const;
43 RlinkConnect& Connect() const;
44 RlogFile& LogFile() const;
45
46 void AddCpu(const std::shared_ptr<Rw11Cpu>& spcpu);
47 size_t NCpu() const;
48 Rw11Cpu& Cpu(size_t ind) const;
49
50 void Start();
51 bool IsStarted() const;
52
53 virtual void Dump(std::ostream& os, int ind=0, const char* text=0,
54 int detail=0) const;
55
56 // some constants (also defined in cpp)
57 static const int kLam = 0;
58
59 protected:
61
62 protected:
63 std::shared_ptr<RlinkServer> fspServ;
64 size_t fNCpu;
65 std::shared_ptr<Rw11Cpu> fspCpu[4];
66 bool fStarted;
67 };
68
69} // end namespace Retro
70
71#include "Rw11.ipp"
72
73#endif
FIXME_docs.
Definition: RlogFile.hpp:34
FIXME_docs.
Definition: Rw11Cpu.hpp:66
FIXME_docs.
Definition: Rw11.hpp:31
std::shared_ptr< RlinkServer > fspServ
Definition: Rw11.hpp:63
RlinkConnect & Connect() const
FIXME_docs.
Definition: Rw11.ipp:38
size_t NCpu() const
FIXME_docs.
Definition: Rw11.ipp:54
Rw11 & operator=(const Rw11 &)=delete
int AttnHandler(RlinkServer::AttnArgs &args)
FIXME_docs.
Definition: Rw11.cpp:134
const std::shared_ptr< RlinkServer > & ServerSPtr() const
FIXME_docs.
Definition: Rw11.ipp:22
Rw11Cpu & Cpu(size_t ind) const
FIXME_docs.
Definition: Rw11.cpp:93
Rw11(const Rw11 &)=delete
RlinkServer & Server() const
FIXME_docs.
Definition: Rw11.ipp:30
void Start()
FIXME_docs.
Definition: Rw11.cpp:101
static const int kLam
W11 CPU cluster lam.
Definition: Rw11.hpp:57
virtual ~Rw11()
Destructor.
Definition: Rw11.cpp:58
Rw11()
Default constructor.
Definition: Rw11.cpp:49
void AddCpu(const std::shared_ptr< Rw11Cpu > &spcpu)
FIXME_docs.
Definition: Rw11.cpp:75
RlogFile & LogFile() const
FIXME_docs.
Definition: Rw11.ipp:46
void SetServer(const std::shared_ptr< RlinkServer > &spserv)
FIXME_docs.
Definition: Rw11.cpp:64
size_t fNCpu
Definition: Rw11.hpp:64
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
Definition: Rw11.cpp:117
bool fStarted
true if Start() called
Definition: Rw11.hpp:66
std::shared_ptr< Rw11Cpu > fspCpu[4]
Definition: Rw11.hpp:65
bool IsStarted() const
FIXME_docs.
Definition: Rw11.ipp:62
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47