增加proto定义

This commit is contained in:
2025-09-25 20:16:07 +08:00
parent 2342f388c0
commit 3b4de24e1d
2 changed files with 87 additions and 9 deletions

View File

@@ -8,7 +8,8 @@ option go_package = "internal/app/service/device/proto";
// 指令类型
enum MethodType{
SWITCH = 0;
SWITCH = 0; // 启停
COLLECT = 1; // 采集
}
// 指令
@@ -22,4 +23,10 @@ message Switch{
int32 bus_number = 2; // 总线号
int32 bus_address = 3; // 总线地址
int32 relay_channel = 4; // 继电器通道号
}
message Collect{
int32 bus_number = 1; // 总线号
int32 bus_address = 2; // 总线地址
float value = 3; // 采集值
}