forked from CPL/Simulator
cpp
This commit is contained in:
77
DroneClientCpp/DroneData.h
Normal file
77
DroneClientCpp/DroneData.h
Normal file
@ -0,0 +1,77 @@
|
||||
#pragma once
|
||||
|
||||
#include <Windows.h>
|
||||
#include <vcclr.h>
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Runtime::InteropServices;
|
||||
|
||||
namespace DroneData {
|
||||
|
||||
public enum class DataMode : unsigned short
|
||||
{
|
||||
None = 0, Response = 1, Request = 2
|
||||
};
|
||||
|
||||
public enum class DataType : unsigned short
|
||||
{
|
||||
None = 0, Head = 1,
|
||||
DataIMU = 1001, DataPos = 1002,
|
||||
DataMotor4 = 2001, DataMotor6 = 2002
|
||||
};
|
||||
|
||||
public value struct DataHead
|
||||
{
|
||||
public:
|
||||
int Size;
|
||||
DataMode Mode;
|
||||
DataType Type;
|
||||
|
||||
static const int StrLen = sizeof(DataHead);
|
||||
};
|
||||
|
||||
public value struct XYZ
|
||||
{
|
||||
public:
|
||||
float X, Y, Z;
|
||||
};
|
||||
|
||||
public value struct DataIMU
|
||||
{
|
||||
public:
|
||||
DataHead Head;
|
||||
XYZ Acc, Gyr, Mag;
|
||||
|
||||
static const int StrLen = sizeof(DataIMU);
|
||||
};
|
||||
|
||||
public value struct DataPos
|
||||
{
|
||||
public:
|
||||
DataHead Head;
|
||||
XYZ Local;
|
||||
float LiDAR;
|
||||
|
||||
static const int StrLen = sizeof(DataPos);
|
||||
};
|
||||
|
||||
public value struct DataMotor4
|
||||
{
|
||||
public:
|
||||
DataHead Head;
|
||||
unsigned long long Count;
|
||||
float UL, UR, DL, DR;
|
||||
|
||||
static const int StrLen = sizeof(DataMotor4);
|
||||
};
|
||||
|
||||
public value struct DataMotor6
|
||||
{
|
||||
public:
|
||||
DataHead Head;
|
||||
unsigned long long Count;
|
||||
float UL, UR, LL, RR, DL, DR;
|
||||
|
||||
static const int StrLen = sizeof(DataMotor6);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user