Helper object for parsing RPC port messages. More...
#include <ControlBoardWrapper/RPCMessagesParser.h>
Public Member Functions | |
RPCMessagesParser ()=default | |
Constructor. More... | |
void | init (yarp::dev::DeviceDriver *x) |
Initialization. More... | |
bool | respond (const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override |
Respond to a message. More... | |
void | handleTorqueMsg (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
void | handleControlModeMsg (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
void | handleImpedanceMsg (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
void | handleInteractionModeMsg (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
void | handleProtocolVersionRequest (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
void | handleRemoteCalibratorMsg (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
void | handleRemoteVariablesMsg (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
void | handleCurrentMsg (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
void | handlePWMMsg (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
void | handlePidMsg (const yarp::os::Bottle &cmd, yarp::os::Bottle &response, bool *rec, bool *ok) |
virtual bool | initialize () |
Initialize the internal data. More... | |
Public Member Functions inherited from yarp::dev::DeviceResponder | |
DeviceResponder () | |
Constructor. More... | |
void | addUsage (const char *txt, const char *explain=nullptr) |
Add information about a message that the respond() method understands. More... | |
void | addUsage (const yarp::os::Bottle &bot, const char *explain=nullptr) |
Add information about a message that the respond() method understands. More... | |
bool | read (yarp::os::ConnectionReader &connection) override |
Handler for reading messages from the network, and passing them on to the respond() method. More... | |
void | onRead (yarp::os::Bottle &v) override |
Alternative handler for reading messages from the network, and passing them on to the respond() method. More... | |
void | makeUsage () |
Regenerate usage information. More... | |
void | attach (yarp::os::TypedReader< yarp::os::Bottle > &source) |
Attach this object to a source of messages. More... | |
Public Member Functions inherited from yarp::os::PortReader | |
virtual | ~PortReader () |
Destructor. More... | |
virtual Type | getReadType () const |
Public Member Functions inherited from yarp::os::TypedReaderCallback< yarp::os::Bottle > | |
virtual | ~TypedReaderCallback () |
Destructor. More... | |
virtual void | onRead (yarp::os::Bottle &datum) |
Callback method. More... | |
virtual void | onRead (yarp::os::Bottle &datum, const yarp::os::TypedReader< yarp::os::Bottle > &reader) |
Callback method. More... | |
Helper object for parsing RPC port messages.
Definition at line 56 of file RPCMessagesParser.h.
|
default |
Constructor.
void RPCMessagesParser::handleControlModeMsg | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 138 of file RPCMessagesParser.cpp.
void RPCMessagesParser::handleCurrentMsg | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 719 of file RPCMessagesParser.cpp.
void RPCMessagesParser::handleImpedanceMsg | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 54 of file RPCMessagesParser.cpp.
void RPCMessagesParser::handleInteractionModeMsg | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 576 of file RPCMessagesParser.cpp.
void RPCMessagesParser::handlePidMsg | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 826 of file RPCMessagesParser.cpp.
void RPCMessagesParser::handleProtocolVersionRequest | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 34 of file RPCMessagesParser.cpp.
void RPCMessagesParser::handlePWMMsg | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 1096 of file RPCMessagesParser.cpp.
void RPCMessagesParser::handleRemoteCalibratorMsg | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 1243 of file RPCMessagesParser.cpp.
void RPCMessagesParser::handleRemoteVariablesMsg | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 1186 of file RPCMessagesParser.cpp.
void RPCMessagesParser::handleTorqueMsg | ( | const yarp::os::Bottle & | cmd, |
yarp::os::Bottle & | response, | ||
bool * | rec, | ||
bool * | ok | ||
) |
Definition at line 409 of file RPCMessagesParser.cpp.
void RPCMessagesParser::init | ( | yarp::dev::DeviceDriver * | x | ) |
Initialization.
x | is the pointer to the instance of the object that uses the RPCMessagesParser. This is required to recover the pointers to the interfaces that implement the responses to the commands. |
Definition at line 2365 of file RPCMessagesParser.cpp.
|
virtual |
Initialize the internal data.
Definition at line 2325 of file RPCMessagesParser.cpp.
|
overridevirtual |
Respond to a message.
command | the message |
reply | the response |
Reimplemented from yarp::dev::DeviceResponder.
Definition at line 1330 of file RPCMessagesParser.cpp.
|
protected |
Definition at line 60 of file RPCMessagesParser.h.
|
protected |
Definition at line 83 of file RPCMessagesParser.h.
|
protected |
Definition at line 81 of file RPCMessagesParser.h.
|
protected |
Definition at line 82 of file RPCMessagesParser.h.
|
protected |
Definition at line 67 of file RPCMessagesParser.h.
|
protected |
Definition at line 68 of file RPCMessagesParser.h.
|
protected |
Definition at line 71 of file RPCMessagesParser.h.
|
protected |
Definition at line 73 of file RPCMessagesParser.h.
|
protected |
Definition at line 70 of file RPCMessagesParser.h.
|
protected |
Definition at line 78 of file RPCMessagesParser.h.
|
protected |
Definition at line 65 of file RPCMessagesParser.h.
|
protected |
Definition at line 74 of file RPCMessagesParser.h.
|
protected |
Definition at line 75 of file RPCMessagesParser.h.
|
protected |
Definition at line 66 of file RPCMessagesParser.h.
|
protected |
Definition at line 76 of file RPCMessagesParser.h.
|
protected |
Definition at line 61 of file RPCMessagesParser.h.
|
protected |
Definition at line 62 of file RPCMessagesParser.h.
|
protected |
Definition at line 63 of file RPCMessagesParser.h.
|
protected |
Definition at line 79 of file RPCMessagesParser.h.
|
protected |
Definition at line 72 of file RPCMessagesParser.h.
|
protected |
Definition at line 69 of file RPCMessagesParser.h.
|
protected |
Definition at line 77 of file RPCMessagesParser.h.
|
protected |
Definition at line 64 of file RPCMessagesParser.h.
|
protected |
Definition at line 80 of file RPCMessagesParser.h.