def.grpc.proto 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. bool encode = 4;
  16. bytes data= 5;
  17. }
  18. message PointCloud{
  19. int32 size=1;
  20. bytes data=2;
  21. }
  22. message LabelImage{
  23. int32 label=1;
  24. Image ir=2;
  25. }
  26. message Pixel{
  27. uint32 point = 1;
  28. }
  29. message SegBox{
  30. int32 x = 1;
  31. int32 y = 2;
  32. int32 width = 3;
  33. int32 height = 4;
  34. float confidence = 5;
  35. repeated Pixel wheels= 6;
  36. repeated Pixel tires= 7;
  37. }
  38. message LabelYolo{
  39. int32 label=1;
  40. repeated SegBox boxes=2;
  41. }
  42. message ResImage{
  43. Image img1=1;
  44. Image img2=2;
  45. Image img3=3;
  46. Image img4=4;
  47. }
  48. message ResCloud{
  49. PointCloud cloud1=1;
  50. PointCloud cloud2=2;
  51. PointCloud cloud3=3;
  52. PointCloud cloud4=4;
  53. }
  54. message MeasureInfo {
  55. optional float x=1;
  56. optional float y=2;
  57. optional float trans_x=3;
  58. optional float trans_y=4;
  59. optional float theta=5;
  60. optional float width=6;
  61. optional float wheelbase=7;
  62. optional float ftheta=8;
  63. // 超界说明,此参数没有表示正常。
  64. // 1:超宽,2:轴距超长,
  65. // 3:前超界,4:后超界,5:左,6:右,7:左倾角过大,8:右倾角过大,9:前轮角过大
  66. optional int32 border_plc=9;
  67. optional int32 border_display=10;
  68. optional string error=11;
  69. }
  70. message ResFrame{
  71. ResImage images=1;
  72. ResCloud clouds=2;
  73. MeasureInfo measure_info=3;
  74. }
  75. service StreamServer{
  76. rpc OpenImageStream(RequestCmd) returns(stream ResImage){}
  77. rpc OpenMeasureDataStream(RequestCmd) returns(stream MeasureInfo){}
  78. rpc CloseImageStream(RequestCmd) returns(Response){}
  79. rpc CloseMeasureDataStream(RequestCmd) returns(Response){}
  80. rpc GetCloud(RequestCmd) returns(ResCloud){}
  81. rpc GetImage(RequestCmd) returns(ResImage){}
  82. }
  83. message Boundary{
  84. float radius=1; //转台半径
  85. float left=2;
  86. float right=3;
  87. float buttom=4;
  88. float minAngle=5;
  89. float maxAngle=6;
  90. float fwheelAngle=7;
  91. }
  92. message Limit{
  93. Boundary plc_limit=1;
  94. Boundary display_limit=2;
  95. float maxWidth=3;
  96. float maxWheelBase=4;
  97. }