拆分protobuf

This commit is contained in:
三丙
2025-09-12 14:40:18 +08:00
parent bc5411eb4b
commit 38548b5230
87 changed files with 558 additions and 467 deletions

View File

@@ -0,0 +1,58 @@
/**
* 开源代码,仅供学习和交流研究使用,商用请联系三丙
* 微信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;
}