Control Libraries 7.4.0
|
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< FieldT > | decoder (const google::protobuf::RepeatedField< FieldT > &message) |
Decoding helper method for a RepeatedField message into vector data. | |
template<typename FieldT > | |
std::vector< FieldT > | decoder (const google::protobuf::RepeatedPtrField< FieldT > &message) |
Decoding helper method for a RepeatedPtrField message into vector data. | |
template<typename ParamT > | |
state_representation::Parameter< ParamT > | decoder (const state_representation::proto::Parameter &message) |
Decoding helper method for the Parameter type. | |
std::vector< bool > | decoder (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 > ¶meter) |
Encoding helper method for the Parameter type. | |
template<typename ParamT > | |
state_representation::proto::Parameter | encoder (const state_representation::Parameter< ParamT > ¶meter) |
Encoding helper method for the Parameter type. | |
template<typename FieldT > | |
google::protobuf::RepeatedField< FieldT > | encoder (const std::vector< FieldT > &data) |
Encoding helper method for vector data into a RepeatedField message type. | |
google::protobuf::RepeatedField< double > | matrix_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< 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< State > | decode (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< State > | decode (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< 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<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< int > ¶meter) |
template<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< std::vector< int > > ¶meter) |
template<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< double > ¶meter) |
template<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< std::vector< double > > ¶meter) |
template<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< bool > ¶meter) |
template<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< std::vector< bool > > ¶meter) |
template<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< std::string > ¶meter) |
template<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< std::vector< std::string > > ¶meter) |
template<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< Eigen::VectorXd > ¶meter) |
template<> | |
proto::Parameter | encoder (proto::Parameter &message, const Parameter< Eigen::MatrixXd > ¶meter) |
Bindings to encode and decode state objects into serialised binary message.
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.
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.
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.
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.
msg | The serialized binary string to check |
Definition at line 40 of file clproto.cpp.
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.
msg | The serialized binary string to check |
Definition at line 63 of file clproto.cpp.
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.
T | The desired control libraries object type |
msg | The serialized binary string to decode |
Definition at line 173 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
AnalogIOState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
AnalogIOState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 214 of file clproto.cpp.
DigitalIOState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
DigitalIOState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 257 of file clproto.cpp.
SpatialState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
SpatialState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 300 of file clproto.cpp.
CartesianState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
CartesianState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 341 of file clproto.cpp.
CartesianPose clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
CartesianPose clproto::decode | ( | const std::string & | msg | ) |
Definition at line 396 of file clproto.cpp.
CartesianTwist clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
CartesianTwist clproto::decode | ( | const std::string & | msg | ) |
Definition at line 444 of file clproto.cpp.
CartesianAcceleration clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
CartesianAcceleration clproto::decode | ( | const std::string & | msg | ) |
Definition at line 492 of file clproto.cpp.
CartesianWrench clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
CartesianWrench clproto::decode | ( | const std::string & | msg | ) |
Definition at line 541 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 584 of file clproto.cpp.
JointState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
JointState clproto::decode | ( | const std::string & | msg | ) |
Definition at line 630 of file clproto.cpp.
JointPositions clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
JointPositions clproto::decode | ( | const std::string & | msg | ) |
Definition at line 681 of file clproto.cpp.
JointVelocities clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
JointVelocities clproto::decode | ( | const std::string & | msg | ) |
Definition at line 729 of file clproto.cpp.
JointAccelerations clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
JointAccelerations clproto::decode | ( | const std::string & | msg | ) |
Definition at line 777 of file clproto.cpp.
JointTorques clproto::decode | ( | const std::string & | msg | ) |
Definition at line 173 of file clproto.cpp.
JointTorques clproto::decode | ( | const std::string & | msg | ) |
Definition at line 825 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 905 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 927 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 949 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 971 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 993 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 1015 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 1037 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 1059 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 1081 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 1103 of file clproto.cpp.
Definition at line 173 of file clproto.cpp.
Definition at line 1219 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
AnalogIOState & | obj | ||
) |
Definition at line 222 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
AnalogIOState & | obj | ||
) |
Definition at line 222 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianAcceleration & | obj | ||
) |
Definition at line 500 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianAcceleration & | obj | ||
) |
Definition at line 500 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianPose & | obj | ||
) |
Definition at line 404 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianPose & | obj | ||
) |
Definition at line 404 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianState & | obj | ||
) |
Definition at line 349 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianState & | obj | ||
) |
Definition at line 349 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianTwist & | obj | ||
) |
Definition at line 452 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianTwist & | obj | ||
) |
Definition at line 452 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianWrench & | obj | ||
) |
Definition at line 549 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
CartesianWrench & | obj | ||
) |
Definition at line 549 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
DigitalIOState & | obj | ||
) |
Definition at line 265 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
DigitalIOState & | obj | ||
) |
Definition at line 265 of file clproto.cpp.
Definition at line 592 of file clproto.cpp.
Definition at line 592 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointAccelerations & | obj | ||
) |
Definition at line 785 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointAccelerations & | obj | ||
) |
Definition at line 785 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointPositions & | obj | ||
) |
Definition at line 689 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointPositions & | obj | ||
) |
Definition at line 689 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointState & | obj | ||
) |
Definition at line 638 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointState & | obj | ||
) |
Definition at line 638 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointTorques & | obj | ||
) |
Definition at line 833 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointTorques & | obj | ||
) |
Definition at line 833 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointVelocities & | obj | ||
) |
Definition at line 737 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
JointVelocities & | obj | ||
) |
Definition at line 737 of file clproto.cpp.
Definition at line 997 of file clproto.cpp.
Definition at line 997 of file clproto.cpp.
Definition at line 953 of file clproto.cpp.
Definition at line 953 of file clproto.cpp.
Definition at line 1107 of file clproto.cpp.
Definition at line 1107 of file clproto.cpp.
Definition at line 1085 of file clproto.cpp.
Definition at line 1085 of file clproto.cpp.
Definition at line 909 of file clproto.cpp.
Definition at line 909 of file clproto.cpp.
Definition at line 1041 of file clproto.cpp.
Definition at line 1041 of file clproto.cpp.
Definition at line 1019 of file clproto.cpp.
Definition at line 1019 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
Parameter< std::vector< double > > & | obj | ||
) |
Definition at line 975 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
Parameter< std::vector< double > > & | obj | ||
) |
Definition at line 975 of file clproto.cpp.
Definition at line 931 of file clproto.cpp.
Definition at line 931 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
Parameter< std::vector< std::string > > & | obj | ||
) |
Definition at line 1063 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
Parameter< std::vector< std::string > > & | obj | ||
) |
Definition at line 1063 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
SpatialState & | obj | ||
) |
Definition at line 308 of file clproto.cpp.
bool clproto::decode | ( | const std::string & | msg, |
SpatialState & | obj | ||
) |
Definition at line 308 of file clproto.cpp.
Definition at line 181 of file clproto.cpp.
Definition at line 181 of file clproto.cpp.
Definition at line 1314 of file clproto.cpp.
Definition at line 1314 of file clproto.cpp.
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.
T | The desired control libraries object type |
msg | The serialized binary string to decode |
obj | A reference to a control libraries object |
Definition at line 7 of file decoders.cpp.
Decoding helper method for a RepeatedField message into vector data.
FieldT | The datatype within the repeated field |
message | A RepeatedField message |
Definition at line 52 of file decoders.hpp.
std::vector< FieldT > clproto::decoder | ( | const google::protobuf::RepeatedPtrField< FieldT > & | message | ) |
Decoding helper method for a RepeatedPtrField message into vector data.
FieldT | The datatype within the repeated field |
message | A RepeatedPtrField message |
Definition at line 57 of file decoders.hpp.
Eigen::Quaterniond clproto::decoder | ( | const proto::Quaterniond & | message | ) |
Definition at line 17 of file decoders.cpp.
Eigen::Vector3d clproto::decoder | ( | const proto::Vector3d & | message | ) |
Definition at line 13 of file decoders.cpp.
state_representation::Parameter< ParamT > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Decoding helper method for the Parameter type.
ParamT | The type contained within the Parameter object |
message | The protocol Parameter message object |
Parameter< int > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 22 of file decoders.cpp.
Parameter< std::vector< int > > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 30 of file decoders.cpp.
Parameter< double > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 39 of file decoders.cpp.
Parameter< std::vector< double > > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 47 of file decoders.cpp.
Parameter< bool > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 56 of file decoders.cpp.
Parameter< std::vector< bool > > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 64 of file decoders.cpp.
Parameter< std::string > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 73 of file decoders.cpp.
Parameter< std::vector< std::string > > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 81 of file decoders.cpp.
Parameter< Eigen::VectorXd > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 90 of file decoders.cpp.
Parameter< Eigen::MatrixXd > clproto::decoder | ( | const state_representation::proto::Parameter & | message | ) |
Definition at line 101 of file decoders.cpp.
std::string clproto::encode | ( | const T & | obj | ) |
Encode a control libraries object into a serialized binary string representation (wire format).
T | The provided control libraries object type |
obj | The control libraries object to encode |
std::string clproto::encode< AnalogIOState > | ( | const AnalogIOState & | obj | ) |
Definition at line 208 of file clproto.cpp.
std::string clproto::encode< AnalogIOState > | ( | const AnalogIOState & | obj | ) |
Definition at line 208 of file clproto.cpp.
std::string clproto::encode< CartesianAcceleration > | ( | const CartesianAcceleration & | obj | ) |
Definition at line 481 of file clproto.cpp.
std::string clproto::encode< CartesianAcceleration > | ( | const CartesianAcceleration & | obj | ) |
Definition at line 481 of file clproto.cpp.
std::string clproto::encode< CartesianPose > | ( | const CartesianPose & | obj | ) |
Definition at line 385 of file clproto.cpp.
std::string clproto::encode< CartesianPose > | ( | const CartesianPose & | obj | ) |
Definition at line 385 of file clproto.cpp.
std::string clproto::encode< CartesianState > | ( | const CartesianState & | obj | ) |
Definition at line 335 of file clproto.cpp.
std::string clproto::encode< CartesianState > | ( | const CartesianState & | obj | ) |
Definition at line 335 of file clproto.cpp.
std::string clproto::encode< CartesianTwist > | ( | const CartesianTwist & | obj | ) |
Definition at line 433 of file clproto.cpp.
std::string clproto::encode< CartesianTwist > | ( | const CartesianTwist & | obj | ) |
Definition at line 433 of file clproto.cpp.
std::string clproto::encode< CartesianWrench > | ( | const CartesianWrench & | obj | ) |
Definition at line 530 of file clproto.cpp.
std::string clproto::encode< CartesianWrench > | ( | const CartesianWrench & | obj | ) |
Definition at line 530 of file clproto.cpp.
std::string clproto::encode< DigitalIOState > | ( | const DigitalIOState & | obj | ) |
Definition at line 251 of file clproto.cpp.
std::string clproto::encode< DigitalIOState > | ( | const DigitalIOState & | obj | ) |
Definition at line 251 of file clproto.cpp.
std::string clproto::encode< Jacobian > | ( | const Jacobian & | obj | ) |
Definition at line 578 of file clproto.cpp.
std::string clproto::encode< Jacobian > | ( | const Jacobian & | obj | ) |
Definition at line 578 of file clproto.cpp.
std::string clproto::encode< JointAccelerations > | ( | const JointAccelerations & | obj | ) |
Definition at line 766 of file clproto.cpp.
std::string clproto::encode< JointAccelerations > | ( | const JointAccelerations & | obj | ) |
Definition at line 766 of file clproto.cpp.
std::string clproto::encode< JointPositions > | ( | const JointPositions & | obj | ) |
Definition at line 670 of file clproto.cpp.
std::string clproto::encode< JointPositions > | ( | const JointPositions & | obj | ) |
Definition at line 670 of file clproto.cpp.
std::string clproto::encode< JointState > | ( | const JointState & | obj | ) |
Definition at line 624 of file clproto.cpp.
std::string clproto::encode< JointState > | ( | const JointState & | obj | ) |
Definition at line 624 of file clproto.cpp.
std::string clproto::encode< JointTorques > | ( | const JointTorques & | obj | ) |
Definition at line 814 of file clproto.cpp.
std::string clproto::encode< JointTorques > | ( | const JointTorques & | obj | ) |
Definition at line 814 of file clproto.cpp.
std::string clproto::encode< JointVelocities > | ( | const JointVelocities & | obj | ) |
Definition at line 718 of file clproto.cpp.
std::string clproto::encode< JointVelocities > | ( | const JointVelocities & | obj | ) |
Definition at line 718 of file clproto.cpp.
Definition at line 989 of file clproto.cpp.
Definition at line 989 of file clproto.cpp.
Definition at line 945 of file clproto.cpp.
Definition at line 945 of file clproto.cpp.
std::string clproto::encode< Parameter< Eigen::MatrixXd > > | ( | const Parameter< Eigen::MatrixXd > & | obj | ) |
Definition at line 1099 of file clproto.cpp.
std::string clproto::encode< Parameter< Eigen::MatrixXd > > | ( | const Parameter< Eigen::MatrixXd > & | obj | ) |
Definition at line 1099 of file clproto.cpp.
std::string clproto::encode< Parameter< Eigen::VectorXd > > | ( | const Parameter< Eigen::VectorXd > & | obj | ) |
Definition at line 1077 of file clproto.cpp.
std::string clproto::encode< Parameter< Eigen::VectorXd > > | ( | const Parameter< Eigen::VectorXd > & | obj | ) |
Definition at line 1077 of file clproto.cpp.
Definition at line 901 of file clproto.cpp.
Definition at line 901 of file clproto.cpp.
std::string clproto::encode< Parameter< std::string > > | ( | const Parameter< std::string > & | obj | ) |
Definition at line 1033 of file clproto.cpp.
std::string clproto::encode< Parameter< std::string > > | ( | const Parameter< std::string > & | obj | ) |
Definition at line 1033 of file clproto.cpp.
std::string clproto::encode< Parameter< std::vector< bool > > > | ( | const Parameter< std::vector< bool > > & | obj | ) |
Definition at line 1011 of file clproto.cpp.
std::string clproto::encode< Parameter< std::vector< bool > > > | ( | const Parameter< std::vector< bool > > & | obj | ) |
Definition at line 1011 of file clproto.cpp.
std::string clproto::encode< Parameter< std::vector< double > > > | ( | const Parameter< std::vector< double > > & | obj | ) |
Definition at line 967 of file clproto.cpp.
std::string clproto::encode< Parameter< std::vector< double > > > | ( | const Parameter< std::vector< double > > & | obj | ) |
Definition at line 967 of file clproto.cpp.
std::string clproto::encode< Parameter< std::vector< int > > > | ( | const Parameter< std::vector< int > > & | obj | ) |
Definition at line 923 of file clproto.cpp.
std::string clproto::encode< Parameter< std::vector< int > > > | ( | const Parameter< std::vector< int > > & | obj | ) |
Definition at line 923 of file clproto.cpp.
std::string clproto::encode< Parameter< std::vector< std::string > > > | ( | const Parameter< std::vector< std::string > > & | obj | ) |
Definition at line 1055 of file clproto.cpp.
std::string clproto::encode< Parameter< std::vector< std::string > > > | ( | const Parameter< std::vector< std::string > > & | obj | ) |
Definition at line 1055 of file clproto.cpp.
std::string clproto::encode< SpatialState > | ( | const SpatialState & | obj | ) |
Definition at line 294 of file clproto.cpp.
std::string clproto::encode< SpatialState > | ( | const SpatialState & | obj | ) |
Definition at line 294 of file clproto.cpp.
std::string clproto::encode< State > | ( | const State & | obj | ) |
Definition at line 167 of file clproto.cpp.
std::string clproto::encode< State > | ( | const State & | obj | ) |
Definition at line 167 of file clproto.cpp.
std::string clproto::encode< std::shared_ptr< State > > | ( | const std::shared_ptr< State > & | obj | ) |
Definition at line 1126 of file clproto.cpp.
std::string clproto::encode< std::shared_ptr< State > > | ( | const std::shared_ptr< State > & | obj | ) |
Definition at line 1126 of file clproto.cpp.
proto::Quaterniond clproto::encoder | ( | const Eigen::Quaterniond & | quaternion | ) |
Definition at line 33 of file encoders.cpp.
proto::Vector3d clproto::encoder | ( | const Eigen::Vector3d & | vector | ) |
Definition at line 25 of file encoders.cpp.
proto::AnalogIOState clproto::encoder | ( | const state_representation::AnalogIOState & | analog_io_state | ) |
Definition at line 211 of file encoders.cpp.
proto::CartesianState clproto::encoder | ( | const state_representation::CartesianState & | cartesian_state | ) |
Definition at line 40 of file encoders.cpp.
proto::DigitalIOState clproto::encoder | ( | const state_representation::DigitalIOState & | digital_io_state | ) |
Definition at line 195 of file encoders.cpp.
proto::Jacobian clproto::encoder | ( | const state_representation::Jacobian & | jacobian | ) |
Definition at line 57 of file encoders.cpp.
proto::JointState clproto::encoder | ( | const state_representation::JointState & | joint_state | ) |
Definition at line 72 of file encoders.cpp.
|
inline |
Encoding helper method for the Parameter type.
ParamT | The type contained within the Parameter object |
parameter | The control libraries Parameter object |
Definition at line 79 of file encoders.hpp.
proto::SpatialState clproto::encoder | ( | const state_representation::SpatialState & | spatial_state | ) |
Definition at line 18 of file encoders.cpp.
proto::State clproto::encoder | ( | const state_representation::State & | state | ) |
Definition at line 11 of file encoders.cpp.
Encoding helper method for vector data into a RepeatedField message type.
FieldT | The datatype within the repeated field |
data | A vector of data |
Definition at line 74 of file encoders.hpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< bool > & | parameter | ||
) |
Definition at line 129 of file encoders.cpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< double > & | parameter | ||
) |
Definition at line 108 of file encoders.cpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< Eigen::MatrixXd > & | parameter | ||
) |
Definition at line 182 of file encoders.cpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< Eigen::VectorXd > & | parameter | ||
) |
Definition at line 172 of file encoders.cpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< int > & | parameter | ||
) |
Definition at line 87 of file encoders.cpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< std::string > & | parameter | ||
) |
Definition at line 150 of file encoders.cpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< std::vector< bool > > & | parameter | ||
) |
Definition at line 139 of file encoders.cpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< std::vector< double > > & | parameter | ||
) |
Definition at line 118 of file encoders.cpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< std::vector< int > > & | parameter | ||
) |
Definition at line 97 of file encoders.cpp.
proto::Parameter clproto::encoder | ( | proto::Parameter & | message, |
const Parameter< std::vector< std::string > > & | parameter | ||
) |
Definition at line 161 of file encoders.cpp.
state_representation::proto::Parameter clproto::encoder | ( | state_representation::proto::Parameter & | message, |
const state_representation::Parameter< ParamT > & | parameter | ||
) |
Encoding helper method for the Parameter type.
ParamT | The type contained within the Parameter object |
message | The protocol Parameter message to fill |
parameter | The control libraries Parameter object |
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.
T | The desired control libraries object type |
json | The JSON formatted state message description |
Definition at line 227 of file clproto.hpp.
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.
json | The JSON formatted state message description |
Definition at line 139 of file clproto.cpp.
Check if a serialized binary string can be decoded into a support control libraries message type.
msg | The serialized binary string to check |
Definition at line 36 of file clproto.cpp.
Encoding helper method for Eigen data into a RepeatedField message type.
matrix | An Eigen matrix of data |
Definition at line 7 of file encoders.cpp.
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.
fields | An ordered vector of encoded message fields | |
[out] | data | A raw data array to be packed with the fields |
Definition at line 72 of file clproto.cpp.
Definition at line 1115 of file clproto.cpp.
std::string clproto::to_json | ( | const std::string & | msg | ) |
Convert a serialized binary string from wire format into a JSON formatted state message description.
msg | The serialized binary string to decode |
Definition at line 122 of file clproto.cpp.
Convert a control libraries object into into a JSON formatted state message description.
T | The provided control libraries object type |
obj | The control libraries object to encode |
Definition at line 203 of file clproto.hpp.
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.
data | A raw data array that has been packed by pack_fields() |
Definition at line 96 of file clproto.cpp.