#pragma once #include #include template struct FVector3 { T X; T Y; T Z; }; enum RadarPosition :int32_t { RADAR_LEFT, RADAR_RIGHT, RADAR_REAR, RADAR_ALL }; enum RenderPosition :int32_t { FRONT, BACK, LEFT, RIGHT, DASHBOARD, DASHBOARD_m, ALL }; enum EgoType :int32_t { None, User, Car }; enum ChannelType:int32_t { CHANNEL_CAR, CHANNEL_IMU, CHANNEL_RADAR, #ifdef LIDAR_SENSOR CHANNEL_LEFT_LIDAR, CHANNEL_RIGHT_LIDAR, #endif CHANNEL_ALL, }; enum UserState { Offline=0, Idle = 1, Remote = 2, Automotive = 3, AskRemote = 4 }; struct UserCamera { int32_t uid; EgoType type; UserState state; std::string name; }; 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, }; #pragma pack() struct RadarData { int32_t r0; int32_t r1; int32_t r2; int32_t r3; int32_t r4; int32_t r5; int32_t r6; int32_t r7; }; struct FeedData { //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 Engine_speed = 1;//发动机转速 int32_t Travel_speed = 2;//行驶速度 int32_t Fuel_level = 3;//燃油油位 int32_t Engine_temperature = 4;//发动机水温 int32_t Hydraulic_oil_temperature = 5;//液压油油温 int32_t Main_pump_1_pressure = 6;//主泵1压力 int32_t Main_pump_2_pressure = 7;//主泵2压力 int32_t Hand_gear = 8;//水箱水位 int32_t Actual_gear = 9;//发动机机油压力 _Float32 Gripper_height = 10;//抓具高度 _Float32 amplitude = 11;//幅度 int32_t Boom_angle = 12;//动臂角度 int32_t Stick_angle = 13;//斗杆角度 ///////////////////////////////////////////////////////报警信息 int32_t Idle_protection = 14;//怠速保护 int32_t Front_toggle = 15;//前轮对中 int32_t Back_toggle = 16;//后轮对中 int8_t Error_Buff[8];//报警信息 int32_t interlock = 18;//启动联锁 int32_t safety_switch = 19;//安全开关阀异常 int32_t arm_lift_pilot = 20;//大臂提升先导比例阀异常 int32_t arm_lowering_pilot = 21;//大臂下降先导比例阀异常 int32_t lever_lifting_pilot = 22;//斗杆提升先导比例阀异常 int32_t rod_lowering_pilot = 23;//斗杆下降先导比例阀异常 int32_t left_rotary_pilot = 24;//左回转先导比例阀异常 int32_t right_rotary_pilot = 25;//右回转先导比例阀异常 int32_t grab_open_pilot = 26;//抓斗开启先导比例阀异常 int32_t grab_close_pilot = 27;//抓斗闭合先导比例阀异常 int32_t safety_valves = 28;//安全开关阀 //增加 0x384 int32_t function_code =29 ; //功能码 int32_t main_add =30; //主地址 int32_t sub_add =31; //次地址 int32_t paramter=32 ; //参数值 //增加0x28b int32_t engine_spn =33; //发动机实时故障SPN int32_t engine_fmi =34; //发动机实时故障FMI int32_t engine_num =35; //发动机故障次数 int8_t all_Buff[8]; //0x28f // //增加0x28f // int32_t p_flameout =36; //P档熄火; // int32_t engine_start =37; //发动机启动 // int32_t emergency_signal = 38; //紧停信号 // int32_t preheating_monitoring=39; //预热监控 // int32_t park_switch =40; //驻车开关 // int32_t safety_bar_lock =41; //安全杆锁定 // int32_t forward_gear =42; //前进档 // int32_t backward_gear =43;//后退档 // int32_t first_gear = 44; //行驶一档 // int32_t sencond_gear = 45; //行驶2档 // int32_t n_gear =46; //实际N 档 // int32_t cabin_end =47; //驾驶室上升到位 // int32_t cab_end =48; //驾驶室下降到位 // int32_t reserve =49; //保留 // int32_t for_left_outrigger =50; //前左支腿选择 // int32_t for_right_outrigger =51; //前右支腿选择 // int32_t back_left_outrigger =52; //后左支腿选择 // int32_t back_right_outrigger=53; //后右支腿选择 // int32_t cab_start = 54; //驾驶室下降 // int32_t canbin_start=55;//驾驶室上升 // int32_t swinging_bridge_lock=56; //摆动桥锁定 // int32_t cab_emery =57; //驾驶室应急下降 // int32_t safety_bypass = 58; //安全旁通 // int32_t clear_alarm = 59; //清除蜂鸣器报警 // int32_t front_wheel_steering = 60; //前轮转向 // int32_t back_wheel_steering = 61; //后轮转向 // int32_t same_steering = 62; //前后轮同向转向 // int32_t reverse_steering= 63; //前后轮反向转向 // int32_t sound_signal_alarm = 64; //故障声光报警 // int32_t rod_intake_limit_valve =65; //斗杆内收限制阀 // int32_t rod_outtake_limit_valve = 66; //斗杆外摆限制阀 // int32_t boom_lift_limit_valve = 67; //动臂提升限制阀 // int32_t boom_out_limit_valve = 68; //动臂下降限制阀 // int32_t cab_emery_value = 69; //驾驶室应急下降阀 // int32_t charging_valve= 70; //充液阀 // int32_t parking_valve = 71; //驻车阀 // int32_t parking_back_signal = 72; //驻车反馈灯 // int32_t brake_signal = 73; //刹车灯 // int32_t power_delay = 74; //断电延时 // int32_t flash_signal= 75; //闪光信号 // int32_t left_for_outrigger_value = 76; //左前支腿伸缩电磁阀 // int32_t right_for_outrigger_value = 77; //右前支腿伸缩电磁阀 // int32_t left_back_outrigger_value = 78; //左后支腿伸缩电磁阀 // int32_t right_back_outrigger_value = 79; //右后支腿伸缩电磁阀 // int32_t for_steering_value = 80; //前轮转向电磁阀 // int32_t same_steering_value = 81; //四轮同向转向电磁阀 // int32_t rever_steering_value = 82; //四轮反向转向电磁阀 // int32_t first_gear_solenoid_valve = 83; //一档电磁阀 // int32_t sen_gear_solenoid_valve = 84; //二档电磁阀 // int32_t grab_rotary_switch_valve = 85; //抓具旋转切换电磁阀 //int32_t Boom_lift_pilot_pressure = 15;//动臂提升先导压力传感器故障 //int32_t Boom_drop_pilot_pressure = 16;//动臂下降先导压力传感器故障 //int32_t Stick_lift_pilot_pressure = 17;//斗杆提升先导压力传感器故障 //int32_t Stick_Drop_Pilot_Pressure = 18;//斗杆下降先导压力传感器故障 //int32_t left_turn_Pressure = 19;//车体左回转先导压力传感器故障 //int32_t right_turn_Pressure = 20;//车体右回转先导压力传感器故障 //int32_t outstretched_Pressure = 21;//支腿伸出先导压力传感器故障 //int32_t instretched_Pressure = 22;//支腿缩回先导压力传感器故障 //int32_t grab_opens_the_pilot = 23;//抓斗开启先导压力传感器故障 //int32_t grab_close_the_pilot = 24;//抓斗闭合先导压力传感器故障 //int32_t Main_pump_1_pilot_pressure = 25;//主泵1压力传感器故障 //int32_t Main_pump_2_pilot_pressure = 26;//主泵2压力传感器故障 //int32_t rod_cavity_pressure = 27;//动臂无杆腔压力传感器故障 //int32_t stick_cavity_pressure = 28;//斗杆无杆腔压力传感器故障 //int32_t Parking_pressure = 29;//驻车压力传感器故障 //int32_t Failure_of_the_accumulator_pressure = 30;//蓄能器压力传感器故障 //int32_t Gas_pedal_failure = 31;//油门踏板故障 //int32_t Faulty_throttle_knob = 32;//油门旋钮故障 //int32_t Leg_handle_failure = 33;//支腿手柄故障 //int32_t The_gripper_knob_faulty = 34;//抓具旋钮故障 //int32_t Hydraulic_oil_temperature_sensor_failure = 35;//液压油温传感器故障 //int32_t Faulty_fuel_level_sensor = 36;//燃油油位传感器故障 //int32_t Boom_inclination_sensor_failure = 37;//动臂倾角传感器故障 //int32_t Stick_inclination_sensor_communication = 38;//斗杆倾角传感器通讯故障 //int32_t Expansion_module_communication_failure = 39;//扩展模块通讯故障 //int32_t working_distance_exceeded = 40;//工作距离超限 //int32_t hydraulic_oil_temperature_low = 41;//燃油油位低 //int32_t Low_battery_voltage = 42;//电池电压低 //int32_t High_battery_voltage = 43;//电池电压高 //int32_t accumulator_pressure_abnormal = 44;//蓄能器压力异常 //int32_t hydraulic_oil_temperature_high = 45;//液压油温高 //int32_t Low_oil_pressure = 46;//机油压力低 //int32_t Low_coolant_level = 47;//冷却液液位低 //int32_t High_coolant_level = 48;//冷却液温度高 //int32_t system_overloaded = 49;//系统超载 //int32_t Safety_bypass_pressed = 50;//安全旁通按下 //int32_t Engine_SPN_failure = 51;//发动机SPN故障 //int32_t engine_warming_up = 52;//发动机预热中 //int32_t engine_warming_up_timeout = 53;//发动机预热超时 //int32_t Emergency_stop_press = 54;//紧急停止按下 }; struct cannet_frame_receive { int32_t canid; int8_t dlc; int8_t data[8]; }; typedef struct { int16_t fire_status; //启动/熄火 int16_t remote_forward; //远程控制前进 int16_t remote_backward; //远程控制后退 int16_t Brake; //刹车 int16_t Park; //驻车 int16_t Outrigger_status; //支腿 int16_t Turn_angle; //转弯角度 int16_t Left_turn; //左旋 左手柄 左信号 int16_t Right_turn; //右旋 右手柄 右信号 int16_t Raised; //小臂抬起 左手柄 向后 int16_t Decrease; //小臂下降 左手柄 向前 int16_t Stretch; //大臂伸起 右手柄 向后 int16_t Bulls_decline ; //大臂下降 右手柄 向前 int16_t Material ; //吸盘吸料 int16_t Discharge ; //吸盘放料 int16_t zhua; //抓斗抓料 int16_t fang; //抓斗放料 int16_t Shell_rotation_left ; //贝壳斗旋转 shun int16_t Shell_rotation_right ; //贝壳斗旋转 ni int16_t Cabin ; //驾驶室升 int16_t Cab ; //驾驶室降 int16_t Working_signal ; //作业灯开/关 int16_t Turn_left_signal; //左转向 开/关 int16_t Turn_right_signal ; //右转向 开/关 int16_t Warning_Light ; //警示灯 开/关 int16_t Trumpet; //喇叭 int16_t Security_lock ; //安全锁 开/关 int16_t Urget_stop ; //急停 int16_t Vehicle_id; //车辆id } vehicle_status;