Control Libraries 6.3.4
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. More...
 
typedef std::chrono::nanoseconds timestamp_duration_t
 Duration type to use when representing chrono timestamps as integer count since epoch. More...
 

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
}
 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. More...
 
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. More...
 
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. More...
 
template<typename T >
std::string encode (const T &obj)
 Encode a control libraries object into a serialized binary string representation (wire format). More...
 
template<typename T >
decode (const std::string &msg)
 Decode a serialized binary string from wire format into a control libraries object instance. More...
 
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. More...
 
void pack_fields (const std::vector< std::string > &fields, char *data)
 Pack an ordered vector of encoded field messages into a single data array. More...
 
std::vector< std::string > unpack_fields (const char *data)
 Unpack a data array into an ordered vector of encoded field messages. More...
 
std::string to_json (const std::string &msg)
 Convert a serialized binary string from wire format into a JSON formatted state message description. More...
 
template<typename T >
std::string to_json (const T &obj)
 Convert a control libraries object into into a JSON formatted state message description. More...
 
std::string from_json (const std::string &json)
 Convert a JSON formatted state message description into a serialized binary string representation (wire format). More...
 
template<typename T >
from_json (const std::string &json)
 Convert a JSON formatted state message description into a control libraries object instance. More...
 
template<typename FieldT >
std::vector< FieldT > decoder (const google::protobuf::RepeatedField< FieldT > &message)
 Decoding helper method for a RepeatedField message into vector data. More...
 
template<typename FieldT >
std::vector< FieldT > decoder (const google::protobuf::RepeatedPtrField< FieldT > &message)
 Decoding helper method for a RepeatedPtrField message into vector data. More...
 
template<typename ParamT >
state_representation::Parameter< ParamT > decoder (const state_representation::proto::Parameter &message)
 Decoding helper method for the Parameter type. More...
 
std::vector< bool > decoder (const google::protobuf::RepeatedField< bool > &message)
 
state_representation::StateType decoder (const state_representation::proto::StateType &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 (const state_representation::Parameter< ParamT > &parameter)
 Encoding helper method for the Parameter type. More...
 
template<typename FieldT >
google::protobuf::RepeatedField< FieldT > encoder (const std::vector< FieldT > &data)
 Encoding helper method for vector data into a RepeatedField message type. More...
 
google::protobuf::RepeatedField< double > matrix_encoder (const Eigen::MatrixXd &matrix)
 Encoding helper method for Eigen data into a RepeatedField message type. More...
 
state_representation::proto::StateType encoder (const state_representation::StateType &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)
 
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< 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< int > decode (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< int > decode (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< double > decode (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< double > decode (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< bool > decode (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< bool > decode (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< T > safe_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)
 
StateType decoder (const proto::StateType &message)
 
Eigen::Vector3d decoder (const proto::Vector3d &message)
 
Eigen::Quaterniond decoder (const proto::Quaterniond &message)
 
template<>
Parameter< int > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< std::vector< int > > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< double > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< std::vector< double > > decoder (const state_representation::proto::Parameter &message)
 
template<>
Parameter< bool > decoder (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<>
state_representation::proto::Parameter encoder (const state_representation::Parameter< int > &parameter)
 
template<>
state_representation::proto::Parameter encoder (const state_representation::Parameter< std::vector< int > > &parameter)
 
template<>
state_representation::proto::Parameter encoder (const state_representation::Parameter< double > &parameter)
 
template<>
state_representation::proto::Parameter encoder (const state_representation::Parameter< std::vector< double > > &parameter)
 
template<>
state_representation::proto::Parameter encoder (const state_representation::Parameter< bool > &parameter)
 
template<>
state_representation::proto::Parameter encoder (const state_representation::Parameter< std::vector< bool > > &parameter)
 
template<>
state_representation::proto::Parameter encoder (const state_representation::Parameter< std::string > &parameter)
 
template<>
state_representation::proto::Parameter encoder (const state_representation::Parameter< std::vector< std::string > > &parameter)
 
template<>
state_representation::proto::Parameter encoder (const state_representation::Parameter< Eigen::VectorXd > &parameter)
 
template<>
state_representation::proto::Parameter encoder (const state_representation::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.h.

◆ timestamp_duration_t

Duration type to use when representing chrono timestamps as integer count since epoch.

Definition at line 31 of file clproto.h.

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 62 of file clproto.h.

◆ 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 91 of file clproto.h.

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 38 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 61 of file clproto.cpp.

◆ decode() [1/98]

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/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [3/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [4/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [5/98]

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

Definition at line 214 of file clproto.cpp.

◆ decode() [6/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [7/98]

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

Definition at line 257 of file clproto.cpp.

◆ decode() [8/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [9/98]

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

Definition at line 310 of file clproto.cpp.

◆ decode() [10/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [11/98]

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

Definition at line 356 of file clproto.cpp.

◆ decode() [12/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [13/98]

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

Definition at line 402 of file clproto.cpp.

◆ decode() [14/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [15/98]

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

Definition at line 448 of file clproto.cpp.

◆ decode() [16/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [17/98]

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

Definition at line 491 of file clproto.cpp.

◆ decode() [18/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [19/98]

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

Definition at line 539 of file clproto.cpp.

◆ decode() [20/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [21/98]

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

Definition at line 587 of file clproto.cpp.

◆ decode() [22/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [23/98]

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

Definition at line 632 of file clproto.cpp.

◆ decode() [24/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [25/98]

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

Definition at line 677 of file clproto.cpp.

◆ decode() [26/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [27/98]

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

Definition at line 722 of file clproto.cpp.

◆ decode() [28/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [29/98]

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

Definition at line 807 of file clproto.cpp.

◆ decode() [30/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [31/98]

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

Definition at line 829 of file clproto.cpp.

◆ decode() [32/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [33/98]

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

Definition at line 851 of file clproto.cpp.

◆ decode() [34/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [35/98]

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

Definition at line 873 of file clproto.cpp.

◆ decode() [36/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [37/98]

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

Definition at line 895 of file clproto.cpp.

◆ decode() [38/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [39/98]

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

Definition at line 917 of file clproto.cpp.

◆ decode() [40/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [41/98]

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

Definition at line 939 of file clproto.cpp.

◆ decode() [42/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [43/98]

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

Definition at line 961 of file clproto.cpp.

◆ decode() [44/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [45/98]

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

Definition at line 983 of file clproto.cpp.

◆ decode() [46/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [47/98]

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

Definition at line 1005 of file clproto.cpp.

◆ decode() [48/98]

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

Definition at line 171 of file clproto.cpp.

◆ decode() [49/98]

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

Definition at line 1115 of file clproto.cpp.

◆ decode() [50/98]

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

Definition at line 410 of file clproto.cpp.

◆ decode() [51/98]

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

Definition at line 410 of file clproto.cpp.

◆ decode() [52/98]

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

Definition at line 318 of file clproto.cpp.

◆ decode() [53/98]

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

Definition at line 318 of file clproto.cpp.

◆ decode() [54/98]

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

Definition at line 265 of file clproto.cpp.

◆ decode() [55/98]

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

Definition at line 265 of file clproto.cpp.

◆ decode() [56/98]

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

Definition at line 364 of file clproto.cpp.

◆ decode() [57/98]

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

Definition at line 364 of file clproto.cpp.

◆ decode() [58/98]

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

Definition at line 456 of file clproto.cpp.

◆ decode() [59/98]

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

Definition at line 456 of file clproto.cpp.

◆ decode() [60/98]

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

Definition at line 499 of file clproto.cpp.

◆ decode() [61/98]

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

Definition at line 499 of file clproto.cpp.

◆ decode() [62/98]

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

Definition at line 685 of file clproto.cpp.

◆ decode() [63/98]

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

Definition at line 685 of file clproto.cpp.

◆ decode() [64/98]

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

Definition at line 595 of file clproto.cpp.

◆ decode() [65/98]

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

Definition at line 595 of file clproto.cpp.

◆ decode() [66/98]

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

Definition at line 547 of file clproto.cpp.

◆ decode() [67/98]

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

Definition at line 547 of file clproto.cpp.

◆ decode() [68/98]

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

Definition at line 730 of file clproto.cpp.

◆ decode() [69/98]

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

Definition at line 730 of file clproto.cpp.

◆ decode() [70/98]

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

Definition at line 640 of file clproto.cpp.

◆ decode() [71/98]

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

Definition at line 640 of file clproto.cpp.

◆ decode() [72/98]

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

Definition at line 899 of file clproto.cpp.

◆ decode() [73/98]

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

Definition at line 899 of file clproto.cpp.

◆ decode() [74/98]

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

Definition at line 855 of file clproto.cpp.

◆ decode() [75/98]

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

Definition at line 855 of file clproto.cpp.

◆ decode() [76/98]

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

Definition at line 1009 of file clproto.cpp.

◆ decode() [77/98]

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

Definition at line 1009 of file clproto.cpp.

◆ decode() [78/98]

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

Definition at line 987 of file clproto.cpp.

◆ decode() [79/98]

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

Definition at line 987 of file clproto.cpp.

◆ decode() [80/98]

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

Definition at line 811 of file clproto.cpp.

◆ decode() [81/98]

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

Definition at line 811 of file clproto.cpp.

◆ decode() [82/98]

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

Definition at line 943 of file clproto.cpp.

◆ decode() [83/98]

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

Definition at line 943 of file clproto.cpp.

◆ decode() [84/98]

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

Definition at line 921 of file clproto.cpp.

◆ decode() [85/98]

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

Definition at line 921 of file clproto.cpp.

◆ decode() [86/98]

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

Definition at line 877 of file clproto.cpp.

◆ decode() [87/98]

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

Definition at line 877 of file clproto.cpp.

◆ decode() [88/98]

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

Definition at line 833 of file clproto.cpp.

◆ decode() [89/98]

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

Definition at line 833 of file clproto.cpp.

◆ decode() [90/98]

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

Definition at line 965 of file clproto.cpp.

◆ decode() [91/98]

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

Definition at line 965 of file clproto.cpp.

◆ decode() [92/98]

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

Definition at line 222 of file clproto.cpp.

◆ decode() [93/98]

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

Definition at line 222 of file clproto.cpp.

◆ decode() [94/98]

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

Definition at line 179 of file clproto.cpp.

◆ decode() [95/98]

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

Definition at line 179 of file clproto.cpp.

◆ decode() [96/98]

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

Definition at line 1204 of file clproto.cpp.

◆ decode() [97/98]

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

Definition at line 1204 of file clproto.cpp.

◆ decode() [98/98]

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/17]

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

Definition at line 7 of file decoders.cpp.

◆ decoder() [2/17]

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 53 of file decoders.h.

◆ decoder() [3/17]

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 58 of file decoders.h.

◆ decoder() [4/17]

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

Definition at line 21 of file decoders.cpp.

◆ decoder() [5/17]

StateType clproto::decoder ( const proto::StateType &  message)

Definition at line 13 of file decoders.cpp.

◆ decoder() [6/17]

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

Definition at line 17 of file decoders.cpp.

◆ decoder() [7/17]

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() [8/17]

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

Definition at line 26 of file decoders.cpp.

◆ decoder() [9/17]

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

Definition at line 30 of file decoders.cpp.

◆ decoder() [10/17]

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

Definition at line 35 of file decoders.cpp.

◆ decoder() [11/17]

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

Definition at line 39 of file decoders.cpp.

◆ decoder() [12/17]

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

Definition at line 44 of file decoders.cpp.

◆ decoder() [13/17]

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

Definition at line 48 of file decoders.cpp.

◆ decoder() [14/17]

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

Definition at line 53 of file decoders.cpp.

◆ decoder() [15/17]

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

Definition at line 57 of file decoders.cpp.

◆ decoder() [16/17]

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

Definition at line 62 of file decoders.cpp.

◆ decoder() [17/17]

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

Definition at line 69 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< CartesianAcceleration >() [1/2]

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

Definition at line 393 of file clproto.cpp.

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

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

Definition at line 393 of file clproto.cpp.

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

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

Definition at line 301 of file clproto.cpp.

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

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

Definition at line 301 of file clproto.cpp.

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

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

Definition at line 251 of file clproto.cpp.

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

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

Definition at line 251 of file clproto.cpp.

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

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

Definition at line 347 of file clproto.cpp.

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

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

Definition at line 347 of file clproto.cpp.

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

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

Definition at line 439 of file clproto.cpp.

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

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

Definition at line 439 of file clproto.cpp.

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

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

Definition at line 485 of file clproto.cpp.

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

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

Definition at line 485 of file clproto.cpp.

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

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

Definition at line 668 of file clproto.cpp.

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

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

Definition at line 668 of file clproto.cpp.

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

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

Definition at line 578 of file clproto.cpp.

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

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

Definition at line 578 of file clproto.cpp.

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

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

Definition at line 533 of file clproto.cpp.

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

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

Definition at line 533 of file clproto.cpp.

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

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

Definition at line 713 of file clproto.cpp.

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

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

Definition at line 713 of file clproto.cpp.

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

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

Definition at line 623 of file clproto.cpp.

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

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

Definition at line 623 of file clproto.cpp.

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

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

Definition at line 891 of file clproto.cpp.

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

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

Definition at line 891 of file clproto.cpp.

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

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

Definition at line 847 of file clproto.cpp.

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

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

Definition at line 847 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 1001 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 1001 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 979 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 979 of file clproto.cpp.

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

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

Definition at line 803 of file clproto.cpp.

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

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

Definition at line 803 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 935 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 935 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 913 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 913 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 869 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 869 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 825 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 825 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 957 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 957 of file clproto.cpp.

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

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

Definition at line 208 of file clproto.cpp.

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

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

Definition at line 208 of file clproto.cpp.

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

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

Definition at line 165 of file clproto.cpp.

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

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

Definition at line 165 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 1028 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 1028 of file clproto.cpp.

◆ encoder() [1/20]

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

Definition at line 40 of file encoders.cpp.

◆ encoder() [2/20]

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

Definition at line 32 of file encoders.cpp.

◆ encoder() [3/20]

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

Definition at line 47 of file encoders.cpp.

◆ encoder() [4/20]

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

Definition at line 64 of file encoders.cpp.

◆ encoder() [5/20]

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

Definition at line 79 of file encoders.cpp.

◆ encoder() [6/20]

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

Definition at line 126 of file encoders.cpp.

◆ encoder() [7/20]

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

Definition at line 110 of file encoders.cpp.

◆ encoder() [8/20]

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

Definition at line 165 of file encoders.cpp.

◆ encoder() [9/20]

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

Definition at line 157 of file encoders.cpp.

◆ encoder() [10/20]

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

Definition at line 94 of file encoders.cpp.

◆ encoder() [11/20]

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

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

◆ encoder() [12/20]

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

Definition at line 141 of file encoders.cpp.

◆ encoder() [13/20]

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

Definition at line 133 of file encoders.cpp.

◆ encoder() [14/20]

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

Definition at line 118 of file encoders.cpp.

◆ encoder() [15/20]

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

Definition at line 102 of file encoders.cpp.

◆ encoder() [16/20]

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

Definition at line 149 of file encoders.cpp.

◆ encoder() [17/20]

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

Definition at line 25 of file encoders.cpp.

◆ encoder() [18/20]

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

Definition at line 15 of file encoders.cpp.

◆ encoder() [19/20]

proto::StateType clproto::encoder ( const state_representation::StateType type)

Definition at line 11 of file encoders.cpp.

◆ encoder() [20/20]

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 60 of file encoders.h.

◆ 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 232 of file clproto.h.

◆ 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 137 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 34 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 70 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 1017 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 120 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 208 of file clproto.h.

◆ 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 94 of file clproto.cpp.