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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librwxxtpp/] [RtclRw11UnitTerm.cpp] - Blame information for rev 40

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

Line No. Rev Author Line
1 20 wfjm
// $Id: RtclRw11UnitTerm.cpp 511 2013-04-27 13:51:46Z mueller $
2 19 wfjm
//
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 20 wfjm
// 2013-04-26   511   1.0.1  add M_type
17 19 wfjm
// 2013-03-03   494   1.0    Initial version
18
// 2013-03-01   493   0.1    First draft
19
// ---------------------------------------------------------------------------
20
 
21
/*!
22
  \file
23 20 wfjm
  \version $Id: RtclRw11UnitTerm.cpp 511 2013-04-27 13:51:46Z mueller $
24 19 wfjm
  \brief   Implemenation of RtclRw11UnitTerm.
25
*/
26
 
27
using namespace std;
28
 
29
#include "RtclRw11UnitTerm.hpp"
30
 
31
/*!
32
  \class Retro::RtclRw11UnitTerm
33
  \brief FIXME_docs
34
*/
35
 
36
// all method definitions in namespace Retro
37
namespace Retro {
38
 
39
//------------------------------------------+-----------------------------------
40
//! Constructor
41
 
42
RtclRw11UnitTerm::RtclRw11UnitTerm(RtclRw11Unit* ptcl, Rw11UnitTerm* pobj)
43
  : fpTcl(ptcl),
44
    fpObj(pobj)
45
{
46 20 wfjm
  ptcl->AddMeth("type",  boost::bind(&RtclRw11UnitTerm::M_type,    this, _1));
47
 
48 19 wfjm
  RtclGetList& gets = ptcl->GetList();
49
  RtclSetList& sets = ptcl->SetList();
50
 
51
  gets.Add<const string&> ("channelid",
52
                            boost::bind(&Rw11UnitTerm::ChannelId,  pobj));
53 20 wfjm
  gets.Add<bool>          ("to7bit",
54
                            boost::bind(&Rw11UnitTerm::To7bit,  pobj));
55
  gets.Add<bool>          ("toenpc",
56
                            boost::bind(&Rw11UnitTerm::ToEnpc,  pobj));
57
  gets.Add<bool>          ("ti7bit",
58
                            boost::bind(&Rw11UnitTerm::Ti7bit,  pobj));
59
  gets.Add<const string&> ("log",
60
                            boost::bind(&Rw11UnitTerm::Log,  pobj));
61 19 wfjm
 
62 20 wfjm
  sets.Add<bool>          ("to7bit",
63
                            boost::bind(&Rw11UnitTerm::SetTo7bit,pobj, _1));
64
  sets.Add<bool>          ("toenpc",
65
                            boost::bind(&Rw11UnitTerm::SetToEnpc,pobj, _1));
66
  sets.Add<bool>          ("ti7bit",
67
                            boost::bind(&Rw11UnitTerm::SetTi7bit,pobj, _1));
68
  sets.Add<const string&> ("log",
69
                            boost::bind(&Rw11UnitTerm::SetLog,pobj, _1));
70 19 wfjm
}
71
 
72
//------------------------------------------+-----------------------------------
73
//! FIXME_docs
74
 
75
RtclRw11UnitTerm::~RtclRw11UnitTerm()
76
{}
77
 
78 20 wfjm
//------------------------------------------+-----------------------------------
79
//! FIXME_docs
80 19 wfjm
 
81 20 wfjm
int RtclRw11UnitTerm::M_type(RtclArgs& args)
82
{
83
  string text;
84
  if (!args.GetArg("text", text)) return TCL_ERROR;
85
 
86
  if (!args.AllDone()) return TCL_ERROR;
87
 
88
  fpObj->RcvCallback((const uint8_t*)text.data(), text.size());
89
 
90
  return TCL_OK;
91
}
92
 
93 19 wfjm
} // end namespace Retro

powered by: WebSVN 2.1.0

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