forked from CPL/Simulator
cpp
This commit is contained in:
46
DroneClientCpp/Drone.h
Normal file
46
DroneClientCpp/Drone.h
Normal file
@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "DroneData.h"
|
||||
#include <Windows.h>
|
||||
#include <vcclr.h>
|
||||
|
||||
#using <System.dll>
|
||||
#using <mscorlib.dll>
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Collections::Generic;
|
||||
using namespace System::Runtime::InteropServices;
|
||||
|
||||
namespace DroneClient {
|
||||
|
||||
public ref class Drone
|
||||
{
|
||||
public:
|
||||
float AccX, AccY, AccZ;
|
||||
float GyrX, GyrY, GyrZ;
|
||||
float PosX, PosY;
|
||||
float LaserRange;
|
||||
|
||||
float MotorUL, MotorUR, MotorDL, MotorDR;
|
||||
|
||||
static array<Byte>^ GetBytes(Object^ data);
|
||||
static Object^ FromBytes(array<Byte>^ arr, Type^ type);
|
||||
|
||||
private:
|
||||
array<Byte>^ SendDataMotor4();
|
||||
array<Byte>^ RecvDataIMU(array<Byte>^ data);
|
||||
array<Byte>^ RecvDataPos(array<Byte>^ data);
|
||||
array<Byte>^ ClientRequestResponse(DroneData::DataHead head, array<Byte>^ body);
|
||||
|
||||
literal int DroneStreamCount = 512;
|
||||
array<Byte>^ DroneStreamData;
|
||||
int DroneStreamIndex;
|
||||
DroneData::DataHead DroneStreamHead;
|
||||
|
||||
public:
|
||||
Drone(); // Конструктор для инициализации
|
||||
|
||||
System::Collections::Generic::List<array<Byte>^>^ DataStream(array<Byte>^ data, int size);
|
||||
array<Byte>^ SendRequest();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user