123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- #pragma once
- #include<string>
- #include <unordered_map>
- #include <vector>
- template<typename T>
- struct FVector3
- {
- T X;
- T Y;
- T Z;
- };
- typedef FVector3<double> FVector3d;
-
- enum RadarPosition :int32_t
- {
- RADAR_LEFT,
- RADAR_RIGHT,
- RADAR_REAR,
- RADAR_ALL
- };
- enum RenderPosition :int32_t
- {
- FRONT,
- BACK,
- LEFT,
- RIGHT,
- LANCHOR,
- RANCHOR,
-
- ALL
- };
- enum EgoType :int32_t
- {
- None,
- User,
-
- Car
- };
- enum CarType
- {
- ZJ,
- KRESS,
- };
- enum ChannelType:int32_t
- {
- CHANNEL_CAR,
- CHANNEL_IMU,
- CHANNEL_RADAR,
-
- //CHANNEL_ENCODE,
-
-
- CHANNEL_ALL,
- };
- enum WorkArea
- {
- Area_A,
- Area_B,
- Area_C,
- Area_D,
- Area_E,
- Area_F,
- Area_G,
- Area_H,
- Area_I,
- Area_J,
- Area_ALL
- };
- enum Metal_Area
- {
- Put_Wait =0,
- Put_1=1,
- Put_2=2,
- Put_3=3,
- Get_Wait=10,
- Get_1=11,
- Get_2=12,
- Get_3=13,
- Out_Area=100
- };
- enum UserState
- {
- Offline,
- Idle = 1,
- Remote = 2,
- Automotive = 3,
- AskRemote = 4
- };
- enum MoveDesc
- {
- Move_OK = 0,
- Move_Encode_Fail = 1,
- Move_Unknow_Fail = 2
- };
- enum Lock_Status
- {
- Lock_Open,
- Lock_Closed,
- Lock_CloseInvalid,
- };
- struct UserCamera
- {
- int32_t uid;
- EgoType type;
- UserState state;
- CarType carType;
- std::string name;
- std::string viewurl;
-
- };
- struct OfferDesc
- {
- char type[16];
- char sdp[4096 * 3-16];
- };
- struct AnswerDesc
- {
- char type[16];
- char sdp[4096 * 3 - 16];
- };
- struct CandidateDesc
- {
- char candidate[4096];
- char sdp_mid[4096];
- int32_t sdp_mline_index;
- };
- #pragma pack(1)
- #define CAN_MSG_LEN 13
- struct cannet_frame
- {
- int8_t dlc;
- int32_t canid;
-
- int8_t data[8];
- };
- #pragma pack()
- enum RobotStatus
- {
- OK,
- Fail,
- };
- struct FeedData
- {
- int32_t engine_speed;
- int32_t travel_speed;
- int32_t fuel_level;
- int32_t engine_temperature;
- int32_t hydraulic_oil_temperature;
- int32_t main_pump_1_pressure;
- int32_t main_pump_2_pressure;
- int32_t hand_gear;
- int32_t actual_gear;
- float gripper_height;
- float amplitude;
- int32_t boom_angle;
- int32_t stick_angle;
- int32_t idle_protection;
- int32_t front_toggle;
- int32_t back_toggle;
- int32_t interlock ;//启动联锁
- int32_t safety_valves;//安全开关阀
- int32_t safety_switch ;//安全开关阀异常
- int32_t arm_lift_pilot ;//大臂提升先导比例阀异常
- int32_t arm_lowering_pilot ;//大臂下降先导比例阀异常
- int32_t lever_lifting_pilot ;//斗杆提升先导比例阀异常
- int32_t rod_lowering_pilot ;//斗杆下降先导比例阀异常
- int32_t left_rotary_pilot ;//左回转先导比例阀异常
- int32_t right_rotary_pilot ;//右回转先导比例阀异常
- int32_t grab_open_pilot ;//抓斗开启先导比例阀异常
- int32_t grab_close_pilot ;//抓斗闭合先导比例阀异常
-
- int8_t warningData[8];
- bool liftpilotpressuresensor_f;
- bool loweringpilotpressuresensor_f;
- bool leverliftpilotpressuresensor_f;
- bool rodloweringpilotpressurepensor_f;
- bool leftturnpilotpressuresensor_f;
- bool rightturnpilotpressuresensor_f;
- bool legextensionpilotpressuresensor_f;
- bool legretractpilotpressuresensor_f;
- bool grabopenpilotpressuresensor_f;
- bool grabclosurepilotpressuresensor_f;
- bool mainpump1pressuresensor_f;
- bool mainpump2pressuresensor_f;
- bool chamberpressuresensor_f;
- bool bucketrodpressuresensor_f;
- bool parkingpressuresensor_f;
- bool accumulatorpressuresensor_f;
- bool gaspedal_f;
- bool throttleknob_f;
- bool leghandle_f;
- bool gripknob_f;
- bool hydraulicoiltemperaturesensor_f;
- bool fuellevelsensor_f;
- bool boomanglesensor_f;
- bool bucketlevertiltsensor_f;
- bool expansionmodule_f;
- bool workingdistanceoverrun_f;
- bool lowoillevel_f;
- bool batterylowvoltage_f;
- bool batteryhighvoltage_f;
- bool accumulatorpressure_f;
- bool highhydraulicoiltemperature_f;
- bool lowoilpressure_f;
- bool coolantlevellow_f;
- bool coolanttemperaturehigh_f;
- bool systemoverload_f;
- bool safebypasspressdown_f;
- bool enginespn_f;
- bool enginewarmup_f;
- bool enginewarmuptimeout_f;
- bool emergencystoppress_f;
- bool leftfrontlegchosed;
- bool rightfrontlegchosed;
- bool leftrearlegchosed;
- bool rightrearlegchosed;
-
- int32_t work_pressure;
- int32_t brake_pressure;
- int32_t gearbox_oil_temp;
- int32_t gearbox_oil_pressure;
- int32_t engine_rpm;
- int32_t engine_pressure;
- int32_t speed;
- // int32_t gear;
- int32_t cold_water;
- int32_t steer_angle;
- int32_t left_lock_status;
- int32_t right_lock_status;
- int32_t left_angle;
- int32_t right_angle;
-
- };
|