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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librlinktpp/] [RtclAttnShuttle.hpp] - Blame information for rev 40

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 wfjm
// $Id: RtclAttnShuttle.hpp 495 2013-03-06 17:13:48Z 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-01   493   1.0    Initial version
17
// 2013-01-14   475   0.5    First draft
18
// ---------------------------------------------------------------------------
19
 
20
/*!
21
  \file
22
  \version $Id: RtclAttnShuttle.hpp 495 2013-03-06 17:13:48Z mueller $
23
  \brief   Declaration of class RtclAttnShuttle.
24
*/
25
 
26
#ifndef included_Retro_RtclAttnShuttle
27
#define included_Retro_RtclAttnShuttle 1
28
 
29
#include "tcl.h"
30
 
31
#include <cstdint>
32
 
33
#include "librtcltools/RtclOPtr.hpp"
34
#include "librlink/RlinkServer.hpp"
35
 
36
namespace Retro {
37
 
38
  class RtclAttnShuttle {
39
    public:
40
                    RtclAttnShuttle(uint16_t mask, Tcl_Obj* pobj);
41
                   ~RtclAttnShuttle();
42
 
43
      uint16_t      Mask() const;
44
      Tcl_Obj*      Script() const;
45
 
46
      void          Add(RlinkServer* pserv, Tcl_Interp* interp);
47
      void          Remove();
48
 
49
    protected:
50
      int           AttnHandler(const RlinkServer::AttnArgs& args);
51
      void          TclChannelHandler(int mask);
52
      static void   ThunkTclChannelHandler(ClientData cdata, int mask);
53
 
54
    protected:
55
      RlinkServer*  fpServ;                 //!< RlinkServer used
56
      Tcl_Interp*   fpInterp;               //!< Tcl interpreter used
57
      int           fFdPipeRead;            //!< attn pipe read fd
58
      int           fFdPipeWrite;           //!< attn pipe write fd
59
      Tcl_Channel   fShuttleChn;            //!< Tcl channel
60
      uint16_t      fMask;                  //!< attn mask
61
      RtclOPtr      fpScript;               //!< Tcl handler script (as Tcl_Obj)
62
  };
63
 
64
} // end namespace Retro
65
 
66
#include "RtclAttnShuttle.ipp"
67
 
68
#endif

powered by: WebSVN 2.1.0

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