inspection-host-computer/server/proto/cmvr/api/common.proto
2026-06-26 10:51:01 +08:00

44 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
package cmvr.api;
import "google/protobuf/timestamp.proto";
message DeviceLifecycle {
enum Lifecycle {
STATE_INIT = 0;
STATE_READY = 1;
STATE_RUNNING = 2;
STATE_ERROR = 3;
STATE_ESTOP = 4;
STATE_STOP = 5;
}
Lifecycle state = 1;
}
message CommandHeader {
message Request {
string device_id = 1; // 目标设备名称
google.protobuf.Timestamp timestamp = 2; // 请求时间
}
message Feedback {
bool success = 1; // 是否成功
string error_message = 2; // 错误信息(成功时为空)
google.protobuf.Timestamp timestamp = 3; // 回复时间
}
}
message ConfigParam {
string param_name = 1;
oneof param_value {
int32 int_value = 2; // 整数类型
double double_value = 3; // 浮点数类型
string string_value = 4; // 字符串类型
bool bool_value = 5; // 布尔类型
bytes bytes_value = 6; // 二进制数据类型
}
}