w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RlinkPortTerm.hpp
Go to the documentation of this file.
1// $Id: RlinkPortTerm.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2011-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2017-04-07 868 1.1.1 Dump(): add detail arg
8// 2015-04-11 666 1.1 drop xon/xoff excaping, now done in RlinkPacketBuf
9// 2011-12-18 440 1.0.2 add kStatNPort stats
10// 2011-12-11 438 1.0.1 Read(),Write(): added for xon handling, tcdrain();
11// 2011-03-27 374 1.0 Initial version
12// ---------------------------------------------------------------------------
13
14
19#ifndef included_Retro_RlinkPortTerm
20#define included_Retro_RlinkPortTerm 1
21
22#include <vector>
23#include <termios.h>
24
25#include "RlinkPort.hpp"
26
27namespace Retro {
28
29 class RlinkPortTerm : public RlinkPort {
30 public:
31
33 virtual ~RlinkPortTerm();
34
35 virtual bool Open(const std::string& url, RerrMsg& emsg);
36 virtual void Close();
37
38 virtual void Dump(std::ostream& os, int ind=0, const char* text=0,
39 int detail=0) const;
40
41 // some constants (also defined in cpp)
42 static const uint8_t kc_xon = 0x11; // XON char -> ^Q = hex 11
43 static const uint8_t kc_xoff = 0x13; // XOFF char -> ^S = hex 13
44
45 protected:
46 void DumpTios(std::ostream& os, int ind, const std::string& name,
47 const struct termios& tios) const;
48
49 protected:
50 struct termios fTiosOld;
51 struct termios fTiosNew;
52 };
53
54} // end namespace Retro
55
56//#include "RlinkPortTerm.ipp"
57
58#endif
FIXME_docs.
Definition: RerrMsg.hpp:25
virtual ~RlinkPortTerm()
Destructor.
virtual bool Open(const std::string &url, RerrMsg &emsg)
FIXME_docs.
struct termios fTiosOld
virtual void Close()
FIXME_docs.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
RlinkPortTerm()
Default constructor.
struct termios fTiosNew
void DumpTios(std::ostream &os, int ind, const std::string &name, const struct termios &tios) const
FIXME_docs.
static const uint8_t kc_xon
static const uint8_t kc_xoff
FIXME_docs.
Definition: RlinkPort.hpp:45
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47