Belle II Software development
RFCommand Class Reference
Inheritance diagram for RFCommand:
NSMCommand Enum

Public Member Functions

 RFCommand (const Enum &e)
 
 RFCommand (const NSMCommand &cmd)
 
 RFCommand (const RFCommand &cmd)
 
 RFCommand (const char *label)
 
State nextState () const
 
const RFCommandoperator= (const RFCommand &command)
 Operator =.
 
const RFCommandoperator= (const std::string &label)
 
const RFCommandoperator= (const char *label)
 
int getId () const
 
const char * getLabel () const
 
const std::string & getLabelString () const
 
bool operator== (const Enum &e) const
 
bool operator== (const std::string &label) const
 
bool operator!= (const Enum &e) const
 
bool operator!= (const std::string &label) const
 

Static Public Attributes

static const RFCommand CONFIGURE
 
static const RFCommand UNCONFIGURE
 
static const RFCommand START
 
static const RFCommand STOP
 
static const RFCommand RESTART
 
static const RFCommand PAUSE
 
static const RFCommand RESUME
 
static const RFCommand STATUS
 
static const NSMCommand OK
 
static const NSMCommand STATE
 
static const NSMCommand ERROR
 
static const NSMCommand FATAL
 
static const NSMCommand LOG
 
static const NSMCommand LOGSET
 
static const NSMCommand LOGGET
 
static const NSMCommand VLISTGET
 
static const NSMCommand VLISTSET
 
static const NSMCommand VGET
 
static const NSMCommand VSET
 
static const NSMCommand VREPLY
 
static const NSMCommand DATAGET
 
static const NSMCommand DATASET
 
static const NSMCommand DBGET
 
static const NSMCommand DBSET
 
static const NSMCommand DBLISTGET
 
static const NSMCommand DBLISTSET
 
static const NSMCommand LOGLIST
 
static const int SUGGESTED = 2
 
static const int ENABLED = 1
 
static const int DISABLED = 0
 
static const Enum UNKNOWN
 

Protected Member Functions

 RFCommand (int id, const char *label)
 

Private Attributes

int m_id
 
std::string m_label
 

Detailed Description

Definition at line 21 of file RFCommand.h.

Constructor & Destructor Documentation

◆ RFCommand() [1/6]

RFCommand ( )
inline

Definition at line 34 of file RFCommand.h.

34{}

◆ RFCommand() [2/6]

RFCommand ( const Enum e)
inline

Definition at line 35 of file RFCommand.h.

35: NSMCommand(e) {}

◆ RFCommand() [3/6]

RFCommand ( const NSMCommand cmd)
inline

Definition at line 36 of file RFCommand.h.

36: NSMCommand(cmd) {}

◆ RFCommand() [4/6]

RFCommand ( const RFCommand cmd)
inline

Definition at line 37 of file RFCommand.h.

37: NSMCommand(cmd) {}

◆ RFCommand() [5/6]

RFCommand ( const char *  label)
inline

Definition at line 38 of file RFCommand.h.

38{ *this = label; }

◆ ~RFCommand()

~RFCommand ( )
inline

Definition at line 39 of file RFCommand.h.

39{}

◆ RFCommand() [6/6]

RFCommand ( int  id,
const char *  label 
)
inlineprotected

Definition at line 42 of file RFCommand.h.

43 : NSMCommand(id, label) {}

Member Function Documentation

◆ getId()

int getId ( ) const
inlineinherited

Definition at line 34 of file Enum.h.

34{ return m_id; }

◆ getLabel()

const char * getLabel ( ) const
inlineinherited

Definition at line 35 of file Enum.h.

35{ return m_label.c_str(); }

◆ getLabelString()

const std::string & getLabelString ( ) const
inlineinherited

Definition at line 36 of file Enum.h.

36{ return m_label; }

◆ operator=() [1/3]

const RFCommand & operator= ( const char *  label)

Definition at line 43 of file RFCommand.cc.

44{
45 if (label != NULL) *this = std::string(label);
46 else *this = Enum::UNKNOWN;
47 return *this;
48}

◆ operator=() [2/3]

const RFCommand & operator= ( const RFCommand command)

Operator =.

Definition at line 21 of file RFCommand.cc.

22{
23 NSMCommand::operator=(command);
24 return *this;
25}
const NSMCommand & operator=(const NSMCommand &command)
Operator =.
Definition: NSMCommand.cc:32

◆ operator=() [3/3]

const RFCommand & operator= ( const std::string &  label)

Definition at line 27 of file RFCommand.cc.

28{
29 if (label == CONFIGURE.getLabel()) *this = CONFIGURE;
30 else if (label == UNCONFIGURE.getLabel()) *this = UNCONFIGURE;
31 else if (label == START.getLabel()) *this = START;
32 else if (label == STOP.getLabel()) *this = STOP;
33 else if (label == RESTART.getLabel()) *this = RESTART;
34 else if (label == PAUSE.getLabel()) *this = PAUSE;
35 else if (label == RESUME.getLabel()) *this = RESUME;
36 else if (label == STATUS.getLabel()) *this = STATUS;
37 else if (label == NSMCommand::OK.getLabel()) *this = NSMCommand::OK;
38 else if (label == NSMCommand::ERROR.getLabel()) *this = NSMCommand::ERROR;
39 else *this = Enum::UNKNOWN;
40 return *this;
41}

Member Data Documentation

◆ CONFIGURE

const RFCommand CONFIGURE
static

Definition at line 24 of file RFCommand.h.

◆ DATAGET

const NSMCommand DATAGET
staticinherited

Definition at line 36 of file NSMCommand.h.

◆ DATASET

const NSMCommand DATASET
staticinherited

Definition at line 37 of file NSMCommand.h.

◆ DBGET

const NSMCommand DBGET
staticinherited

Definition at line 38 of file NSMCommand.h.

◆ DBLISTGET

const NSMCommand DBLISTGET
staticinherited

Definition at line 40 of file NSMCommand.h.

◆ DBLISTSET

const NSMCommand DBLISTSET
staticinherited

Definition at line 41 of file NSMCommand.h.

◆ DBSET

const NSMCommand DBSET
staticinherited

Definition at line 39 of file NSMCommand.h.

◆ DISABLED

const int DISABLED = 0
staticinherited

Definition at line 47 of file NSMCommand.h.

◆ ENABLED

const int ENABLED = 1
staticinherited

Definition at line 46 of file NSMCommand.h.

◆ ERROR

const NSMCommand ERROR
staticinherited

Definition at line 24 of file NSMCommand.h.

◆ FATAL

const NSMCommand FATAL
staticinherited

Definition at line 25 of file NSMCommand.h.

◆ LOG

const NSMCommand LOG
staticinherited

Definition at line 26 of file NSMCommand.h.

◆ LOGGET

const NSMCommand LOGGET
staticinherited

Definition at line 28 of file NSMCommand.h.

◆ LOGLIST

const NSMCommand LOGLIST
staticinherited

Definition at line 42 of file NSMCommand.h.

◆ LOGSET

const NSMCommand LOGSET
staticinherited

Definition at line 27 of file NSMCommand.h.

◆ m_id

int m_id
privateinherited

Definition at line 45 of file Enum.h.

◆ m_label

std::string m_label
privateinherited

Definition at line 46 of file Enum.h.

◆ OK

const NSMCommand OK
staticinherited

Definition at line 22 of file NSMCommand.h.

◆ PAUSE

const RFCommand PAUSE
static

Definition at line 29 of file RFCommand.h.

◆ RESTART

const RFCommand RESTART
static

Definition at line 28 of file RFCommand.h.

◆ RESUME

const RFCommand RESUME
static

Definition at line 30 of file RFCommand.h.

◆ START

const RFCommand START
static

Definition at line 26 of file RFCommand.h.

◆ STATE

const NSMCommand STATE
staticinherited

Definition at line 23 of file NSMCommand.h.

◆ STATUS

const RFCommand STATUS
static

Definition at line 31 of file RFCommand.h.

◆ STOP

const RFCommand STOP
static

Definition at line 27 of file RFCommand.h.

◆ SUGGESTED

const int SUGGESTED = 2
staticinherited

Definition at line 45 of file NSMCommand.h.

◆ UNCONFIGURE

const RFCommand UNCONFIGURE
static

Definition at line 25 of file RFCommand.h.

◆ UNKNOWN

const Enum UNKNOWN
staticinherited

Definition at line 22 of file Enum.h.

◆ VGET

const NSMCommand VGET
staticinherited

Definition at line 31 of file NSMCommand.h.

◆ VLISTGET

const NSMCommand VLISTGET
staticinherited

Definition at line 29 of file NSMCommand.h.

◆ VLISTSET

const NSMCommand VLISTSET
staticinherited

Definition at line 30 of file NSMCommand.h.

◆ VREPLY

const NSMCommand VREPLY
staticinherited

Definition at line 33 of file NSMCommand.h.

◆ VSET

const NSMCommand VSET
staticinherited

Definition at line 32 of file NSMCommand.h.


The documentation for this class was generated from the following files: