1 #include "daq/rfarm/manager/RFCommand.h"
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");
14 const RFCommand& RFCommand::operator=(
const std::string& label)
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;
30 const RFCommand& RFCommand::operator=(
const char* label)
32 if (label != NULL) *
this = std::string(label);
33 else *
this = Enum::UNKNOWN;