syntax = "proto3";
package JetStream;

message RequestCmd
{
  int32 Id=1;  // 对于获取对应id的相机数据。1,2,3,4,其他表示所有
                //对于打开视频流
}

message Response{
  string info=2;
}

message Image{
  int32 width=1;
  int32 height=2;
  int32 channel=3;
  bytes data=4;
}

message PointCloud{
  int32 size=1;
  bytes data=2;
}

message ResImage{
  Image img1=1;
  Image img2=2;
  Image img3=3;
  Image img4=4;
}
message ResCloud{
  PointCloud cloud1=1;
  PointCloud cloud2=2;
  PointCloud cloud3=3;
  PointCloud cloud4=4;
}
message MeasureInfo {
  float x=1;
  float y=2;
  float theta=3;
  float width=4;
  float wheelbase=5;
  float ftheta=6;
  int32 border=7;
  string error=8;
}
message ResFrame{
  ResImage images=1;
  ResCloud clouds=2;

  MeasureInfo measure_info=3;
}

service StreamServer{
  rpc OpenImageStream(RequestCmd) returns(stream ResImage){}
  rpc OpenMeasureDataStream(RequestCmd) returns(stream MeasureInfo){}
  rpc Detect(RequestCmd) returns(ResFrame){}
  rpc CloseImageStream(RequestCmd) returns(Response){}
  rpc CloseMeasureDataStream(RequestCmd) returns(Response){}
  rpc GetCloud(RequestCmd) returns(ResCloud){}
  rpc GetImage(RequestCmd) returns(ResImage){}
}
