9#define CLPROTO_PACKING_MAX_FIELD_LENGTH (4096)
10#define CLPROTO_PACKING_MAX_FIELDS (64)
58 SPATIAL_STATE_MESSAGE = 2,
59 CARTESIAN_STATE_MESSAGE = 3,
60 CARTESIAN_POSE_MESSAGE = 4,
61 CARTESIAN_TWIST_MESSAGE = 5,
62 CARTESIAN_ACCELERATION_MESSAGE = 6,
63 CARTESIAN_WRENCH_MESSAGE = 7,
65 JOINT_STATE_MESSAGE = 9,
66 JOINT_POSITIONS_MESSAGE = 10,
67 JOINT_VELOCITIES_MESSAGE = 11,
68 JOINT_ACCELERATIONS_MESSAGE = 12,
69 JOINT_TORQUES_MESSAGE = 13,
71 ELLIPSOID_MESSAGE = 15,
72 PARAMETER_MESSAGE = 16,
73 DIGITAL_IO_STATE_MESSAGE = 17,
74 ANALOG_IO_STATE_MESSAGE = 18
87 UNKNOWN_PARAMETER = 0,
106bool is_valid(
const std::string& msg);
157bool decode(
const std::string& msg, T& obj);
172void pack_fields(
const std::vector<std::string>& fields,
char* data);
193std::string
to_json(
const std::string& msg);
A DecodingException is raised whenever a decoding operation fails due to invalid encoding.
A JsonParsingException is raised whenever a JSON conversion operation fails due to invalid encoding.
Bindings to encode and decode state objects into serialised binary message.
ParameterMessageType check_parameter_message_type(const std::string &msg)
Check which control libraries parameter type a serialized binary string can be decoded as,...
uint32_t field_length_t
Size type used to indicate number of fields and field data length in pack_fields() and unpack_fields(...
std::string from_json(const std::string &json)
Convert a JSON formatted state message description into a serialized binary string representation (wi...
MessageType check_message_type(const std::string &msg)
Check which control libraries message type a serialized binary string can be decoded as,...
T decode(const std::string &msg)
Decode a serialized binary string from wire format into a control libraries object instance.
MessageType
The MessageType enumeration contains the possible message types in the clproto.
std::string to_json(const std::string &msg)
Convert a serialized binary string from wire format into a JSON formatted state message description.
ParameterMessageType
The ParameterMessageType enumeration contains the possible value types contained in a parameter messa...
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::string encode(const T &obj)
Encode a control libraries object into a serialized binary string representation (wire format).
std::vector< std::string > unpack_fields(const char *data)
Unpack a data array into an ordered vector of encoded field messages.
bool is_valid(const std::string &msg)
Check if a serialized binary string can be decoded into a support control libraries message type.