// $Id: Rw11Unit.hpp 515 2013-05-04 17:28:59Z mueller $
|
// $Id: Rw11Unit.hpp 515 2013-05-04 17:28:59Z mueller $
|
//
|
//
|
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
//
|
//
|
// This program is free software; you may redistribute and/or modify it under
|
// 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
|
// 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.
|
// 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
|
// This program is distributed in the hope that it will be useful, but
|
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
// for complete details.
|
// for complete details.
|
//
|
//
|
// Revision History:
|
// Revision History:
|
// Date Rev Version Comment
|
// Date Rev Version Comment
|
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone()
|
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone()
|
// 2013-05-01 513 1.0.1 add fAttachOpts, (Set)AttachOpts()
|
// 2013-05-01 513 1.0.1 add fAttachOpts, (Set)AttachOpts()
|
// 2013-03-06 495 1.0 Initial version
|
// 2013-03-06 495 1.0 Initial version
|
// 2013-02-13 488 0.1 First draft
|
// 2013-02-13 488 0.1 First draft
|
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
|
|
|
|
/*!
|
/*!
|
\file
|
\file
|
\version $Id: Rw11Unit.hpp 515 2013-05-04 17:28:59Z mueller $
|
\version $Id: Rw11Unit.hpp 515 2013-05-04 17:28:59Z mueller $
|
\brief Declaration of class Rw11Unit.
|
\brief Declaration of class Rw11Unit.
|
*/
|
*/
|
|
|
#ifndef included_Retro_Rw11Unit
|
#ifndef included_Retro_Rw11Unit
|
#define included_Retro_Rw11Unit 1
|
#define included_Retro_Rw11Unit 1
|
|
|
#include <string>
|
#include <string>
|
|
|
#include "boost/utility.hpp"
|
#include "boost/utility.hpp"
|
|
|
#include "librtools/Rstats.hpp"
|
#include "librtools/Rstats.hpp"
|
#include "librtools/RerrMsg.hpp"
|
#include "librtools/RerrMsg.hpp"
|
#include "librlink/RlinkServer.hpp"
|
#include "librlink/RlinkServer.hpp"
|
|
|
#include "librtools/Rbits.hpp"
|
#include "librtools/Rbits.hpp"
|
#include "Rw11Cntl.hpp"
|
#include "Rw11Cntl.hpp"
|
|
|
namespace Retro {
|
namespace Retro {
|
|
|
class Rw11Unit : public Rbits, private boost::noncopyable {
|
class Rw11Unit : public Rbits, private boost::noncopyable {
|
public:
|
public:
|
|
|
Rw11Unit(Rw11Cntl* pcntl, size_t index);
|
Rw11Unit(Rw11Cntl* pcntl, size_t index);
|
virtual ~Rw11Unit();
|
virtual ~Rw11Unit();
|
|
|
size_t Index() const;
|
size_t Index() const;
|
std::string Name() const;
|
std::string Name() const;
|
|
|
void SetAttachOpts(const std::string& opts);
|
void SetAttachOpts(const std::string& opts);
|
const std::string& AttachOpts() const;
|
const std::string& AttachOpts() const;
|
|
|
Rw11Cntl& CntlBase() const;
|
Rw11Cntl& CntlBase() const;
|
Rw11Cpu& Cpu() const;
|
Rw11Cpu& Cpu() const;
|
Rw11& W11() const;
|
Rw11& W11() const;
|
RlinkServer& Server() const;
|
RlinkServer& Server() const;
|
RlinkConnect& Connect() const;
|
RlinkConnect& Connect() const;
|
RlogFile& LogFile() const;
|
RlogFile& LogFile() const;
|
|
|
virtual bool Attach(const std::string& url, RerrMsg& emsg);
|
virtual bool Attach(const std::string& url, RerrMsg& emsg);
|
virtual void Detach();
|
virtual void Detach();
|
|
|
const Rstats& Stats() const;
|
const Rstats& Stats() const;
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const;
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const;
|
|
|
// statistics counter indices
|
// statistics counter indices
|
enum stats {
|
enum stats {
|
kDimStat = 0
|
kDimStat = 0
|
};
|
};
|
|
|
protected:
|
protected:
|
virtual void AttachDone();
|
virtual void AttachDone();
|
virtual void DetachCleanup();
|
virtual void DetachCleanup();
|
virtual void DetachDone();
|
virtual void DetachDone();
|
|
|
private:
|
private:
|
Rw11Unit() {} //!< default ctor blocker
|
Rw11Unit() {} //!< default ctor blocker
|
|
|
protected:
|
protected:
|
Rw11Cntl* fpCntlBase; //!< plain Rw11Cntl ptr
|
Rw11Cntl* fpCntlBase; //!< plain Rw11Cntl ptr
|
size_t fIndex; //!< unit number
|
size_t fIndex; //!< unit number
|
std::string fAttachOpts; //!< unit context options for attach
|
std::string fAttachOpts; //!< unit context options for attach
|
Rstats fStats; //!< statistics
|
Rstats fStats; //!< statistics
|
};
|
};
|
|
|
} // end namespace Retro
|
} // end namespace Retro
|
|
|
#include "Rw11Unit.ipp"
|
#include "Rw11Unit.ipp"
|
|
|
#endif
|
#endif
|
|
|