proto: Add new field servo_fw_channel
New servo fw can have stable, prev, dev, alpha channels.
BUG=b:181711016
TEST=None
Change-Id: Id7c84ff3b774255fc2b010639f383296123005d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2730861
Auto-Submit: Otabek Kasimov <otabek@google.com>
Reviewed-by: Eshwar Narayan <eshwarn@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
Commit-Queue: Otabek Kasimov <otabek@google.com>
diff --git a/go/lab/servo.pb.go b/go/lab/servo.pb.go
index 352251e..c27db71 100644
--- a/go/lab/servo.pb.go
+++ b/go/lab/servo.pb.go
@@ -76,7 +76,65 @@
return file_lab_servo_proto_rawDescGZIP(), []int{0}
}
-// NEXT TAG: 9
+// Servo Firmware Channel describes the firmware expected to have on servos.
+// Next Tag : 4
+type ServoFwChannel int32
+
+const (
+ // Servo firmware from Stable channel.
+ ServoFwChannel_SERVO_FW_STABLE ServoFwChannel = 0
+ // The previous Servo firmware from Stable channel.
+ ServoFwChannel_SERVO_FW_PREVIOUS ServoFwChannel = 1
+ // Servo firmware from Dev channel.
+ ServoFwChannel_SERVO_FW_DEV ServoFwChannel = 2
+ // Servo firmware from Alpha channel.
+ ServoFwChannel_SERVO_FW_ALPHA ServoFwChannel = 3
+)
+
+// Enum value maps for ServoFwChannel.
+var (
+ ServoFwChannel_name = map[int32]string{
+ 0: "SERVO_FW_STABLE",
+ 1: "SERVO_FW_PREVIOUS",
+ 2: "SERVO_FW_DEV",
+ 3: "SERVO_FW_ALPHA",
+ }
+ ServoFwChannel_value = map[string]int32{
+ "SERVO_FW_STABLE": 0,
+ "SERVO_FW_PREVIOUS": 1,
+ "SERVO_FW_DEV": 2,
+ "SERVO_FW_ALPHA": 3,
+ }
+)
+
+func (x ServoFwChannel) Enum() *ServoFwChannel {
+ p := new(ServoFwChannel)
+ *p = x
+ return p
+}
+
+func (x ServoFwChannel) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ServoFwChannel) Descriptor() protoreflect.EnumDescriptor {
+ return file_lab_servo_proto_enumTypes[1].Descriptor()
+}
+
+func (ServoFwChannel) Type() protoreflect.EnumType {
+ return &file_lab_servo_proto_enumTypes[1]
+}
+
+func (x ServoFwChannel) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ServoFwChannel.Descriptor instead.
+func (ServoFwChannel) EnumDescriptor() ([]byte, []int) {
+ return file_lab_servo_proto_rawDescGZIP(), []int{1}
+}
+
+// NEXT TAG: 10
type Servo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -91,7 +149,8 @@
ServoType string `protobuf:"bytes,5,opt,name=servo_type,json=servoType,proto3" json:"servo_type,omitempty"`
ServoSetup ServoSetupType `protobuf:"varint,7,opt,name=servo_setup,json=servoSetup,proto3,enum=lab.ServoSetupType" json:"servo_setup,omitempty"`
// Based on http://go/fleet-servo-topology
- ServoTopology *ServoTopology `protobuf:"bytes,8,opt,name=servo_topology,json=servoTopology,proto3" json:"servo_topology,omitempty"`
+ ServoTopology *ServoTopology `protobuf:"bytes,8,opt,name=servo_topology,json=servoTopology,proto3" json:"servo_topology,omitempty"`
+ ServoFwChannel ServoFwChannel `protobuf:"varint,9,opt,name=servo_fw_channel,json=servoFwChannel,proto3,enum=lab.ServoFwChannel" json:"servo_fw_channel,omitempty"`
}
func (x *Servo) Reset() {
@@ -168,6 +227,13 @@
return nil
}
+func (x *Servo) GetServoFwChannel() ServoFwChannel {
+ if x != nil {
+ return x.ServoFwChannel
+ }
+ return ServoFwChannel_SERVO_FW_STABLE
+}
+
// Servo Topology describe connected servo devices on DUT set-up to provide Servo functionality.
// Next Tag : 3
type ServoTopology struct {
@@ -311,7 +377,7 @@
var file_lab_servo_proto_rawDesc = []byte{
0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x12, 0x03, 0x6c, 0x61, 0x62, 0x22, 0x86, 0x02, 0x0a, 0x05, 0x53, 0x65, 0x72, 0x76, 0x6f,
+ 0x6f, 0x12, 0x03, 0x6c, 0x61, 0x62, 0x22, 0xc5, 0x02, 0x0a, 0x05, 0x53, 0x65, 0x72, 0x76, 0x6f,
0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x48,
0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x6f,
@@ -327,32 +393,43 @@
0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x5f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79,
0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x61, 0x62, 0x2e, 0x53, 0x65, 0x72,
0x76, 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76,
- 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22,
- 0x6f, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79,
- 0x12, 0x2a, 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
- 0x2e, 0x6c, 0x61, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f,
- 0x67, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x08,
- 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16,
- 0x2e, 0x6c, 0x61, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f,
- 0x67, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e,
- 0x22, 0x86, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f,
- 0x67, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x79,
- 0x73, 0x66, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0c, 0x73, 0x79, 0x73, 0x66, 0x73, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12,
- 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x73, 0x62, 0x5f, 0x68,
- 0x75, 0x62, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75,
- 0x73, 0x62, 0x48, 0x75, 0x62, 0x50, 0x6f, 0x72, 0x74, 0x2a, 0x5b, 0x0a, 0x0e, 0x53, 0x65, 0x72,
- 0x76, 0x6f, 0x53, 0x65, 0x74, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x53,
- 0x45, 0x52, 0x56, 0x4f, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x47, 0x55, 0x4c,
- 0x41, 0x52, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x45, 0x52, 0x56, 0x4f, 0x5f, 0x53, 0x45,
- 0x54, 0x55, 0x50, 0x5f, 0x44, 0x55, 0x41, 0x4c, 0x5f, 0x56, 0x34, 0x10, 0x01, 0x12, 0x17, 0x0a,
- 0x13, 0x53, 0x45, 0x52, 0x56, 0x4f, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x49, 0x4e, 0x56,
- 0x41, 0x4c, 0x49, 0x44, 0x10, 0x02, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72,
- 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69,
- 0x75, 0x6d, 0x6f, 0x73, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x2f, 0x67, 0x6f, 0x2f, 0x6c, 0x61, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x3d, 0x0a, 0x10, 0x73, 0x65, 0x72,
+ 0x76, 0x6f, 0x5f, 0x66, 0x77, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x09, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x61, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x46,
+ 0x77, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x46,
+ 0x77, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0x6f,
+ 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12,
+ 0x2a, 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e,
+ 0x6c, 0x61, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67,
+ 0x79, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x08, 0x63,
+ 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e,
+ 0x6c, 0x61, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67,
+ 0x79, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22,
+ 0x86, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67,
+ 0x79, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x79, 0x73,
+ 0x66, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0c, 0x73, 0x79, 0x73, 0x66, 0x73, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x16,
+ 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x73, 0x62, 0x5f, 0x68, 0x75,
+ 0x62, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73,
+ 0x62, 0x48, 0x75, 0x62, 0x50, 0x6f, 0x72, 0x74, 0x2a, 0x5b, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76,
+ 0x6f, 0x53, 0x65, 0x74, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x45,
+ 0x52, 0x56, 0x4f, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x47, 0x55, 0x4c, 0x41,
+ 0x52, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x45, 0x52, 0x56, 0x4f, 0x5f, 0x53, 0x45, 0x54,
+ 0x55, 0x50, 0x5f, 0x44, 0x55, 0x41, 0x4c, 0x5f, 0x56, 0x34, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13,
+ 0x53, 0x45, 0x52, 0x56, 0x4f, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x49, 0x4e, 0x56, 0x41,
+ 0x4c, 0x49, 0x44, 0x10, 0x02, 0x2a, 0x62, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x46, 0x77,
+ 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x52, 0x56, 0x4f,
+ 0x5f, 0x46, 0x57, 0x5f, 0x53, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11,
+ 0x53, 0x45, 0x52, 0x56, 0x4f, 0x5f, 0x46, 0x57, 0x5f, 0x50, 0x52, 0x45, 0x56, 0x49, 0x4f, 0x55,
+ 0x53, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x52, 0x56, 0x4f, 0x5f, 0x46, 0x57, 0x5f,
+ 0x44, 0x45, 0x56, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x45, 0x52, 0x56, 0x4f, 0x5f, 0x46,
+ 0x57, 0x5f, 0x41, 0x4c, 0x50, 0x48, 0x41, 0x10, 0x03, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x2e,
+ 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x68, 0x72,
+ 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x6c, 0x61, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
}
var (
@@ -367,24 +444,26 @@
return file_lab_servo_proto_rawDescData
}
-var file_lab_servo_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_lab_servo_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_lab_servo_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_lab_servo_proto_goTypes = []interface{}{
(ServoSetupType)(0), // 0: lab.ServoSetupType
- (*Servo)(nil), // 1: lab.Servo
- (*ServoTopology)(nil), // 2: lab.ServoTopology
- (*ServoTopologyItem)(nil), // 3: lab.ServoTopologyItem
+ (ServoFwChannel)(0), // 1: lab.ServoFwChannel
+ (*Servo)(nil), // 2: lab.Servo
+ (*ServoTopology)(nil), // 3: lab.ServoTopology
+ (*ServoTopologyItem)(nil), // 4: lab.ServoTopologyItem
}
var file_lab_servo_proto_depIdxs = []int32{
0, // 0: lab.Servo.servo_setup:type_name -> lab.ServoSetupType
- 2, // 1: lab.Servo.servo_topology:type_name -> lab.ServoTopology
- 3, // 2: lab.ServoTopology.main:type_name -> lab.ServoTopologyItem
- 3, // 3: lab.ServoTopology.children:type_name -> lab.ServoTopologyItem
- 4, // [4:4] is the sub-list for method output_type
- 4, // [4:4] is the sub-list for method input_type
- 4, // [4:4] is the sub-list for extension type_name
- 4, // [4:4] is the sub-list for extension extendee
- 0, // [0:4] is the sub-list for field type_name
+ 3, // 1: lab.Servo.servo_topology:type_name -> lab.ServoTopology
+ 1, // 2: lab.Servo.servo_fw_channel:type_name -> lab.ServoFwChannel
+ 4, // 3: lab.ServoTopology.main:type_name -> lab.ServoTopologyItem
+ 4, // 4: lab.ServoTopology.children:type_name -> lab.ServoTopologyItem
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
}
func init() { file_lab_servo_proto_init() }
@@ -435,7 +514,7 @@
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_lab_servo_proto_rawDesc,
- NumEnums: 1,
+ NumEnums: 2,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
diff --git a/src/lab/servo.proto b/src/lab/servo.proto
index 695ce3e..8e70dfc 100644
--- a/src/lab/servo.proto
+++ b/src/lab/servo.proto
@@ -8,7 +8,7 @@
option go_package = "go.chromium.org/chromiumos/infra/proto/go/lab";
-// NEXT TAG: 9
+// NEXT TAG: 10
message Servo {
reserved 6;
// Servo-specific configs
@@ -21,6 +21,7 @@
ServoSetupType servo_setup = 7;
// Based on http://go/fleet-servo-topology
ServoTopology servo_topology = 8;
+ ServoFwChannel servo_fw_channel = 9;
}
// Servo Setup Type describes the capabilities of servos.
@@ -32,6 +33,19 @@
SERVO_SETUP_INVALID = 2;
}
+// Servo Firmware Channel describes the firmware expected to have on servos.
+// Next Tag : 4
+enum ServoFwChannel {
+ // Servo firmware from Stable channel.
+ SERVO_FW_STABLE = 0;
+ // The previous Servo firmware from Stable channel.
+ SERVO_FW_PREVIOUS = 1;
+ // Servo firmware from Dev channel.
+ SERVO_FW_DEV = 2;
+ // Servo firmware from Alpha channel.
+ SERVO_FW_ALPHA = 3;
+}
+
// Servo Topology describe connected servo devices on DUT set-up to provide Servo functionality.
// Next Tag : 3
message ServoTopology {