19 class RCState :
public NSMState {
22 static const RCState OFF_S;
23 static const RCState NOTREADY_S;
24 static const RCState READY_S;
25 static const RCState RUNNING_S;
26 static const RCState PAUSED_S;
27 static const RCState CONFIGURING_TS;
28 static const RCState LOADING_TS;
29 static const RCState STARTING_TS;
30 static const RCState STOPPING_TS;
31 static const RCState ERROR_ES;
32 static const RCState FATAL_ES;
33 static const RCState RECOVERING_RS;
34 static const RCState ABORTING_RS;
35 static const RCState BOOTING_RS;
38 RCState() : NSMState(Enum::UNKNOWN) {}
39 RCState(
const Enum& e) : NSMState(e) {}
40 RCState(
const NSMState& num) : NSMState(num) {}
41 RCState(
const RCState& st) : NSMState(st) {}
42 RCState(
const char* st) { *
this = st; }
43 RCState(
const std::string& st) { *
this = st; }
44 RCState(
int id) { *
this = id; }
48 RCState(
int id,
const char* label)
49 : NSMState(
id, label) {}
52 bool isStable()
const {
return getId() > 1 && getId() <= 5; }
53 bool isTransition()
const {
return getId() > 5 && getId() <= 9; }
54 bool isError()
const {
return getId() > 9 && getId() <= 11; }
55 bool isRecovering()
const {
return getId() > 11 && getId() <= 14; }
63 const RCState&
operator=(
const RCState& state);
64 const RCState&
operator=(
const std::string& msg);
65 const RCState&
operator=(
const char* msg);