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) {}
40 RCState(
const Enum& e) : NSMState(e) {}
42 RCState(
const NSMState& num) : NSMState(num) {}
43 RCState(
const RCState& st) : NSMState(st) {}
45 RCState(
const char* st) { *
this = st; }
46 explicit RCState(
const std::string& st) { *
this = st; }
47 explicit RCState(
int id) { *
this = id; }
51 RCState(
int id,
const char* label)
52 : NSMState(
id, label) {}
55 bool isStable()
const {
return getId() > 1 && getId() <= 5; }
56 bool isTransition()
const {
return getId() > 5 && getId() <= 9; }
57 bool isError()
const {
return getId() > 9 && getId() <= 11; }
58 bool isRecovering()
const {
return getId() > 11 && getId() <= 14; }
66 const RCState&
operator=(
const RCState& state);
67 const RCState&
operator=(
const std::string& msg);
68 const RCState&
operator=(
const char* msg);