w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclRlinkPort.hpp
Go to the documentation of this file.
1// $Id: RtclRlinkPort.hpp 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-08 1079 1.3 use ref not ptr for RlinkPort
8// 2018-12-07 1078 1.2.1 use std::shared_ptr instead of boost
9// 2018-12-01 1076 1.2 use unique_ptr
10// 2017-04-29 888 1.1 LogFileName(): returns now const std::string&
11// drop M_rawio; add M_rawread,M_rawrblk,M_rawwblk
12// 2015-01-09 632 1.0.2 add M_get, M_set, remove M_config
13// 2013-02-23 492 1.0.1 use RlogFile.Name();
14// 2013-01-27 478 1.0 Initial version
15// ---------------------------------------------------------------------------
16
21#ifndef included_Retro_RtclRlinkPort
22#define included_Retro_RtclRlinkPort 1
23
24#include <cstddef>
25#include <string>
26#include <memory>
27
32
34
35namespace Retro {
36
38 public:
39 RtclRlinkPort(Tcl_Interp* interp, const char* name);
41
42 friend class RtclRlinkConnect;
43
44 protected:
45 int M_open(RtclArgs& args);
46 int M_close(RtclArgs& args);
47 int M_errcnt(RtclArgs& args);
48 int M_rawread(RtclArgs& args);
49 int M_rawrblk(RtclArgs& args);
50 int M_rawwblk(RtclArgs& args);
51 int M_stats(RtclArgs& args);
52 int M_log(RtclArgs& args);
53 int M_dump(RtclArgs& args);
54 int M_get(RtclArgs& args);
55 int M_set(RtclArgs& args);
56 int M_default(RtclArgs& args);
57
58 void SetupGetSet();
59 bool TestPort(RtclArgs& args, bool testopen=true);
60 void SetLogFileName(const std::string& name);
61 const std::string& LogFileName() const;
62
63 static int DoRawRead(RtclArgs& args, RlinkPort& port);
64 static int DoRawRblk(RtclArgs& args, RlinkPort& port, size_t& errcnt);
65 static int DoRawWblk(RtclArgs& args, RlinkPort& port);
66
67 protected:
69 std::shared_ptr<RlogFile> fspLog;
70 uint32_t fTraceLevel;
71 size_t fErrCnt;
74 };
75
76} // end namespace Retro
77
78//#include "RtclRlinkPort.ipp"
79
80#endif
FIXME_docs.
Definition: RlinkPort.hpp:45
std::unique_ptr< RlinkPort > port_uptr_t
Definition: RlinkPort.hpp:47
FIXME_docs.
Definition: RtclArgs.hpp:41
int M_errcnt(RtclArgs &args)
FIXME_docs.
int M_dump(RtclArgs &args)
FIXME_docs.
int M_log(RtclArgs &args)
FIXME_docs.
int M_rawread(RtclArgs &args)
FIXME_docs.
static int DoRawWblk(RtclArgs &args, RlinkPort &port)
FIXME_docs.
int M_open(RtclArgs &args)
FIXME_docs.
const std::string & LogFileName() const
FIXME_docs.
bool TestPort(RtclArgs &args, bool testopen=true)
FIXME_docs.
static int DoRawRblk(RtclArgs &args, RlinkPort &port, size_t &errcnt)
FIXME_docs.
int M_default(RtclArgs &args)
FIXME_docs.
int M_rawrblk(RtclArgs &args)
FIXME_docs.
int M_rawwblk(RtclArgs &args)
FIXME_docs.
RlinkPort::port_uptr_t fupObj
uptr to managed port
size_t fErrCnt
error count
~RtclRlinkPort()
Destructor.
std::shared_ptr< RlogFile > fspLog
port log file
int M_close(RtclArgs &args)
FIXME_docs.
int M_stats(RtclArgs &args)
FIXME_docs.
void SetupGetSet()
FIXME_docs.
static int DoRawRead(RtclArgs &args, RlinkPort &port)
FIXME_docs.
int M_get(RtclArgs &args)
FIXME_docs.
uint32_t fTraceLevel
0=off,1=buf,2=char
int M_set(RtclArgs &args)
FIXME_docs.
void SetLogFileName(const std::string &name)
FIXME_docs.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47