9 #ifndef FAIRMQSTATEMACHINE_H_ 10 #define FAIRMQSTATEMACHINE_H_ 12 #include <fairmq/States.h> 14 #include <fairlogger/Logger.h> 32 bool ChangeState(
const Transition transition);
33 bool ChangeState(
const std::string& transition) {
return ChangeState(GetTransition(transition)); }
35 void SubscribeToStateChange(
const std::string& key, std::function<
void(
const State)> callback);
36 void UnsubscribeFromStateChange(
const std::string& key);
38 void HandleStates(std::function<
void(
const State)> callback);
39 void StopHandlingStates();
41 void SubscribeToNewTransition(
const std::string& key, std::function<
void(
const Transition)> callback);
42 void UnsubscribeFromNewTransition(
const std::string& key);
44 bool NewStatePending()
const;
45 void WaitForPendingState()
const;
46 bool WaitForPendingStateFor(
const int durationInMs)
const;
48 State GetCurrentState()
const;
49 std::string GetCurrentStateName()
const;
58 std::shared_ptr<void> fFsm;
Definition: StateMachine.h:55
Definition: StateMachine.h:26
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23