123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532 |
- #ifndef DATAFORMAT_H
- #define DATAFORMAT_H
- #define carCheckin (0x01)
- #define realtimeInfoUpload (0x02)
- #define supplementInfoUpload (0x03)
- #define carCheckout (0x04)
- #define platformReserve1 (0x05)
- #define platfoemReserve2 (0x06)
- #define heartbeats (0x07)
- #define terminalCheckTime (0x08)
- #define carStatus (0x09)
- #define driveDataLow (0x0A)
- #define driveDataHigh (0x0B)
- #define carAlarm (0x0C)
- #define sensorConfig (0x0D)
- #define multimedia (0x0E)
- #define V2X (0x0F)
- #define APPcarcall (0x10)
- #define humanIntervene (0x11)
- #define inquire (0x80)
- #define setting (0x81)
- #define carTerminalControl (0x82)
- #define carLongdistanceControl (0x83)
- #define longdistanceDrive (0x84)
- #define appointmentDispatch (0x85)
- #define routePlane (0x86)
- #define carCamControl (0x87)
- #define platformTo (0x88)
- #define downDataReserve (0x89)
- #define platformReserve (0xC0)
- #define resuccess (0x01)
- #define reerror (0x02)
- #define VINrepetition (0x03)
- #define reserves (0x40)
- #define comment (0xFE)
- #include <string>
- using namespace std;
- namespace iv {
- namespace platform {
- struct DataPackageHead//数据包结构
- {
- unsigned char startSymbol1;
- unsigned char startSymbol2;
- unsigned char commentSymbol;
- unsigned char responseSymbol;
- char VIN[17];
- unsigned char encryptionType;
- char dataLength[2];
-
-
- };
- struct CarcheckinData //车辆登入数据包格式 0x01
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- char checkinID[2];
- char ICCID[20];
- unsigned char storageSysCount;
- unsigned char storageSysEncodeLen;
-
- };
- struct RealtimeInfo//实时数据上报 0x02
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- };
- struct CarData//整车数据
- {
- unsigned char head;
- unsigned char carstatus;
- unsigned char chargeStatus;
- unsigned char runMode;
- char carSpeed[2];
- char carMileage[4];
- char totalVoltage[2];
- char totalElectricity[2];
- unsigned char SOC;
- unsigned char DCDC;
- unsigned char gear;
- char resistance[2];
- unsigned char accelerateMile;
- unsigned char brakingMile;
- };
- struct DriveMotorInfo//驱动电机数据
- {
- unsigned char head;
- unsigned char motorCount;
- unsigned char motorNum;
- unsigned char motorStatus;
- unsigned char motorControlTemperature;
- char motorRevolveSpeed[2];
- char motorTorque[2];
- unsigned char motorTemperature;
- char motorInputVoltage[2];
- char motorElectricity[2];
- };
- struct FuelCellInfo//燃料电池数据
- {
- unsigned char head;
- char fuelCellVoltage[2];
- char fuelCellElectricity[2];
- char fuelConsumptionRate[2];
- char fuelTemperatureNeedleCount[2];
- char needleTemperature[4];
- char hydrogenTemperature[2];
- unsigned char hydrogenTemperatureNum;
- char hydrogenConcentration[2];
- unsigned char hydrogenConcentrationNum;
- char hydrogenPressure[2];
- unsigned char hydrogenPressureNum;
- unsigned char DCDC;
- };
- struct EngineInfo//发动机数据
- {
- unsigned char head;
- unsigned char engineStatus;
- char bentAxleRevolveSpeed[2];
- char fuelConsumptionRate[2];
- };
- struct LocationInfo//定位数据
- {
- unsigned char head;
- unsigned char localStatus;
- char longtitude[4];
- char latitude[4];
- };
- struct ExtremumInfo//极值数据
- {
- unsigned char highVoltageNum;
- unsigned char highCellVoltageNum;
- char highCellVoltage[2];
- unsigned char lowVoltageNum;
- unsigned char lowCellVoltageNum;
- char lowCellVoltage[2];
- unsigned char highTemperatureNum;
- unsigned char highNeedleTemNum;
- unsigned char highTemperature;
- unsigned char lowTemperatureNum;
- unsigned char lowNeedleTemNum;
- unsigned char lowTemperature;
- };
- struct AlarmInfo//报警数据
- {
- unsigned char head;
- unsigned char highAlarmGrade;
- char normalAlarm[4];
- unsigned char chargeableDeviceCount;
- char chargeableDevice;
- unsigned char driveMotorCount;
- char driveMotor[4];
- unsigned char engineCount;
- char engine[4];
- unsigned char elseCount;
- char elses[4];
- };
- struct ChargeableDeviceVoltageInfo//可充电储能系统单体电压数据
- {
- unsigned char head;
- unsigned char chargeableDeviceCount;
- unsigned char chargeableDeviceNum;
- char chargeableDeviceVoltage[2];
- char chargeableDeviceElectricity[2];
- char cellCount[2];
- char beginCellNum[2];
- unsigned char beginCellCount;
- };
- struct ChargeableDeviceTemperatureInfo//可充电储能装置温度数据
- {
- unsigned char head;
- unsigned char chargeableDeviceCount;
- unsigned char chargeableDeviceNum;
- char temperatureNeedleCount[2];
- char temperature[4];
- };
- struct CarcheckoutData //车辆登出数据包格式 0x04
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- char checkoutID[2];
- };
- struct CarStatus//车身状态 0x09
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char leftFrontdoor;
- unsigned char rightFrontdoor;
- unsigned char leftBackdoor;
- unsigned char rightBackdoor;
- unsigned char backTrunk;
- unsigned char leftFrontWindow;
- unsigned char rightFrontWindow;
- unsigned char leftBackWindow;
- unsigned char rightBackWindow;
- unsigned char skyWindow;
- unsigned char leftFrontLock;
- unsigned char rightFrontLock;
- unsigned char leftBackLock;
- unsigned char rightBackLock;
- unsigned char handBrake;
- unsigned char positionLight;
- unsigned char nearLight;
- unsigned char farLight;
- unsigned char frontFogLight;
- unsigned char backFogLight;
- unsigned char airConditioner;
- unsigned char block;
- unsigned char key;
- };
- struct DriveDataLow//驾驶行为数据 (低频) 0x0A
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char autoDriveMode;
- unsigned char urgentStop;
- unsigned char UCStatus;
- unsigned char UCError;
- unsigned char UCMode;
- unsigned char UC2EPSRequest;
- unsigned char UC2EPSMess;
- unsigned char CDDAccelerate;
- unsigned char UCBlock;
- unsigned char brakeSatus;
- unsigned char leftStatus;
- unsigned char rightStatus;
- unsigned char UC2ACCStart;
- unsigned char UC2ACCStandstill;
- };
- struct DriveDataHigh//驾驶行为数据 (高频) 0x0B
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char collectCycle;
- char UC2EPSAngle[2];
- unsigned char UC2AEBDecelerate;
- char carSpeed[2];
- char engineRevolve[2];
- char accelerate[2];
- unsigned char UC2Accelerator;
- };
- struct CarAlarm//车辆报警信息 0x0C
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char EPSStatus;
- unsigned char UCStatus;
- unsigned char UCError;
- unsigned char MCUStatus;
- unsigned char BCMStatus;
- unsigned char VCMStatus;
- unsigned char EPS2ACCError;
- };
- struct SensorConfig//传感器配置信息 0x0D
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char lidar64;
- unsigned char lidar16left;
- unsigned char lidar16right;
- unsigned char lidar4;
- unsigned char radarFront;
- unsigned char radarBack;
- unsigned char GPS;
- unsigned char camera;
- };
- struct Multimedia//多媒体信息上报 0X0E
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- char multimediaID[4];
- unsigned char multimediaType;
- unsigned char multimediaEncode;
- unsigned char eventEncode;
- unsigned char channelID;
- char localzation[28];
- char multimediaData[100];
- };
- struct V2XInfo//V2X 信息 0x0F
- {
- };
- struct ToPlatform//与云平台服务的上行消息 0x10
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char commID1;
- unsigned char commInfo;
- };
- struct HumanIntervene//人工干预信息上报 0x11
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char humanInterType;
- char humanInterTime[2];
- };
- struct CarControl//车辆远程控制信息 0x83 下行
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char controlID1;
- unsigned char leftFrontdoor;
- unsigned char controlID2;
- unsigned char rightFrontdoor;
- unsigned char controlID3;
- unsigned char leftBackdoor;
- unsigned char controlID4;
- unsigned char rightBackdoor;
- unsigned char controlID5;
- unsigned char backTrunk;
- unsigned char controlID6;
- unsigned char leftFrontWindow;
- unsigned char controlID7;
- unsigned char rightFrontWindow;
- unsigned char controlID8;
- unsigned char leftBackWindow;
- unsigned char controlID9;
- unsigned char rightBackWindow;
- unsigned char controlID0A;
- unsigned char skyWindow;
- unsigned char controlID0B;
- unsigned char leftFrontLock;
- unsigned char controlID0C;
- unsigned char rightFrontLock;
- unsigned char controlID0D;
- unsigned char leftBackLock;
- unsigned char controlID0E;
- unsigned char rightBackLock;
- unsigned char controlID0F;
- unsigned char handBrake;
- unsigned char controlID10;
- unsigned char positionLight;
- unsigned char controlID11;
- unsigned char nearLight;
- unsigned char controlID12;
- unsigned char farLight;
- unsigned char controlID13;
- unsigned char frontFogLight;
- unsigned char controlID14;
- unsigned char backFogLight;
- unsigned char controlID15;
- unsigned char airConditioner;
- unsigned char controlID16;
- char speed[2];
- unsigned char controlID17;
- unsigned char key;
- };
- struct FarControl//远程遥控驾驶 0x84 下行
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char platMode;
- char CP2EPSAngle[2];
- char CP2Decelerate[2];
- unsigned char CP2Accelerate;
- unsigned char CP2Block;
- };
- struct AppointmentDispatch//预约与远程调度 0x85 下行
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char appointYear;
- unsigned char appointMonth;
- unsigned char appointDay;
- unsigned char appointHour;
- unsigned char appointMinute;
- unsigned char appointSecond;
- unsigned char humanCount;
- unsigned char srcLocalStatus;
- char srcLocalLong[4];
- char srcLocalLat[4];
- unsigned char desLocalStatus;
- char desLocalLong[4];
- char desLocalLat[4];
- };
- struct RoutePlaning
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char lineID;
- char numName[5];
- char usename[3];
- char password[3];
- char address[6];
- char port[2];
- char filename1[7];
- char filename2[12];
- char URLAddress[16];
- char connectTime[2];
- };
- struct PlatformTo//与云平台服务的下行消息 0x88
- {
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minute;
- unsigned char second;
- unsigned char infoID1;
- unsigned char appointStart;
- unsigned char infoID2;
- unsigned char carStart;
- unsigned char infoID3;
- unsigned char carStop;
- unsigned char infoID4;
- unsigned char backToGarage;
- unsigned char infoID5;
- unsigned char reAppoint;
- unsigned char infoID6;
- unsigned char keepGoing;
- };
- struct station
- {
- double longtitude;
- double latitude;
- int ID;
- };
- }
- }
- #endif
|