scene.proto 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. //版本
  2. syntax = "proto3";
  3. package scene;
  4. option java_multiple_files = true;
  5. // grpc插件生成的类的报名,随便写
  6. option java_package = "com.fdkk.fdkkmeta.grpc";
  7. // grpc的方法
  8. service SceneGrpcService {
  9. rpc test (TestRequest) returns (TestReply){}
  10. rpc getRoute (RouteRequest) returns (RouteReply){}
  11. rpc init (InitRequest) returns (NormalReply){}
  12. rpc rotate (RotateRequest) returns (NormalReply){}
  13. // rpc moveStart (StartMoveRequest) returns (MoveReply){}
  14. // rpc moveProcess (MoveNextNeighborRequest) returns (MoveReply){}
  15. rpc echo (EchoRequest) returns (EchoReply){}
  16. rpc usersState (GetNewUserStateRequest) returns (GetNewUserStateReply){}
  17. rpc getBreakPoint (BreakPointRequest) returns (BreakPointReply){}
  18. rpc joystick (JoystickRequest) returns (NormalReply){} //操作杆
  19. }
  20. message TestRequest {
  21. string name=3;
  22. }
  23. message TestReply {
  24. bool msg=3;
  25. }
  26. // 全局对象
  27. message Point {
  28. string x=1;
  29. string y=2;
  30. string z=3;
  31. }
  32. // 全局对象
  33. message AngleUe4 {
  34. int32 pitch=1;
  35. int32 yaw=2;
  36. int32 roll=3;
  37. }
  38. // 全局对象
  39. message RouteArray{
  40. int32 id=1;
  41. Point location=2;
  42. }
  43. // getRoute入参对象
  44. message RouteRequest {
  45. Point s_location=1;
  46. Point e_location=2;
  47. string sceneCode=3;
  48. }
  49. // getRoute出参对象
  50. message RouteReply{
  51. repeated RouteArray in=1;
  52. }
  53. // 入参对象
  54. message SceneRequest {
  55. string id=1;
  56. string name=2;
  57. }
  58. // 出参对象
  59. message SceneReply {
  60. string res=1;
  61. }
  62. /**********************************************************/
  63. // 正常出参对象
  64. message NormalReply {
  65. int32 code=1; //0/1 0表示没收到,1表示收到
  66. }
  67. /**********************************************************/
  68. /***********************************************************/
  69. message Space {
  70. Point position=1;
  71. AngleUe4 angle=2;
  72. }
  73. message Extra{
  74. bool removeWhenDisconnected=1;
  75. }
  76. message State {
  77. string roomTypeId=1;
  78. int32 person=2;
  79. string avatarId=3;
  80. string skinId=4;
  81. string roomId=5;
  82. bool isHost=6;
  83. bool isFollowHost=7;
  84. string skinDataVersion=8;
  85. string avatarComponents=9;
  86. string nickName=10;
  87. int32 movingMode=11;
  88. string attitude=12;
  89. string areaName=13;
  90. string pathName=14;
  91. string pathId=15;
  92. int32 avatarSize=16;
  93. Extra extra=17;
  94. bool prioritySync=18;
  95. Space player=19;
  96. Space camera=20;
  97. Point cameraCenter=21;
  98. }
  99. message RenderInfo{
  100. int32 renderType=1;
  101. string videoFrame=2;
  102. int32 cameraStateType=3;
  103. int32 isMoving=4;
  104. int32 needIfr=5;
  105. int32 isVideo=6;
  106. int32 stillFrame=7;
  107. int32 isRotating=8;
  108. int32 isFollowing=9;
  109. repeated string clientPanoTitlesBitmap=10;
  110. string clientPanoTreceId=11;
  111. string prefetchVideoId=12;
  112. bool noMedia=13;
  113. }
  114. message Event{
  115. string id=1;
  116. int32 type =2;
  117. repeated Point points=3;
  118. string rotateEvent=4;
  119. string removeVisitorEvent=5;
  120. }
  121. message UserState{
  122. string userId=1;
  123. State playerState=2;
  124. RenderInfo renderInfo=3;
  125. Event event=4;
  126. int32 relation=5;
  127. }
  128. /***********************************************************/
  129. // init入参对象
  130. message InitRequest {
  131. string user_id=1;
  132. string nick_name=2;
  133. string skin_id=3;
  134. string avatar_id=4;
  135. string room_id=5;
  136. string app_id=6;
  137. Space player=7;
  138. }
  139. /**********************************************************/
  140. message EchoMsg{
  141. string echoMsg=1;
  142. }
  143. message EchoRequest{
  144. int32 action_type=1; //1009
  145. EchoMsg echo_msg=2;
  146. string trace_id=3;
  147. string user_id=4;
  148. }
  149. message EchoReply{
  150. int32 actionType=1; //1009
  151. int32 pointType=2;
  152. string extra=3;
  153. string traceId=4;
  154. string packetId=5;
  155. repeated Point nps=6;
  156. int32 peopleNum=7;
  157. string zoneId=8;
  158. string echoMsg=9;
  159. string reserveDetail=10;
  160. repeated string userWithAvatarList=11;
  161. repeated UserState newUserStates=12;
  162. int32 code=13;
  163. string msg=14;
  164. }
  165. /*********************************************/
  166. message getNewUserStateAction{
  167. int32 userType=1;
  168. }
  169. message GetNewUserStateRequest{
  170. int32 action_type=1; //1024
  171. getNewUserStateAction getNewUserStateAction=2;
  172. string trace_id=3;
  173. string user_id=4;
  174. }
  175. message GetNewUserStateReply{
  176. int32 actionType=1; //1024
  177. int32 pointType=2;
  178. string extra=3;
  179. string traceId=4;
  180. string packetId=5;
  181. repeated Point nps=6;
  182. int32 peopleNum=7;
  183. string zoneId=8;
  184. string echoMsg=9;
  185. string reserveDetail=10;
  186. repeated string userWithAvatarList=11;
  187. repeated UserState newUserStates=12;
  188. int32 code=13;
  189. string msg=14;
  190. }
  191. /*********************************************/
  192. //全局对象,旋转的参数
  193. message RotationAction{
  194. int32 vertical_move=1;
  195. double horizontal_move=2;
  196. }
  197. // rotate入参对象
  198. message RotateRequest {
  199. int32 action_type=1; //1014
  200. RotationAction rotation_action=2;
  201. string trace_id=3;
  202. string user_id=4;
  203. }
  204. /**********************************************************/
  205. //正常的反馈
  206. //message NormalReply {
  207. // repeated string traceIds=1;
  208. // string vehicle=2;
  209. // repeated UserState newUserStates=3;
  210. // repeated int32 actionResponses=4;
  211. // int32 getStateType=5;
  212. // int32 code=6;
  213. // string msg=7;
  214. // string frameSrc=8; //视频路径
  215. //}
  216. /**********************************************************/
  217. //
  218. message ClickingAction {
  219. Point clicking_point=1;
  220. int32 clicking_type=2;
  221. string extra=3;
  222. string attitude=4;
  223. }
  224. message MoveRequest {
  225. int32 action_type=1; //1
  226. ClickingAction clicking_action=2;
  227. State clicking_state=3;
  228. string trace_id=4;
  229. string user_id=5;
  230. }
  231. //// 开始请求漫游
  232. //message StartMoveRequest {
  233. // int32 action_type=1;
  234. // ClickingAction clicking_action=2;
  235. // State clicking_state=3;
  236. // string trace_id=4;
  237. // string user_id=5;
  238. //}
  239. //
  240. //// 请求移动下一段
  241. //message MoveNextNeighborRequest {
  242. // string user_id=1;
  243. // string trace_id=2;
  244. // bool next=3; //true表示继续拿下一个,false表示结束(一般是有新的请求)
  245. //}
  246. // move出参对象
  247. // 这需要自定义
  248. //message MoveReply {
  249. // repeated string traceIds=1;
  250. // string vehicle=2;
  251. // repeated UserState newUserStates=3; //自己的话,不要有player,camera和cameraCenter。自己对应的这三个属性在8,9,10上,到webrtc服务器上组装
  252. // repeated int32 actionResponses=4;
  253. // int32 getStateType=5;
  254. // int32 code=6;
  255. // string msg=7;
  256. // //每一段的人物和相机坐标,第一段可能还有初始旋转
  257. // repeated Space player=8;
  258. // repeated Space camera=9;
  259. // repeated Point cameraCenter=10;
  260. // repeated string frameSrc=11;
  261. // bool isEnd=12; //false表示可以继续移动,true表示这次移动已经结束
  262. //}
  263. /**********************************************************/
  264. /**********************************************************/
  265. message DirAction{
  266. int32 move_angle=1;
  267. int32 speed_level=2;
  268. }
  269. //控制杆移动
  270. message JoystickRequest {
  271. int32 action_type=1;
  272. DirAction dir_action=2;
  273. string trace_id=3;
  274. string user_id=4;
  275. string packet_id=5;
  276. }
  277. /**********************************************************/
  278. /**********************************************************/
  279. message NeighborPointsAction{
  280. Point point=1;
  281. int32 level=2;
  282. bool containSelf=3;
  283. int32 searchRange=4;
  284. }
  285. // move入参对象
  286. message BreakPointRequest{
  287. int32 action_type=1; //1004
  288. NeighborPointsAction get_neighbor_points_action=2;
  289. string trace_id=3;
  290. string user_id=4;
  291. }
  292. // move出参对象
  293. message BreakPointReply {
  294. int32 actionType=1; //1004
  295. int32 pointType=2;
  296. string extra=3;
  297. string traceId=4;
  298. string packetId=5;
  299. repeated Point nps=6;
  300. int32 peopleNum=7;
  301. string zoneId=8;
  302. string echoMsg=9;
  303. string reserveDetail=10;
  304. repeated string userWithAvatarList=11;
  305. repeated UserState newUserStates=12;
  306. int32 code=13;
  307. string msg=14;
  308. }
  309. /**********************************************************/