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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [tools/] [src/] [librw11/] [Rw11Probe.cpp] - 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: Rw11Probe.cpp 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-05   495   1.0    Initial version
17
// ---------------------------------------------------------------------------
18
 
19
/*!
20
  \file
21
  \version $Id: Rw11Probe.cpp 495 2013-03-06 17:13:48Z mueller $
22
  \brief   Implemenation of Rw11Probe.
23
*/
24
 
25
#include "librtools/RosFill.hpp"
26
#include "librtools/RosPrintf.hpp"
27
 
28
#include "librlink/RlinkServer.hpp"
29
 
30
#include "Rw11Probe.hpp"
31
 
32
using namespace std;
33
 
34
/*!
35
  \class Retro::Rw11Probe
36
  \brief FIXME_docs
37
*/
38
 
39
// all method definitions in namespace Retro
40
namespace Retro {
41
 
42
//------------------------------------------+-----------------------------------
43
//! Default constructor
44
 
45
Rw11Probe::Rw11Probe(uint16_t addr, bool probeint, bool proberem)
46
  : fAddr(addr),
47
    fProbeInt(probeint),
48
    fProbeRem(proberem),
49
    fProbeDone(false),
50
    fFoundInt(false),
51
    fFoundRem(false)
52
{}
53
 
54
//------------------------------------------+-----------------------------------
55
//! FIXME_docs
56
 
57
bool Rw11Probe::Found() const
58
{
59
  if (!fProbeDone) return false;
60
  if (fProbeInt && ! fFoundInt) return false;
61
  if (fProbeRem && ! fFoundRem) return false;
62
  return true;
63
}
64
 
65
//------------------------------------------+-----------------------------------
66
//! FIXME_docs
67
 
68
char Rw11Probe::IndicatorInt() const
69
{
70
  if (!fProbeDone) return '?';
71
  if (!fProbeInt)  return '-';
72
  return fFoundInt ? 'y' : 'n';
73
}
74
 
75
//------------------------------------------+-----------------------------------
76
//! FIXME_docs
77
 
78
char Rw11Probe::IndicatorRem() const
79
{
80
  if (!fProbeDone) return '?';
81
  if (!fProbeRem)  return '-';
82
  return fFoundRem ? 'y' : 'n';
83
}
84
 
85
//------------------------------------------+-----------------------------------
86
//! FIXME_docs
87
 
88
void Rw11Probe::Dump(std::ostream& os, int ind, const char* text) const
89
{
90
  RosFill bl(ind);
91
  os << bl << (text?text:"--") << "Rw11Probe @ " << this << endl;
92
 
93
  os << bl << "  fAddr:           " << RosPrintf(fAddr,"o0",6) << endl;
94
  os << bl << "  fProbeInt,Rem:   " << fProbeInt << ", " << fProbeInt<< endl;
95
  os << bl << "  fProbeDone:      " << fProbeDone << endl;
96
  os << bl << "  fFoundInt,Rem    " << fFoundInt << ", " << fFoundInt<< endl;
97
  return;
98
}
99
 
100
} // end namespace Retro

powered by: WebSVN 2.1.0

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