winss
|
A supervisor state listener which is race-condition free. More...
#include <state_listener.hpp>
Public Member Functions | |
SuperviseStateListener (const winss::SuperviseStateFile &state_file, SuperviseStateListenerAction action) | |
Supervise state listener constructor. More... | |
SuperviseStateListener (const SuperviseStateListener &)=delete | |
No copy. More... | |
SuperviseStateListener (SuperviseStateListener &&)=delete | |
No move. More... | |
bool | IsEnabled () |
Gets if the listener is enabled. More... | |
bool | CanStart () |
Gets if the listener can start. More... | |
void | HandleConnected () |
Handle the connected event. More... | |
bool | HandleReceived (const std::vector< char > &message) |
Handle the received event. More... | |
SuperviseStateListener & | operator= (const SuperviseStateListener &)=delete |
No copy. More... | |
SuperviseStateListener & | operator= (SuperviseStateListener &&)=delete |
No move. More... | |
![]() | |
virtual | ~InboundControlItemListener () |
Default destructor. More... | |
A supervisor state listener which is race-condition free.
winss::SuperviseStateListener::SuperviseStateListener | ( | const winss::SuperviseStateFile & | state_file, |
winss::SuperviseStateListenerAction | action | ||
) |
Supervise state listener constructor.
state_file | The state file. |
action | The action to listen for. |
|
delete |
No copy.
|
delete |
No move.
|
virtual |
Gets if the listener can start.
Implements winss::InboundControlItemListener.
|
virtual |
Handle the connected event.
Reimplemented from winss::InboundControlItemListener.
References winss::END, winss::FINISHED, winss::SuperviseStateFile::Read(), winss::RUN, winss::WAIT_DOWN, winss::WAIT_FINISHED, winss::WAIT_RESTART, and winss::WAIT_UP.
|
virtual |
Handle the received event.
[in] | message | The message that was received as a list of chars. |
Implements winss::InboundControlItemListener.
References winss::SuperviseController::GetNotification().
|
virtual |
Gets if the listener is enabled.
Implements winss::InboundControlItemListener.
References winss::NO_WAIT.
|
delete |
No copy.
|
delete |
No move.