YARP
Yet Another Robot Platform
RPCMessagesParser Class Reference

Helper object for parsing RPC port messages. More...

#include <ControlBoardWrapper/RPCMessagesParser.h>

+ Inheritance diagram for RPCMessagesParser:

Detailed Description

Helper object for parsing RPC port messages.

Definition at line 55 of file RPCMessagesParser.h.

Public Member Functions

 RPCMessagesParser ()
 Constructor. More...
 
void init (ControlBoardWrapper *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...
 

Protected Attributes

ControlBoardWrapperControlBoardWrapper_p
 
yarp::dev::IPidControlrpc_IPid
 
yarp::dev::IPositionControlrpc_IPosCtrl
 
yarp::dev::IPositionDirectrpc_IPosDirect
 
yarp::dev::IVelocityControlrpc_IVelCtrl
 
yarp::dev::IEncodersTimedrpc_IEncTimed
 
yarp::dev::IMotorEncodersrpc_IMotEnc
 
yarp::dev::IAmplifierControlrcp_IAmp
 
yarp::dev::IControlLimitsrcp_Ilim
 
yarp::dev::ITorqueControlrpc_ITorque
 
yarp::dev::IControlModerpc_iCtrlMode
 
yarp::dev::IAxisInforpc_AxisInfo
 
yarp::dev::IRemoteCalibratorrpc_IRemoteCalibrator
 
yarp::dev::IControlCalibrationrpc_Icalib
 
yarp::dev::IImpedanceControlrpc_IImpedance
 
yarp::dev::IInteractionModerpc_IInteract
 
yarp::dev::IMotorrpc_IMotor
 
yarp::dev::IRemoteVariablesrpc_IVar
 
yarp::dev::ICurrentControlrpc_ICurrent
 
yarp::dev::IPWMControlrpc_IPWM
 
yarp::sig::Vector tmpVect
 
yarp::os::Stamp lastRpcStamp
 
std::mutex mutex
 
int controlledJoints
 

Constructor & Destructor Documentation

◆ RPCMessagesParser()

RPCMessagesParser::RPCMessagesParser ( )

Constructor.

Definition at line 2823 of file RPCMessagesParser.cpp.

Member Function Documentation

◆ handleControlModeMsg()

void RPCMessagesParser::handleControlModeMsg ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 157 of file RPCMessagesParser.cpp.

◆ handleCurrentMsg()

void RPCMessagesParser::handleCurrentMsg ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 850 of file RPCMessagesParser.cpp.

◆ handleImpedanceMsg()

void RPCMessagesParser::handleImpedanceMsg ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 52 of file RPCMessagesParser.cpp.

◆ handleInteractionModeMsg()

void RPCMessagesParser::handleInteractionModeMsg ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 666 of file RPCMessagesParser.cpp.

◆ handlePidMsg()

void RPCMessagesParser::handlePidMsg ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 987 of file RPCMessagesParser.cpp.

◆ handleProtocolVersionRequest()

void RPCMessagesParser::handleProtocolVersionRequest ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 33 of file RPCMessagesParser.cpp.

◆ handlePWMMsg()

void RPCMessagesParser::handlePWMMsg ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 1316 of file RPCMessagesParser.cpp.

◆ handleRemoteCalibratorMsg()

void RPCMessagesParser::handleRemoteCalibratorMsg ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 1502 of file RPCMessagesParser.cpp.

◆ handleRemoteVariablesMsg()

void RPCMessagesParser::handleRemoteVariablesMsg ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 1430 of file RPCMessagesParser.cpp.

◆ handleTorqueMsg()

void RPCMessagesParser::handleTorqueMsg ( const yarp::os::Bottle cmd,
yarp::os::Bottle response,
bool *  rec,
bool *  ok 
)

Definition at line 465 of file RPCMessagesParser.cpp.

◆ init()

void RPCMessagesParser::init ( ControlBoardWrapper x)

Initialization.

Parameters
xis 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 2848 of file RPCMessagesParser.cpp.

◆ initialize()

bool RPCMessagesParser::initialize ( )
virtual

Initialize the internal data.

Returns
true/false on success/failure

Definition at line 2784 of file RPCMessagesParser.cpp.

◆ respond()

bool RPCMessagesParser::respond ( const yarp::os::Bottle command,
yarp::os::Bottle reply 
)
overridevirtual

Respond to a message.

Parameters
commandthe message
replythe response
Returns
true if there was no critical failure

Reimplemented from yarp::dev::DeviceResponder.

Definition at line 1614 of file RPCMessagesParser.cpp.

Member Data Documentation

◆ ControlBoardWrapper_p

ControlBoardWrapper* RPCMessagesParser::ControlBoardWrapper_p
protected

Definition at line 59 of file RPCMessagesParser.h.

◆ controlledJoints

int RPCMessagesParser::controlledJoints
protected

Definition at line 82 of file RPCMessagesParser.h.

◆ lastRpcStamp

yarp::os::Stamp RPCMessagesParser::lastRpcStamp
protected

Definition at line 80 of file RPCMessagesParser.h.

◆ mutex

std::mutex RPCMessagesParser::mutex
protected

Definition at line 81 of file RPCMessagesParser.h.

◆ rcp_IAmp

yarp::dev::IAmplifierControl* RPCMessagesParser::rcp_IAmp
protected

Definition at line 66 of file RPCMessagesParser.h.

◆ rcp_Ilim

yarp::dev::IControlLimits* RPCMessagesParser::rcp_Ilim
protected

Definition at line 67 of file RPCMessagesParser.h.

◆ rpc_AxisInfo

yarp::dev::IAxisInfo* RPCMessagesParser::rpc_AxisInfo
protected

Definition at line 70 of file RPCMessagesParser.h.

◆ rpc_Icalib

yarp::dev::IControlCalibration* RPCMessagesParser::rpc_Icalib
protected

Definition at line 72 of file RPCMessagesParser.h.

◆ rpc_iCtrlMode

yarp::dev::IControlMode* RPCMessagesParser::rpc_iCtrlMode
protected

Definition at line 69 of file RPCMessagesParser.h.

◆ rpc_ICurrent

yarp::dev::ICurrentControl* RPCMessagesParser::rpc_ICurrent
protected

Definition at line 77 of file RPCMessagesParser.h.

◆ rpc_IEncTimed

yarp::dev::IEncodersTimed* RPCMessagesParser::rpc_IEncTimed
protected

Definition at line 64 of file RPCMessagesParser.h.

◆ rpc_IImpedance

yarp::dev::IImpedanceControl* RPCMessagesParser::rpc_IImpedance
protected

Definition at line 73 of file RPCMessagesParser.h.

◆ rpc_IInteract

yarp::dev::IInteractionMode* RPCMessagesParser::rpc_IInteract
protected

Definition at line 74 of file RPCMessagesParser.h.

◆ rpc_IMotEnc

yarp::dev::IMotorEncoders* RPCMessagesParser::rpc_IMotEnc
protected

Definition at line 65 of file RPCMessagesParser.h.

◆ rpc_IMotor

yarp::dev::IMotor* RPCMessagesParser::rpc_IMotor
protected

Definition at line 75 of file RPCMessagesParser.h.

◆ rpc_IPid

yarp::dev::IPidControl* RPCMessagesParser::rpc_IPid
protected

Definition at line 60 of file RPCMessagesParser.h.

◆ rpc_IPosCtrl

yarp::dev::IPositionControl* RPCMessagesParser::rpc_IPosCtrl
protected

Definition at line 61 of file RPCMessagesParser.h.

◆ rpc_IPosDirect

yarp::dev::IPositionDirect* RPCMessagesParser::rpc_IPosDirect
protected

Definition at line 62 of file RPCMessagesParser.h.

◆ rpc_IPWM

yarp::dev::IPWMControl* RPCMessagesParser::rpc_IPWM
protected

Definition at line 78 of file RPCMessagesParser.h.

◆ rpc_IRemoteCalibrator

yarp::dev::IRemoteCalibrator* RPCMessagesParser::rpc_IRemoteCalibrator
protected

Definition at line 71 of file RPCMessagesParser.h.

◆ rpc_ITorque

yarp::dev::ITorqueControl* RPCMessagesParser::rpc_ITorque
protected

Definition at line 68 of file RPCMessagesParser.h.

◆ rpc_IVar

yarp::dev::IRemoteVariables* RPCMessagesParser::rpc_IVar
protected

Definition at line 76 of file RPCMessagesParser.h.

◆ rpc_IVelCtrl

yarp::dev::IVelocityControl* RPCMessagesParser::rpc_IVelCtrl
protected

Definition at line 63 of file RPCMessagesParser.h.

◆ tmpVect

yarp::sig::Vector RPCMessagesParser::tmpVect
protected

Definition at line 79 of file RPCMessagesParser.h.


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