From 7543b034cd5c93612eda37fbf36864a0c3a3357a Mon Sep 17 00:00:00 2001 From: walker Date: Wed, 1 Nov 2023 16:55:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=94=B5=E5=99=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=89=80=E5=B1=9E=E8=BD=A6=E7=AB=99=E5=B1=9E=E6=80=A7=20?= =?UTF-8?q?=E6=9E=84=E6=80=9D=E8=81=94=E9=94=81=E9=87=87=E9=9B=86=E3=80=81?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8=E7=9B=B8=E5=85=B3=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/ci.go | 42 +++ component/component_proto/ci.pb.go | 208 ++++++++++++++ component/component_proto/turnout.pb.go | 98 +++---- component/turnout.go | 4 +- fi/turnout.go | 8 +- proto/src/component/ci.proto | 16 ++ proto/src/component/turnout.proto | 10 +- proto/src/model.proto | 1 + repository/electronic_component.go | 9 +- repository/model/proto/model.pb.go | 342 ++++++++++++------------ repository/repository_manager.go | 19 +- sys/circuit_sys/turnout_zdj9_2.go | 2 +- 12 files changed, 516 insertions(+), 243 deletions(-) create mode 100644 component/ci.go create mode 100644 component/component_proto/ci.pb.go create mode 100644 proto/src/component/ci.proto diff --git a/component/ci.go b/component/ci.go new file mode 100644 index 0000000..186a19b --- /dev/null +++ b/component/ci.go @@ -0,0 +1,42 @@ +package component + +import ( + "joylink.club/ecs" + "joylink.club/rtsssimulation/component/component_proto" + "joylink.club/rtsssimulation/repository" +) + +var ( + // 联锁驱动状态表 + CiQdStateType = ecs.NewComponentType[component_proto.CiQdState]() + // 联锁采集状态表 + CiCjStateType = ecs.NewComponentType[component_proto.CiCjState]() +) + +type CiData struct { + // 所属集中站 + station repository.Station + // 驱动码表 + QdBits []CiQdBit + // 采集码表 + CjBits []CiCjBit +} + +type CiCjBit struct { + Cjs []CiCjDef +} + +type CiCjDef struct { + Uid string + // 是否前接点(前为吸起/定位) + Q bool +} + +type CiQdBit struct { + Uid string + Index int +} + +func GetCiQdBitOfRelay(ci *ecs.Entry, uid string) (bool, error) { + return false, nil +} diff --git a/component/component_proto/ci.pb.go b/component/component_proto/ci.pb.go new file mode 100644 index 0000000..595c491 --- /dev/null +++ b/component/component_proto/ci.pb.go @@ -0,0 +1,208 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.23.1 +// source: component/ci.proto + +package component_proto + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// 联锁驱动状态表 +type CiQdState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 驱动bit列表 + Bits []bool `protobuf:"varint,1,rep,packed,name=bits,proto3" json:"bits,omitempty"` +} + +func (x *CiQdState) Reset() { + *x = CiQdState{} + if protoimpl.UnsafeEnabled { + mi := &file_component_ci_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiQdState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiQdState) ProtoMessage() {} + +func (x *CiQdState) ProtoReflect() protoreflect.Message { + mi := &file_component_ci_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CiQdState.ProtoReflect.Descriptor instead. +func (*CiQdState) Descriptor() ([]byte, []int) { + return file_component_ci_proto_rawDescGZIP(), []int{0} +} + +func (x *CiQdState) GetBits() []bool { + if x != nil { + return x.Bits + } + return nil +} + +// 联锁采集状态表 +type CiCjState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bits []bool `protobuf:"varint,1,rep,packed,name=bits,proto3" json:"bits,omitempty"` +} + +func (x *CiCjState) Reset() { + *x = CiCjState{} + if protoimpl.UnsafeEnabled { + mi := &file_component_ci_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiCjState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiCjState) ProtoMessage() {} + +func (x *CiCjState) ProtoReflect() protoreflect.Message { + mi := &file_component_ci_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CiCjState.ProtoReflect.Descriptor instead. +func (*CiCjState) Descriptor() ([]byte, []int) { + return file_component_ci_proto_rawDescGZIP(), []int{1} +} + +func (x *CiCjState) GetBits() []bool { + if x != nil { + return x.Bits + } + return nil +} + +var File_component_ci_proto protoreflect.FileDescriptor + +var file_component_ci_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x69, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x22, + 0x1f, 0x0a, 0x09, 0x43, 0x69, 0x51, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x08, 0x52, 0x04, 0x62, 0x69, 0x74, 0x73, + 0x22, 0x1f, 0x0a, 0x09, 0x43, 0x69, 0x43, 0x6a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x08, 0x52, 0x04, 0x62, 0x69, 0x74, + 0x73, 0x42, 0x1d, 0x5a, 0x1b, 0x2e, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_ci_proto_rawDescOnce sync.Once + file_component_ci_proto_rawDescData = file_component_ci_proto_rawDesc +) + +func file_component_ci_proto_rawDescGZIP() []byte { + file_component_ci_proto_rawDescOnce.Do(func() { + file_component_ci_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_ci_proto_rawDescData) + }) + return file_component_ci_proto_rawDescData +} + +var file_component_ci_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_component_ci_proto_goTypes = []interface{}{ + (*CiQdState)(nil), // 0: component.CiQdState + (*CiCjState)(nil), // 1: component.CiCjState +} +var file_component_ci_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_component_ci_proto_init() } +func file_component_ci_proto_init() { + if File_component_ci_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_ci_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CiQdState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_ci_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CiCjState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_ci_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_component_ci_proto_goTypes, + DependencyIndexes: file_component_ci_proto_depIdxs, + MessageInfos: file_component_ci_proto_msgTypes, + }.Build() + File_component_ci_proto = out.File + file_component_ci_proto_rawDesc = nil + file_component_ci_proto_goTypes = nil + file_component_ci_proto_depIdxs = nil +} diff --git a/component/component_proto/turnout.pb.go b/component/component_proto/turnout.pb.go index 1e82627..2582520 100644 --- a/component/component_proto/turnout.pb.go +++ b/component/component_proto/turnout.pb.go @@ -31,8 +31,8 @@ const ( Turnout_FWSB Turnout_Fault = 2 // 挤岔 Turnout_JC Turnout_Fault = 3 - // 联锁驱动失效 - Turnout_CIQDSX Turnout_Fault = 4 + // 联锁无法驱动故障 + Turnout_CIQD Turnout_Fault = 4 ) // Enum value maps for Turnout_Fault. @@ -42,14 +42,14 @@ var ( 1: "DWSB", 2: "FWSB", 3: "JC", - 4: "CIQDSX", + 4: "CIQD", } Turnout_Fault_value = map[string]int32{ - "SB": 0, - "DWSB": 1, - "FWSB": 2, - "JC": 3, - "CIQDSX": 4, + "SB": 0, + "DWSB": 1, + "FWSB": 2, + "JC": 3, + "CIQD": 4, } ) @@ -161,8 +161,6 @@ type Turnout struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Fault []Turnout_Fault `protobuf:"varint,1,rep,packed,name=fault,proto3,enum=component.Turnout_Fault" json:"fault,omitempty"` } func (x *Turnout) Reset() { @@ -197,13 +195,6 @@ func (*Turnout) Descriptor() ([]byte, []int) { return file_component_turnout_proto_rawDescGZIP(), []int{1} } -func (x *Turnout) GetFault() []Turnout_Fault { - if x != nil { - return x.Fault - } - return nil -} - // 道岔失表故障 type TurnoutFaultSB struct { state protoimpl.MessageState @@ -360,15 +351,15 @@ func (*TurnoutFaultJc) Descriptor() ([]byte, []int) { return file_component_turnout_proto_rawDescGZIP(), []int{5} } -// 道岔联锁驱动失效 -type TurnoutFaultCiQdsx struct { +// 道岔联锁无法驱动故障 +type TurnoutFaultCiqd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *TurnoutFaultCiQdsx) Reset() { - *x = TurnoutFaultCiQdsx{} +func (x *TurnoutFaultCiqd) Reset() { + *x = TurnoutFaultCiqd{} if protoimpl.UnsafeEnabled { mi := &file_component_turnout_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -376,13 +367,13 @@ func (x *TurnoutFaultCiQdsx) Reset() { } } -func (x *TurnoutFaultCiQdsx) String() string { +func (x *TurnoutFaultCiqd) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TurnoutFaultCiQdsx) ProtoMessage() {} +func (*TurnoutFaultCiqd) ProtoMessage() {} -func (x *TurnoutFaultCiQdsx) ProtoReflect() protoreflect.Message { +func (x *TurnoutFaultCiqd) ProtoReflect() protoreflect.Message { mi := &file_component_turnout_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -394,8 +385,8 @@ func (x *TurnoutFaultCiQdsx) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TurnoutFaultCiQdsx.ProtoReflect.Descriptor instead. -func (*TurnoutFaultCiQdsx) Descriptor() ([]byte, []int) { +// Deprecated: Use TurnoutFaultCiqd.ProtoReflect.Descriptor instead. +func (*TurnoutFaultCiqd) Descriptor() ([]byte, []int) { return file_component_turnout_proto_rawDescGZIP(), []int{6} } @@ -409,23 +400,19 @@ var file_component_turnout_proto_rawDesc = []byte{ 0x01, 0x28, 0x08, 0x52, 0x02, 0x64, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x66, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x64, 0x62, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x62, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x02, 0x66, 0x62, 0x22, 0x72, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, - 0x75, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x75, - 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x22, 0x37, 0x0a, 0x05, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x06, 0x0a, 0x02, 0x53, + 0x01, 0x28, 0x08, 0x52, 0x02, 0x66, 0x62, 0x22, 0x40, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, + 0x75, 0x74, 0x22, 0x35, 0x0a, 0x05, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x06, 0x0a, 0x02, 0x53, 0x42, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x57, 0x53, 0x42, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x57, 0x53, 0x42, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x4a, 0x43, 0x10, 0x03, 0x12, - 0x0a, 0x0a, 0x06, 0x43, 0x49, 0x51, 0x44, 0x53, 0x58, 0x10, 0x04, 0x22, 0x10, 0x0a, 0x0e, 0x54, - 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x42, 0x22, 0x12, 0x0a, - 0x10, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x77, 0x73, - 0x62, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, - 0x74, 0x46, 0x77, 0x73, 0x62, 0x22, 0x10, 0x0a, 0x0e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, - 0x46, 0x61, 0x75, 0x6c, 0x74, 0x4a, 0x63, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x75, 0x72, 0x6e, 0x6f, - 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x51, 0x64, 0x73, 0x78, 0x42, 0x1d, 0x5a, - 0x1b, 0x2e, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x08, 0x0a, 0x04, 0x43, 0x49, 0x51, 0x44, 0x10, 0x04, 0x22, 0x10, 0x0a, 0x0e, 0x54, 0x75, 0x72, + 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x42, 0x22, 0x12, 0x0a, 0x10, 0x54, + 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x77, 0x73, 0x62, 0x22, + 0x12, 0x0a, 0x10, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x46, + 0x77, 0x73, 0x62, 0x22, 0x10, 0x0a, 0x0e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, + 0x75, 0x6c, 0x74, 0x4a, 0x63, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, + 0x46, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x71, 0x64, 0x42, 0x1d, 0x5a, 0x1b, 0x2e, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -443,22 +430,21 @@ func file_component_turnout_proto_rawDescGZIP() []byte { var file_component_turnout_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_component_turnout_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_component_turnout_proto_goTypes = []interface{}{ - (Turnout_Fault)(0), // 0: component.Turnout.Fault - (*TurnoutPosition)(nil), // 1: component.TurnoutPosition - (*Turnout)(nil), // 2: component.Turnout - (*TurnoutFaultSB)(nil), // 3: component.TurnoutFaultSB - (*TurnoutFaultDwsb)(nil), // 4: component.TurnoutFaultDwsb - (*TurnoutFaultFwsb)(nil), // 5: component.TurnoutFaultFwsb - (*TurnoutFaultJc)(nil), // 6: component.TurnoutFaultJc - (*TurnoutFaultCiQdsx)(nil), // 7: component.TurnoutFaultCiQdsx + (Turnout_Fault)(0), // 0: component.Turnout.Fault + (*TurnoutPosition)(nil), // 1: component.TurnoutPosition + (*Turnout)(nil), // 2: component.Turnout + (*TurnoutFaultSB)(nil), // 3: component.TurnoutFaultSB + (*TurnoutFaultDwsb)(nil), // 4: component.TurnoutFaultDwsb + (*TurnoutFaultFwsb)(nil), // 5: component.TurnoutFaultFwsb + (*TurnoutFaultJc)(nil), // 6: component.TurnoutFaultJc + (*TurnoutFaultCiqd)(nil), // 7: component.TurnoutFaultCiqd } var file_component_turnout_proto_depIdxs = []int32{ - 0, // 0: component.Turnout.fault:type_name -> component.Turnout.Fault - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_component_turnout_proto_init() } @@ -540,7 +526,7 @@ func file_component_turnout_proto_init() { } } file_component_turnout_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TurnoutFaultCiQdsx); i { + switch v := v.(*TurnoutFaultCiqd); i { case 0: return &v.state case 1: diff --git a/component/turnout.go b/component/turnout.go index af96f50..7653c7a 100644 --- a/component/turnout.go +++ b/component/turnout.go @@ -29,8 +29,8 @@ var ( TurnoutFaultFwsbType = ecs.NewComponentType[component_proto.TurnoutFaultFwsb]() // 挤岔故障类型 TurnoutFaultJcType = ecs.NewComponentType[component_proto.TurnoutFaultJc]() - // 联锁驱动失效故障 - TurnoutFaultCiQdsxType = ecs.NewComponentType[component_proto.TurnoutFaultCiQdsx]() + // 联锁无法驱动故障 + TurnoutFaultCiqdType = ecs.NewComponentType[component_proto.TurnoutFaultCiqd]() ) // 根据道岔故障枚举获取道岔故障组件类型 diff --git a/fi/turnout.go b/fi/turnout.go index bb63ee9..ef327eb 100644 --- a/fi/turnout.go +++ b/fi/turnout.go @@ -81,7 +81,7 @@ func driveTurnoutZzj(w ecs.World, id string, dc bool, on bool) error { } } } else { // 无电路,直接驱动转辙机 - if entry.HasComponent(component.TurnoutFaultCiQdsxType) { + if entry.HasComponent(component.TurnoutFaultCiqdType) { return ecs.NewOkEmptyResult() } tz := component.TurnoutZzjType.Get(entry) @@ -139,7 +139,7 @@ func CancelTurnoutForce(w ecs.World, id string) error { wd := entity.GetWorldData(w) entry, ok := wd.EntityMap[id] if ok { - entry.RemoveComponent(component.TurnoutFaultCiQdsxType) + entry.RemoveComponent(component.TurnoutFaultCiqdType) } else { return ecs.NewErrResult(fmt.Errorf("未找到id=%s的道岔", id)) } @@ -164,8 +164,8 @@ func forceTurnout(w ecs.World, id string, pos ForceTurnoutPos) error { wd := entity.GetWorldData(w) entry, ok := wd.EntityMap[id] if ok { - if !entry.HasComponent(component.TurnoutFaultCiQdsxType) { - entry.AddComponent(component.TurnoutFaultCiQdsxType) + if !entry.HasComponent(component.TurnoutFaultCiqdType) { + entry.AddComponent(component.TurnoutFaultCiqdType) } if entry.HasComponent(component.Zdj9TwoDriveType) { // 有电路,驱动继电器 elec := component.Zdj9TwoElectronicType.Get(entry) diff --git a/proto/src/component/ci.proto b/proto/src/component/ci.proto new file mode 100644 index 0000000..c75361a --- /dev/null +++ b/proto/src/component/ci.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package component; + +option go_package = "./component/component_proto"; + +// 联锁驱动状态表 +message CiQdState { + // 驱动bit列表 + repeated bool bits = 1; +} + +// 联锁采集状态表 +message CiCjState { + repeated bool bits = 1; +} diff --git a/proto/src/component/turnout.proto b/proto/src/component/turnout.proto index 43f9535..9118822 100644 --- a/proto/src/component/turnout.proto +++ b/proto/src/component/turnout.proto @@ -28,10 +28,9 @@ message Turnout { FWSB = 2; // 挤岔 JC = 3; - // 联锁驱动失效 - CIQDSX = 4; + // 联锁无法驱动故障 + CIQD = 4; } - repeated Fault fault = 1; } // 道岔失表故障 message TurnoutFaultSB { @@ -49,8 +48,7 @@ message TurnoutFaultFwsb { message TurnoutFaultJc { } - -// 道岔联锁驱动失效 -message TurnoutFaultCiQdsx { +// 道岔联锁无法驱动故障 +message TurnoutFaultCiqd { } diff --git a/proto/src/model.proto b/proto/src/model.proto index b308e97..31b95c9 100644 --- a/proto/src/model.proto +++ b/proto/src/model.proto @@ -191,6 +191,7 @@ message Relay { string id = 1; string code = 2; Model model = 3; + string stationId = 4; // 所属车站id } //断相保护器 diff --git a/repository/electronic_component.go b/repository/electronic_component.go index cce13db..564dc48 100644 --- a/repository/electronic_component.go +++ b/repository/electronic_component.go @@ -13,16 +13,19 @@ type Relay struct { Identity code string model proto.Relay_Model + // 所属车站 + station *Station } -func newRelay(id string, code string, model proto.Relay_Model) *Relay { +func newRelay(id string, code string, model proto.Relay_Model, s *Station) *Relay { return &Relay{ Identity: identity{ id: id, deviceType: proto.DeviceType_DeviceType_Relay, }, - code: code, - model: model, + code: code, + model: model, + station: s, } } diff --git a/repository/model/proto/model.pb.go b/repository/model/proto/model.pb.go index 04b28df..96003c0 100644 --- a/repository/model/proto/model.pb.go +++ b/repository/model/proto/model.pb.go @@ -1625,9 +1625,10 @@ type Relay struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - Model Relay_Model `protobuf:"varint,3,opt,name=model,proto3,enum=model.Relay_Model" json:"model,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Model Relay_Model `protobuf:"varint,3,opt,name=model,proto3,enum=model.Relay_Model" json:"model,omitempty"` + StationId string `protobuf:"bytes,4,opt,name=stationId,proto3" json:"stationId,omitempty"` // 所属车站id } func (x *Relay) Reset() { @@ -1683,6 +1684,13 @@ func (x *Relay) GetModel() Relay_Model { return Relay_Unknown } +func (x *Relay) GetStationId() string { + if x != nil { + return x.StationId + } + return "" +} + // 断相保护器 type PhaseFailureProtector struct { state protoimpl.MessageState @@ -2840,176 +2848,178 @@ var file_model_proto_rawDesc = []byte{ 0x6d, 0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x42, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x22, 0xeb, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x22, 0x89, 0x02, 0x0a, 0x05, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x93, 0x01, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, - 0x4a, 0x50, 0x58, 0x43, 0x5f, 0x31, 0x30, 0x30, 0x30, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, - 0x50, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, - 0x4a, 0x58, 0x43, 0x5f, 0x34, 0x38, 0x30, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x57, 0x4a, - 0x58, 0x43, 0x5f, 0x48, 0x31, 0x32, 0x35, 0x5f, 0x38, 0x30, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, - 0x4a, 0x57, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4a, - 0x57, 0x58, 0x43, 0x5f, 0x48, 0x33, 0x34, 0x30, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x59, - 0x4a, 0x58, 0x43, 0x5f, 0x31, 0x36, 0x30, 0x5f, 0x32, 0x36, 0x30, 0x10, 0x07, 0x12, 0x0c, 0x0a, - 0x08, 0x4a, 0x5a, 0x58, 0x43, 0x5f, 0x48, 0x31, 0x38, 0x10, 0x08, 0x22, 0x3b, 0x0a, 0x15, 0x50, - 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x52, 0x0a, 0x18, 0x45, 0x6c, 0x65, 0x63, - 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0xef, 0x01, 0x0a, - 0x06, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x62, - 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x18, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2e, 0x42, - 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x4c, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4c, 0x69, 0x67, 0x68, - 0x74, 0x22, 0x6b, 0x0a, 0x0a, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, - 0x4e, 0x4f, 0x5f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, - 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, - 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, - 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, 0x04, - 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x5f, 0x4b, 0x6e, 0x6f, 0x62, 0x10, 0x05, 0x22, 0x97, - 0x01, 0x0a, 0x05, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x06, - 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, - 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x06, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x22, 0x38, - 0x0a, 0x0b, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x05, 0x0a, - 0x01, 0x4c, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x48, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x55, - 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x55, 0x10, 0x03, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, - 0x04, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x05, 0x22, 0x2b, 0x0a, 0x05, 0x41, 0x6c, 0x61, 0x72, - 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x6f, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, - 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, - 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x61, 0x0a, 0x0f, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, - 0x6f, 0x6e, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, - 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, - 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x58, 0x0a, 0x13, 0x45, 0x6c, 0x65, - 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x31, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x22, 0xf6, 0x01, 0x0a, 0x03, 0x4d, 0x6b, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, - 0x73, 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x73, 0x64, 0x49, - 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x63, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x49, 0x64, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x63, 0x62, 0x42, 0x75, 0x74, 0x74, - 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x62, 0x42, 0x75, 0x74, 0x74, - 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x6f, 0x62, - 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x62, - 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0c, 0x70, 0x61, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x5d, 0x0a, - 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, - 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x7a, 0x0a, 0x08, - 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x68, - 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, + 0x58, 0x43, 0x5f, 0x31, 0x30, 0x30, 0x30, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, 0x58, + 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x4a, 0x58, + 0x43, 0x5f, 0x34, 0x38, 0x30, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x57, 0x4a, 0x58, 0x43, + 0x5f, 0x48, 0x31, 0x32, 0x35, 0x5f, 0x38, 0x30, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, + 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x58, + 0x43, 0x5f, 0x48, 0x33, 0x34, 0x30, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x59, 0x4a, 0x58, + 0x43, 0x5f, 0x31, 0x36, 0x30, 0x5f, 0x32, 0x36, 0x30, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x4a, + 0x5a, 0x58, 0x43, 0x5f, 0x48, 0x31, 0x38, 0x10, 0x08, 0x22, 0x3b, 0x0a, 0x15, 0x50, 0x68, 0x61, + 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x52, 0x0a, 0x18, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, + 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0xef, 0x01, 0x0a, 0x06, 0x42, + 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x62, 0x75, 0x74, + 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x74, + 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x22, + 0x6b, 0x0a, 0x0a, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, + 0x5f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x12, 0x0f, + 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, 0x02, 0x12, + 0x0f, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10, 0x03, + 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, 0x04, 0x12, 0x0c, + 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x5f, 0x4b, 0x6e, 0x6f, 0x62, 0x10, 0x05, 0x22, 0x97, 0x01, 0x0a, + 0x05, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x73, + 0x70, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x41, 0x73, + 0x70, 0x65, 0x63, 0x74, 0x52, 0x06, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x22, 0x38, 0x0a, 0x0b, + 0x4c, 0x69, 0x67, 0x68, 0x74, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x4c, + 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x48, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x55, 0x10, 0x02, + 0x12, 0x06, 0x0a, 0x02, 0x48, 0x55, 0x10, 0x03, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x04, 0x12, + 0x05, 0x0a, 0x01, 0x41, 0x10, 0x05, 0x22, 0x2b, 0x0a, 0x05, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x67, 0x65, 0x61, 0x72, 0x22, 0xa9, 0x01, 0x0a, 0x15, 0x43, 0x65, 0x6e, 0x74, - 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x24, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, - 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x6a, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x63, 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, - 0x71, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x51, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x71, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x22, 0x5d, 0x0a, 0x06, 0x43, 0x6a, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, - 0x03, 0x72, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x6f, 0x77, 0x12, - 0x10, 0x0a, 0x03, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x6f, - 0x6c, 0x12, 0x2f, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x6a, 0x44, - 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, - 0x79, 0x73, 0x22, 0x7e, 0x0a, 0x0a, 0x43, 0x6a, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, - 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x08, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x6a, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x2e, - 0x50, 0x6f, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1b, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x05, 0x0a, 0x01, 0x51, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x48, - 0x10, 0x01, 0x22, 0x4a, 0x0a, 0x06, 0x51, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, - 0x72, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x6f, 0x77, 0x12, 0x10, - 0x0a, 0x03, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x6f, 0x6c, - 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x2a, 0xe4, - 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, - 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x55, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, - 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, - 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x04, 0x12, - 0x1a, 0x0a, 0x16, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x10, - 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, - 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x10, 0x0a, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x10, 0x0b, 0x12, 0x15, - 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x75, 0x74, - 0x74, 0x6f, 0x6e, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x10, - 0x0e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x50, 0x73, 0x64, 0x10, 0x0f, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x10, 0x12, 0x12, 0x0a, - 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6b, 0x78, 0x10, - 0x11, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x4b, 0x65, 0x79, 0x10, 0x12, 0x2a, 0x25, 0x0a, 0x04, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x08, 0x0a, - 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x01, 0x12, 0x05, - 0x0a, 0x01, 0x42, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x03, 0x2a, 0x20, 0x0a, 0x09, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, - 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x2a, 0x43, - 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x10, 0x00, 0x12, 0x0f, - 0x0a, 0x0b, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x69, 0x6e, - 0x74, 0x10, 0x02, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x64, 0x65, 0x22, 0x6f, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x0f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x22, 0x61, 0x0a, 0x0f, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, + 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, + 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x58, 0x0a, 0x13, 0x45, 0x6c, 0x65, 0x63, 0x74, + 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, + 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x22, 0xf6, 0x01, 0x0a, 0x03, 0x4d, 0x6b, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x73, 0x64, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x73, 0x64, 0x49, 0x64, 0x12, + 0x22, 0x0a, 0x0c, 0x70, 0x63, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x63, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, + 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, + 0x49, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x6f, 0x62, 0x42, 0x75, + 0x74, 0x74, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x62, 0x42, 0x75, + 0x74, 0x74, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, + 0x61, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x5d, 0x0a, 0x19, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, + 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x7a, 0x0a, 0x08, 0x50, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x68, 0x79, 0x73, + 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x67, 0x65, 0x61, 0x72, 0x22, 0xa9, 0x01, 0x0a, 0x15, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x24, 0x0a, + 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x6a, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x06, 0x63, 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x71, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x2e, 0x51, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x71, 0x64, 0x4c, 0x69, 0x73, + 0x74, 0x22, 0x5d, 0x0a, 0x06, 0x43, 0x6a, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72, + 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x6f, 0x77, 0x12, 0x10, 0x0a, + 0x03, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x6f, 0x6c, 0x12, + 0x2f, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x6a, 0x44, 0x61, 0x74, + 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, + 0x22, 0x7e, 0x0a, 0x0a, 0x43, 0x6a, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x18, + 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x2e, 0x43, 0x6a, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x50, 0x6f, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x1b, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x05, 0x0a, 0x01, 0x51, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x48, 0x10, 0x01, + 0x22, 0x4a, 0x0a, 0x06, 0x51, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x6f, + 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x03, + 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x6f, 0x6c, 0x12, 0x1c, + 0x0a, 0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x2a, 0xe4, 0x03, 0x0a, + 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x5f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x5f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x16, + 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x75, 0x72, + 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x04, 0x12, 0x1a, 0x0a, + 0x16, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x10, 0x06, 0x12, + 0x21, 0x0a, 0x1d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x10, 0x09, + 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x52, + 0x65, 0x6c, 0x61, 0x79, 0x10, 0x0a, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x10, 0x0b, 0x12, 0x15, 0x0a, 0x11, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x75, 0x74, 0x74, 0x6f, + 0x6e, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x10, 0x0e, 0x12, + 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x73, + 0x64, 0x10, 0x0f, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6b, 0x78, 0x10, 0x11, 0x12, + 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4b, 0x65, + 0x79, 0x10, 0x12, 0x2a, 0x25, 0x0a, 0x04, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x4e, + 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, + 0x42, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x03, 0x2a, 0x20, 0x0a, 0x09, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, 0x54, 0x10, + 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x2a, 0x43, 0x0a, 0x0e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, + 0x0a, 0x08, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, + 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0e, 0x49, 0x6e, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x10, + 0x02, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/repository/repository_manager.go b/repository/repository_manager.go index e2ee0a6..60e875f 100644 --- a/repository/repository_manager.go +++ b/repository/repository_manager.go @@ -53,6 +53,14 @@ func buildModels(source *proto.Repository, repository *Repository) error { for _, protoData := range source.KilometerConverts { repository.addKilometerConvert(protoData) } + for _, protoData := range source.Stations { + m := NewStation(protoData.Id, protoData.Code) + _, ok := repository.stationMap[m.Id()] + if ok { + return fmt.Errorf("id=%s的车站数据重复", protoData.Id) + } + repository.stationMap[m.Id()] = m + } for _, protoData := range source.PhysicalSections { m := NewPhysicalSection(protoData.Id) repository.physicalSectionMap[m.Id()] = m @@ -82,7 +90,11 @@ func buildModels(source *proto.Repository, repository *Repository) error { repository.sectionalCurvatureMap[m.Id()] = m } for _, protoData := range source.Relays { - m := newRelay(protoData.Id, protoData.Code, protoData.Model) + s, ok := repository.stationMap[protoData.StationId] + if !ok { + return fmt.Errorf("id=%s的继电器所属车站不存在,车站id=%s", protoData.Id, protoData.StationId) + } + m := newRelay(protoData.Id, protoData.Code, protoData.Model, s) repository.relayMap[m.Id()] = m } for _, protoData := range source.PhaseFailureProtectors { @@ -109,10 +121,7 @@ func buildModels(source *proto.Repository, repository *Repository) error { m := NewAlarm(protoData.Id, protoData.Code) repository.alarmMap[m.Id()] = m } - for _, protoData := range source.Stations { - m := NewStation(protoData.Id, protoData.Code) - repository.stationMap[m.Id()] = m - } + for _, protoData := range source.Mkxs { m := NewMkx(protoData.Id, protoData.PsdId) repository.mkxMap[m.Id()] = m diff --git a/sys/circuit_sys/turnout_zdj9_2.go b/sys/circuit_sys/turnout_zdj9_2.go index 9d0ec0a..d941997 100644 --- a/sys/circuit_sys/turnout_zdj9_2.go +++ b/sys/circuit_sys/turnout_zdj9_2.go @@ -93,7 +93,7 @@ func (zdj9 *ZDJ9TwoDragSys) exciteCollectElectronic(entry *ecs.Entry, elec *comp // 处理驱动电路励磁相关继电器 func (zdj9 *ZDJ9TwoDragSys) exciteDriveElectronic(entry *ecs.Entry, elec *component.Zdj9TwoElectronic, driveElec *component.Zdj9TwoDrive) { - if entry.HasComponent(component.TurnoutFaultCiQdsxType) { // 联锁驱动失效 + if entry.HasComponent(component.TurnoutFaultCiqdType) { // 联锁驱动失效 return } dcj_drive := component.RelayDriveType.Get(elec.TDC_DCJ)