Safir SDK Core
|
Class that provides subscription and filtering for BackdoorCommands. More...
#include <Safir/Application/BackdoorKeeper.h>
Public Member Functions | |
BackdoorKeeper (const Safir::Dob::ConnectionBase &connection) | |
Constructor. More... | |
virtual | ~BackdoorKeeper () |
Destructor. More... | |
void | Start (Safir::Application::Backdoor &backdoor) |
Starts subscription for backdoor commands to be sent to the Backdoor. More... | |
void | Stop () |
Stops subscription for backdoor commands. More... | |
bool | IsStarted () const |
Check if the backdoor keeper has been started. More... | |
Public Member Functions inherited from Safir::Dob::MessageSubscriber | |
virtual | ~MessageSubscriber () |
Virtual destructor is needed since we have virtual member functions. More... | |
Public Member Functions inherited from Safir::Dob::Internal::ConsumerBase | |
virtual | ~ConsumerBase () |
Class that provides subscription and filtering for BackdoorCommands.
Use this class to "keep" the Backdoor. After Start is called your Backdoor will be called every time there is a Command aimed for the given connection.
|
explicit |
Constructor.
connection | [in] The connection on which the keeper will subscribe to backdoor messages. |
|
virtual |
Destructor.
bool Safir::Application::BackdoorKeeper::IsStarted | ( | ) | const |
Check if the backdoor keeper has been started.
void Safir::Application::BackdoorKeeper::Start | ( | Safir::Application::Backdoor & | backdoor | ) |
Starts subscription for backdoor commands to be sent to the Backdoor.
The connection that was passed in the constructor must be opened before Start is called.
If the connection is closed and opened again (maybe in a different context) this method must be called again to establish the subscription.
The class supports restarting/pausing by calling stop and then start again.
backdoor | [in] - Class that implements the Backdoor interface. |
Safir::Dob::NotOpenException | 'Start' was called before connect to Dob. |
void Safir::Application::BackdoorKeeper::Stop | ( | ) |
Stops subscription for backdoor commands.
The backdoor can be started again by calling start after it has been stopped.