186 lines
4.2 KiB
Protocol Buffer
186 lines
4.2 KiB
Protocol Buffer
|
|
syntax = "proto3";
|
|||
|
|
|
|||
|
|
option java_multiple_files = true;
|
|||
|
|
option java_package = "com.matrix.train.grpc";
|
|||
|
|
option java_outer_classname = "GrpcService";
|
|||
|
|
//option objc_class_prefix = "Matrixai";
|
|||
|
|
|
|||
|
|
package MatrixAi;
|
|||
|
|
|
|||
|
|
service Train {
|
|||
|
|
|
|||
|
|
// 识别状态控制-来车
|
|||
|
|
rpc Come(Request) returns (Reply) {}
|
|||
|
|
// 识别状态控制-车走
|
|||
|
|
rpc Leave(Request) returns (Reply) {}
|
|||
|
|
// 识别状态控制-停车
|
|||
|
|
rpc TemporaryStop(Request) returns (Reply) {}
|
|||
|
|
// 识别状态控制-倒车
|
|||
|
|
rpc Reversing(Request) returns (Reply) {}
|
|||
|
|
|
|||
|
|
// 查看“工作站设置”
|
|||
|
|
rpc QueryWorkstation(QueryWorkstationRequest) returns (QueryWorkstationReply) {}
|
|||
|
|
// 修改“工作站设置”
|
|||
|
|
rpc UpdateWorkstation(UpdateWorkstationRequest) returns (UpdateWorkstationReply) {}
|
|||
|
|
|
|||
|
|
// 查询摄像头配置
|
|||
|
|
rpc QueryCamera(QueryCameraRequest) returns (QueryCameraReply) {}
|
|||
|
|
// 修改摄像头配置
|
|||
|
|
rpc UpdateCamera(UpdateCameraRequest) returns (UpdateCameraReply) {}
|
|||
|
|
|
|||
|
|
// 查询FTP的配置
|
|||
|
|
rpc QueryFTP(QueryFTPRequest) returns (QueryFTPReply) {}
|
|||
|
|
// 修改FTP的配置
|
|||
|
|
rpc UpdateFTP(UpdateFTPRequest) returns (UpdateFTPReply) {}
|
|||
|
|
|
|||
|
|
// 重启识别程序
|
|||
|
|
rpc RebootAI(Request) returns (Reply) {}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 基础
|
|||
|
|
message Request {
|
|||
|
|
//请求头
|
|||
|
|
uint32 head=1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
message Reply {
|
|||
|
|
//异常消息(正常的话为"")
|
|||
|
|
string error_msg=1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 查看“工作站设置”
|
|||
|
|
message QueryWorkstationRequest {
|
|||
|
|
//请求头
|
|||
|
|
uint32 head=1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
message QueryWorkstationReply {
|
|||
|
|
//工作站名字
|
|||
|
|
string name=1;
|
|||
|
|
//工作站编号
|
|||
|
|
string name_no=2;
|
|||
|
|
//异常消息(正常的话为"")
|
|||
|
|
string error_msg=3;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 修改“工作站设置”
|
|||
|
|
message UpdateWorkstationRequest {
|
|||
|
|
//请求头
|
|||
|
|
uint32 head=1;
|
|||
|
|
//工作站名字
|
|||
|
|
string name=2;
|
|||
|
|
//工作站编号
|
|||
|
|
string name_no=3;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
message UpdateWorkstationReply {
|
|||
|
|
//异常消息(正常的话为"")
|
|||
|
|
string error_msg=1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//查询摄像头配置
|
|||
|
|
message QueryCameraRequest {
|
|||
|
|
//请求头
|
|||
|
|
uint32 head=1;
|
|||
|
|
//查询的摄像头编号 0-一号摄像头,1-二号摄像头
|
|||
|
|
uint32 channel_id=2;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
message QueryCameraReply {
|
|||
|
|
//查询的摄像头编号 0-一号摄像头,1-二号摄像头
|
|||
|
|
uint32 channel_id=1;
|
|||
|
|
//使用状态
|
|||
|
|
bool use=2;
|
|||
|
|
//摄像头RTSP地址
|
|||
|
|
string url=3;
|
|||
|
|
//跳帧数
|
|||
|
|
uint32 skipinterval=4;
|
|||
|
|
//画面中火车行驶方向:0-自动识别 1-向左 2-向右
|
|||
|
|
uint32 direction=5;
|
|||
|
|
//向左行驶时首位大框:0-向左编号在前 1-向左属性在前
|
|||
|
|
uint32 left_first=6;
|
|||
|
|
//向右行驶时首位大框:2-向右编号在前 3-向右属性在前
|
|||
|
|
uint32 right_first=7;
|
|||
|
|
//异常消息(正常的话为"")
|
|||
|
|
string error_msg=8;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//修改摄像头配置
|
|||
|
|
message UpdateCameraRequest {
|
|||
|
|
//请求头
|
|||
|
|
uint32 head=1;
|
|||
|
|
//摄像头编号 0-一号摄像头,1-二号摄像头
|
|||
|
|
uint32 channel_id=2;
|
|||
|
|
//使用状态
|
|||
|
|
bool use=3;
|
|||
|
|
//摄像头RTSP地址
|
|||
|
|
string url=4;
|
|||
|
|
//跳帧数
|
|||
|
|
uint32 skipinterval=5;
|
|||
|
|
//画面中火车行驶方向:0-自动识别 1-向左 2-向右
|
|||
|
|
uint32 direction=6;
|
|||
|
|
//向左行驶时首位大框:0-向左编号在前 1-向左属性在前
|
|||
|
|
uint32 left_first=7;
|
|||
|
|
//向右行驶时首位大框:2-向右编号在前 3-向右属性在前
|
|||
|
|
uint32 right_first=8;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
message UpdateCameraReply {
|
|||
|
|
//摄像头编号 0-一号摄像头,1-二号摄像头
|
|||
|
|
uint32 channel_id=1;
|
|||
|
|
//异常消息(正常的话为"")
|
|||
|
|
string error_msg=2;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//查询FTP的配置
|
|||
|
|
message QueryFTPRequest {
|
|||
|
|
//请求头
|
|||
|
|
uint32 head=1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
message QueryFTPReply {
|
|||
|
|
//是否开启SFTP传输 0 - 不开启 1 - 开启
|
|||
|
|
uint32 open=1;
|
|||
|
|
//FTP用户名
|
|||
|
|
string username=2;
|
|||
|
|
//密码
|
|||
|
|
string password=3;
|
|||
|
|
//IP地址
|
|||
|
|
string ip=4;
|
|||
|
|
//通讯端口
|
|||
|
|
uint32 port=5;
|
|||
|
|
//结果存储路径
|
|||
|
|
string image_path=6;
|
|||
|
|
//无上传任务延迟XXX秒断开FTP连接
|
|||
|
|
uint32 quit_time=7;
|
|||
|
|
//异常消息(正常的话为"")
|
|||
|
|
string error_msg=8;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//修改FTP的配置
|
|||
|
|
message UpdateFTPRequest {
|
|||
|
|
//请求头
|
|||
|
|
uint32 head=1;
|
|||
|
|
//是否开启SFTP传输 0 - 不开启 1 - 开启
|
|||
|
|
uint32 open=2;
|
|||
|
|
//FTP用户名
|
|||
|
|
string username=3;
|
|||
|
|
//密码
|
|||
|
|
string password=4;
|
|||
|
|
//IP地址
|
|||
|
|
string ip=5;
|
|||
|
|
//通讯端口
|
|||
|
|
uint32 port=6;
|
|||
|
|
//结果存储路径
|
|||
|
|
string image_path=7;
|
|||
|
|
//无上传任务延迟XXX秒断开FTP连接
|
|||
|
|
uint32 quit_time=8;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
message UpdateFTPReply {
|
|||
|
|
//异常消息(正常的话为"")
|
|||
|
|
string error_msg=1;
|
|||
|
|
}
|
|||
|
|
|