protocol.proto 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  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_ASKDATACHANNEL=8003;
  61. CC_Manipulation=8004;
  62. CC_Radar=8005;
  63. CC_Switch=8006;
  64. CC_Ping=8007;
  65. CC_SensorStop=8008;
  66. CC_StopACK=8009;
  67. CC_Lidar=8010;
  68. CC_CANMSG=8011;
  69. CC_STATE=8012;
  70. CC_NDTPOS=8013;
  71. };
  72. enum VideoDesc
  73. {
  74. OK=0;
  75. Busy=1;
  76. Reject=2;
  77. NoFound=3;
  78. IsVideoing=4;
  79. };
  80. message SwitchDriver
  81. {
  82. int32 peer=1;
  83. };
  84. message NDTPos
  85. {
  86. float x =1;
  87. float y =2;
  88. float z =3;
  89. float rx =4;
  90. float ry =5;
  91. float rz =6;
  92. float rw =7;
  93. };
  94. message CSMoveBegin
  95. {
  96. int32 peer=1;
  97. int32 area=2;
  98. int32 no=3;
  99. };
  100. enum MoveDesc
  101. {
  102. Move_OK=0;
  103. Move_Encode_Fail=1;
  104. Move_Unknow_Faile=2;
  105. };
  106. message MoveRet
  107. {
  108. MoveDesc desc=1;
  109. int32 peer=2;
  110. };
  111. message CSMoveEnd
  112. {
  113. int32 area=1;
  114. int32 no=2;
  115. int32 uid=3;
  116. };
  117. message SCMoveBegin
  118. {
  119. int32 uid=1;
  120. int32 area=2;
  121. int32 no=3;
  122. float x=4;
  123. float y=5;
  124. };
  125. message SCMoveEnd
  126. {
  127. int32 area=1;
  128. int32 no=2;
  129. int32 uid=3;
  130. };
  131. message CSAdd
  132. {
  133. string serial=1;
  134. int32 type=2;
  135. string name=3;
  136. int32 car=4;
  137. };
  138. message SCAdd
  139. {
  140. bool ret=1;
  141. int32 uid=2;
  142. string name=3;
  143. int32 car=4;
  144. };
  145. message SCKickOff
  146. {
  147. };
  148. enum UserState
  149. {
  150. Offline=0;
  151. Idle=1;
  152. Remote=2;
  153. Automotive=3;
  154. AskRemote=4;
  155. };
  156. message CSState
  157. {
  158. UserState state=1;
  159. int32 uid=2;
  160. };
  161. message SCState
  162. {
  163. UserState state=1;
  164. int32 uid=2;
  165. };
  166. message Robot
  167. {
  168. int32 rid=1;
  169. string name=2;
  170. int32 type=3;
  171. UserState state=4;
  172. int32 carType=5;
  173. };
  174. message CSRobot
  175. {
  176. };
  177. message SCRobot
  178. {
  179. repeated Robot robot=1;
  180. };
  181. message CSSign
  182. {
  183. string account=1;
  184. string password=2;
  185. };
  186. message SCSign
  187. {
  188. bool ret=1;
  189. int32 uid=2;
  190. string name=3;
  191. };
  192. message CSReq
  193. {
  194. int32 peer=1;
  195. int32 index=2;
  196. int32 egotype=3;
  197. };
  198. message SCReq
  199. {
  200. VideoDesc desc=1;
  201. int32 peer=2;
  202. int32 egotype=3;
  203. };
  204. message CSRep
  205. {
  206. VideoDesc desc=1;
  207. int32 peer=2;
  208. int32 index=3;
  209. int32 egotype=4;
  210. };
  211. message SCRep
  212. {
  213. VideoDesc desc=1;
  214. int32 index=2;
  215. int32 egotype=3;
  216. int32 peer=4;
  217. };
  218. message Offer
  219. {
  220. int32 index=1;
  221. int32 peer=2;
  222. string type=3;
  223. string sdp=4;
  224. };
  225. message Answer
  226. {
  227. int32 index=1;
  228. int32 peer=2;
  229. string type=3;
  230. string sdp=4;
  231. };
  232. message Candidate
  233. {
  234. int32 index=1;
  235. int32 peer=2;
  236. string type=3;
  237. string candidate=4;
  238. int32 sdpMLineIndex =5;
  239. string sdpMid =6;
  240. int32 egotype=7;
  241. };
  242. message Leave
  243. {
  244. int32 peer=1;
  245. int32 egotype=2;
  246. };
  247. message Close
  248. {
  249. int32 peer=1;
  250. int32 egotype=2;
  251. int32 index=3;
  252. };
  253. message TestTextReq
  254. {
  255. string text=1;
  256. };
  257. message SyncTime
  258. {
  259. int32 tm_sec =1; // seconds after the minute - [0, 60] including leap second
  260. int32 tm_min =2; // minutes after the hour - [0, 59]
  261. int32 tm_hour =3; // hours since midnight - [0, 23]
  262. int32 tm_mday =4; // day of the month - [1, 31]
  263. int32 tm_mon =5; // months since January - [0, 11]
  264. int32 tm_year =6; // years since 1900
  265. int32 tm_wday =7; // days since Sunday - [0, 6]
  266. int32 tm_yday =8; // days since January 1 - [0, 365]
  267. int32 tm_isdst =9; // daylight savings time flag
  268. bool update_time=10;
  269. };
  270. message CCAskDataChannel
  271. {
  272. };
  273. message CCPing
  274. {
  275. int64 tick=1;
  276. double temp=2;
  277. };
  278. /*
  279. message radar_info
  280. {
  281. .. int32 index=1;
  282. int32 range=2;
  283. // int32 azimuth=3;
  284. // float verl=4;
  285. // int32 count=5;
  286. // int32 snr=6;
  287. }
  288. */
  289. message radar_node
  290. {
  291. int32 id =1;
  292. int32 range=2;
  293. };
  294. message CCSensor
  295. {
  296. repeated radar_node node=1;
  297. int32 left_encode=2;
  298. int32 right_encode=3;
  299. };
  300. message CCSwitch
  301. {
  302. bool front=1;
  303. };
  304. message State
  305. {
  306. int32 work_pressure=1;//工作系统压力
  307. int32 brake_pressure=2; //制动系统压力
  308. int32 gearbox_oil_temp=3;//变速箱油温
  309. int32 gearbox_oil_pressure=4; //变速箱油压
  310. int32 engine_rpm=5;//发动机转速
  311. int32 speed=6;
  312. // int32 gear=7;
  313. int32 engine_pressure=8;
  314. int32 cold_water=9;
  315. int32 steer_angle=10;
  316. int32 left_lock=11;
  317. int32 right_lock=12;
  318. };
  319. message LidarPoint
  320. {
  321. optional double timestamp = 1;
  322. optional uint32 seq = 2;
  323. optional string frame_id = 3;
  324. optional uint32 height=4;
  325. optional uint32 width=5;
  326. optional bool is_dense=6;
  327. optional bool is_left=7;
  328. repeated float data = 8;
  329. };
  330. message SensorStop
  331. {
  332. };
  333. message StopAck
  334. {
  335. };
  336. /*
  337. message CCManipulation
  338. {
  339. bytes sensor=1;
  340. bytes car=2;
  341. };
  342. */
  343. message can_net_frame
  344. {
  345. sint32 dlc =1;
  346. int32 canid =2;
  347. bytes data=3;
  348. };
  349. message CCCanMsg
  350. {
  351. repeated can_net_frame frams=1;
  352. };
  353. message SCAddRobot
  354. {
  355. Robot robot=1;
  356. };
  357. message SCDelRobot
  358. {
  359. int32 peer=1;
  360. int32 egotype=2;
  361. };