Control Libraries 7.4.0
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
clproto Namespace Reference

Bindings to encode and decode state objects into serialised binary message. More...

Classes

class  DecodingException
 A DecodingException is raised whenever a decoding operation fails due to invalid encoding. More...
 
class  JsonParsingException
 A JsonParsingException is raised whenever a JSON conversion operation fails due to invalid encoding. More...
 

Typedefs

typedef uint32_t field_length_t
 Size type used to indicate number of fields and field data length in pack_fields() and unpack_fields() methods.
 

Enumerations

enum  MessageType {
  UNKNOWN_MESSAGE = 0 , STATE_MESSAGE = 1 , SPATIAL_STATE_MESSAGE = 2 , CARTESIAN_STATE_MESSAGE = 3 ,
  CARTESIAN_POSE_MESSAGE = 4 , CARTESIAN_TWIST_MESSAGE = 5 , CARTESIAN_ACCELERATION_MESSAGE = 6 , CARTESIAN_WRENCH_MESSAGE = 7 ,
  JACOBIAN_MESSAGE = 8 , JOINT_STATE_MESSAGE = 9 , JOINT_POSITIONS_MESSAGE = 10 , JOINT_VELOCITIES_MESSAGE = 11 ,
  JOINT_ACCELERATIONS_MESSAGE = 12 , JOINT_TORQUES_MESSAGE = 13 , SHAPE_MESSAGE = 14 , ELLIPSOID_MESSAGE = 15 ,
  PARAMETER_MESSAGE = 16 , DIGITAL_IO_STATE_MESSAGE = 17 , ANALOG_IO_STATE_MESSAGE = 18
}
 The MessageType enumeration contains the possible message types in the clproto. More...
 
enum  ParameterMessageType {
  UNKNOWN_PARAMETER = 0 , INT = 9 , INT_ARRAY = 10 , DOUBLE = 1 ,
  DOUBLE_ARRAY = 2 , BOOL = 3 , BOOL_ARRAY = 4 , STRING = 5 ,
  STRING_ARRAY = 6 , MATRIX = 7 , VECTOR = 8
}
 The ParameterMessageType enumeration contains the possible value types contained in a parameter message. More...
 

Functions

bool is_valid (const std::string &msg)
 Check if a serialized binary string can be decoded into a support control libraries message type.
 
MessageType check_message_type (const std::string &msg)
 Check which control libraries message type a serialized binary string can be decoded as, if at all.
 
ParameterMessageType check_parameter_message_type (const std::string &msg)
 Check which control libraries parameter type a serialized binary string can be decoded as, if at all.
 
template<typename T >
std::string encode (const T &obj)
 Encode a control libraries object into a serialized binary string representation (wire format).
 
template<typename T >
T decode (const std::string &msg)
 Decode a serialized binary string from wire format into a control libraries object instance.
 
template<typename T >
bool decode (const std::string &msg, T &obj)
 Exception safe decoding of a serialized binary string wire format into a control libraries object instance.
 
void pack_fields (const std::vector< std::string > &fields, char *data)
 Pack an ordered vector of encoded field messages into a single data array.
 
std::vector< std::string > unpack_fields (const char *data)
 Unpack a data array into an ordered vector of encoded field messages.
 
std::string to_json (const std::string &msg)
 Convert a serialized binary string from wire format into a JSON formatted state message description.
 
template<typename T >
std::string to_json (const T &obj)
 Convert a control libraries object into into a JSON formatted state message description.
 
std::string from_json (const std::string &json)
 Convert a JSON formatted state message description into a serialized binary string representation (wire format).
 
template<typename T >
T from_json (const std::string &json)
 Convert a JSON formatted state message description into a control libraries object instance.
 
template<typename FieldT >
std::vector< FieldTdecoder (const google::protobuf::RepeatedField< FieldT > &message)
 Decoding helper method for a RepeatedField message into vector data.
 
template<typename FieldT >
std::vector< FieldTdecoder (const google::protobuf::RepeatedPtrField< FieldT > &message)
 Decoding helper method for a RepeatedPtrField message into vector data.
 
template<typename ParamT >
state_representation::Parameter< ParamTdecoder (const state_representation::proto::Parameter &message)
 Decoding helper method for the Parameter type.
 
std::vector< booldecoder (const google::protobuf::RepeatedField< bool > &message)
 
Eigen::Vector3d decoder (const state_representation::proto::Vector3d &message)
 
Eigen::Quaterniond decoder (const state_representation::proto::Quaterniond &message)
 
template<typename ParamT >
state_representation::proto::Parameter encoder (state_representation::proto::Parameter &message, const state_representation::Parameter< ParamT > &parameter)
 Encoding helper method for the Parameter type.
 
template<typename ParamT >
state_representation::proto::Parameter encoder (const state_representation::Parameter< ParamT > &parameter)
 Encoding helper method for the Parameter type.
 
template<typename FieldT >
google::protobuf::RepeatedField< FieldTencoder (const std::vector< FieldT > &data)
 Encoding helper method for vector data into a RepeatedField message type.
 
google::protobuf::RepeatedField< doublematrix_encoder (const Eigen::MatrixXd &matrix)
 Encoding helper method for Eigen data into a RepeatedField message type.
 
state_representation::proto::State encoder (const state_representation::State &state)
 
state_representation::proto::SpatialState encoder (const state_representation::SpatialState &spatial_state)
 
state_representation::proto::Vector3d encoder (const Eigen::Vector3d &vector)
 
state_representation::proto::Quaterniond encoder (const Eigen::Quaterniond &quaternion)
 
state_representation::proto::CartesianState encoder (const state_representation::CartesianState &cartesian_state)
 
state_representation::proto::Jacobian encoder (const state_representation::Jacobian &jacobian)
 
state_representation::proto::JointState encoder (const state_representation::JointState &joint_state)
 
state_representation::proto::AnalogIOState encoder (const state_representation::AnalogIOState &analog_io_state)
 
state_representation::proto::DigitalIOState encoder (const state_representation::DigitalIOState &digital_io_state)
 
template<>
std::string encode< State > (const State &obj)
 
template<>
State decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, State &obj)
 
template<>
std::string encode< State > (const State &obj)
 
template<>
State decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, State &obj)
 
template<>
std::string encode< AnalogIOState > (const AnalogIOState &obj)
 
template<>
AnalogIOState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, AnalogIOState &obj)
 
template<>
std::string encode< AnalogIOState > (const AnalogIOState &obj)
 
template<>
AnalogIOState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, AnalogIOState &obj)
 
template<>
std::string encode< DigitalIOState > (const DigitalIOState &obj)
 
template<>
DigitalIOState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, DigitalIOState &obj)
 
template<>
std::string encode< DigitalIOState > (const DigitalIOState &obj)
 
template<>
DigitalIOState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, DigitalIOState &obj)
 
template<>
std::string encode< SpatialState > (const SpatialState &obj)
 
template<>
SpatialState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, SpatialState &obj)
 
template<>
std::string encode< SpatialState > (const SpatialState &obj)
 
template<>
SpatialState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, SpatialState &obj)
 
template<>
std::string encode< CartesianState > (const CartesianState &obj)
 
template<>
CartesianState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianState &obj)
 
template<>
std::string encode< CartesianState > (const CartesianState &obj)
 
template<>
CartesianState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianState &obj)
 
template<>
std::string encode< CartesianPose > (const CartesianPose &obj)
 
template<>
CartesianPose decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianPose &obj)
 
template<>
std::string encode< CartesianPose > (const CartesianPose &obj)
 
template<>
CartesianPose decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianPose &obj)
 
template<>
std::string encode< CartesianTwist > (const CartesianTwist &obj)
 
template<>
CartesianTwist decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianTwist &obj)
 
template<>
std::string encode< CartesianTwist > (const CartesianTwist &obj)
 
template<>
CartesianTwist decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianTwist &obj)
 
template<>
std::string encode< CartesianAcceleration > (const CartesianAcceleration &obj)
 
template<>
CartesianAcceleration decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianAcceleration &obj)
 
template<>
std::string encode< CartesianAcceleration > (const CartesianAcceleration &obj)
 
template<>
CartesianAcceleration decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianAcceleration &obj)
 
template<>
std::string encode< CartesianWrench > (const CartesianWrench &obj)
 
template<>
CartesianWrench decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianWrench &obj)
 
template<>
std::string encode< CartesianWrench > (const CartesianWrench &obj)
 
template<>
CartesianWrench decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, CartesianWrench &obj)
 
template<>
std::string encode< Jacobian > (const Jacobian &obj)
 
template<>
Jacobian decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Jacobian &obj)
 
template<>
std::string encode< Jacobian > (const Jacobian &obj)
 
template<>
Jacobian decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Jacobian &obj)
 
template<>
std::string encode< JointState > (const JointState &obj)
 
template<>
JointState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointState &obj)
 
template<>
std::string encode< JointState > (const JointState &obj)
 
template<>
JointState decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointState &obj)
 
template<>
std::string encode< JointPositions > (const JointPositions &obj)
 
template<>
JointPositions decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointPositions &obj)
 
template<>
std::string encode< JointPositions > (const JointPositions &obj)
 
template<>
JointPositions decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointPositions &obj)
 
template<>
std::string encode< JointVelocities > (const JointVelocities &obj)
 
template<>
JointVelocities decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointVelocities &obj)
 
template<>
std::string encode< JointVelocities > (const JointVelocities &obj)
 
template<>
JointVelocities decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointVelocities &obj)
 
template<>
std::string encode< JointAccelerations > (const JointAccelerations &obj)
 
template<>
JointAccelerations decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointAccelerations &obj)
 
template<>
std::string encode< JointAccelerations > (const JointAccelerations &obj)
 
template<>
JointAccelerations decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointAccelerations &obj)
 
template<>
std::string encode< JointTorques > (const JointTorques &obj)
 
template<>
JointTorques decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointTorques &obj)
 
template<>
std::string encode< JointTorques > (const JointTorques &obj)
 
template<>
JointTorques decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, JointTorques &obj)
 
template<>
std::string encode< Parameter< int > > (const Parameter< int > &obj)
 
template<>
Parameter< intdecode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< int > &obj)
 
template<>
std::string encode< Parameter< int > > (const Parameter< int > &obj)
 
template<>
Parameter< intdecode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< int > &obj)
 
template<>
std::string encode< Parameter< std::vector< int > > > (const Parameter< std::vector< int > > &obj)
 
template<>
Parameter< std::vector< int > > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::vector< int > > &obj)
 
template<>
std::string encode< Parameter< std::vector< int > > > (const Parameter< std::vector< int > > &obj)
 
template<>
Parameter< std::vector< int > > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::vector< int > > &obj)
 
template<>
std::string encode< Parameter< double > > (const Parameter< double > &obj)
 
template<>
Parameter< doubledecode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< double > &obj)
 
template<>
std::string encode< Parameter< double > > (const Parameter< double > &obj)
 
template<>
Parameter< doubledecode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< double > &obj)
 
template<>
std::string encode< Parameter< std::vector< double > > > (const Parameter< std::vector< double > > &obj)
 
template<>
Parameter< std::vector< double > > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::vector< double > > &obj)
 
template<>
std::string encode< Parameter< std::vector< double > > > (const Parameter< std::vector< double > > &obj)
 
template<>
Parameter< std::vector< double > > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::vector< double > > &obj)
 
template<>
std::string encode< Parameter< bool > > (const Parameter< bool > &obj)
 
template<>
Parameter< booldecode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< bool > &obj)
 
template<>
std::string encode< Parameter< bool > > (const Parameter< bool > &obj)
 
template<>
Parameter< booldecode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< bool > &obj)
 
template<>
std::string encode< Parameter< std::vector< bool > > > (const Parameter< std::vector< bool > > &obj)
 
template<>
Parameter< std::vector< bool > > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::vector< bool > > &obj)
 
template<>
std::string encode< Parameter< std::vector< bool > > > (const Parameter< std::vector< bool > > &obj)
 
template<>
Parameter< std::vector< bool > > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::vector< bool > > &obj)
 
template<>
std::string encode< Parameter< std::string > > (const Parameter< std::string > &obj)
 
template<>
Parameter< std::string > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::string > &obj)
 
template<>
std::string encode< Parameter< std::string > > (const Parameter< std::string > &obj)
 
template<>
Parameter< std::string > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::string > &obj)
 
template<>
std::string encode< Parameter< std::vector< std::string > > > (const Parameter< std::vector< std::string > > &obj)
 
template<>
Parameter< std::vector< std::string > > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::vector< std::string > > &obj)
 
template<>
std::string encode< Parameter< std::vector< std::string > > > (const Parameter< std::vector< std::string > > &obj)
 
template<>
Parameter< std::vector< std::string > > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< std::vector< std::string > > &obj)
 
template<>
std::string encode< Parameter< Eigen::VectorXd > > (const Parameter< Eigen::VectorXd > &obj)
 
template<>
Parameter< Eigen::VectorXd > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< Eigen::VectorXd > &obj)
 
template<>
std::string encode< Parameter< Eigen::VectorXd > > (const Parameter< Eigen::VectorXd > &obj)
 
template<>
Parameter< Eigen::VectorXd > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< Eigen::VectorXd > &obj)
 
template<>
std::string encode< Parameter< Eigen::MatrixXd > > (const Parameter< Eigen::MatrixXd > &obj)
 
template<>
Parameter< Eigen::MatrixXd > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< Eigen::MatrixXd > &obj)
 
template<>
std::string encode< Parameter< Eigen::MatrixXd > > (const Parameter< Eigen::MatrixXd > &obj)
 
template<>
Parameter< Eigen::MatrixXd > decode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, Parameter< Eigen::MatrixXd > &obj)
 
template<typename T >
std::shared_ptr< Tsafe_dynamic_pointer_cast (const std::shared_ptr< State > &state)
 
template<>
std::string encode< std::shared_ptr< State > > (const std::shared_ptr< State > &obj)
 
template<>
std::shared_ptr< Statedecode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, std::shared_ptr< State > &obj)
 
template<>
std::string encode< std::shared_ptr< State > > (const std::shared_ptr< State > &obj)
 
template<>
std::shared_ptr< Statedecode (const std::string &msg)
 
template<>
bool decode (const std::string &msg, std::shared_ptr< State > &obj)
 
Eigen::Vector3d decoder (const proto::Vector3d &message)
 
Eigen::Quaterniond decoder (const proto::Quaterniond &message)
 
template<>
Parameter< intdecoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< std::vector< int > > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< doubledecoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< std::vector< double > > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< booldecoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< std::vector< bool > > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< std::string > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< std::vector< std::string > > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< Eigen::VectorXd > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< Eigen::MatrixXd > decoder (const state_representation::proto::Parameter &message)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< int > &parameter)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< std::vector< int > > &parameter)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< double > &parameter)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< std::vector< double > > &parameter)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< bool > &parameter)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< std::vector< bool > > &parameter)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< std::string > &parameter)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< std::vector< std::string > > &parameter)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< Eigen::VectorXd > &parameter)
 
template<>
proto::Parameter encoder (proto::Parameter &message, const Parameter< Eigen::MatrixXd > &parameter)
 

Detailed Description

Bindings to encode and decode state objects into serialised binary message.

Typedef Documentation

◆ field_length_t

Size type used to indicate number of fields and field data length in pack_fields() and unpack_fields() methods.

Definition at line 24 of file clproto.hpp.

Enumeration Type Documentation

◆ MessageType

The MessageType enumeration contains the possible message types in the clproto.

The values and order of this enumeration are synchronized with the fields of the protobuf StateMessage type, allowing a one-to-one mapping to the StateMessage type case.

Definition at line 55 of file clproto.hpp.

◆ ParameterMessageType

The ParameterMessageType enumeration contains the possible value types contained in a parameter message.

The values and order of this enumeration are synchronized with the fields of the protobuf ParameterValue type, allowing a one-to-one mapping to the ParameterValue type case.

Definition at line 86 of file clproto.hpp.

Function Documentation

◆ check_message_type()

MessageType clproto::check_message_type ( const std::string &  msg)

Check which control libraries message type a serialized binary string can be decoded as, if at all.

Parameters
msgThe serialized binary string to check
Returns
The MessageType of the contained type or UNKNOWN

Definition at line 40 of file clproto.cpp.

◆ check_parameter_message_type()

ParameterMessageType clproto::check_parameter_message_type ( const std::string &  msg)

Check which control libraries parameter type a serialized binary string can be decoded as, if at all.

Parameters
msgThe serialized binary string to check
Returns
The ParameterMessageType of the contained type or UNKNOWN

Definition at line 63 of file clproto.cpp.

◆ decode() [1/106]

template<typename T >
T clproto::decode ( const std::string &  msg)

Decode a serialized binary string from wire format into a control libraries object instance.

Throws an exception if the message cannot be decoded into the desired type.

Template Parameters
TThe desired control libraries object type
Parameters
msgThe serialized binary string to decode
Returns
A new instance of the control libraries object

◆ decode() [2/106]

template<>
State clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [3/106]

template<>
State clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [4/106]

template<>
AnalogIOState clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [5/106]

template<>
AnalogIOState clproto::decode ( const std::string &  msg)

Definition at line 214 of file clproto.cpp.

◆ decode() [6/106]

template<>
DigitalIOState clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [7/106]

template<>
DigitalIOState clproto::decode ( const std::string &  msg)

Definition at line 257 of file clproto.cpp.

◆ decode() [8/106]

template<>
SpatialState clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [9/106]

template<>
SpatialState clproto::decode ( const std::string &  msg)

Definition at line 300 of file clproto.cpp.

◆ decode() [10/106]

template<>
CartesianState clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [11/106]

template<>
CartesianState clproto::decode ( const std::string &  msg)

Definition at line 341 of file clproto.cpp.

◆ decode() [12/106]

template<>
CartesianPose clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [13/106]

template<>
CartesianPose clproto::decode ( const std::string &  msg)

Definition at line 396 of file clproto.cpp.

◆ decode() [14/106]

template<>
CartesianTwist clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [15/106]

template<>
CartesianTwist clproto::decode ( const std::string &  msg)

Definition at line 444 of file clproto.cpp.

◆ decode() [16/106]

template<>
CartesianAcceleration clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [17/106]

template<>
CartesianAcceleration clproto::decode ( const std::string &  msg)

Definition at line 492 of file clproto.cpp.

◆ decode() [18/106]

template<>
CartesianWrench clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [19/106]

template<>
CartesianWrench clproto::decode ( const std::string &  msg)

Definition at line 541 of file clproto.cpp.

◆ decode() [20/106]

template<>
Jacobian clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [21/106]

template<>
Jacobian clproto::decode ( const std::string &  msg)

Definition at line 584 of file clproto.cpp.

◆ decode() [22/106]

template<>
JointState clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [23/106]

template<>
JointState clproto::decode ( const std::string &  msg)

Definition at line 630 of file clproto.cpp.

◆ decode() [24/106]

template<>
JointPositions clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [25/106]

template<>
JointPositions clproto::decode ( const std::string &  msg)

Definition at line 681 of file clproto.cpp.

◆ decode() [26/106]

template<>
JointVelocities clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [27/106]

template<>
JointVelocities clproto::decode ( const std::string &  msg)

Definition at line 729 of file clproto.cpp.

◆ decode() [28/106]

template<>
JointAccelerations clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [29/106]

template<>
JointAccelerations clproto::decode ( const std::string &  msg)

Definition at line 777 of file clproto.cpp.

◆ decode() [30/106]

template<>
JointTorques clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [31/106]

template<>
JointTorques clproto::decode ( const std::string &  msg)

Definition at line 825 of file clproto.cpp.

◆ decode() [32/106]

template<>
Parameter< int > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [33/106]

template<>
Parameter< int > clproto::decode ( const std::string &  msg)

Definition at line 905 of file clproto.cpp.

◆ decode() [34/106]

template<>
Parameter< std::vector< int > > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [35/106]

template<>
Parameter< std::vector< int > > clproto::decode ( const std::string &  msg)

Definition at line 927 of file clproto.cpp.

◆ decode() [36/106]

template<>
Parameter< double > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [37/106]

template<>
Parameter< double > clproto::decode ( const std::string &  msg)

Definition at line 949 of file clproto.cpp.

◆ decode() [38/106]

template<>
Parameter< std::vector< double > > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [39/106]

template<>
Parameter< std::vector< double > > clproto::decode ( const std::string &  msg)

Definition at line 971 of file clproto.cpp.

◆ decode() [40/106]

template<>
Parameter< bool > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [41/106]

template<>
Parameter< bool > clproto::decode ( const std::string &  msg)

Definition at line 993 of file clproto.cpp.

◆ decode() [42/106]

template<>
Parameter< std::vector< bool > > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [43/106]

template<>
Parameter< std::vector< bool > > clproto::decode ( const std::string &  msg)

Definition at line 1015 of file clproto.cpp.

◆ decode() [44/106]

template<>
Parameter< std::string > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [45/106]

template<>
Parameter< std::string > clproto::decode ( const std::string &  msg)

Definition at line 1037 of file clproto.cpp.

◆ decode() [46/106]

template<>
Parameter< std::vector< std::string > > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [47/106]

template<>
Parameter< std::vector< std::string > > clproto::decode ( const std::string &  msg)

Definition at line 1059 of file clproto.cpp.

◆ decode() [48/106]

template<>
Parameter< Eigen::VectorXd > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [49/106]

template<>
Parameter< Eigen::VectorXd > clproto::decode ( const std::string &  msg)

Definition at line 1081 of file clproto.cpp.

◆ decode() [50/106]

template<>
Parameter< Eigen::MatrixXd > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [51/106]

template<>
Parameter< Eigen::MatrixXd > clproto::decode ( const std::string &  msg)

Definition at line 1103 of file clproto.cpp.

◆ decode() [52/106]

template<>
std::shared_ptr< State > clproto::decode ( const std::string &  msg)

Definition at line 173 of file clproto.cpp.

◆ decode() [53/106]

template<>
std::shared_ptr< State > clproto::decode ( const std::string &  msg)

Definition at line 1219 of file clproto.cpp.

◆ decode() [54/106]

template<>
bool clproto::decode ( const std::string &  msg,
AnalogIOState obj 
)

Definition at line 222 of file clproto.cpp.

◆ decode() [55/106]

template<>
bool clproto::decode ( const std::string &  msg,
AnalogIOState obj 
)

Definition at line 222 of file clproto.cpp.

◆ decode() [56/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianAcceleration obj 
)

Definition at line 500 of file clproto.cpp.

◆ decode() [57/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianAcceleration obj 
)

Definition at line 500 of file clproto.cpp.

◆ decode() [58/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianPose obj 
)

Definition at line 404 of file clproto.cpp.

◆ decode() [59/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianPose obj 
)

Definition at line 404 of file clproto.cpp.

◆ decode() [60/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianState obj 
)

Definition at line 349 of file clproto.cpp.

◆ decode() [61/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianState obj 
)

Definition at line 349 of file clproto.cpp.

◆ decode() [62/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianTwist obj 
)

Definition at line 452 of file clproto.cpp.

◆ decode() [63/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianTwist obj 
)

Definition at line 452 of file clproto.cpp.

◆ decode() [64/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianWrench obj 
)

Definition at line 549 of file clproto.cpp.

◆ decode() [65/106]

template<>
bool clproto::decode ( const std::string &  msg,
CartesianWrench obj 
)

Definition at line 549 of file clproto.cpp.

◆ decode() [66/106]

template<>
bool clproto::decode ( const std::string &  msg,
DigitalIOState obj 
)

Definition at line 265 of file clproto.cpp.

◆ decode() [67/106]

template<>
bool clproto::decode ( const std::string &  msg,
DigitalIOState obj 
)

Definition at line 265 of file clproto.cpp.

◆ decode() [68/106]

template<>
bool clproto::decode ( const std::string &  msg,
Jacobian obj 
)

Definition at line 592 of file clproto.cpp.

◆ decode() [69/106]

template<>
bool clproto::decode ( const std::string &  msg,
Jacobian obj 
)

Definition at line 592 of file clproto.cpp.

◆ decode() [70/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointAccelerations obj 
)

Definition at line 785 of file clproto.cpp.

◆ decode() [71/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointAccelerations obj 
)

Definition at line 785 of file clproto.cpp.

◆ decode() [72/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointPositions obj 
)

Definition at line 689 of file clproto.cpp.

◆ decode() [73/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointPositions obj 
)

Definition at line 689 of file clproto.cpp.

◆ decode() [74/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointState obj 
)

Definition at line 638 of file clproto.cpp.

◆ decode() [75/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointState obj 
)

Definition at line 638 of file clproto.cpp.

◆ decode() [76/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointTorques obj 
)

Definition at line 833 of file clproto.cpp.

◆ decode() [77/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointTorques obj 
)

Definition at line 833 of file clproto.cpp.

◆ decode() [78/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointVelocities obj 
)

Definition at line 737 of file clproto.cpp.

◆ decode() [79/106]

template<>
bool clproto::decode ( const std::string &  msg,
JointVelocities obj 
)

Definition at line 737 of file clproto.cpp.

◆ decode() [80/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< bool > &  obj 
)

Definition at line 997 of file clproto.cpp.

◆ decode() [81/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< bool > &  obj 
)

Definition at line 997 of file clproto.cpp.

◆ decode() [82/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< double > &  obj 
)

Definition at line 953 of file clproto.cpp.

◆ decode() [83/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< double > &  obj 
)

Definition at line 953 of file clproto.cpp.

◆ decode() [84/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< Eigen::MatrixXd > &  obj 
)

Definition at line 1107 of file clproto.cpp.

◆ decode() [85/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< Eigen::MatrixXd > &  obj 
)

Definition at line 1107 of file clproto.cpp.

◆ decode() [86/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< Eigen::VectorXd > &  obj 
)

Definition at line 1085 of file clproto.cpp.

◆ decode() [87/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< Eigen::VectorXd > &  obj 
)

Definition at line 1085 of file clproto.cpp.

◆ decode() [88/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< int > &  obj 
)

Definition at line 909 of file clproto.cpp.

◆ decode() [89/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< int > &  obj 
)

Definition at line 909 of file clproto.cpp.

◆ decode() [90/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::string > &  obj 
)

Definition at line 1041 of file clproto.cpp.

◆ decode() [91/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::string > &  obj 
)

Definition at line 1041 of file clproto.cpp.

◆ decode() [92/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::vector< bool > > &  obj 
)

Definition at line 1019 of file clproto.cpp.

◆ decode() [93/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::vector< bool > > &  obj 
)

Definition at line 1019 of file clproto.cpp.

◆ decode() [94/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::vector< double > > &  obj 
)

Definition at line 975 of file clproto.cpp.

◆ decode() [95/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::vector< double > > &  obj 
)

Definition at line 975 of file clproto.cpp.

◆ decode() [96/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::vector< int > > &  obj 
)

Definition at line 931 of file clproto.cpp.

◆ decode() [97/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::vector< int > > &  obj 
)

Definition at line 931 of file clproto.cpp.

◆ decode() [98/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::vector< std::string > > &  obj 
)

Definition at line 1063 of file clproto.cpp.

◆ decode() [99/106]

template<>
bool clproto::decode ( const std::string &  msg,
Parameter< std::vector< std::string > > &  obj 
)

Definition at line 1063 of file clproto.cpp.

◆ decode() [100/106]

template<>
bool clproto::decode ( const std::string &  msg,
SpatialState obj 
)

Definition at line 308 of file clproto.cpp.

◆ decode() [101/106]

template<>
bool clproto::decode ( const std::string &  msg,
SpatialState obj 
)

Definition at line 308 of file clproto.cpp.

◆ decode() [102/106]

template<>
bool clproto::decode ( const std::string &  msg,
State obj 
)

Definition at line 181 of file clproto.cpp.

◆ decode() [103/106]

template<>
bool clproto::decode ( const std::string &  msg,
State obj 
)

Definition at line 181 of file clproto.cpp.

◆ decode() [104/106]

template<>
bool clproto::decode ( const std::string &  msg,
std::shared_ptr< State > &  obj 
)

Definition at line 1314 of file clproto.cpp.

◆ decode() [105/106]

template<>
bool clproto::decode ( const std::string &  msg,
std::shared_ptr< State > &  obj 
)

Definition at line 1314 of file clproto.cpp.

◆ decode() [106/106]

template<typename T >
bool clproto::decode ( const std::string &  msg,
T obj 
)

Exception safe decoding of a serialized binary string wire format into a control libraries object instance.

It modifies the object by reference if the decoding is successful, and leaves it unmodified otherwise.

Template Parameters
TThe desired control libraries object type
Parameters
msgThe serialized binary string to decode
objA reference to a control libraries object
Returns
A success status boolean

◆ decoder() [1/16]

std::vector< bool > clproto::decoder ( const google::protobuf::RepeatedField< bool > &  message)

Definition at line 7 of file decoders.cpp.

◆ decoder() [2/16]

template<typename FieldT >
std::vector< FieldT > clproto::decoder ( const google::protobuf::RepeatedField< FieldT > &  message)

Decoding helper method for a RepeatedField message into vector data.

Template Parameters
FieldTThe datatype within the repeated field
Parameters
messageA RepeatedField message
Returns
The decoded vector of data

Definition at line 52 of file decoders.hpp.

◆ decoder() [3/16]

template<typename FieldT >
std::vector< FieldT > clproto::decoder ( const google::protobuf::RepeatedPtrField< FieldT > &  message)

Decoding helper method for a RepeatedPtrField message into vector data.

Template Parameters
FieldTThe datatype within the repeated field
Parameters
messageA RepeatedPtrField message
Returns
The decoded vector of data

Definition at line 57 of file decoders.hpp.

◆ decoder() [4/16]

Eigen::Quaterniond clproto::decoder ( const proto::Quaterniond &  message)

Definition at line 17 of file decoders.cpp.

◆ decoder() [5/16]

Eigen::Vector3d clproto::decoder ( const proto::Vector3d &  message)

Definition at line 13 of file decoders.cpp.

◆ decoder() [6/16]

template<typename ParamT >
state_representation::Parameter< ParamT > clproto::decoder ( const state_representation::proto::Parameter &  message)

Decoding helper method for the Parameter type.

Template Parameters
ParamTThe type contained within the Parameter object
Parameters
messageThe protocol Parameter message object
Returns
The decoded control libraries Parameter object

◆ decoder() [7/16]

template<>
Parameter< int > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 22 of file decoders.cpp.

◆ decoder() [8/16]

template<>
Parameter< std::vector< int > > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 30 of file decoders.cpp.

◆ decoder() [9/16]

template<>
Parameter< double > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 39 of file decoders.cpp.

◆ decoder() [10/16]

template<>
Parameter< std::vector< double > > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 47 of file decoders.cpp.

◆ decoder() [11/16]

template<>
Parameter< bool > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 56 of file decoders.cpp.

◆ decoder() [12/16]

template<>
Parameter< std::vector< bool > > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 64 of file decoders.cpp.

◆ decoder() [13/16]

template<>
Parameter< std::string > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 73 of file decoders.cpp.

◆ decoder() [14/16]

template<>
Parameter< std::vector< std::string > > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 81 of file decoders.cpp.

◆ decoder() [15/16]

template<>
Parameter< Eigen::VectorXd > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 90 of file decoders.cpp.

◆ decoder() [16/16]

template<>
Parameter< Eigen::MatrixXd > clproto::decoder ( const state_representation::proto::Parameter &  message)

Definition at line 101 of file decoders.cpp.

◆ encode()

template<typename T >
std::string clproto::encode ( const T &  obj)

Encode a control libraries object into a serialized binary string representation (wire format).

Template Parameters
TThe provided control libraries object type
Parameters
objThe control libraries object to encode
Returns
The serialized binary string encoding

◆ encode< AnalogIOState >() [1/2]

template<>
std::string clproto::encode< AnalogIOState > ( const AnalogIOState obj)

Definition at line 208 of file clproto.cpp.

◆ encode< AnalogIOState >() [2/2]

template<>
std::string clproto::encode< AnalogIOState > ( const AnalogIOState obj)

Definition at line 208 of file clproto.cpp.

◆ encode< CartesianAcceleration >() [1/2]

template<>
std::string clproto::encode< CartesianAcceleration > ( const CartesianAcceleration obj)

Definition at line 481 of file clproto.cpp.

◆ encode< CartesianAcceleration >() [2/2]

template<>
std::string clproto::encode< CartesianAcceleration > ( const CartesianAcceleration obj)

Definition at line 481 of file clproto.cpp.

◆ encode< CartesianPose >() [1/2]

template<>
std::string clproto::encode< CartesianPose > ( const CartesianPose obj)

Definition at line 385 of file clproto.cpp.

◆ encode< CartesianPose >() [2/2]

template<>
std::string clproto::encode< CartesianPose > ( const CartesianPose obj)

Definition at line 385 of file clproto.cpp.

◆ encode< CartesianState >() [1/2]

template<>
std::string clproto::encode< CartesianState > ( const CartesianState obj)

Definition at line 335 of file clproto.cpp.

◆ encode< CartesianState >() [2/2]

template<>
std::string clproto::encode< CartesianState > ( const CartesianState obj)

Definition at line 335 of file clproto.cpp.

◆ encode< CartesianTwist >() [1/2]

template<>
std::string clproto::encode< CartesianTwist > ( const CartesianTwist obj)

Definition at line 433 of file clproto.cpp.

◆ encode< CartesianTwist >() [2/2]

template<>
std::string clproto::encode< CartesianTwist > ( const CartesianTwist obj)

Definition at line 433 of file clproto.cpp.

◆ encode< CartesianWrench >() [1/2]

template<>
std::string clproto::encode< CartesianWrench > ( const CartesianWrench obj)

Definition at line 530 of file clproto.cpp.

◆ encode< CartesianWrench >() [2/2]

template<>
std::string clproto::encode< CartesianWrench > ( const CartesianWrench obj)

Definition at line 530 of file clproto.cpp.

◆ encode< DigitalIOState >() [1/2]

template<>
std::string clproto::encode< DigitalIOState > ( const DigitalIOState obj)

Definition at line 251 of file clproto.cpp.

◆ encode< DigitalIOState >() [2/2]

template<>
std::string clproto::encode< DigitalIOState > ( const DigitalIOState obj)

Definition at line 251 of file clproto.cpp.

◆ encode< Jacobian >() [1/2]

template<>
std::string clproto::encode< Jacobian > ( const Jacobian obj)

Definition at line 578 of file clproto.cpp.

◆ encode< Jacobian >() [2/2]

template<>
std::string clproto::encode< Jacobian > ( const Jacobian obj)

Definition at line 578 of file clproto.cpp.

◆ encode< JointAccelerations >() [1/2]

template<>
std::string clproto::encode< JointAccelerations > ( const JointAccelerations obj)

Definition at line 766 of file clproto.cpp.

◆ encode< JointAccelerations >() [2/2]

template<>
std::string clproto::encode< JointAccelerations > ( const JointAccelerations obj)

Definition at line 766 of file clproto.cpp.

◆ encode< JointPositions >() [1/2]

template<>
std::string clproto::encode< JointPositions > ( const JointPositions obj)

Definition at line 670 of file clproto.cpp.

◆ encode< JointPositions >() [2/2]

template<>
std::string clproto::encode< JointPositions > ( const JointPositions obj)

Definition at line 670 of file clproto.cpp.

◆ encode< JointState >() [1/2]

template<>
std::string clproto::encode< JointState > ( const JointState obj)

Definition at line 624 of file clproto.cpp.

◆ encode< JointState >() [2/2]

template<>
std::string clproto::encode< JointState > ( const JointState obj)

Definition at line 624 of file clproto.cpp.

◆ encode< JointTorques >() [1/2]

template<>
std::string clproto::encode< JointTorques > ( const JointTorques obj)

Definition at line 814 of file clproto.cpp.

◆ encode< JointTorques >() [2/2]

template<>
std::string clproto::encode< JointTorques > ( const JointTorques obj)

Definition at line 814 of file clproto.cpp.

◆ encode< JointVelocities >() [1/2]

template<>
std::string clproto::encode< JointVelocities > ( const JointVelocities obj)

Definition at line 718 of file clproto.cpp.

◆ encode< JointVelocities >() [2/2]

template<>
std::string clproto::encode< JointVelocities > ( const JointVelocities obj)

Definition at line 718 of file clproto.cpp.

◆ encode< Parameter< bool > >() [1/2]

template<>
std::string clproto::encode< Parameter< bool > > ( const Parameter< bool > &  obj)

Definition at line 989 of file clproto.cpp.

◆ encode< Parameter< bool > >() [2/2]

template<>
std::string clproto::encode< Parameter< bool > > ( const Parameter< bool > &  obj)

Definition at line 989 of file clproto.cpp.

◆ encode< Parameter< double > >() [1/2]

template<>
std::string clproto::encode< Parameter< double > > ( const Parameter< double > &  obj)

Definition at line 945 of file clproto.cpp.

◆ encode< Parameter< double > >() [2/2]

template<>
std::string clproto::encode< Parameter< double > > ( const Parameter< double > &  obj)

Definition at line 945 of file clproto.cpp.

◆ encode< Parameter< Eigen::MatrixXd > >() [1/2]

template<>
std::string clproto::encode< Parameter< Eigen::MatrixXd > > ( const Parameter< Eigen::MatrixXd > &  obj)

Definition at line 1099 of file clproto.cpp.

◆ encode< Parameter< Eigen::MatrixXd > >() [2/2]

template<>
std::string clproto::encode< Parameter< Eigen::MatrixXd > > ( const Parameter< Eigen::MatrixXd > &  obj)

Definition at line 1099 of file clproto.cpp.

◆ encode< Parameter< Eigen::VectorXd > >() [1/2]

template<>
std::string clproto::encode< Parameter< Eigen::VectorXd > > ( const Parameter< Eigen::VectorXd > &  obj)

Definition at line 1077 of file clproto.cpp.

◆ encode< Parameter< Eigen::VectorXd > >() [2/2]

template<>
std::string clproto::encode< Parameter< Eigen::VectorXd > > ( const Parameter< Eigen::VectorXd > &  obj)

Definition at line 1077 of file clproto.cpp.

◆ encode< Parameter< int > >() [1/2]

template<>
std::string clproto::encode< Parameter< int > > ( const Parameter< int > &  obj)

Definition at line 901 of file clproto.cpp.

◆ encode< Parameter< int > >() [2/2]

template<>
std::string clproto::encode< Parameter< int > > ( const Parameter< int > &  obj)

Definition at line 901 of file clproto.cpp.

◆ encode< Parameter< std::string > >() [1/2]

template<>
std::string clproto::encode< Parameter< std::string > > ( const Parameter< std::string > &  obj)

Definition at line 1033 of file clproto.cpp.

◆ encode< Parameter< std::string > >() [2/2]

template<>
std::string clproto::encode< Parameter< std::string > > ( const Parameter< std::string > &  obj)

Definition at line 1033 of file clproto.cpp.

◆ encode< Parameter< std::vector< bool > > >() [1/2]

template<>
std::string clproto::encode< Parameter< std::vector< bool > > > ( const Parameter< std::vector< bool > > &  obj)

Definition at line 1011 of file clproto.cpp.

◆ encode< Parameter< std::vector< bool > > >() [2/2]

template<>
std::string clproto::encode< Parameter< std::vector< bool > > > ( const Parameter< std::vector< bool > > &  obj)

Definition at line 1011 of file clproto.cpp.

◆ encode< Parameter< std::vector< double > > >() [1/2]

template<>
std::string clproto::encode< Parameter< std::vector< double > > > ( const Parameter< std::vector< double > > &  obj)

Definition at line 967 of file clproto.cpp.

◆ encode< Parameter< std::vector< double > > >() [2/2]

template<>
std::string clproto::encode< Parameter< std::vector< double > > > ( const Parameter< std::vector< double > > &  obj)

Definition at line 967 of file clproto.cpp.

◆ encode< Parameter< std::vector< int > > >() [1/2]

template<>
std::string clproto::encode< Parameter< std::vector< int > > > ( const Parameter< std::vector< int > > &  obj)

Definition at line 923 of file clproto.cpp.

◆ encode< Parameter< std::vector< int > > >() [2/2]

template<>
std::string clproto::encode< Parameter< std::vector< int > > > ( const Parameter< std::vector< int > > &  obj)

Definition at line 923 of file clproto.cpp.

◆ encode< Parameter< std::vector< std::string > > >() [1/2]

template<>
std::string clproto::encode< Parameter< std::vector< std::string > > > ( const Parameter< std::vector< std::string > > &  obj)

Definition at line 1055 of file clproto.cpp.

◆ encode< Parameter< std::vector< std::string > > >() [2/2]

template<>
std::string clproto::encode< Parameter< std::vector< std::string > > > ( const Parameter< std::vector< std::string > > &  obj)

Definition at line 1055 of file clproto.cpp.

◆ encode< SpatialState >() [1/2]

template<>
std::string clproto::encode< SpatialState > ( const SpatialState obj)

Definition at line 294 of file clproto.cpp.

◆ encode< SpatialState >() [2/2]

template<>
std::string clproto::encode< SpatialState > ( const SpatialState obj)

Definition at line 294 of file clproto.cpp.

◆ encode< State >() [1/2]

template<>
std::string clproto::encode< State > ( const State obj)

Definition at line 167 of file clproto.cpp.

◆ encode< State >() [2/2]

template<>
std::string clproto::encode< State > ( const State obj)

Definition at line 167 of file clproto.cpp.

◆ encode< std::shared_ptr< State > >() [1/2]

template<>
std::string clproto::encode< std::shared_ptr< State > > ( const std::shared_ptr< State > &  obj)

Definition at line 1126 of file clproto.cpp.

◆ encode< std::shared_ptr< State > >() [2/2]

template<>
std::string clproto::encode< std::shared_ptr< State > > ( const std::shared_ptr< State > &  obj)

Definition at line 1126 of file clproto.cpp.

◆ encoder() [1/22]

proto::Quaterniond clproto::encoder ( const Eigen::Quaterniond &  quaternion)

Definition at line 33 of file encoders.cpp.

◆ encoder() [2/22]

proto::Vector3d clproto::encoder ( const Eigen::Vector3d &  vector)

Definition at line 25 of file encoders.cpp.

◆ encoder() [3/22]

proto::AnalogIOState clproto::encoder ( const state_representation::AnalogIOState analog_io_state)

Definition at line 211 of file encoders.cpp.

◆ encoder() [4/22]

proto::CartesianState clproto::encoder ( const state_representation::CartesianState cartesian_state)

Definition at line 40 of file encoders.cpp.

◆ encoder() [5/22]

proto::DigitalIOState clproto::encoder ( const state_representation::DigitalIOState digital_io_state)

Definition at line 195 of file encoders.cpp.

◆ encoder() [6/22]

proto::Jacobian clproto::encoder ( const state_representation::Jacobian jacobian)

Definition at line 57 of file encoders.cpp.

◆ encoder() [7/22]

proto::JointState clproto::encoder ( const state_representation::JointState joint_state)

Definition at line 72 of file encoders.cpp.

◆ encoder() [8/22]

template<typename ParamT >
state_representation::proto::Parameter clproto::encoder ( const state_representation::Parameter< ParamT > &  parameter)
inline

Encoding helper method for the Parameter type.

Template Parameters
ParamTThe type contained within the Parameter object
Parameters
parameterThe control libraries Parameter object
Returns
The encoded protocol Parameter message object

Definition at line 79 of file encoders.hpp.

◆ encoder() [9/22]

proto::SpatialState clproto::encoder ( const state_representation::SpatialState spatial_state)

Definition at line 18 of file encoders.cpp.

◆ encoder() [10/22]

proto::State clproto::encoder ( const state_representation::State state)

Definition at line 11 of file encoders.cpp.

◆ encoder() [11/22]

template<typename FieldT >
google::protobuf::RepeatedField< FieldT > clproto::encoder ( const std::vector< FieldT > &  data)

Encoding helper method for vector data into a RepeatedField message type.

Template Parameters
FieldTThe datatype within the repeated field
Parameters
dataA vector of data
Returns
The encoded RepeatedField protocol message object

Definition at line 74 of file encoders.hpp.

◆ encoder() [12/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< bool > &  parameter 
)

Definition at line 129 of file encoders.cpp.

◆ encoder() [13/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< double > &  parameter 
)

Definition at line 108 of file encoders.cpp.

◆ encoder() [14/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< Eigen::MatrixXd > &  parameter 
)

Definition at line 182 of file encoders.cpp.

◆ encoder() [15/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< Eigen::VectorXd > &  parameter 
)

Definition at line 172 of file encoders.cpp.

◆ encoder() [16/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< int > &  parameter 
)

Definition at line 87 of file encoders.cpp.

◆ encoder() [17/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< std::string > &  parameter 
)

Definition at line 150 of file encoders.cpp.

◆ encoder() [18/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< std::vector< bool > > &  parameter 
)

Definition at line 139 of file encoders.cpp.

◆ encoder() [19/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< std::vector< double > > &  parameter 
)

Definition at line 118 of file encoders.cpp.

◆ encoder() [20/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< std::vector< int > > &  parameter 
)

Definition at line 97 of file encoders.cpp.

◆ encoder() [21/22]

template<>
proto::Parameter clproto::encoder ( proto::Parameter &  message,
const Parameter< std::vector< std::string > > &  parameter 
)

Definition at line 161 of file encoders.cpp.

◆ encoder() [22/22]

template<typename ParamT >
state_representation::proto::Parameter clproto::encoder ( state_representation::proto::Parameter &  message,
const state_representation::Parameter< ParamT > &  parameter 
)

Encoding helper method for the Parameter type.

Template Parameters
ParamTThe type contained within the Parameter object
Parameters
messageThe protocol Parameter message to fill
parameterThe control libraries Parameter object
Returns
The encoded protocol Parameter message object

◆ from_json() [1/2]

template<typename T >
T clproto::from_json ( const std::string &  json)

Convert a JSON formatted state message description into a control libraries object instance.

Throws an exception if the message cannot be converted into the desired type.

Template Parameters
TThe desired control libraries object type
Parameters
jsonThe JSON formatted state message description
Returns
A new instance of the control libraries object

Definition at line 227 of file clproto.hpp.

◆ from_json() [2/2]

std::string clproto::from_json ( const std::string &  json)

Convert a JSON formatted state message description into a serialized binary string representation (wire format).

Throws an exception if the message cannot be decoded into the desired type.

Parameters
jsonThe JSON formatted state message description
Returns
The serialized binary string encoding

Definition at line 139 of file clproto.cpp.

◆ is_valid()

bool clproto::is_valid ( const std::string &  msg)

Check if a serialized binary string can be decoded into a support control libraries message type.

Parameters
msgThe serialized binary string to check
Returns
True if the message can be decoded, false otherwise

Definition at line 36 of file clproto.cpp.

◆ matrix_encoder()

google::protobuf::RepeatedField< double > clproto::matrix_encoder ( const Eigen::MatrixXd &  matrix)

Encoding helper method for Eigen data into a RepeatedField message type.

Parameters
matrixAn Eigen matrix of data
Returns
The encoded RepeatedField protocol message object

Definition at line 7 of file encoders.cpp.

◆ pack_fields()

void clproto::pack_fields ( const std::vector< std::string > &  fields,
char data 
)

Pack an ordered vector of encoded field messages into a single data array.

To send multiple messages in one packet, there must be some delimiting logic to distinguish the end of one field from the start of the next. This packing function encodes the number of fields (N) as the first data entry in the packet, then the size of each field in the next N data entries, followed by the raw concatenated data of each field. The order of the original vector is preserved. The corresponding unpack_fields() method can be used to restore the original vector of fields from the data buffer.

Parameters
fieldsAn ordered vector of encoded message fields
[out]dataA raw data array to be packed with the fields

Definition at line 72 of file clproto.cpp.

◆ safe_dynamic_pointer_cast()

template<typename T >
std::shared_ptr< T > clproto::safe_dynamic_pointer_cast ( const std::shared_ptr< State > &  state)

Definition at line 1115 of file clproto.cpp.

◆ to_json() [1/2]

std::string clproto::to_json ( const std::string &  msg)

Convert a serialized binary string from wire format into a JSON formatted state message description.

Parameters
msgThe serialized binary string to decode
Returns
The JSON formatted state message description

Definition at line 122 of file clproto.cpp.

◆ to_json() [2/2]

template<typename T >
std::string clproto::to_json ( const T obj)

Convert a control libraries object into into a JSON formatted state message description.

Template Parameters
TThe provided control libraries object type
Parameters
objThe control libraries object to encode
Returns
The JSON formatted state message description

Definition at line 203 of file clproto.hpp.

◆ unpack_fields()

std::vector< std::string > clproto::unpack_fields ( const char data)

Unpack a data array into an ordered vector of encoded field messages.

A buffer of encoded fields serialized by pack_fields() can be unpacked by this method. It expects the first data entry in the data buffer to contain the number of fields (N). The next N data entries then must contain the data length of each subsequent field. Finally, the rest of the data is broken into ordered fields based on the interpreted field data lengths.

Parameters
dataA raw data array that has been packed by pack_fields()
Returns
An ordered vector of encoded message fields

Definition at line 96 of file clproto.cpp.