#pragma once #include #include #include template struct FVector3 { T X; T Y; T Z; }; typedef FVector3 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; };