9#define CLPROTO_PACKING_MAX_FIELD_LENGTH (4096)
10#define CLPROTO_PACKING_MAX_FIELDS (64)
65 SPATIAL_STATE_MESSAGE = 2,
66 CARTESIAN_STATE_MESSAGE = 3,
67 CARTESIAN_POSE_MESSAGE = 4,
68 CARTESIAN_TWIST_MESSAGE = 5,
69 CARTESIAN_ACCELERATION_MESSAGE = 6,
70 CARTESIAN_WRENCH_MESSAGE = 7,
72 JOINT_STATE_MESSAGE = 9,
73 JOINT_POSITIONS_MESSAGE = 10,
74 JOINT_VELOCITIES_MESSAGE = 11,
75 JOINT_ACCELERATIONS_MESSAGE = 12,
76 JOINT_TORQUES_MESSAGE = 13,
78 ELLIPSOID_MESSAGE = 15,
79 PARAMETER_MESSAGE = 16
92 UNKNOWN_PARAMETER = 0,
111bool is_valid(
const std::string& msg);
162bool decode(
const std::string& msg, T& obj);
177void pack_fields(
const std::vector<std::string>& fields,
char* data);
198std::string
to_json(
const std::string& msg);
209 return to_json(encode<T>(obj));
220std::string
from_json(
const std::string& json);
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.
std::chrono::nanoseconds timestamp_duration_t
Duration type to use when representing chrono timestamps as integer count since epoch.
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.