TwiceAsNice
2019-02-18
|
A ServiceStateMachine keeps track of scheduled and current state (one out of 6). More...
#include <ServiceStateMachine.h>
Public Member Functions | |
ServiceStateMachine (const ServiceState &_state) | |
ctor that jumps into a fixed state. More... | |
ServiceStateMachine () | |
default ctor. Enters in the OFFLINE state. More... | |
ServiceStateMachine (const ServiceStateMachineVar &_sm) | |
ctor copying another state machine. More... | |
ServiceStateMachine (const ServiceStateMachine &_sm) | |
ctor copying another state machine. More... | |
bool | operator== (const ServiceStateMachine &__rhs) const |
compare this state with another More... | |
ServiceStateMachine & | operator= (const Basda::ServiceStateMachine &_sm) |
operator ServiceState () | |
ServiceStateMachine & | init (const ServiceState &_init) |
initialize current previous and next stat with the same state. More... | |
ServiceState | now () const |
retreive the current state More... | |
ServiceState | next () const |
retreive the next (scheduled) state More... | |
ServiceState | last () const |
retreive the penultimate state. More... | |
bool | transit () const |
get the flag that says this is a temporary transiting state. More... | |
bool | isSettled () |
figure out whether the current state equals the next one. More... | |
bool | stateHasChanged () |
figure out whether the current state equals the previous one. More... | |
ServiceStateMachine & | setNow (ServiceState _now) |
set a new state in the "now" slot. More... | |
ServiceStateMachine & | setNext (ServiceState _next) |
update the "next" slot. Also sets the completion state ty "BUSY" More... | |
ServiceStateMachine & | setTransit (bool _t) |
reset the transit flag. More... | |
ServiceStateMachine & | setAction (const std::string &_action, int _percent) |
update the percentage of completion. More... | |
Nice::Completion | completion () const |
ServiceStateMachine (const ServiceState &_state) | |
ctor that jumps into a fixed state. More... | |
ServiceStateMachine () | |
default ctor. Enters in the OFFLINE state. More... | |
ServiceStateMachine (const ServiceStateMachineVar &_sm) | |
ctor copying another state machine. More... | |
ServiceStateMachine (const ServiceStateMachine &_sm) | |
ctor copying another state machine. More... | |
bool | operator== (const ServiceStateMachine &__rhs) const |
compare this state with another More... | |
ServiceStateMachine & | operator= (const Basda::ServiceStateMachine &_sm) |
operator ServiceState () | |
ServiceStateMachine & | init (const ServiceState &_init) |
initialize current previous and next stat with the same state. More... | |
ServiceState | now () const |
retreive the current state More... | |
ServiceState | next () const |
retreive the next (scheduled) state More... | |
ServiceState | last () const |
retreive the penultimate state. More... | |
bool | transit () const |
get the flag that says this is a temporary transiting state. More... | |
bool | isSettled () |
figure out whether the current state equals the next one. More... | |
bool | stateHasChanged () |
figure out whether the current state equals the previous one. More... | |
ServiceStateMachine & | setNow (ServiceState _now) |
set a new state in the "now" slot. More... | |
ServiceStateMachine & | setNext (ServiceState _next) |
update the "next" slot. Also sets the completion state ty "BUSY" More... | |
ServiceStateMachine & | setTransit (bool _t) |
reset the transit flag. More... | |
ServiceStateMachine & | setAction (const std::string &_action, int _percent) |
update the percentage of completion. More... | |
Nice::Completion | completion () const |
Additional Inherited Members | |
![]() | |
::Basda::ServiceState | now |
::Basda::ServiceState | next |
::Basda::ServiceState | last |
bool | transit |
::Nice::CompletionVar | completion |
A ServiceStateMachine keeps track of scheduled and current state (one out of 6).
|
inline |
ctor that jumps into a fixed state.
_state |
|
inline |
default ctor. Enters in the OFFLINE state.
|
inline |
ctor copying another state machine.
_sm | The status that is copied into this state machine. |
|
inline |
ctor copying another state machine.
_sm | The status that is copied into this state machine. |
|
inline |
ctor that jumps into a fixed state.
_state |
|
inline |
default ctor. Enters in the OFFLINE state.
|
inline |
ctor copying another state machine.
_sm | The status that is copied into this state machine. |
|
inline |
ctor copying another state machine.
_sm | The status that is copied into this state machine. |
|
inline |
|
inline |
|
inline |
initialize current previous and next stat with the same state.
_init | The status to enter into. |
Completion percentage is set to zero.
|
inline |
initialize current previous and next stat with the same state.
_init | The status to enter into. |
Completion percentage is set to zero.
|
inline |
figure out whether the current state equals the next one.
|
inline |
figure out whether the current state equals the next one.
|
inline |
retreive the penultimate state.
|
inline |
retreive the penultimate state.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
compare this state with another
__rhs | The right hand side. The other state. |
|
inline |
compare this state with another
__rhs | The right hand side. The other state. |
|
inline |
update the percentage of completion.
_action | The short string that indicates what is to be done. |
_percent | The new percentage. |
|
inline |
update the percentage of completion.
_action | The short string that indicates what is to be done. |
_percent | The new percentage. |
|
inline |
update the "next" slot. Also sets the completion state ty "BUSY"
_next | The state scheduled to come next. |
|
inline |
update the "next" slot. Also sets the completion state ty "BUSY"
_next | The state scheduled to come next. |
|
inline |
set a new state in the "now" slot.
_now | what is to be set as the current state. |
The existing state is saved in the "last" slot.
|
inline |
set a new state in the "now" slot.
_now | what is to be set as the current state. |
The existing state is saved in the "last" slot.
|
inline |
reset the transit flag.
_t | The new flag. |
|
inline |
reset the transit flag.
_t | The new flag. |
|
inline |
figure out whether the current state equals the previous one.
|
inline |
figure out whether the current state equals the previous one.
|
inline |
get the flag that says this is a temporary transiting state.
|
inline |
get the flag that says this is a temporary transiting state.