protocol.proto 7.4 KB

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