Implements the state machine for FairMQ devices.
More...
#include <fairmq/StateMachine.h>
|
enum | State : int {
Ok,
Error,
Idle,
InitializingDevice,
DeviceReady,
InitializingTask,
Ready,
Running,
ResettingTask,
ResettingDevice,
Exiting
} |
|
enum | StateTransition : int {
InitDevice,
InitTask,
Run,
Stop,
ResetTask,
ResetDevice,
End,
ErrorFound,
Automatic
} |
|
|
auto | SubscribeToStateChange (const std::string &subscriber, std::function< void(typename StateChange::KeyType newState, State lastState)> callback) -> void |
|
auto | UnsubscribeFromStateChange (const std::string &subscriber) -> void |
|
auto | SubscribeToStateQueued (const std::string &subscriber, std::function< void(typename StateQueued::KeyType newState, State lastState)> callback) -> void |
|
auto | UnsubscribeFromStateQueued (const std::string &subscriber) -> void |
|
auto | GetCurrentState () const -> State |
|
auto | GetCurrentErrorState () const -> State |
|
auto | GetLastQueuedState () const -> State |
|
auto | ChangeState (StateTransition transition) -> void |
|
auto | Run () -> void |
|
auto | Reset () -> void |
|
auto | NextStatePending () -> bool |
|
|
static auto | ToState (const std::string &state) -> State |
| Convert string to State. More...
|
|
static auto | ToStateTransition (const std::string &transition) -> StateTransition |
| Convert string to StateTransition. More...
|
|
static auto | ToStr (State state) -> std::string |
| Convert State to string. More...
|
|
static auto | ToStr (StateTransition transition) -> std::string |
| Convert StateTransition to string. More...
|
|
|
auto | operator<< (std::ostream &os, const State &state) -> std::ostream & |
|
auto | operator<< (std::ostream &os, const StateTransition &transition) -> std::ostream & |
|
◆ ToState()
static auto fair::mq::StateMachine::ToState |
( |
const std::string & |
state | ) |
-> State |
|
inlinestatic |
Convert string to State.
- Parameters
-
- Returns
- State enum entry
- Exceptions
-
std::out_of_range | if a string cannot be resolved to a State |
◆ ToStateTransition()
static auto fair::mq::StateMachine::ToStateTransition |
( |
const std::string & |
transition | ) |
-> StateTransition |
|
inlinestatic |
Convert string to StateTransition.
- Parameters
-
- Returns
- StateTransition enum entry
- Exceptions
-
std::out_of_range | if a string cannot be resolved to a StateTransition |
◆ ToStr() [1/2]
static auto fair::mq::StateMachine::ToStr |
( |
State |
state | ) |
-> std::string |
|
inlinestatic |
Convert State to string.
- Parameters
-
- Returns
- string representation of State enum entry
◆ ToStr() [2/2]
static auto fair::mq::StateMachine::ToStr |
( |
StateTransition |
transition | ) |
-> std::string |
|
inlinestatic |
Convert StateTransition to string.
- Parameters
-
- Returns
- string representation of StateTransition enum entry
The documentation for this class was generated from the following files: