Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add state_representation::Parameters to clproto #180

Merged
merged 12 commits into from
Aug 25, 2021
14 changes: 14 additions & 0 deletions protocol/clproto_cpp/include/clproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,24 @@

namespace clproto {

/**
* @class DecodingException
* @brief A DedocdingException is raised whenever a
* decoding operation fails due to invalid encoding.
*/
class DecodingException : public std::runtime_error {
public:
explicit DecodingException(const std::string& msg);
};

/**
* @brief The MessageType enumeration contains the possible
* message types in the clproto.
* @details 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.
*/
enum MessageType {
UNKNOWN_MESSAGE = 0,
STATE_MESSAGE = 1,
Expand All @@ -27,6 +40,7 @@ enum MessageType {
JOINT_TORQUES_MESSAGE = 13,
SHAPE_MESSAGE = 14,
ELLIPSOID_MESSAGE = 15,
PARAMETER_MESSAGE = 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No comma at the end?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably not that is the last one of the enum

};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "state_representation/space/joint/jacobian.proto";
import "state_representation/space/joint/joint_state.proto";
import "state_representation/geometry/shape.proto";
import "state_representation/geometry/ellipsoid.proto";
import "state_representation/parameters/parameter.proto";

message StateMessage {
oneof message_type {
Expand All @@ -27,5 +28,6 @@ message StateMessage {
JointTorques joint_torques = 13;
Shape shape = 14;
Ellipsoid ellipsoid = 15;
Parameter parameter = 16;
}
}