RoboidControl-cpp/Messages.h
2024-12-02 09:16:46 +01:00

45 lines
1.8 KiB
C++

#pragma once
#include "Roboid.h"
namespace Passer {
namespace RoboidControl {
class Messages {
public:
static Angle8 ReceiveAngle8(unsigned char *buffer, unsigned char *startIndex);
static float ReceiveFloat16(unsigned char *buffer, unsigned char *startIndex);
static Spherical16 ReceiveSpherical16(unsigned char *buffer,
unsigned char *startIndex);
static void SendSingle100(unsigned char *buffer, unsigned int startIndex,
float value);
static void SendFloat16(unsigned char *buffer, unsigned char *startIndex,
float value);
// void SendInt32(unsigned char *buffer, unsigned int startIndex, Int32
// value);
static void SendAngle8(unsigned char *buffer, unsigned int startIndex,
const float value);
// void SendAngle16(unsigned char *buffer, unsigned int startIndex,
// const float value);
// void SendAngle32(unsigned char *buffer, unsigned int startIndex,
// const float value);
static void SendVector3(unsigned char *buffer, unsigned char *startIndex,
const Vector3 v);
static void SendQuaternion(unsigned char *buffer, const int startIndex,
const Quaternion q);
static void SendPolar(unsigned char *buffer, unsigned char *startIndex,
Polar p);
static void SendSpherical16(unsigned char *buffer, unsigned char *startIndex,
Spherical16 s);
static void SendSwingTwist(unsigned char *buffer, unsigned char *startIndex,
const SwingTwist16 r);
static void SendQuat32(unsigned char *buffer, unsigned char *startIndex,
const Quaternion q);
};
} // namespace RoboidControl
} // namespace Passer
using namespace Passer::RoboidControl;