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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [tools/] [src/] [librlink/] [RlinkContext.hpp] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 wfjm
// $Id: RlinkContext.hpp 661 2015-04-03 18:28:41Z mueller $
2 19 wfjm
//
3 30 wfjm
// Copyright 2013-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 19 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-03-28   660   1.1    add SetStatus(Value|Mask)()
17 19 wfjm
// 2013-02-23   492   1.0    Initial version
18
// ---------------------------------------------------------------------------
19
 
20
 
21
/*!
22
  \file
23 30 wfjm
  \version $Id: RlinkContext.hpp 661 2015-04-03 18:28:41Z mueller $
24 19 wfjm
  \brief   Declaration of class RlinkContext.
25
*/
26
 
27
#ifndef included_Retro_RlinkContext
28
#define included_Retro_RlinkContext 1
29
 
30
#include <cstdint>
31
 
32
namespace Retro {
33
 
34
  class RlinkContext {
35
    public:
36
                    RlinkContext();
37
                   ~RlinkContext();
38
 
39 30 wfjm
      void          SetStatus(uint8_t stat, uint8_t statmsk=0xff);
40 19 wfjm
 
41 30 wfjm
      void          SetStatusValue(uint8_t stat);
42
      void          SetStatusMask(uint8_t statmsk);
43
 
44 19 wfjm
      uint8_t       StatusValue() const;
45
      uint8_t       StatusMask() const;
46
 
47
      bool          StatusIsChecked() const;
48
      bool          StatusCheck(uint8_t val) const;
49
 
50
      void          IncErrorCount(size_t inc = 1);
51
      void          ClearErrorCount();
52
      size_t        ErrorCount() const;
53
 
54
      void          Dump(std::ostream& os, int ind=0, const char* text=0) const;
55
 
56
    protected:
57
      uint8_t       fStatusVal;             //!< status value
58
      uint8_t       fStatusMsk;             //!< status mask
59
      size_t        fErrCnt;                //!< error count
60
  };
61
 
62
} // end namespace Retro
63
 
64
#include "RlinkContext.ipp"
65
 
66
#endif

powered by: WebSVN 2.1.0

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