Belle II Software  release-05-01-25
RFCommand.cc
1 #include "daq/rfarm/manager/RFCommand.h"
2 
3 using namespace Belle2;
4 
5 const RFCommand RFCommand::CONFIGURE(601, "RF_CONFIGURE");
6 const RFCommand RFCommand::UNCONFIGURE(602, "RF_UNCONFIGURE");
7 const RFCommand RFCommand::START(603, "RF_START");
8 const RFCommand RFCommand::STOP(604, "RF_STOP");
9 const RFCommand RFCommand::RESTART(605, "RF_RESTART");
10 const RFCommand RFCommand::PAUSE(606, "RF_PAUSE");
11 const RFCommand RFCommand::RESUME(607, "RF_RESUME");
12 const RFCommand RFCommand::STATUS(608, "RF_STATUS");
13 
14 const RFCommand& RFCommand::operator=(const std::string& label)
15 {
16  if (label == CONFIGURE.getLabel()) *this = CONFIGURE;
17  else if (label == UNCONFIGURE.getLabel()) *this = UNCONFIGURE;
18  else if (label == START.getLabel()) *this = START;
19  else if (label == STOP.getLabel()) *this = STOP;
20  else if (label == RESTART.getLabel()) *this = RESTART;
21  else if (label == PAUSE.getLabel()) *this = PAUSE;
22  else if (label == RESUME.getLabel()) *this = RESUME;
23  else if (label == STATUS.getLabel()) *this = STATUS;
24  else if (label == NSMCommand::OK.getLabel()) *this = NSMCommand::OK;
25  else if (label == NSMCommand::ERROR.getLabel()) *this = NSMCommand::ERROR;
26  else *this = Enum::UNKNOWN;
27  return *this;
28 }
29 
30 const RFCommand& RFCommand::operator=(const char* label)
31 {
32  if (label != NULL) *this = std::string(label);
33  else *this = Enum::UNKNOWN;
34  return *this;
35 }
36 
Belle2::RFCommand
Definition: RFCommand.h:14
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19