w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclRw11CntlTermBase.ipp
Go to the documentation of this file.
1// $Id: RtclRw11CntlTermBase.ipp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2017-04-16 878 1.0 Initial version
8// ---------------------------------------------------------------------------
9
19#include <sstream>
20
22
24
25// all method definitions in namespace Retro
26namespace Retro {
28//------------------------------------------+-----------------------------------
31template <class TC>
33 const std::string& cclass)
34 : RtclRw11CntlBase<TC>(type,cclass)
35{}
36
37//------------------------------------------+-----------------------------------
39
40template <class TC>
42{}
43
44//------------------------------------------+-----------------------------------
46
47template <class TC>
49{
50 if (!args.AllDone()) return RtclRw11Cntl::kERR;
51 std::ostringstream sos;
52 TC& cntl = this->Obj();
53 sos << "unit i7 o7 oe at attachurl\n";
54 for (size_t i=0; i<cntl.NUnit(); i++) {
55 Rw11UnitTerm& unit = cntl.Unit(i);
56 sos << RosPrintf(unit.Name().c_str(),"-s",4)
57 << " " << (unit.Ti7bit() ? " y" : " n")
58 << " " << (unit.To7bit() ? " y" : " n")
59 << " " << (unit.ToEnpc() ? " y" : " n")
60 << " " << (unit.IsAttached() ? " y" : " n")
61 << " " << unit.AttachUrl()
62 << "\n";
63 }
64 args.AppendResultLines(sos);
65 return RtclRw11Cntl::kOK;
66}
67
68
69} // end namespace Retro
FIXME_docs.
Definition: RtclArgs.hpp:41
void AppendResultLines(const std::string &str)
FIXME_docs.
Definition: RtclArgs.cpp:484
bool AllDone()
FIXME_docs.
Definition: RtclArgs.cpp:447
static const int kOK
Definition: RtclCmdBase.hpp:54
static const int kERR
Definition: RtclCmdBase.hpp:55
Implemenation (all inline) of RtclRw11CntlBase.
RtclRw11CntlTermBase(const std::string &type, const std::string &cclass)
Constructor.
virtual int M_default(RtclArgs &args)
FIXME_docs.
bool ToEnpc() const
FIXME_docs.
bool Ti7bit() const
FIXME_docs.
bool To7bit() const
FIXME_docs.
bool IsAttached() const
FIXME_docs.
Definition: Rw11Unit.cpp:61
std::string Name() const
FIXME_docs.
Definition: Rw11Unit.ipp:31
const std::string & AttachUrl() const
FIXME_docs.
Definition: Rw11Unit.cpp:69
RosPrintfS< bool > RosPrintf(bool value, const char *form=0, int width=0, int prec=0)
Creates a print object for the formatted output of a bool value.
Definition: RosPrintf.ipp:38
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47