mirror of
https://github.com/wfjm/w11.git
synced 2026-04-05 05:51:14 +00:00
factor out controller class specifics; add useful M_default output
- RtclRw11Cntl*Base: add classes with Rdma,Disk,Stream.Tape,Term specifics - RtclRw11Cntl*: add class in ctor; derive from RtclRw11Cntl*Base
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlBase.hpp 870 2017-04-08 18:24:34Z mueller $
|
||||
// $Id: RtclRw11CntlBase.hpp 877 2017-04-16 10:13:56Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 877 1.1 add class in ctor
|
||||
// 2013-03-06 495 1.0 Initial version
|
||||
// 2013-02-08 484 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlBase.hpp 870 2017-04-08 18:24:34Z mueller $
|
||||
\version $Id: RtclRw11CntlBase.hpp 877 2017-04-16 10:13:56Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlBase.
|
||||
*/
|
||||
|
||||
@@ -36,7 +37,8 @@ namespace Retro {
|
||||
template <class TC>
|
||||
class RtclRw11CntlBase : public RtclRw11Cntl {
|
||||
public:
|
||||
explicit RtclRw11CntlBase(const std::string& type);
|
||||
explicit RtclRw11CntlBase(const std::string& type,
|
||||
const std::string& cclass);
|
||||
~RtclRw11CntlBase();
|
||||
|
||||
virtual TC& Obj();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: RtclRw11CntlBase.ipp 870 2017-04-08 18:24:34Z mueller $
|
||||
// $Id: RtclRw11CntlBase.ipp 877 2017-04-16 10:13:56Z mueller $
|
||||
//
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 877 1.2 add class in ctor
|
||||
// 2017-02-04 848 1.1 add in fGets: found,pdataint,pdatarem
|
||||
// 2013-03-06 495 1.0 Initial version
|
||||
// 2013-02-08 484 0.1 First draft
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlBase.ipp 870 2017-04-08 18:24:34Z mueller $
|
||||
\version $Id: RtclRw11CntlBase.ipp 877 2017-04-16 10:13:56Z mueller $
|
||||
\brief Implemenation (all inline) of RtclRw11CntlBase.
|
||||
*/
|
||||
|
||||
@@ -39,8 +40,9 @@ namespace Retro {
|
||||
//! Constructor
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlBase<TC>::RtclRw11CntlBase(const std::string& type)
|
||||
: RtclRw11Cntl(type),
|
||||
inline RtclRw11CntlBase<TC>::RtclRw11CntlBase(const std::string& type,
|
||||
const std::string& cclass)
|
||||
: RtclRw11Cntl(type,cclass),
|
||||
fspObj(new TC())
|
||||
{
|
||||
AddMeth("bootcode", boost::bind(&RtclRw11CntlBase<TC>::M_bootcode,this, _1));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlDL11.cpp 516 2013-05-05 21:24:52Z mueller $
|
||||
// $Id: RtclRw11CntlDL11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 add class in ctor; derive from RtclRw11CntlTermBase
|
||||
// 2013-05-04 516 1.0.1 add RxRlim support (receive interrupt rate limit)
|
||||
// 2013-03-06 495 1.0 Initial version
|
||||
// 2013-02-02 480 0.1 First draft
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlDL11.cpp 516 2013-05-05 21:24:52Z mueller $
|
||||
\version $Id: RtclRw11CntlDL11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation of RtclRw11CntlDL11.
|
||||
*/
|
||||
|
||||
@@ -43,7 +44,7 @@ namespace Retro {
|
||||
//! Constructor
|
||||
|
||||
RtclRw11CntlDL11::RtclRw11CntlDL11()
|
||||
: RtclRw11CntlBase<Rw11CntlDL11>("Rw11CntlDL11")
|
||||
: RtclRw11CntlTermBase<Rw11CntlDL11>("Rw11CntlDL11","term")
|
||||
{
|
||||
Rw11CntlDL11* pobj = &Obj();
|
||||
fGets.Add<uint16_t> ("rxrlim",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlDL11.hpp 504 2013-04-13 15:37:24Z mueller $
|
||||
// $Id: RtclRw11CntlDL11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 derive from RtclRw11CntlTermBase
|
||||
// 2013-03-06 495 1.0 Initial version
|
||||
// 2013-02-08 484 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -20,19 +21,19 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlDL11.hpp 504 2013-04-13 15:37:24Z mueller $
|
||||
\version $Id: RtclRw11CntlDL11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlDL11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlDL11
|
||||
#define included_Retro_RtclRw11CntlDL11 1
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
#include "RtclRw11CntlTermBase.hpp"
|
||||
#include "librw11/Rw11CntlDL11.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11CntlDL11 : public RtclRw11CntlBase<Rw11CntlDL11> {
|
||||
class RtclRw11CntlDL11 : public RtclRw11CntlTermBase<Rw11CntlDL11> {
|
||||
public:
|
||||
RtclRw11CntlDL11();
|
||||
~RtclRw11CntlDL11();
|
||||
|
||||
51
tools/src/librwxxtpp/RtclRw11CntlDiskBase.hpp
Normal file
51
tools/src/librwxxtpp/RtclRw11CntlDiskBase.hpp
Normal file
@@ -0,0 +1,51 @@
|
||||
// $Id: RtclRw11CntlDiskBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlDiskBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlDiskBase.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlDiskBase
|
||||
#define included_Retro_RtclRw11CntlDiskBase 1
|
||||
|
||||
#include "boost/shared_ptr.hpp"
|
||||
|
||||
#include "RtclRw11CntlRdmaBase.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
template <class TC>
|
||||
class RtclRw11CntlDiskBase : public RtclRw11CntlRdmaBase<TC> {
|
||||
public:
|
||||
explicit RtclRw11CntlDiskBase(const std::string& type,
|
||||
const std::string& cclass);
|
||||
~RtclRw11CntlDiskBase();
|
||||
|
||||
protected:
|
||||
virtual int M_default(RtclArgs& args);
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
// implementation is all inline
|
||||
#include "RtclRw11CntlDiskBase.ipp"
|
||||
|
||||
#endif
|
||||
85
tools/src/librwxxtpp/RtclRw11CntlDiskBase.ipp
Normal file
85
tools/src/librwxxtpp/RtclRw11CntlDiskBase.ipp
Normal file
@@ -0,0 +1,85 @@
|
||||
// $Id: RtclRw11CntlDiskBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlDiskBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation (all inline) of RtclRw11CntlDiskBase.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class Retro::RtclRw11CntlDiskBase
|
||||
\brief FIXME_docs
|
||||
*/
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "librtools/RosPrintf.hpp"
|
||||
|
||||
#include "librw11/Rw11UnitDisk.hpp"
|
||||
|
||||
// all method definitions in namespace Retro
|
||||
namespace Retro {
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Constructor
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlDiskBase<TC>::RtclRw11CntlDiskBase(const std::string& type,
|
||||
const std::string& cclass)
|
||||
: RtclRw11CntlRdmaBase<TC>(type,cclass)
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlDiskBase<TC>::~RtclRw11CntlDiskBase()
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
template <class TC>
|
||||
inline int RtclRw11CntlDiskBase<TC>::M_default(RtclArgs& args)
|
||||
{
|
||||
if (!args.AllDone()) return RtclRw11Cntl::kERR;
|
||||
std::ostringstream sos;
|
||||
TC& cntl = this->Obj();
|
||||
sos << "unit type en wp cyl hd sec blocks bsz at attachurl\n";
|
||||
for (size_t i=0; i<cntl.NUnit(); i++) {
|
||||
Rw11UnitDisk& unit = cntl.Unit(i);
|
||||
sos << RosPrintf(unit.Name().c_str(),"-s",4)
|
||||
<< " " << RosPrintf(unit.Type().c_str(),"-s",4)
|
||||
<< " " << (unit.Enabled() ? " y" : " n")
|
||||
<< " " << (unit.WProt() ? " y" : " n")
|
||||
<< " " << RosPrintf(unit.NCylinder(),"d",4)
|
||||
<< " " << RosPrintf(unit.NHead(),"d",2)
|
||||
<< " " << RosPrintf(unit.NSector(),"d",3)
|
||||
<< " " << RosPrintf(unit.NBlock(),"d",7)
|
||||
<< " " << RosPrintf(unit.BlockSize(),"d",3)
|
||||
<< " " << (unit.IsAttached() ? " y" : " n")
|
||||
<< " " << unit.AttachUrl()
|
||||
<< "\n";
|
||||
}
|
||||
args.AppendResultLines(sos);
|
||||
return RtclRw11Cntl::kOK;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace Retro
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlLP11.cpp 515 2013-05-04 17:28:59Z mueller $
|
||||
// $Id: RtclRw11CntlLP11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,12 +13,13 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 add class in ctor;derive from RtclRw11CntlStreamBase
|
||||
// 2013-05-01 513 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlLP11.cpp 515 2013-05-04 17:28:59Z mueller $
|
||||
\version $Id: RtclRw11CntlLP11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation of RtclRw11CntlLP11.
|
||||
*/
|
||||
|
||||
@@ -41,10 +42,8 @@ namespace Retro {
|
||||
//! Constructor
|
||||
|
||||
RtclRw11CntlLP11::RtclRw11CntlLP11()
|
||||
: RtclRw11CntlBase<Rw11CntlLP11>("Rw11CntlLP11")
|
||||
{
|
||||
//Rw11CntlLP11* pobj = &Obj();
|
||||
}
|
||||
: RtclRw11CntlStreamBase<Rw11CntlLP11>("Rw11CntlLP11","stream")
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Destructor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlLP11.hpp 515 2013-05-04 17:28:59Z mueller $
|
||||
// $Id: RtclRw11CntlLP11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,25 +13,26 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 derive from RtclRw11CntlStreamBase
|
||||
// 2013-05-01 513 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlLP11.hpp 515 2013-05-04 17:28:59Z mueller $
|
||||
\version $Id: RtclRw11CntlLP11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlLP11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlLP11
|
||||
#define included_Retro_RtclRw11CntlLP11 1
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
#include "RtclRw11CntlStreamBase.hpp"
|
||||
#include "librw11/Rw11CntlLP11.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11CntlLP11 : public RtclRw11CntlBase<Rw11CntlLP11> {
|
||||
class RtclRw11CntlLP11 : public RtclRw11CntlStreamBase<Rw11CntlLP11> {
|
||||
public:
|
||||
RtclRw11CntlLP11();
|
||||
~RtclRw11CntlLP11();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlPC11.cpp 515 2013-05-04 17:28:59Z mueller $
|
||||
// $Id: RtclRw11CntlPC11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,12 +13,13 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 add class in ctor;derive from RtclRw11CntlStreamBase
|
||||
// 2013-05-03 515 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlPC11.cpp 515 2013-05-04 17:28:59Z mueller $
|
||||
\version $Id: RtclRw11CntlPC11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation of RtclRw11CntlPC11.
|
||||
*/
|
||||
|
||||
@@ -41,10 +42,8 @@ namespace Retro {
|
||||
//! Constructor
|
||||
|
||||
RtclRw11CntlPC11::RtclRw11CntlPC11()
|
||||
: RtclRw11CntlBase<Rw11CntlPC11>("Rw11CntlPC11")
|
||||
{
|
||||
//Rw11CntlPC11* pobj = &Obj();
|
||||
}
|
||||
: RtclRw11CntlStreamBase<Rw11CntlPC11>("Rw11CntlPC11","stream")
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Destructor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $
|
||||
// $Id: RtclRw11CntlPC11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,25 +13,26 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 derive from RtclRw11CntlStreamBase
|
||||
// 2013-05-03 515 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $
|
||||
\version $Id: RtclRw11CntlPC11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlPC11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlPC11
|
||||
#define included_Retro_RtclRw11CntlPC11 1
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
#include "RtclRw11CntlStreamBase.hpp"
|
||||
#include "librw11/Rw11CntlPC11.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11CntlPC11 : public RtclRw11CntlBase<Rw11CntlPC11> {
|
||||
class RtclRw11CntlPC11 : public RtclRw11CntlStreamBase<Rw11CntlPC11> {
|
||||
public:
|
||||
RtclRw11CntlPC11();
|
||||
~RtclRw11CntlPC11();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlRHRP.cpp 680 2015-05-14 13:29:46Z mueller $
|
||||
// $Id: RtclRw11CntlRHRP.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2015- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2015-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,13 +13,14 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 add class in ctor; derive from RtclRw11CntlDiskBase
|
||||
// 2015-05-14 680 1.0 Initial version
|
||||
// 2015-03-21 659 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRHRP.cpp 680 2015-05-14 13:29:46Z mueller $
|
||||
\version $Id: RtclRw11CntlRHRP.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation of RtclRw11CntlRHRP.
|
||||
*/
|
||||
|
||||
@@ -42,14 +43,8 @@ namespace Retro {
|
||||
//! Constructor
|
||||
|
||||
RtclRw11CntlRHRP::RtclRw11CntlRHRP()
|
||||
: RtclRw11CntlBase<Rw11CntlRHRP>("Rw11CntlRHRP")
|
||||
{
|
||||
Rw11CntlRHRP* pobj = &Obj();
|
||||
fGets.Add<size_t> ("chunksize",
|
||||
boost::bind(&Rw11CntlRHRP::ChunkSize, pobj));
|
||||
fSets.Add<size_t> ("chunksize",
|
||||
boost::bind(&Rw11CntlRHRP::SetChunkSize, pobj, _1));
|
||||
}
|
||||
: RtclRw11CntlDiskBase<Rw11CntlRHRP>("Rw11CntlRHRP","disk")
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Destructor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlRHRP.hpp 680 2015-05-14 13:29:46Z mueller $
|
||||
// $Id: RtclRw11CntlRHRP.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2015- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2015-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 derive from RtclRw11CntlDiskBase
|
||||
// 2015-05-14 680 1.0 Initial version
|
||||
// 2015-03-21 659 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -20,19 +21,19 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRHRP.hpp 680 2015-05-14 13:29:46Z mueller $
|
||||
\version $Id: RtclRw11CntlRHRP.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlRHRP.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlRHRP
|
||||
#define included_Retro_RtclRw11CntlRHRP 1
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
#include "RtclRw11CntlDiskBase.hpp"
|
||||
#include "librw11/Rw11CntlRHRP.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11CntlRHRP : public RtclRw11CntlBase<Rw11CntlRHRP> {
|
||||
class RtclRw11CntlRHRP : public RtclRw11CntlDiskBase<Rw11CntlRHRP> {
|
||||
public:
|
||||
RtclRw11CntlRHRP();
|
||||
~RtclRw11CntlRHRP();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlRK11.cpp 632 2015-01-11 12:30:03Z mueller $
|
||||
// $Id: RtclRw11CntlRK11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2013-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.2 add class in ctor; derive from RtclRw11CntlDiskBase
|
||||
// 2015-01-04 627 1.1 add Get/Set for chunksize
|
||||
// 2013-03-06 495 1.0 Initial version
|
||||
// 2013-02-02 480 0.1 First draft
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRK11.cpp 632 2015-01-11 12:30:03Z mueller $
|
||||
\version $Id: RtclRw11CntlRK11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation of RtclRw11CntlRK11.
|
||||
*/
|
||||
|
||||
@@ -43,14 +44,8 @@ namespace Retro {
|
||||
//! Constructor
|
||||
|
||||
RtclRw11CntlRK11::RtclRw11CntlRK11()
|
||||
: RtclRw11CntlBase<Rw11CntlRK11>("Rw11CntlRK11")
|
||||
{
|
||||
Rw11CntlRK11* pobj = &Obj();
|
||||
fGets.Add<size_t> ("chunksize",
|
||||
boost::bind(&Rw11CntlRK11::ChunkSize, pobj));
|
||||
fSets.Add<size_t> ("chunksize",
|
||||
boost::bind(&Rw11CntlRK11::SetChunkSize, pobj, _1));
|
||||
}
|
||||
: RtclRw11CntlDiskBase<Rw11CntlRK11>("Rw11CntlRK11","disk")
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Destructor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlRK11.hpp 627 2015-01-04 11:36:37Z mueller $
|
||||
// $Id: RtclRw11CntlRK11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2013-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.2 derive from RtclRw11CntlDiskBase
|
||||
// 2015-01-03 627 1.1 add local M_stat
|
||||
// 2013-03-06 495 1.0 Initial version
|
||||
// 2013-02-08 484 0.1 First draft
|
||||
@@ -21,19 +22,19 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRK11.hpp 627 2015-01-04 11:36:37Z mueller $
|
||||
\version $Id: RtclRw11CntlRK11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlRK11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlRK11
|
||||
#define included_Retro_RtclRw11CntlRK11 1
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
#include "RtclRw11CntlDiskBase.hpp"
|
||||
#include "librw11/Rw11CntlRK11.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11CntlRK11 : public RtclRw11CntlBase<Rw11CntlRK11> {
|
||||
class RtclRw11CntlRK11 : public RtclRw11CntlDiskBase<Rw11CntlRK11> {
|
||||
public:
|
||||
RtclRw11CntlRK11();
|
||||
~RtclRw11CntlRK11();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlRL11.cpp 632 2015-01-11 12:30:03Z mueller $
|
||||
// $Id: RtclRw11CntlRL11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2014-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2014-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,13 +13,14 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.2 add class in ctor; derive from RtclRw11CntlDiskBase
|
||||
// 2015-01-10 632 1.0 Initial version
|
||||
// 2014-06-08 561 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRL11.cpp 632 2015-01-11 12:30:03Z mueller $
|
||||
\version $Id: RtclRw11CntlRL11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation of RtclRw11CntlRL11.
|
||||
*/
|
||||
|
||||
@@ -42,14 +43,8 @@ namespace Retro {
|
||||
//! Constructor
|
||||
|
||||
RtclRw11CntlRL11::RtclRw11CntlRL11()
|
||||
: RtclRw11CntlBase<Rw11CntlRL11>("Rw11CntlRL11")
|
||||
{
|
||||
Rw11CntlRL11* pobj = &Obj();
|
||||
fGets.Add<size_t> ("chunksize",
|
||||
boost::bind(&Rw11CntlRL11::ChunkSize, pobj));
|
||||
fSets.Add<size_t> ("chunksize",
|
||||
boost::bind(&Rw11CntlRL11::SetChunkSize, pobj, _1));
|
||||
}
|
||||
: RtclRw11CntlDiskBase<Rw11CntlRL11>("Rw11CntlRL11","disk")
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Destructor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlRL11.hpp 647 2015-02-17 22:35:36Z mueller $
|
||||
// $Id: RtclRw11CntlRL11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2014-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2014-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.2 derive from RtclRw11CntlDiskBase
|
||||
// 2015-01-10 632 1.0 Initial version
|
||||
// 2014-06-10 561 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -20,19 +21,19 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRL11.hpp 647 2015-02-17 22:35:36Z mueller $
|
||||
\version $Id: RtclRw11CntlRL11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlRL11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlRL11
|
||||
#define included_Retro_RtclRw11CntlRL11 1
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
#include "RtclRw11CntlDiskBase.hpp"
|
||||
#include "librw11/Rw11CntlRL11.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11CntlRL11 : public RtclRw11CntlBase<Rw11CntlRL11> {
|
||||
class RtclRw11CntlRL11 : public RtclRw11CntlDiskBase<Rw11CntlRL11> {
|
||||
public:
|
||||
RtclRw11CntlRL11();
|
||||
~RtclRw11CntlRL11();
|
||||
|
||||
50
tools/src/librwxxtpp/RtclRw11CntlRdmaBase.hpp
Normal file
50
tools/src/librwxxtpp/RtclRw11CntlRdmaBase.hpp
Normal file
@@ -0,0 +1,50 @@
|
||||
// $Id: RtclRw11CntlRdmaBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRdmaBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlRdmaBase.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlRdmaBase
|
||||
#define included_Retro_RtclRw11CntlRdmaBase 1
|
||||
|
||||
#include "boost/shared_ptr.hpp"
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
template <class TC>
|
||||
class RtclRw11CntlRdmaBase : public RtclRw11CntlBase<TC> {
|
||||
public:
|
||||
explicit RtclRw11CntlRdmaBase(const std::string& type,
|
||||
const std::string& cclass);
|
||||
~RtclRw11CntlRdmaBase();
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
// implementation is all inline
|
||||
#include "RtclRw11CntlRdmaBase.ipp"
|
||||
|
||||
#endif
|
||||
64
tools/src/librwxxtpp/RtclRw11CntlRdmaBase.ipp
Normal file
64
tools/src/librwxxtpp/RtclRw11CntlRdmaBase.ipp
Normal file
@@ -0,0 +1,64 @@
|
||||
// $Id: RtclRw11CntlRdmaBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 877 1.2 add class in ctor
|
||||
// 2017-02-04 848 1.1 add in fGets: found,pdataint,pdatarem
|
||||
// 2013-03-06 495 1.0 Initial version
|
||||
// 2013-02-08 484 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRdmaBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation (all inline) of RtclRw11CntlRdmaBase.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class Retro::RtclRw11CntlRdmaBase
|
||||
\brief FIXME_docs
|
||||
*/
|
||||
|
||||
#include "librtcltools/Rtcl.hpp"
|
||||
#include "librtcltools/RtclOPtr.hpp"
|
||||
|
||||
// all method definitions in namespace Retro
|
||||
namespace Retro {
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Constructor
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlRdmaBase<TC>::RtclRw11CntlRdmaBase(const std::string& type,
|
||||
const std::string& cclass)
|
||||
: RtclRw11CntlBase<TC>(type,cclass)
|
||||
{
|
||||
TC* pobj = &this->Obj();
|
||||
RtclGetList& gets = this->fGets;
|
||||
RtclSetList& sets = this->fSets;
|
||||
gets.Add<size_t> ("chunksize",
|
||||
boost::bind(&TC::ChunkSize, pobj));
|
||||
sets.Add<size_t> ("chunksize",
|
||||
boost::bind(&TC::SetChunkSize, pobj, _1));
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlRdmaBase<TC>::~RtclRw11CntlRdmaBase()
|
||||
{}
|
||||
|
||||
|
||||
} // end namespace Retro
|
||||
51
tools/src/librwxxtpp/RtclRw11CntlStreamBase.hpp
Normal file
51
tools/src/librwxxtpp/RtclRw11CntlStreamBase.hpp
Normal file
@@ -0,0 +1,51 @@
|
||||
// $Id: RtclRw11CntlStreamBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlStreamBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlStreamBase.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlStreamBase
|
||||
#define included_Retro_RtclRw11CntlStreamBase 1
|
||||
|
||||
#include "boost/shared_ptr.hpp"
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
template <class TC>
|
||||
class RtclRw11CntlStreamBase : public RtclRw11CntlBase<TC> {
|
||||
public:
|
||||
explicit RtclRw11CntlStreamBase(const std::string& type,
|
||||
const std::string& cclass);
|
||||
~RtclRw11CntlStreamBase();
|
||||
|
||||
protected:
|
||||
virtual int M_default(RtclArgs& args);
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
// implementation is all inline
|
||||
#include "RtclRw11CntlStreamBase.ipp"
|
||||
|
||||
#endif
|
||||
78
tools/src/librwxxtpp/RtclRw11CntlStreamBase.ipp
Normal file
78
tools/src/librwxxtpp/RtclRw11CntlStreamBase.ipp
Normal file
@@ -0,0 +1,78 @@
|
||||
// $Id: RtclRw11CntlStreamBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlStreamBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation (all inline) of RtclRw11CntlStreamBase.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class Retro::RtclRw11CntlStreamBase
|
||||
\brief FIXME_docs
|
||||
*/
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "librtools/RosPrintf.hpp"
|
||||
|
||||
#include "librw11/Rw11UnitStream.hpp"
|
||||
|
||||
// all method definitions in namespace Retro
|
||||
namespace Retro {
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Constructor
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlStreamBase<TC>::RtclRw11CntlStreamBase(const std::string& type,
|
||||
const std::string& cclass)
|
||||
: RtclRw11CntlBase<TC>(type,cclass)
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlStreamBase<TC>::~RtclRw11CntlStreamBase()
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
template <class TC>
|
||||
inline int RtclRw11CntlStreamBase<TC>::M_default(RtclArgs& args)
|
||||
{
|
||||
if (!args.AllDone()) return RtclRw11Cntl::kERR;
|
||||
std::ostringstream sos;
|
||||
TC& cntl = this->Obj();
|
||||
sos << "unit pos at attachurl\n";
|
||||
for (size_t i=0; i<cntl.NUnit(); i++) {
|
||||
Rw11UnitStream& unit = cntl.Unit(i);
|
||||
sos << RosPrintf(unit.Name().c_str(),"-s",4)
|
||||
<< " " << RosPrintf(unit.Pos(),"d",9)
|
||||
<< " " << (unit.IsAttached() ? " y" : " n")
|
||||
<< " " << unit.AttachUrl()
|
||||
<< "\n";
|
||||
}
|
||||
args.AppendResultLines(sos);
|
||||
return RtclRw11Cntl::kOK;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace Retro
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlTM11.cpp 686 2015-06-04 21:08:08Z mueller $
|
||||
// $Id: RtclRw11CntlTM11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2015- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2015-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,12 +13,13 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 add class in ctor; derive from RtclRw11CntlTapeBase
|
||||
// 2015-05-17 683 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlTM11.cpp 686 2015-06-04 21:08:08Z mueller $
|
||||
\version $Id: RtclRw11CntlTM11.cpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation of RtclRw11CntlTM11.
|
||||
*/
|
||||
|
||||
@@ -41,14 +42,8 @@ namespace Retro {
|
||||
//! Constructor
|
||||
|
||||
RtclRw11CntlTM11::RtclRw11CntlTM11()
|
||||
: RtclRw11CntlBase<Rw11CntlTM11>("Rw11CntlTM11")
|
||||
{
|
||||
Rw11CntlTM11* pobj = &Obj();
|
||||
fGets.Add<size_t> ("chunksize",
|
||||
boost::bind(&Rw11CntlTM11::ChunkSize, pobj));
|
||||
fSets.Add<size_t> ("chunksize",
|
||||
boost::bind(&Rw11CntlTM11::SetChunkSize, pobj, _1));
|
||||
}
|
||||
: RtclRw11CntlTapeBase<Rw11CntlTM11>("Rw11CntlTM11","tape")
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Destructor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id: RtclRw11CntlTM11.hpp 686 2015-06-04 21:08:08Z mueller $
|
||||
// $Id: RtclRw11CntlTM11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2015- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2015-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
@@ -13,25 +13,26 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.1 derive from RtclRw11CntlTapeBase
|
||||
// 2015-05-17 683 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlTM11.hpp 686 2015-06-04 21:08:08Z mueller $
|
||||
\version $Id: RtclRw11CntlTM11.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlTM11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlTM11
|
||||
#define included_Retro_RtclRw11CntlTM11 1
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
#include "RtclRw11CntlTapeBase.hpp"
|
||||
#include "librw11/Rw11CntlTM11.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11CntlTM11 : public RtclRw11CntlBase<Rw11CntlTM11> {
|
||||
class RtclRw11CntlTM11 : public RtclRw11CntlTapeBase<Rw11CntlTM11> {
|
||||
public:
|
||||
RtclRw11CntlTM11();
|
||||
~RtclRw11CntlTM11();
|
||||
|
||||
51
tools/src/librwxxtpp/RtclRw11CntlTapeBase.hpp
Normal file
51
tools/src/librwxxtpp/RtclRw11CntlTapeBase.hpp
Normal file
@@ -0,0 +1,51 @@
|
||||
// $Id: RtclRw11CntlTapeBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlTapeBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlTapeBase.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlTapeBase
|
||||
#define included_Retro_RtclRw11CntlTapeBase 1
|
||||
|
||||
#include "boost/shared_ptr.hpp"
|
||||
|
||||
#include "RtclRw11CntlRdmaBase.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
template <class TC>
|
||||
class RtclRw11CntlTapeBase : public RtclRw11CntlRdmaBase<TC> {
|
||||
public:
|
||||
explicit RtclRw11CntlTapeBase(const std::string& type,
|
||||
const std::string& cclass);
|
||||
~RtclRw11CntlTapeBase();
|
||||
|
||||
protected:
|
||||
virtual int M_default(RtclArgs& args);
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
// implementation is all inline
|
||||
#include "RtclRw11CntlTapeBase.ipp"
|
||||
|
||||
#endif
|
||||
85
tools/src/librwxxtpp/RtclRw11CntlTapeBase.ipp
Normal file
85
tools/src/librwxxtpp/RtclRw11CntlTapeBase.ipp
Normal file
@@ -0,0 +1,85 @@
|
||||
// $Id: RtclRw11CntlTapeBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlTapeBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation (all inline) of RtclRw11CntlTapeBase.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class Retro::RtclRw11CntlTapeBase
|
||||
\brief FIXME_docs
|
||||
*/
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "librtools/RosPrintf.hpp"
|
||||
|
||||
#include "librw11/Rw11UnitTape.hpp"
|
||||
|
||||
// all method definitions in namespace Retro
|
||||
namespace Retro {
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Constructor
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlTapeBase<TC>::RtclRw11CntlTapeBase(const std::string& type,
|
||||
const std::string& cclass)
|
||||
: RtclRw11CntlRdmaBase<TC>(type,cclass)
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlTapeBase<TC>::~RtclRw11CntlTapeBase()
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
template <class TC>
|
||||
inline int RtclRw11CntlTapeBase<TC>::M_default(RtclArgs& args)
|
||||
{
|
||||
if (!args.AllDone()) return RtclRw11Cntl::kERR;
|
||||
std::ostringstream sos;
|
||||
TC& cntl = this->Obj();
|
||||
sos << "unit type en wp capacity bot eot eom pfi prec at attachurl\n";
|
||||
for (size_t i=0; i<cntl.NUnit(); i++) {
|
||||
Rw11UnitTape& unit = cntl.Unit(i);
|
||||
sos << RosPrintf(unit.Name().c_str(),"-s",4)
|
||||
<< " " << RosPrintf(unit.Type().c_str(),"-s",4)
|
||||
<< " " << (unit.Enabled() ? " y" : " n")
|
||||
<< " " << (unit.WProt() ? " y" : " n")
|
||||
<< " " << RosPrintf(unit.Capacity(),"d",9)
|
||||
<< " " << (unit.Bot() ? " y" : " n")
|
||||
<< " " << (unit.Eot() ? " y" : " n")
|
||||
<< " " << (unit.Eom() ? " y" : " n")
|
||||
<< " " << RosPrintf(unit.PosFile(),"d",3)
|
||||
<< " " << RosPrintf(unit.PosRecord(),"d",5)
|
||||
<< " " << (unit.IsAttached() ? " y" : " n")
|
||||
<< " " << unit.AttachUrl()
|
||||
<< "\n";
|
||||
}
|
||||
args.AppendResultLines(sos);
|
||||
return RtclRw11Cntl::kOK;
|
||||
}
|
||||
|
||||
} // end namespace Retro
|
||||
51
tools/src/librwxxtpp/RtclRw11CntlTermBase.hpp
Normal file
51
tools/src/librwxxtpp/RtclRw11CntlTermBase.hpp
Normal file
@@ -0,0 +1,51 @@
|
||||
// $Id: RtclRw11CntlTermBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlTermBase.hpp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlTermBase.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlTermBase
|
||||
#define included_Retro_RtclRw11CntlTermBase 1
|
||||
|
||||
#include "boost/shared_ptr.hpp"
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
template <class TC>
|
||||
class RtclRw11CntlTermBase : public RtclRw11CntlBase<TC> {
|
||||
public:
|
||||
explicit RtclRw11CntlTermBase(const std::string& type,
|
||||
const std::string& cclass);
|
||||
~RtclRw11CntlTermBase();
|
||||
|
||||
protected:
|
||||
virtual int M_default(RtclArgs& args);
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
// implementation is all inline
|
||||
#include "RtclRw11CntlTermBase.ipp"
|
||||
|
||||
#endif
|
||||
80
tools/src/librwxxtpp/RtclRw11CntlTermBase.ipp
Normal file
80
tools/src/librwxxtpp/RtclRw11CntlTermBase.ipp
Normal file
@@ -0,0 +1,80 @@
|
||||
// $Id: RtclRw11CntlTermBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
//
|
||||
// Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2017-04-16 878 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlTermBase.ipp 878 2017-04-16 12:28:15Z mueller $
|
||||
\brief Implemenation (all inline) of RtclRw11CntlTermBase.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class Retro::RtclRw11CntlTermBase
|
||||
\brief FIXME_docs
|
||||
*/
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "librtools/RosPrintf.hpp"
|
||||
|
||||
#include "librw11/Rw11UnitTerm.hpp"
|
||||
|
||||
// all method definitions in namespace Retro
|
||||
namespace Retro {
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Constructor
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlTermBase<TC>::RtclRw11CntlTermBase(const std::string& type,
|
||||
const std::string& cclass)
|
||||
: RtclRw11CntlBase<TC>(type,cclass)
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
template <class TC>
|
||||
inline RtclRw11CntlTermBase<TC>::~RtclRw11CntlTermBase()
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
template <class TC>
|
||||
inline int RtclRw11CntlTermBase<TC>::M_default(RtclArgs& args)
|
||||
{
|
||||
if (!args.AllDone()) return RtclRw11Cntl::kERR;
|
||||
std::ostringstream sos;
|
||||
TC& cntl = this->Obj();
|
||||
sos << "unit i7 o7 oe at attachurl\n";
|
||||
for (size_t i=0; i<cntl.NUnit(); i++) {
|
||||
Rw11UnitTerm& unit = cntl.Unit(i);
|
||||
sos << RosPrintf(unit.Name().c_str(),"-s",4)
|
||||
<< " " << (unit.Ti7bit() ? " y" : " n")
|
||||
<< " " << (unit.To7bit() ? " y" : " n")
|
||||
<< " " << (unit.ToEnpc() ? " y" : " n")
|
||||
<< " " << (unit.IsAttached() ? " y" : " n")
|
||||
<< " " << unit.AttachUrl()
|
||||
<< "\n";
|
||||
}
|
||||
args.AppendResultLines(sos);
|
||||
return RtclRw11Cntl::kOK;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace Retro
|
||||
Reference in New Issue
Block a user