protocol.proto 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  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_MoveBegin=2012;
  19. CS_MoveEnd=2013;
  20. CS_State=2014;
  21. CS_SwitchDriver=2015;
  22. CS_MoveRet=2016;
  23. CS_SyncTime=2017;
  24. };
  25. enum SCMessage
  26. {
  27. SC_NONE=0;
  28. SC_Sign=4000;
  29. SC_Req=4001;
  30. SC_Rep=4002;
  31. SC_Cancel=4003;
  32. SC_Offer=4004;
  33. SC_Answer=4005;
  34. SC_Candidate=4006;
  35. SC_Add =4007;
  36. SC_Robot=4008;
  37. SC_NotifyReq=4009;
  38. SC_NotifyRep=4010;
  39. SC_NotifyAnswer=4011;
  40. SC_NotifyOffer=4012;
  41. SC_NotifyCandidate=4013;
  42. SC_NotifyLeave=4014;
  43. SC_NotifyCancel=4015;
  44. SC_NotifyAdd=4016;
  45. SC_NotifyDel=4017;
  46. SC_NotifyCloseVideo=4018;
  47. SC_KickOff=4019;
  48. SC_MoveBegin=4020;
  49. SC_MoveEnd=4021;
  50. SC_State=4022;
  51. SC_SwitchDriver=4023;
  52. SC_MoveRet=4024;
  53. SC_NotifyState=4025;
  54. SC_SyncTime=4026;
  55. };
  56. enum CCMessage
  57. {
  58. CC_None=0;
  59. CC_Text=8000;
  60. CC_CAN=8001;
  61. CC_IMU=8002;
  62. CC_ASKDATACHANNEL=8003;
  63. CC_Manipulation=8004;
  64. CC_Radar=8005;
  65. CC_Switch=8006;
  66. CC_Ping=8007;
  67. CC_SensorStop=8008;
  68. CC_StopACK=8009;
  69. CC_Lidar=8010;
  70. CC_CANMSG=8011;
  71. CC_STATE=8012;
  72. CC_NDTPOS=8013;
  73. };
  74. enum VideoDesc
  75. {
  76. OK=0;
  77. Busy=1;
  78. Reject=2;
  79. NoFound=3;
  80. IsVideoing=4;
  81. };
  82. message SwitchDriver
  83. {
  84. int32 peer=1;
  85. };
  86. message NDTPos
  87. {
  88. float x =1;
  89. float y =2;
  90. float z =3;
  91. float rx =4;
  92. float ry =5;
  93. float rz =6;
  94. float rw =7;
  95. };
  96. message CSMoveBegin
  97. {
  98. int32 peer=1;
  99. int32 area=2;
  100. int32 no=3;
  101. };
  102. enum MoveDesc
  103. {
  104. Move_OK=0;
  105. Move_Encode_Fail=1;
  106. Move_Unknow_Faile=2;
  107. };
  108. message MoveRet
  109. {
  110. MoveDesc desc=1;
  111. int32 peer=2;
  112. };
  113. message CSMoveEnd
  114. {
  115. int32 area=1;
  116. int32 no=2;
  117. int32 uid=3;
  118. };
  119. message SCMoveBegin
  120. {
  121. int32 uid=1;
  122. int32 area=2;
  123. int32 no=3;
  124. float x=4;
  125. float y=5;
  126. };
  127. message SCMoveEnd
  128. {
  129. int32 area=1;
  130. int32 no=2;
  131. int32 uid=3;
  132. };
  133. message CSAdd
  134. {
  135. string serial=1;
  136. int32 type=2;
  137. string name=3;
  138. int32 car=4;
  139. };
  140. message SCAdd
  141. {
  142. bool ret=1;
  143. int32 uid=2;
  144. string name=3;
  145. int32 car=4;
  146. };
  147. message SCKickOff
  148. {
  149. };
  150. enum UserState
  151. {
  152. Offline=0;
  153. Idle=1;
  154. Remote=2;
  155. Automotive=3;
  156. AskRemote=4;
  157. };
  158. message CSState
  159. {
  160. UserState state=1;
  161. int32 uid=2;
  162. };
  163. message SCState
  164. {
  165. UserState state=1;
  166. int32 uid=2;
  167. };
  168. message Robot
  169. {
  170. int32 rid=1;
  171. string name=2;
  172. int32 type=3;
  173. UserState state=4;
  174. int32 carType=5;
  175. };
  176. message CSRobot
  177. {
  178. };
  179. message SCRobot
  180. {
  181. repeated Robot robot=1;
  182. };
  183. message CSSign
  184. {
  185. string account=1;
  186. string password=2;
  187. };
  188. message SCSign
  189. {
  190. bool ret=1;
  191. int32 uid=2;
  192. string name=3;
  193. string user_uuid=4;
  194. };
  195. message CSReq
  196. {
  197. int32 peer=1;
  198. int32 index=2;
  199. int32 egotype=3;
  200. };
  201. message SCReq
  202. {
  203. VideoDesc desc=1;
  204. int32 peer=2;
  205. int32 egotype=3;
  206. };
  207. message CSRep
  208. {
  209. VideoDesc desc=1;
  210. int32 peer=2;
  211. int32 index=3;
  212. int32 egotype=4;
  213. };
  214. message SCRep
  215. {
  216. VideoDesc desc=1;
  217. int32 index=2;
  218. int32 egotype=3;
  219. int32 peer=4;
  220. };
  221. message Offer
  222. {
  223. int32 index=1;
  224. int32 peer=2;
  225. string type=3;
  226. string sdp=4;
  227. };
  228. message Answer
  229. {
  230. int32 index=1;
  231. int32 peer=2;
  232. string type=3;
  233. string sdp=4;
  234. };
  235. message Candidate
  236. {
  237. int32 index=1;
  238. int32 peer=2;
  239. string type=3;
  240. string candidate=4;
  241. int32 sdpMLineIndex =5;
  242. string sdpMid =6;
  243. int32 egotype=7;
  244. };
  245. message Leave
  246. {
  247. int32 peer=1;
  248. int32 egotype=2;
  249. };
  250. message Close
  251. {
  252. int32 peer=1;
  253. int32 egotype=2;
  254. int32 index=3;
  255. };
  256. message TestTextReq
  257. {
  258. string text=1;
  259. };
  260. message SyncTime
  261. {
  262. int32 tm_sec =1; // seconds after the minute - [0, 60] including leap second
  263. int32 tm_min =2; // minutes after the hour - [0, 59]
  264. int32 tm_hour =3; // hours since midnight - [0, 23]
  265. int32 tm_mday =4; // day of the month - [1, 31]
  266. int32 tm_mon =5; // months since January - [0, 11]
  267. int32 tm_year =6; // years since 1900
  268. int32 tm_wday =7; // days since Sunday - [0, 6]
  269. int32 tm_yday =8; // days since January 1 - [0, 365]
  270. int32 tm_isdst =9; // daylight savings time flag
  271. bool update_time=10;
  272. };
  273. message CCAskDataChannel
  274. {
  275. };
  276. message IMuMessage
  277. {
  278. float rx=1;
  279. float ry=2;
  280. // float rz=3;
  281. };
  282. message CCPing
  283. {
  284. int64 tick=1;
  285. double temp=2;
  286. };
  287. /*
  288. message radar_info
  289. {
  290. .. int32 index=1;
  291. int32 range=2;
  292. // int32 azimuth=3;
  293. // float verl=4;
  294. // int32 count=5;
  295. // int32 snr=6;
  296. }
  297. */
  298. message radar_node
  299. {
  300. int32 id =1;
  301. int32 range=2;
  302. };
  303. message CCRadarMessage
  304. {
  305. int32 radar0=1;
  306. int32 radar1=2;
  307. int32 radar2=3;
  308. int32 radar3=4;
  309. int32 radar4=5;
  310. int32 radar5=6;
  311. int32 radar6=7;
  312. int32 radar7=8;
  313. };
  314. message CCSensor
  315. {
  316. repeated radar_node node=1;
  317. int32 left_encode=2;
  318. int32 right_encode=3;
  319. };
  320. message CCSwitch
  321. {
  322. bool front=1;
  323. };
  324. message State
  325. {
  326. /*
  327. int32 work_pressure=1;//工作系统压力
  328. int32 brake_pressure=2; //制动系统压力
  329. int32 gearbox_oil_temp=3;//变速箱油温
  330. int32 gearbox_oil_pressure=4; //变速箱油压
  331. int32 engine_rpm=5;//发动机转速
  332. int32 speed=6;
  333. // int32 gear=7;
  334. int32 engine_pressure=8;
  335. int32 cold_water=9;
  336. int32 steer_angle=10;
  337. int32 left_lock=11;
  338. int32 right_lock=12;
  339. */
  340. ///////////////////////////////////////////////////////状态参数
  341. int32 engine_speed = 1;//发动机转速
  342. int32 travel_speed = 2;//行驶速度
  343. int32 fuel_level = 3;//燃油油位
  344. int32 engine_temperature = 4;//发动机水温
  345. int32 hydraulic_oil_temperature = 5;//液压油油温
  346. int32 main_pump_1_pressure = 6;//主泵1压力
  347. int32 main_pump_2_pressure = 7;//主泵2压力
  348. int32 hand_gear = 8;//手挡挡位----改为水箱水位
  349. int32 actual_gear = 9;//实际挡位----改为发动机机油压力
  350. float gripper_height = 10;//抓具高度
  351. float amplitude = 11;//幅度
  352. int32 boom_angle = 12;//动臂角度
  353. int32 stick_angle = 13;//斗杆角度
  354. ///////////////////////////////////////////////////////报警信息
  355. int32 idle_protection = 14;//怠速保护
  356. int32 front_toggle = 15;//前轮对中-----新增的
  357. int32 back_toggle = 16;//后轮对中-----新增的
  358. bytes error_Buff = 17;//报警信息-----由原来的15改为17
  359. int32 interlock = 18;//启动联锁
  360. int32 safety_switch = 19;//安全开关阀异常
  361. int32 arm_lift_pilot = 20;//大臂提升先导比例阀异常
  362. int32 arm_lowering_pilot = 21;//大臂下降先导比例阀异常
  363. int32 lever_lifting_pilot = 22;//斗杆提升先导比例阀异常
  364. int32 rod_lowering_pilot = 23;//斗杆下降先导比例阀异常
  365. int32 left_rotary_pilot = 24;//左回转先导比例阀异常
  366. int32 right_rotary_pilot = 25;//右回转先导比例阀异常
  367. int32 grab_open_pilot = 26;//抓斗开启先导比例阀异常
  368. int32 grab_close_pilot = 27;//抓斗闭合先导比例阀异常
  369. int32 safety_valves = 28;//安全开关阀
  370. //增加 0x384
  371. int32 function_code =29 ; //功能码
  372. int32 main_add =30; //主地址
  373. int32 sub_add =31; //次地址
  374. int32 paramter=32 ; //参数值
  375. //增加0x28b
  376. int32 engine_spn =33; //发动机实时故障SPN
  377. int32 engine_fmi =34; //发动机实时故障FMI
  378. int32 engine_num =35; //发动机故障次数
  379. //增加0x28f
  380. bytes all_Buff =36;
  381. };
  382. message LidarPoint
  383. {
  384. optional double timestamp = 1;
  385. optional uint32 seq = 2;
  386. optional string frame_id = 3;
  387. optional uint32 height=4;
  388. optional uint32 width=5;
  389. optional bool is_dense=6;
  390. optional bool is_left=7;
  391. repeated float data = 8;
  392. };
  393. message SensorStop
  394. {
  395. };
  396. message StopAck
  397. {
  398. };
  399. /*
  400. message CCManipulation
  401. {
  402. bytes sensor=1;
  403. bytes car=2;
  404. };
  405. */
  406. message can_net_frame
  407. {
  408. sint32 dlc =1;
  409. int32 canid =2;
  410. bytes data=3;
  411. };
  412. message CCCanMsg
  413. {
  414. repeated can_net_frame frams=1;
  415. };
  416. message SCAddRobot
  417. {
  418. Robot robot=1;
  419. };
  420. message SCDelRobot
  421. {
  422. int32 peer=1;
  423. int32 egotype=2;
  424. };