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
21
#include "
librtools/RosPrintf.hpp
"
22
23
#include "
librw11/Rw11UnitTerm.hpp
"
24
25
// all method definitions in namespace Retro
26
namespace
Retro
{
27
28
//------------------------------------------+-----------------------------------
30
31
template
<
class
TC>
32
inline
RtclRw11CntlTermBase<TC>::RtclRw11CntlTermBase
(
const
std::string& type,
33
const
std::string& cclass)
34
:
RtclRw11CntlBase
<TC>(type,cclass)
35
{}
36
37
//------------------------------------------+-----------------------------------
39
40
template
<
class
TC>
41
inline
RtclRw11CntlTermBase<TC>::~RtclRw11CntlTermBase
()
42
{}
43
44
//------------------------------------------+-----------------------------------
46
47
template
<
class
TC>
48
inline
int
RtclRw11CntlTermBase<TC>::M_default
(
RtclArgs
& args)
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
RosPrintf.hpp
Rw11UnitTerm.hpp
Retro::RtclArgs
FIXME_docs.
Definition:
RtclArgs.hpp:41
Retro::RtclArgs::AppendResultLines
void AppendResultLines(const std::string &str)
FIXME_docs.
Definition:
RtclArgs.cpp:484
Retro::RtclArgs::AllDone
bool AllDone()
FIXME_docs.
Definition:
RtclArgs.cpp:447
Retro::RtclCmdBase::kOK
static const int kOK
Definition:
RtclCmdBase.hpp:54
Retro::RtclCmdBase::kERR
static const int kERR
Definition:
RtclCmdBase.hpp:55
Retro::RtclRw11CntlBase
Implemenation (all inline) of RtclRw11CntlBase.
Definition:
RtclRw11CntlBase.hpp:28
Retro::RtclRw11CntlTermBase::~RtclRw11CntlTermBase
~RtclRw11CntlTermBase()
FIXME_docs.
Definition:
RtclRw11CntlTermBase.ipp:41
Retro::RtclRw11CntlTermBase::RtclRw11CntlTermBase
RtclRw11CntlTermBase(const std::string &type, const std::string &cclass)
Constructor.
Definition:
RtclRw11CntlTermBase.ipp:32
Retro::RtclRw11CntlTermBase::M_default
virtual int M_default(RtclArgs &args)
FIXME_docs.
Definition:
RtclRw11CntlTermBase.ipp:48
Retro::Rw11UnitTerm
FIXME_docs.
Definition:
Rw11UnitTerm.hpp:34
Retro::Rw11UnitTerm::ToEnpc
bool ToEnpc() const
FIXME_docs.
Definition:
Rw11UnitTerm.ipp:58
Retro::Rw11UnitTerm::Ti7bit
bool Ti7bit() const
FIXME_docs.
Definition:
Rw11UnitTerm.ipp:66
Retro::Rw11UnitTerm::To7bit
bool To7bit() const
FIXME_docs.
Definition:
Rw11UnitTerm.ipp:50
Retro::Rw11Unit::IsAttached
bool IsAttached() const
FIXME_docs.
Definition:
Rw11Unit.cpp:61
Retro::Rw11Unit::Name
std::string Name() const
FIXME_docs.
Definition:
Rw11Unit.ipp:31
Retro::Rw11Unit::AttachUrl
const std::string & AttachUrl() const
FIXME_docs.
Definition:
Rw11Unit.cpp:69
Retro::RosPrintf
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
Retro
Declaration of class ReventLoop.
Definition:
ReventLoop.cpp:47
librwxxtpp
RtclRw11CntlTermBase.ipp
Generated on Thu Feb 9 2023 12:40:57 for w11 - cpp by
1.9.6