31 lines
958 B
C++
31 lines
958 B
C++
#include "Messages.h"
|
|
|
|
class PoseMsg : public IMessage {
|
|
public:
|
|
static const unsigned char id = 0x10;
|
|
unsigned char length = 4 + 4 + 4;
|
|
|
|
unsigned char networkId;
|
|
unsigned char thingId;
|
|
|
|
unsigned char poseType;
|
|
static const unsigned char Pose_Position = 0x01;
|
|
static const unsigned char Pose_Orientation = 0x02;
|
|
static const unsigned char Pose_LinearVelocity = 0x04; // For future use
|
|
static const unsigned char Pose_AngularVelocity = 0x08; // For future use
|
|
|
|
Spherical16 position;
|
|
SwingTwist16 orientation;
|
|
Spherical16 linearVelocity;
|
|
Spherical16 angularVelocity;
|
|
|
|
PoseMsg(unsigned char networkId, unsigned char thingId,
|
|
unsigned char poseType, Spherical16 position,
|
|
SwingTwist16 orientation, Spherical16 linearVelocity = Spherical16(),
|
|
Spherical16 angularVelocity = Spherical16());
|
|
PoseMsg(const char *buffer);
|
|
virtual ~PoseMsg();
|
|
|
|
virtual unsigned char Serialize(char *buffer) override;
|
|
};
|