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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [tools/] [src/] [librlink/] [RlinkChannel.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: RlinkChannel.cpp 492 2013-02-24 22:14:47Z 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-02-23   492   1.0    Initial version
17
// ---------------------------------------------------------------------------
18
 
19
/*!
20
  \file
21
  \version $Id: RlinkChannel.cpp 492 2013-02-24 22:14:47Z mueller $
22
  \brief   Implemenation of class RlinkChannel.
23
 */
24
 
25
#include "librtools/RosFill.hpp"
26
#include "librtools/RosPrintf.hpp"
27
#include "librtools/RosPrintBvi.hpp"
28
#include "librtools/Rexception.hpp"
29
 
30
#include "RlinkChannel.hpp"
31
 
32
using namespace std;
33
 
34
/*!
35
  \class Retro::RlinkChannel
36
  \brief FIXME_docs
37
*/
38
 
39
// all method definitions in namespace Retro
40
namespace Retro {
41
 
42
//------------------------------------------+-----------------------------------
43
//! Default constructor
44
 
45
RlinkChannel::RlinkChannel(const boost::shared_ptr<RlinkConnect>& spconn)
46
  : fContext(),
47
    fspConn(spconn)
48
{}
49
 
50
//------------------------------------------+-----------------------------------
51
//! Destructor
52
 
53
RlinkChannel::~RlinkChannel()
54
{}
55
 
56
//------------------------------------------+-----------------------------------
57
//! FIXME_docs
58
 
59
bool RlinkChannel::Exec(RlinkCommandList& clist, RerrMsg& emsg)
60
{
61
  if (!fspConn)
62
    throw Rexception("RlinkChannel::Exec", "Bad state: fspConn == 0");
63
 
64
  return fspConn->Exec(clist, emsg);
65
}
66
 
67
//------------------------------------------+-----------------------------------
68
//! FIXME_docs
69
 
70
void RlinkChannel::Dump(std::ostream& os, int ind, const char* text) const
71
{
72
  RosFill bl(ind);
73
  os << bl << (text?text:"--") << "RlinkChannel @ " << this << endl;
74
 
75
  fContext.Dump(os, ind+2, "fContext: ");
76
  if (fspConn) {
77
    fspConn->Dump(os, ind+2, "fspConn: ");
78
  } else {
79
    os << bl << "  fspConn:         " <<  fspConn.get() << endl;
80
  }
81
 
82
  return;
83
}
84
 
85
} // end namespace Retro

powered by: WebSVN 2.1.0

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