w11 - cpp
0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RlinkChannel.cpp
Go to the documentation of this file.
1
// $Id: RlinkChannel.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.0.2 use std::shared_ptr instead of boost
8
// 2017-04-07 868 1.0.1 Dump(): add detail arg
9
// 2013-02-23 492 1.0 Initial version
10
// ---------------------------------------------------------------------------
11
16
#include "
librtools/RosFill.hpp
"
17
#include "
librtools/RosPrintf.hpp
"
18
#include "
librtools/RosPrintBvi.hpp
"
19
#include "
librtools/Rexception.hpp
"
20
21
#include "
RlinkChannel.hpp
"
22
23
using namespace
std;
24
30
// all method definitions in namespace Retro
31
namespace
Retro
{
32
33
//------------------------------------------+-----------------------------------
35
36
RlinkChannel::RlinkChannel
(
const
std::shared_ptr<RlinkConnect>& spconn)
37
: fContext(),
38
fspConn(spconn)
39
{}
40
41
//------------------------------------------+-----------------------------------
43
44
RlinkChannel::~RlinkChannel
()
45
{}
46
47
//------------------------------------------+-----------------------------------
49
50
bool
RlinkChannel::Exec
(
RlinkCommandList
& clist,
RerrMsg
& emsg)
51
{
52
if
(!
fspConn
)
53
throw
Rexception
(
"RlinkChannel::Exec"
,
"Bad state: fspConn == 0"
);
54
55
return
fspConn
->Exec(clist, emsg);
56
}
57
58
//------------------------------------------+-----------------------------------
60
61
void
RlinkChannel::Dump
(std::ostream& os,
int
ind,
const
char
* text,
62
int
/*detail*/
)
const
63
{
64
RosFill
bl(ind);
65
os << bl << (text?text:
"--"
) <<
"RlinkChannel @ "
<<
this
<< endl;
66
67
fContext
.
Dump
(os, ind+2,
"fContext: "
);
68
if
(
fspConn
) {
69
fspConn
->Dump(os, ind+2,
"fspConn: "
);
70
}
else
{
71
os << bl <<
" fspConn: "
<<
fspConn
.get() << endl;
72
}
73
74
return
;
75
}
76
77
}
// end namespace Retro
Rexception.hpp
RlinkChannel.hpp
RosFill.hpp
RosPrintBvi.hpp
RosPrintf.hpp
Retro::RerrMsg
FIXME_docs.
Definition:
RerrMsg.hpp:25
Retro::Rexception
FIXME_docs.
Definition:
Rexception.hpp:29
Retro::RlinkChannel::fspConn
std::shared_ptr< RlinkConnect > fspConn
ptr to connect
Definition:
RlinkChannel.hpp:43
Retro::RlinkChannel::RlinkChannel
RlinkChannel(const std::shared_ptr< RlinkConnect > &spconn)
Default constructor.
Definition:
RlinkChannel.cpp:36
Retro::RlinkChannel::Exec
bool Exec(RlinkCommandList &clist, RerrMsg &emsg)
FIXME_docs.
Definition:
RlinkChannel.cpp:50
Retro::RlinkChannel::Dump
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
Definition:
RlinkChannel.cpp:61
Retro::RlinkChannel::~RlinkChannel
~RlinkChannel()
Destructor.
Definition:
RlinkChannel.cpp:44
Retro::RlinkChannel::fContext
RlinkContext fContext
stat check and errcnt context
Definition:
RlinkChannel.hpp:42
Retro::RlinkCommandList
FIXME_docs.
Definition:
RlinkCommandList.hpp:40
Retro::RlinkContext::Dump
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
Definition:
RlinkContext.cpp:51
Retro::RosFill
I/O appicator to generate fill characters.
Definition:
RosFill.hpp:24
Retro
Declaration of class ReventLoop.
Definition:
ReventLoop.cpp:47
librlink
RlinkChannel.cpp
Generated on Thu Feb 9 2023 12:40:56 for w11 - cpp by
1.9.6