Files
JChargePointProtocol/jcpp-infrastructure-proto/src/main/proto/grpc.proto

59 lines
1.2 KiB
Protocol Buffer
Raw Normal View History

2025-09-12 14:40:18 +08:00
/**
* 使
* mohan_88888
*
* https://t.zsxq.com/aKtXo
*/
syntax = "proto3";
package infrastructureProto;
import "downlink.proto";
option java_package = "sanbing.jcpp.proto.gen";
option java_outer_classname = "GrpcProto";
// gRPC 服务定义
service ProtocolInterface {
rpc onDownlink(stream RequestMsg) returns (stream ResponseMsg) {}
}
// gRPC 请求消息
message RequestMsg {
int64 ts = 1;
TracerProto tracer = 2;
ConnectRequestMsg connectRequestMsg = 10;
DownlinkRequestMessage downlinkRequestMessage = 11;
}
// gRPC 响应消息
message ResponseMsg {
TracerProto tracer = 2;
ConnectResponseMsg connectResponseMsg = 12;
DownlinkResponseMessage downlinkResponseMsg = 13;
}
// 连接请求消息
message ConnectRequestMsg {
string nodeId = 1;
}
// 连接响应消息
message ConnectResponseMsg {
ConnectResponseCode responseCode = 1;
string errorMsg = 2;
}
// 连接响应状态码
enum ConnectResponseCode {
ACCEPTED = 0;
REFUSE = 1;
}
// 追踪信息
message TracerProto {
string id = 1;
string origin = 2;
int64 ts = 3;
}