1 #include "daq/slc/nsm/NSMCommand.h"
10 const NSMCommand NSMCommand::LOGSET(6,
"LOGSET");
11 const NSMCommand NSMCommand::LOGGET(7,
"LOGGET");
14 const NSMCommand NSMCommand::VREPLY(13,
"VREPLY");
15 const NSMCommand NSMCommand::VLISTGET(14,
"VLISTGET");
16 const NSMCommand NSMCommand::VLISTSET(15,
"VLISTSET");
17 const NSMCommand NSMCommand::DATAGET(401,
"DATAGET");
18 const NSMCommand NSMCommand::DATASET(402,
"DATASET");
19 const NSMCommand NSMCommand::DBSET(403,
"DBSET");
20 const NSMCommand NSMCommand::DBGET(404,
"DBGET");
21 const NSMCommand NSMCommand::DBLISTSET(405,
"DBLISTSET");
22 const NSMCommand NSMCommand::DBLISTGET(406,
"DBLISTGET");
23 const NSMCommand NSMCommand::LOGLIST(407,
"LOGLIST");
25 const NSMCommand& NSMCommand::operator=(
const std::string& label)
27 if (label == LOG.getLabel()) *
this = LOG;
28 else if (label == OK.getLabel()) *
this = OK;
29 else if (label == ERROR.getLabel()) *
this = ERROR;
30 else if (label == FATAL.getLabel()) *
this = FATAL;
31 else if (label == LOG.getLabel()) *
this = LOG;
32 else if (label == LOGSET.getLabel()) *
this = LOGSET;
33 else if (label == LOGGET.getLabel()) *
this = LOGGET;
34 else if (label == STATE.getLabel()) *
this = STATE;
35 else if (label == VGET.getLabel()) *
this = VGET;
36 else if (label == VSET.getLabel()) *
this = VSET;
37 else if (label == VREPLY.getLabel()) *
this = VREPLY;
38 else if (label == VLISTGET.getLabel()) *
this = VLISTGET;
39 else if (label == VLISTSET.getLabel()) *
this = VLISTSET;
40 else if (label == DATAGET.getLabel()) *
this = DATAGET;
41 else if (label == DATASET.getLabel()) *
this = DATASET;
42 else if (label == DBSET.getLabel()) *
this = DBSET;
43 else if (label == DBGET.getLabel()) *
this = DBGET;
44 else if (label == DBLISTSET.getLabel()) *
this = DBLISTSET;
45 else if (label == DBLISTGET.getLabel()) *
this = DBLISTGET;
46 else if (label == LOGLIST.getLabel()) *
this = LOGLIST;
47 else *
this = Enum::UNKNOWN;
51 const NSMCommand& NSMCommand::operator=(
int id)
53 if (
id == LOG.getId()) *
this = LOG;
54 else if (
id == OK.getId()) *
this = OK;
55 else if (
id == ERROR.getId()) *
this = ERROR;
56 else if (
id == FATAL.getId()) *
this = FATAL;
57 else if (
id == LOG.getId()) *
this = LOG;
58 else if (
id == LOGSET.getId()) *
this = LOGSET;
59 else if (
id == LOGGET.getId()) *
this = LOGGET;
60 else if (
id == STATE.getId()) *
this = STATE;
61 else if (
id == VSET.getId()) *
this = VSET;
62 else if (
id == VGET.getId()) *
this = VGET;
63 else if (
id == VREPLY.getId()) *
this = VREPLY;
64 else if (
id == VLISTSET.getId()) *
this = VLISTSET;
65 else if (
id == VLISTGET.getId()) *
this = VLISTGET;
66 else if (
id == DATASET.getId()) *
this = DATASET;
67 else if (
id == DATAGET.getId()) *
this = DATAGET;
68 else if (
id == DBSET.getId()) *
this = DBSET;
69 else if (
id == DBGET.getId()) *
this = DBGET;
70 else if (
id == DBLISTSET.getId()) *
this = DBLISTSET;
71 else if (
id == DBLISTGET.getId()) *
this = DBLISTGET;
72 else if (
id == LOGLIST.getId()) *
this = LOGLIST;
73 else *
this = Enum::UNKNOWN;
77 const NSMCommand& NSMCommand::operator=(
const char* label)
79 if (label != NULL) *
this = std::string(label);
80 else *
this = Enum::UNKNOWN;