protocol.proto 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. syntax="proto3";
  2. package RemoNet;
  3. enum CSMessage
  4. {
  5. CS_NONE=0;
  6. CS_Sign=2000;
  7. CS_Req=2001;
  8. CS_Rep=2002;
  9. CS_CancelReq=2003;
  10. CS_Offer=2004;
  11. CS_Answer=2005;
  12. CS_Candidate=2006;
  13. CS_Leave=2007;
  14. CS_KeepAlive=2008;
  15. CS_Add=2009;
  16. CS_Robot=2010;
  17. CS_CloseVideo=2011;
  18. CS_State=2014;
  19. };
  20. enum SCMessage
  21. {
  22. SC_NONE=0;
  23. SC_Sign=4000;
  24. SC_Req=4001;
  25. SC_Rep=4002;
  26. SC_Cancel=4003;
  27. SC_Offer=4004;
  28. SC_Answer=4005;
  29. SC_Candidate=4006;
  30. SC_Add =4007;
  31. SC_Robot=4008;
  32. SC_NotifyReq=4009;
  33. SC_NotifyRep=4010;
  34. SC_NotifyAnswer=4011;
  35. SC_NotifyOffer=4012;
  36. SC_NotifyCandidate=4013;
  37. SC_NotifyLeave=4014;
  38. SC_NotifyCancel=4015;
  39. SC_NotifyAdd=4016;
  40. SC_NotifyDel=4017;
  41. SC_NotifyCloseVideo=4018;
  42. SC_KickOff=4019;
  43. SC_State=4022;
  44. S2V_SendUserInfo=6011; //增加
  45. };
  46. //增加用于mqtt消息
  47. message UserActivityInfo
  48. {
  49. string user_uuid=1;
  50. int32 cockpit_id=2;
  51. int32 vehicle_id=3;
  52. };
  53. enum CCMessage
  54. {
  55. CC_None=0;
  56. CC_Text=8000;
  57. CC_CAN=8001;
  58. CC_IMU=8002;
  59. CC_ASKDATACHANNEL=8003;
  60. CC_Manipulation=8004;
  61. CC_Radar=8005;
  62. CC_Switch=8006;
  63. CC_Ping=8007;
  64. CC_SensorStop=8008;
  65. CC_StopACK=8009;
  66. CC_LIDARDATA=8010;
  67. CC_CANMSG=8011;
  68. CC_STATE=8012;
  69. CC_RobotAnalog=8017;
  70. CC_BootReq=8013;
  71. CC_StartupReq=8014;
  72. CC_BootRep=8015;
  73. CC_StartupRep=8016;
  74. // CC_FrontLight=8017;
  75. // CC_Wiper=8018;
  76. // CC_BackLight=8019;
  77. };
  78. enum VideoDesc
  79. {
  80. OK=0;
  81. Busy=1;
  82. Reject=2;
  83. NoFound=3;
  84. IsVideoing=4;
  85. };
  86. message CSAdd
  87. {
  88. string serial=1;
  89. int32 type=2;
  90. string name=3;
  91. };
  92. message SCAdd
  93. {
  94. bool ret=1;
  95. int32 uid=2;
  96. int32 cid=3;
  97. string name=4;
  98. };
  99. message SCKickOff
  100. {
  101. };
  102. message Robot
  103. {
  104. enum RobotState
  105. {
  106. Offline=0;
  107. Online=1;
  108. Busy=2;
  109. };
  110. int32 rid=1;
  111. string name=2;
  112. int32 type=3;
  113. RobotState state=4;
  114. };
  115. message CSRobot
  116. {
  117. };
  118. message SCRobot
  119. {
  120. repeated Robot robot=1;
  121. };
  122. message CSSign
  123. {
  124. string account=1;
  125. string password=2;
  126. };
  127. message SCSign
  128. {
  129. bool ret=1;
  130. int32 uid=2;
  131. int32 cid=3;
  132. string name=4;
  133. };
  134. message CSReq
  135. {
  136. int32 peer=1;
  137. int32 index=2;
  138. int32 egotype=3;
  139. };
  140. message SCReq
  141. {
  142. VideoDesc desc=1;
  143. int32 peer=2;
  144. int32 egotype=3;
  145. };
  146. message CSRep
  147. {
  148. VideoDesc desc=1;
  149. int32 peer=2;
  150. int32 index=3;
  151. int32 egotype=4;
  152. };
  153. message SCRep
  154. {
  155. VideoDesc desc=1;
  156. int32 index=2;
  157. int32 egotype=3;
  158. int32 peer=4;
  159. };
  160. message Offer
  161. {
  162. int32 index=1;
  163. int32 peer=2;
  164. string type=3;
  165. string sdp=4;
  166. };
  167. message Answer
  168. {
  169. int32 index=1;
  170. int32 peer=2;
  171. string type=3;
  172. string sdp=4;
  173. };
  174. message Candidate
  175. {
  176. int32 index=1;
  177. int32 peer=2;
  178. string type=3;
  179. string candidate=4;
  180. int32 sdpMLineIndex =5;
  181. string sdpMid =6;
  182. int32 egotype=7;
  183. };
  184. message Leave
  185. {
  186. int32 peer=1;
  187. int32 egotype=2;
  188. };
  189. message Close
  190. {
  191. int32 peer=1;
  192. int32 egotype=2;
  193. int32 index=3;
  194. };
  195. message TestTextReq
  196. {
  197. string text=1;
  198. };
  199. message CanMessage
  200. {
  201. int32 head=1;
  202. int32 canid=2;
  203. bytes data=3;
  204. };
  205. message CCCanMesage
  206. {
  207. bool islidar=1;
  208. repeated CanMessage message=2;
  209. };
  210. message Wiper
  211. {
  212. bool ret=1;
  213. };
  214. message FrontLight
  215. {
  216. bool ret=1;
  217. };
  218. message BackLight
  219. {
  220. bool ret=1;
  221. };
  222. message CCAskDataChannel
  223. {
  224. };
  225. message IMuMessage
  226. {
  227. float rx=1;
  228. float ry=2;
  229. // float rz=3;
  230. };
  231. message CCPing
  232. {
  233. int64 tick=1;
  234. };
  235. message CCRadarMessage
  236. {
  237. int32 radar0=1;
  238. int32 radar1=2;
  239. int32 radar2=3;
  240. int32 radar3=4;
  241. int32 radar4=5;
  242. int32 radar5=6;
  243. int32 radar6=7;
  244. int32 radar7=8;
  245. };
  246. enum Gears
  247. {
  248. None=0;
  249. N=1;
  250. D=2;
  251. R=3;
  252. };
  253. //挂挡
  254. enum Gears_D
  255. {
  256. None_d=0;
  257. D_1=1;
  258. D_2=2;
  259. D_3=3;
  260. D_4=4;
  261. };
  262. //左右转向灯
  263. enum DirectionLight
  264. {
  265. RightLight=0;
  266. LeftLight=1;
  267. OffLight=2;
  268. };
  269. message CCRobotAnalog
  270. {
  271. int32 steer=1;
  272. int32 arm=2; //举升臂
  273. int32 bucket=3; //翻斗
  274. int32 throttle=4; //油门
  275. int32 brake=5; //刹车
  276. // bool bootstrap=6; //钥匙一档上电
  277. // bool startup=7; //钥匙二档启动
  278. bool emergency=8; //急停
  279. bool resume=9;// 急停反转
  280. Gears gears=10;
  281. bool frontlight=11;
  282. bool backlight=12;
  283. bool wipe=13;
  284. DirectionLight directionlight=14;//左右转向灯
  285. bool buzzer=15;//车鸣笛
  286. Gears_D gears_d=16;//挂挡
  287. };
  288. message CCBootStrapReq
  289. {
  290. }
  291. message CCBooStrapRep
  292. {
  293. bool ret=1;
  294. }
  295. message CCStartupReq
  296. {
  297. }
  298. message CCStartupRep
  299. {
  300. bool ret=1;
  301. }
  302. message CCSwitch
  303. {
  304. bool front=1;
  305. };
  306. message LidarPoint
  307. {
  308. optional double timestamp = 1;
  309. optional uint32 seq = 2;
  310. optional string frame_id = 3;
  311. optional uint32 height=4;
  312. optional uint32 width=5;
  313. optional bool is_dense=6;
  314. optional bool is_left=7;
  315. repeated float data = 8;
  316. };
  317. message SensorStop
  318. {
  319. };
  320. message StopAck
  321. {
  322. };
  323. message CCManipulation
  324. {
  325. bytes sensor=1;
  326. bytes car=2;
  327. };
  328. message SCAddRobot
  329. {
  330. Robot robot=1;
  331. };
  332. message SCDelRobot
  333. {
  334. int32 peer=1;
  335. int32 egotype=2;
  336. };
  337. message State
  338. {
  339. /*
  340. int32 work_pressure=1;//工作系统压力
  341. int32 brake_pressure=2; //制动系统压力
  342. int32 gearbox_oil_temp=3;//变速箱油温
  343. int32 gearbox_oil_pressure=4; //变速箱油压
  344. int32 engine_rpm=5;//发动机转速
  345. int32 speed=6;
  346. int32 engine_pressure=8;
  347. int32 cold_water=9;
  348. int32 steer_angle=10;
  349. int32 left_lock=11;
  350. int32 right_lock=12;
  351. */
  352. ///////////////////////////////////////////////////////状态参数
  353. int32 engine_speed = 1;//发动机转速
  354. int32 travel_speed = 2;//行驶速度
  355. int32 fuel_level = 3;//燃油油位
  356. int32 engine_temperature = 4;//发动机水温
  357. int32 hydraulic_oil_temperature = 5;//液压油油温
  358. int32 main_pump_1_pressure = 6;//主泵1压力
  359. int32 main_pump_2_pressure = 7;//主泵2压力
  360. int32 hand_gear = 8;//水箱水位
  361. int32 actual_gear = 9;//发动机机油压力
  362. float gripper_height = 10;//抓具高度
  363. float amplitude = 11;//幅度
  364. int32 boom_angle = 12;//动臂角度
  365. int32 stick_angle = 13;//斗杆角度
  366. ///////////////////////////////////////////////////////报警信息
  367. int32 idle_protection = 14;//怠速保护
  368. int32 front_toggle = 15;//前轮对中
  369. int32 back_toggle = 16;//后轮对中
  370. bytes error_Buff = 17;//报警信息
  371. int32 interlock = 18;//启动联锁
  372. int32 safety_switch = 19;//安全开关阀异常
  373. int32 arm_lift_pilot = 20;//大臂提升先导比例阀异常
  374. int32 arm_lowering_pilot = 21;//大臂下降先导比例阀异常
  375. int32 lever_lifting_pilot = 22;//斗杆提升先导比例阀异常
  376. int32 rod_lowering_pilot = 23;//斗杆下降先导比例阀异常
  377. int32 left_rotary_pilot = 24;//左回转先导比例阀异常
  378. int32 right_rotary_pilot = 25;//右回转先导比例阀异常
  379. int32 grab_open_pilot = 26;//抓斗开启先导比例阀异常
  380. int32 grab_close_pilot = 27;//抓斗闭合先导比例阀异常
  381. int32 safety_valves = 28;//安全开关阀
  382. //增加 0x384
  383. int32 function_code =29 ; //功能码
  384. int32 main_add =30; //主地址
  385. int32 sub_add =31; //次地址
  386. int32 paramter=32 ; //参数值
  387. //增加0x28b
  388. int32 engine_spn =33; //发动机实时故障SPN
  389. int32 engine_fmi =34; //发动机实时故障FMI
  390. int32 engine_num =35; //发动机故障次数
  391. //增加0x28f
  392. bytes all_Buff=36;
  393. };
  394. message can_net_frame
  395. {
  396. sint32 dlc =1;
  397. int32 canid =2;
  398. bytes data=3;
  399. };
  400. message CCCanMsg
  401. {
  402. repeated can_net_frame frams=1;
  403. };