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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librw11/] [Rw11VirtTerm.hpp] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 wfjm
// $Id: Rw11VirtTerm.hpp 504 2013-04-13 15:37:24Z mueller $
2
//
3
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
//
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
// 2013-03-06   495   1.0    Initial version
17
// 2013-02-13   488   0.1    First draft
18
// ---------------------------------------------------------------------------
19
 
20
/*!
21
  \file
22
  \version $Id: Rw11VirtTerm.hpp 504 2013-04-13 15:37:24Z mueller $
23
  \brief   Declaration of class Rw11VirtTerm.
24
*/
25
 
26
#ifndef included_Retro_Rw11VirtTerm
27
#define included_Retro_Rw11VirtTerm 1
28
 
29
#include "boost/function.hpp"
30
 
31
#include "Rw11Virt.hpp"
32
 
33
namespace Retro {
34
 
35
  class Rw11VirtTerm : public Rw11Virt {
36
    public:
37
      typedef boost::function<bool(const uint8_t*, size_t)> rcvcbfo_t;
38
 
39
      explicit      Rw11VirtTerm(Rw11Unit* punit);
40
                   ~Rw11VirtTerm();
41
 
42
      virtual const std::string& ChannelId() const;
43
 
44
      void          SetupRcvCallback(const rcvcbfo_t& rcvcbfo);
45
      virtual bool  Snd(const uint8_t* data, size_t count, RerrMsg& emsg) = 0;
46
 
47
      virtual void  Dump(std::ostream& os, int ind=0, const char* text=0) const;
48
 
49
      static Rw11VirtTerm* New(const std::string& url, Rw11Unit* punit,
50
                               RerrMsg& emsg);
51
 
52
    // statistics counter indices
53
      enum stats {
54
        kStatNVTRcvPoll = Rw11Virt::kDimStat,
55
        kStatNVTSnd,
56
        kStatNVTRcvByt,
57
        kStatNVTSndByt,
58
        kDimStat
59
      };
60
 
61
    protected:
62
      std::string   fChannelId;             //!< channel id 
63
      rcvcbfo_t     fRcvCb;                 //!< receive callback fobj
64
  };
65
 
66
} // end namespace Retro
67
 
68
#include "Rw11VirtTerm.ipp"
69
 
70
#endif

powered by: WebSVN 2.1.0

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