winss
Public Member Functions | List of all members
winss::SuperviseStateListener Class Reference

A supervisor state listener which is race-condition free. More...

#include <state_listener.hpp>

Inheritance diagram for winss::SuperviseStateListener:
Inheritance graph
[legend]
Collaboration diagram for winss::SuperviseStateListener:
Collaboration graph
[legend]

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...
 
SuperviseStateListeneroperator= (const SuperviseStateListener &)=delete
 No copy. More...
 
SuperviseStateListeneroperator= (SuperviseStateListener &&)=delete
 No move. More...
 
- Public Member Functions inherited from winss::InboundControlItemListener
virtual ~InboundControlItemListener ()
 Default destructor. More...
 

Detailed Description

A supervisor state listener which is race-condition free.

Constructor & Destructor Documentation

winss::SuperviseStateListener::SuperviseStateListener ( const winss::SuperviseStateFile state_file,
winss::SuperviseStateListenerAction  action 
)

Supervise state listener constructor.

Parameters
state_fileThe state file.
actionThe action to listen for.
winss::SuperviseStateListener::SuperviseStateListener ( const SuperviseStateListener )
delete

No copy.

winss::SuperviseStateListener::SuperviseStateListener ( SuperviseStateListener &&  )
delete

No move.

Member Function Documentation

bool winss::SuperviseStateListener::CanStart ( )
virtual

Gets if the listener can start.

Returns
True if can start otherwise false.

Implements winss::InboundControlItemListener.

void winss::SuperviseStateListener::HandleConnected ( )
virtual
bool winss::SuperviseStateListener::HandleReceived ( const std::vector< char > &  message)
virtual

Handle the received event.

Parameters
[in]messageThe message that was received as a list of chars.

Implements winss::InboundControlItemListener.

References winss::SuperviseController::GetNotification().

bool winss::SuperviseStateListener::IsEnabled ( )
virtual

Gets if the listener is enabled.

Returns
True if enabled otherwise false.

Implements winss::InboundControlItemListener.

References winss::NO_WAIT.

SuperviseStateListener& winss::SuperviseStateListener::operator= ( const SuperviseStateListener )
delete

No copy.

SuperviseStateListener& winss::SuperviseStateListener::operator= ( SuperviseStateListener &&  )
delete

No move.


The documentation for this class was generated from the following files: