def.grpc.proto 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. syntax = "proto3";
  2. package JetStream;
  3. message RequestCmd
  4. {
  5. int32 Id=1; // 对于获取对应id的相机数据。1,2,3,4,其他表示所有
  6. //对于打开视频流
  7. }
  8. message Response{
  9. string info=2;
  10. }
  11. message Image{
  12. int32 width=1;
  13. int32 height=2;
  14. int32 channel=3;
  15. bytes data=4;
  16. }
  17. message PointCloud{
  18. int32 size=1;
  19. bytes data=2;
  20. }
  21. message ResImage{
  22. Image img1=1;
  23. Image img2=2;
  24. Image img3=3;
  25. Image img4=4;
  26. }
  27. message ResCloud{
  28. PointCloud cloud1=1;
  29. PointCloud cloud2=2;
  30. PointCloud cloud3=3;
  31. PointCloud cloud4=4;
  32. }
  33. message MeasureInfo {
  34. optional float x=1;
  35. optional float y=2;
  36. optional float trans_x=3;
  37. optional float trans_y=4;
  38. optional float theta=5;
  39. optional float width=6;
  40. optional float wheelbase=7;
  41. optional float ftheta=8;
  42. // 超界说明,此参数没有表示正常。
  43. // 1:超宽,2:轴距超长,
  44. // 3:前超界,4:后超界,5:左,6:右,7:左倾角过大,8:右倾角过大,9:前轮角过大
  45. optional int32 border_plc=9;
  46. optional int32 border_display=10;
  47. optional string error=11;
  48. }
  49. message ResFrame{
  50. ResImage images=1;
  51. ResCloud clouds=2;
  52. MeasureInfo measure_info=3;
  53. }
  54. service StreamServer{
  55. rpc OpenImageStream(RequestCmd) returns(stream ResImage){}
  56. rpc OpenMeasureDataStream(RequestCmd) returns(stream MeasureInfo){}
  57. rpc CloseImageStream(RequestCmd) returns(Response){}
  58. rpc CloseMeasureDataStream(RequestCmd) returns(Response){}
  59. rpc GetCloud(RequestCmd) returns(ResCloud){}
  60. rpc GetImage(RequestCmd) returns(ResImage){}
  61. }
  62. message Boundary{
  63. float radius=1; //转台半径
  64. float left=2;
  65. float right=3;
  66. float buttom=4;
  67. float minAngle=5;
  68. float maxAngle=6;
  69. float fwheelAngle=7;
  70. }
  71. message Limit{
  72. Boundary plc_limit=1;
  73. Boundary display_limit=2;
  74. float maxWidth=3;
  75. float maxWheelBase=4;
  76. }