#include <CommandTranslator.hh>
Inheritance diagram for rovsoft::main::CommandTranslator:
Public Member Functions | |
CommandTranslator (messages::MotionCommandMessageReceiver *motionReceiver=0, messages::BoolCommandMessageReceiver *boolReceiver=0, messages::NConfirmationMessageReceiver *confirmationReceiver=0) | |
Construct a CommandTranslator object, with the specified receivers of the filtered messages. | |
virtual void | putNMotionCommandMessage (messages::NMotionCommandMessagePtr message) |
Just calls sendMotionCommand(). | |
virtual void | putNBoolCommandMessage (messages::NBoolCommandMessagePtr message) |
Just calls sendBoolCommand(). | |
virtual void | newMotionCommandReceiver (messages::MotionCommandMessageReceiver &receiver) |
Just calls sendAllMotionCommands(). | |
virtual void | newBoolCommandReceiver (messages::BoolCommandMessageReceiver &receiver) |
Just calls sendAllBoolCommands(). | |
virtual void | setMotionCommandReceiver (messages::MotionCommandMessageReceiver &listener) |
Tries to send motion command messages in motionCommands if motionReceiverWasNull is 1, then sets it to 0. | |
virtual void | setBoolCommandReceiver (messages::BoolCommandMessageReceiver &listener) |
Tries to send bool command messages in boolCommands if boolReceiverWasNull is 1, then sets it to 0. | |
Protected Member Functions | |
void | sendAllMotionCommands () |
Tries to send all motion commands in the motionCommands list. | |
void | sendAllBoolCommands () |
Tries to send all bool commands in the boolCommands list. | |
void | sendMotionCommand (messages::NMotionCommandMessagePtr message) |
Tries to send the translated message to motionCommandReceiver, if it fails it puts it into the motionCommands list. | |
void | sendBoolCommand (messages::NBoolCommandMessagePtr message) |
Tries to send the translated message to boolCommandReceiver, if it fails it puts it into the boolCommands list. | |
Protected Attributes | |
std::list< messages::NMotionCommandMessagePtr > | motionCommands |
A list of motion command messages not yet send because the device didn't exist already or the motion command receiver was not yet set. | |
std::list< messages::NBoolCommandMessagePtr > | boolCommands |
A list of bool command messages not yet send because the device didn't exist already or the bool command receiver was not yet set. | |
unsigned char | motionReceiverWasNull:1 |
Was a motion command message not send, because the motion command receiver was 0:. | |
unsigned char | boolReceiverWasNull:1 |
Was a bool command message not send, because the bool command receiver was 0:. | |
ost::Semaphore | motionLock |
Synchronize the access to the lists. | |
ost::Semaphore | boolLock |
Synchronize the access to the lists. |
Then it sends a confirmation message.
|
Construct a CommandTranslator object, with the specified receivers of the filtered messages.
|
|
Just calls sendAllBoolCommands(). Because now the device previously not existing could exist now. Implements rovsoft::messages::NewBoolCommandReceiverListener. Here is the call graph for this function: ![]() |
|
Just calls sendAllMotionCommands(). Because now the device previously not existing could exist now. Implements rovsoft::messages::NewMotionCommandReceiverListener. Here is the call graph for this function: ![]() |
|
Just calls sendBoolCommand().
Implements rovsoft::messages::NBoolCommandMessageReceiver. Here is the call graph for this function: ![]() |
|
Just calls sendMotionCommand().
Implements rovsoft::messages::NMotionCommandMessageReceiver. Here is the call graph for this function: ![]() |
|
Tries to send all bool commands in the boolCommands list.
Here is the call graph for this function: ![]() |
|
Tries to send all motion commands in the motionCommands list.
Here is the call graph for this function: ![]() |
|
Tries to send the translated message to boolCommandReceiver, if it fails it puts it into the boolCommands list. If it fails because the boolCommandReceiver was 0, then it also sets boolReceiverWasNull. It sends also a confirmation message if confirmationReceiver is not null.
Here is the call graph for this function: ![]() |
|
Tries to send the translated message to motionCommandReceiver, if it fails it puts it into the motionCommands list. If it fails because the motionCommandReceiver was 0, then it also sets motionReceiverWasNull. It sends also a confirmation message if confirmationReceiver is not null.
Here is the call graph for this function: ![]() |
|
Tries to send bool command messages in boolCommands if boolReceiverWasNull is 1, then sets it to 0.
Implements rovsoft::messages::BoolCommandMessageSender. Here is the call graph for this function: ![]() |
|
Tries to send motion command messages in motionCommands if motionReceiverWasNull is 1, then sets it to 0.
Reimplemented from rovsoft::messages::MotionCommandMessageSender. Here is the call graph for this function: ![]() |
|
A list of bool command messages not yet send because the device didn't exist already or the bool command receiver was not yet set.
|
|
Synchronize the access to the lists.
|
|
Was a bool command message not send, because the bool command receiver was 0:.
|
|
A list of motion command messages not yet send because the device didn't exist already or the motion command receiver was not yet set.
|
|
Synchronize the access to the lists.
|
|
Was a motion command message not send, because the motion command receiver was 0:.
|