w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclRw11UnitPC11.cpp
Go to the documentation of this file.
1// $Id: RtclRw11UnitPC11.cpp 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-07 1078 1.2 use std::shared_ptr instead of boost
8// 2017-04-08 870 1.1 inherit from RtclRw11UnitBase
9// 2014-08-22 584 1.0.1 use nullptr
10// 2013-05-03 515 1.0 Initial version
11// ---------------------------------------------------------------------------
12
17#include "RtclRw11UnitPC11.hpp"
18
19using namespace std;
20
26// all method definitions in namespace Retro
27namespace Retro {
28
29//------------------------------------------+-----------------------------------
31
33 const std::string& unitcmd,
34 const std::shared_ptr<Rw11UnitPC11>& spunit)
36 RtclRw11UnitStream>("Rw11UnitPC11", spunit)
37{
38 // create default unit command
40 CreateObjectCmd(interp, unitcmd.c_str());
41
42 // for 1st PC11, create also alias
43 // cpuxpca0 -> cpuxpr
44 // cpuxpca1 -> cpuxpp
45 if (unitcmd.length() == 8) {
46 size_t ind = spunit->Index();
47 if (unitcmd.length() == 8 && unitcmd.substr(4,3) == "pca") {
48 string alias = unitcmd.substr(0,4);
49 alias += (ind==Rw11CntlPC11::kUnit_PR) ? "pr" : "pp";
50 Tcl_CreateAlias(interp, alias.c_str(), interp, unitcmd.c_str(),
51 0, nullptr);
52 }
53 }
54}
55
56//------------------------------------------+-----------------------------------
58
60{}
61
62} // end namespace Retro
void CreateObjectCmd(Tcl_Interp *interp, const char *name)
FIXME_docs.
Implemenation (all inline) of RtclRw11UnitBase.
RtclRw11UnitPC11(Tcl_Interp *interp, const std::string &unitcmd, const std::shared_ptr< Rw11UnitPC11 > &spunit)
Constructor.
static const uint16_t kUnit_PR
unit number of paper reader
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47