Belle II Software development
RFCommand.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include "daq/rfarm/manager/RFCommand.h"
9
10using namespace Belle2;
11
12const RFCommand RFCommand::CONFIGURE(601, "RF_CONFIGURE");
13const RFCommand RFCommand::UNCONFIGURE(602, "RF_UNCONFIGURE");
14const RFCommand RFCommand::START(603, "RF_START");
15const RFCommand RFCommand::STOP(604, "RF_STOP");
16const RFCommand RFCommand::RESTART(605, "RF_RESTART");
17const RFCommand RFCommand::PAUSE(606, "RF_PAUSE");
18const RFCommand RFCommand::RESUME(607, "RF_RESUME");
19const RFCommand RFCommand::STATUS(608, "RF_STATUS");
20
22{
23 NSMCommand::operator=(command);
24 return *this;
25}
26
27const RFCommand& RFCommand::operator=(const std::string& label)
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}
42
43const RFCommand& RFCommand::operator=(const char* label)
44{
45 if (label != NULL) *this = std::string(label);
46 else *this = Enum::UNKNOWN;
47 return *this;
48}
49
const NSMCommand & operator=(const NSMCommand &command)
Operator =.
Definition: NSMCommand.cc:32
const RFCommand & operator=(const RFCommand &command)
Operator =.
Definition: RFCommand.cc:21
Abstract base class for different kinds of events.