OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librlink/] [RlinkPortTerm.hpp] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 wfjm
// $Id: RlinkPortTerm.hpp 666 2015-04-12 21:17:54Z mueller $
2 10 wfjm
//
3 30 wfjm
// Copyright 2011-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 10 wfjm
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
// 
14
// Revision History: 
15
// Date         Rev Version  Comment
16 30 wfjm
// 2015-04-11   666   1.1    drop xon/xoff excaping, now done in RlinkPacketBuf
17 16 wfjm
// 2011-12-18   440   1.0.2  add kStatNPort stats
18
// 2011-12-11   438   1.0.1  Read(),Write(): added for xon handling, tcdrain();
19 10 wfjm
// 2011-03-27   374   1.0    Initial version
20
// ---------------------------------------------------------------------------
21
 
22
 
23
/*!
24
  \file
25 30 wfjm
  \version $Id: RlinkPortTerm.hpp 666 2015-04-12 21:17:54Z mueller $
26 10 wfjm
  \brief   Declaration of class RlinkPortTerm.
27
*/
28
 
29
#ifndef included_Retro_RlinkPortTerm
30
#define included_Retro_RlinkPortTerm 1
31
 
32 16 wfjm
#include <vector>
33 10 wfjm
#include <termios.h>
34
 
35
#include "RlinkPort.hpp"
36
 
37
namespace Retro {
38
 
39
  class RlinkPortTerm : public RlinkPort {
40
    public:
41
 
42
                    RlinkPortTerm();
43
      virtual       ~RlinkPortTerm();
44
 
45
      virtual bool  Open(const std::string& url, RerrMsg& emsg);
46
      virtual void  Close();
47 30 wfjm
 
48 10 wfjm
      virtual void  Dump(std::ostream& os, int ind=0, const char* text=0) const;
49
 
50 19 wfjm
    // some constants (also defined in cpp)
51 16 wfjm
      static const uint8_t kc_xon  = 0x11;  // XON  char -> ^Q = hex 11
52
      static const uint8_t kc_xoff = 0x13;  // XOFF char -> ^S = hex 13
53
 
54 10 wfjm
    protected:
55
      void          DumpTios(std::ostream& os, int ind, const std::string& name,
56
                             const struct termios& tios) const;
57
 
58
    protected:
59
      struct termios fTiosOld;
60
      struct termios fTiosNew;
61
  };
62
 
63
} // end namespace Retro
64
 
65
//#include "RlinkPortTerm.ipp"
66
 
67
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.