优化proto

This commit is contained in:
2025-10-09 13:55:46 +08:00
parent 8a2e889048
commit ac8c8c56a6
2 changed files with 3 additions and 3 deletions

View File

@@ -132,7 +132,7 @@ func (x *BatchCollectCommand) GetTasks() []*CollectTask {
// 定义了单个采集任务的“意图”。
type CollectTask struct {
state protoimpl.MessageState `protogen:"open.v1"`
Command *Raw485Command `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"` // 平台生成的原始485指令
Command *Raw485Command `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` // 平台生成的原始485指令
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -342,7 +342,7 @@ const file_device_proto_rawDesc = "" +
"\x0ecorrelation_id\x18\x01 \x01(\tR\rcorrelationId\x12)\n" +
"\x05tasks\x18\x02 \x03(\v2\x13.device.CollectTaskR\x05tasks\">\n" +
"\vCollectTask\x12/\n" +
"\acommand\x18\x02 \x01(\v2\x15.device.Raw485CommandR\acommand\"N\n" +
"\acommand\x18\x01 \x01(\v2\x15.device.Raw485CommandR\acommand\"N\n" +
"\rCollectResult\x12%\n" +
"\x0ecorrelation_id\x18\x01 \x01(\tR\rcorrelationId\x12\x16\n" +
"\x06values\x18\x02 \x03(\x02R\x06values\"\xec\x01\n" +

View File

@@ -24,7 +24,7 @@ message BatchCollectCommand {
// CollectTask
// 定义了单个采集任务的“意图”。
message CollectTask {
Raw485Command command = 2; // 平台生成的原始485指令
Raw485Command command = 1; // 平台生成的原始485指令
}
// CollectResult