123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- //版本
- syntax = "proto3";
- package scene;
- option java_multiple_files = true;
- // grpc插件生成的类的报名,随便写
- option java_package = "com.fdkk.fdkkmeta.grpc";
- // grpc的方法
- service SceneGrpcService {
- rpc getRoute (RouteRequest) returns (RouteReply){}
- rpc init (InitRequest) returns (NormalReply){}
- rpc rotate (RotateRequest) returns (NormalReply){}
- // rpc moveStart (StartMoveRequest) returns (MoveReply){}
- // rpc moveProcess (MoveNextNeighborRequest) returns (MoveReply){}
- rpc echo (EchoRequest) returns (EchoReply){}
- rpc usersState (GetNewUserStateRequest) returns (GetNewUserStateReply){}
- rpc getBreakPoint (BreakPointRequest) returns (BreakPointReply){}
- rpc joystick (JoystickRequest) returns (NormalReply){} //操作杆
- }
- // 全局对象
- message Point {
- string x=1;
- string y=2;
- string z=3;
- }
- // 全局对象
- message AngleUe4 {
- int32 pitch=1;
- int32 yaw=2;
- int32 roll=3;
- }
- // 全局对象
- message RouteArray{
- int32 id=1;
- Point location=2;
- }
- // getRoute入参对象
- message RouteRequest {
- Point s_location=1;
- Point e_location=2;
- string sceneCode=3;
- }
- // getRoute出参对象
- message RouteReply{
- repeated RouteArray in=1;
- }
- // 入参对象
- message SceneRequest {
- string id=1;
- string name=2;
- }
- // 出参对象
- message SceneReply {
- string res=1;
- }
- /**********************************************************/
- // 正常出参对象
- message NormalReply {
- string code=1; //0/1 0表示没收到,1表示收到
- }
- /**********************************************************/
- /***********************************************************/
- message Space {
- Point position=1;
- AngleUe4 angle=2;
- }
- message State {
- string roomTypeId=1;
- int32 person=2;
- string avatarId=3;
- string skinId=4;
- string roomId=5;
- bool isHost=6;
- bool isFollowHost=7;
- string skinDataVersion=8;
- string avatarComponents=9;
- string nickName=10;
- int32 movingMode=11;
- string attitude=12;
- string areaName=13;
- string pathName=14;
- string pathId=15;
- int32 avatarSize=16;
- string extra=17;
- bool prioritySync=18;
- Space player=19;
- Space camera=20;
- Point cameraCenter=21;
- }
- message RenderInfo{
- int32 renderType=1;
- string videoFrame=2;
- int32 cameraStateType=3;
- int32 isMoving=4;
- int32 needIfr=5;
- int32 isVideo=6;
- int32 stillFrame=7;
- int32 isRotating=8;
- int32 isFollowing=9;
- repeated string clientPanoTitlesBitmap=10;
- string clientPanoTreceId=11;
- string prefetchVideoId=12;
- bool noMedia=13;
- }
- message Event{
- string id=1;
- int32 type =2;
- repeated Point points=3;
- string rotateEvent=4;
- string removeVisitorEvent=5;
- }
- message UserState{
- string userId=1;
- State playerState=2;
- RenderInfo renderInfo=3;
- Event event=4;
- int32 relation=5;
- }
- /***********************************************************/
- // init入参对象
- message InitRequest {
- string user_id=1;
- string nick_name=2;
- string skin_id=3;
- string avatar_id=4;
- string room_id=5;
- string app_id=6;
- }
- /**********************************************************/
- message echoMsg{
- string echoMsg=1;
- }
- message EchoRequest{
- int32 action_type=1; //1009
- echoMsg echo_msg=2;
- string trace_id=3;
- string user_id=4;
- }
- message EchoReply{
- int32 actionType=1; //1009
- int32 pointType=2;
- string extra=3;
- string traceId=4;
- string packetId=5;
- repeated Point nps=6;
- int32 peopleNum=7;
- string zoneId=8;
- string echoMsg=9;
- string reserveDetail=10;
- repeated string userWithAvatarList=11;
- repeated UserState newUserStates=12;
- int32 code=13;
- string msg=14;
- }
- /*********************************************/
- message getNewUserStateAction{
- int32 userType=1;
- }
- message GetNewUserStateRequest{
- int32 action_type=1; //1024
- getNewUserStateAction getNewUserStateAction=2;
- string trace_id=3;
- string user_id=4;
- }
- message GetNewUserStateReply{
- int32 actionType=1; //1024
- int32 pointType=2;
- string extra=3;
- string traceId=4;
- string packetId=5;
- repeated Point nps=6;
- int32 peopleNum=7;
- string zoneId=8;
- string echoMsg=9;
- string reserveDetail=10;
- repeated string userWithAvatarList=11;
- repeated UserState newUserStates=12;
- int32 code=13;
- string msg=14;
- }
- /*********************************************/
- //全局对象,旋转的参数
- message RotationAction{
- int32 vertical_move=1;
- double horizontal_move=2;
- }
- // rotate入参对象
- message RotateRequest {
- int32 action_type=1; //1014
- RotationAction rotation_action=2;
- string trace_id=3;
- string user_id=4;
- }
- /**********************************************************/
- //正常的反馈
- //message NormalReply {
- // repeated string traceIds=1;
- // string vehicle=2;
- // repeated UserState newUserStates=3;
- // repeated int32 actionResponses=4;
- // int32 getStateType=5;
- // int32 code=6;
- // string msg=7;
- // string frameSrc=8; //视频路径
- //}
- /**********************************************************/
- //
- message ClickingAction {
- Point clicking_point=1;
- int32 clicking_type=2;
- string extra=3;
- string attitude=4;
- }
- message MoveRequest {
- int32 action_type=1; //1
- ClickingAction clicking_action=2;
- State clicking_state=3;
- string trace_id=4;
- string user_id=5;
- }
- //// 开始请求漫游
- //message StartMoveRequest {
- // int32 action_type=1;
- // ClickingAction clicking_action=2;
- // State clicking_state=3;
- // string trace_id=4;
- // string user_id=5;
- //}
- //
- //// 请求移动下一段
- //message MoveNextNeighborRequest {
- // string user_id=1;
- // string trace_id=2;
- // bool next=3; //true表示继续拿下一个,false表示结束(一般是有新的请求)
- //}
- // move出参对象
- // 这需要自定义
- //message MoveReply {
- // repeated string traceIds=1;
- // string vehicle=2;
- // repeated UserState newUserStates=3; //自己的话,不要有player,camera和cameraCenter。自己对应的这三个属性在8,9,10上,到webrtc服务器上组装
- // repeated int32 actionResponses=4;
- // int32 getStateType=5;
- // int32 code=6;
- // string msg=7;
- // //每一段的人物和相机坐标,第一段可能还有初始旋转
- // repeated Space player=8;
- // repeated Space camera=9;
- // repeated Point cameraCenter=10;
- // repeated string frameSrc=11;
- // bool isEnd=12; //false表示可以继续移动,true表示这次移动已经结束
- //}
- /**********************************************************/
- /**********************************************************/
- message DirAction{
- int32 move_angle=1;
- int32 speed_level=2;
- }
- //控制杆移动
- message JoystickRequest {
- int32 action_type=1;
- DirAction dir_action=2;
- string trace_id=3;
- string user_id=4;
- string packet_id=5;
- }
- /**********************************************************/
- /**********************************************************/
- message NeighborPointsAction{
- Point point=1;
- int32 level=2;
- bool containSelf=3;
- int32 searchRange=4;
- }
- // move入参对象
- message BreakPointRequest{
- int32 action_type=1; //1004
- NeighborPointsAction get_neighbor_points_action=2;
- string trace_id=3;
- string user_id=4;
- }
- // move出参对象
- message BreakPointReply {
- int32 actionType=1; //1004
- int32 pointType=2;
- string extra=3;
- string traceId=4;
- string packetId=5;
- repeated Point nps=6;
- int32 peopleNum=7;
- string zoneId=8;
- string echoMsg=9;
- string reserveDetail=10;
- repeated string userWithAvatarList=11;
- repeated UserState newUserStates=12;
- int32 code=13;
- string msg=14;
- }
- /**********************************************************/
|