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"
20
21#include "RlinkChannel.hpp"
22
23using namespace std;
24
30// all method definitions in namespace Retro
31namespace Retro {
32
33//------------------------------------------+-----------------------------------
35
36RlinkChannel::RlinkChannel(const std::shared_ptr<RlinkConnect>& spconn)
37 : fContext(),
38 fspConn(spconn)
39{}
40
41//------------------------------------------+-----------------------------------
43
45{}
46
47//------------------------------------------+-----------------------------------
49
51{
52 if (!fspConn)
53 throw Rexception("RlinkChannel::Exec", "Bad state: fspConn == 0");
54
55 return fspConn->Exec(clist, emsg);
56}
57
58//------------------------------------------+-----------------------------------
60
61void 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
FIXME_docs.
Definition: RerrMsg.hpp:25
FIXME_docs.
Definition: Rexception.hpp:29
std::shared_ptr< RlinkConnect > fspConn
ptr to connect
RlinkChannel(const std::shared_ptr< RlinkConnect > &spconn)
Default constructor.
bool Exec(RlinkCommandList &clist, RerrMsg &emsg)
FIXME_docs.
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
~RlinkChannel()
Destructor.
RlinkContext fContext
stat check and errcnt context
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
I/O appicator to generate fill characters.
Definition: RosFill.hpp:24
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47