From 18ed7f9214d036d8f87864ff3ef8e161db6ba0c0 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Thu, 12 Oct 2023 17:55:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8D=89=E7=A8=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=9B=E5=A2=9E=E5=8A=A0=E5=B1=8F=E8=94=BD=E9=97=A8ecs?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/component_proto/common.pb.go | 2 +- component/psd.go | 60 +++ entity/init.go | 5 + entity/psd.go | 50 +++ examples/psd/main.go | 1 + jl-ecs-go | 2 +- proto/src/model.proto | 10 +- repository/model/proto/model.pb.go | 516 +++++++++++++++---------- repository/psd.go | 18 + repository/repository.go | 9 + repository/repository_manager.go | 4 + sys/circuit_sys/psd.go | 85 ++++ sys/device_sys/psd_motor.go | 21 + 13 files changed, 573 insertions(+), 210 deletions(-) create mode 100644 component/psd.go create mode 100644 entity/psd.go create mode 100644 examples/psd/main.go create mode 100644 repository/psd.go create mode 100644 sys/circuit_sys/psd.go create mode 100644 sys/device_sys/psd_motor.go diff --git a/component/component_proto/common.pb.go b/component/component_proto/common.pb.go index 1dc8c16..53c59b7 100644 --- a/component/component_proto/common.pb.go +++ b/component/component_proto/common.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.31.0 // protoc v4.23.1 // source: component/common.proto diff --git a/component/psd.go b/component/psd.go new file mode 100644 index 0000000..180fa46 --- /dev/null +++ b/component/psd.go @@ -0,0 +1,60 @@ +package component + +import "joylink.club/ecs" + +var PsdTag = ecs.NewTag() + +var PsdCircuitType = ecs.NewComponentType[PsdCircuit]() + +type PsdCircuit struct { + //屏蔽门驱动继电器 + GMJ *ecs.Entry + KMJ4 *ecs.Entry + KMJ8 *ecs.Entry + //屏蔽门表示继电器 + MGJ *ecs.Entry + MPLJ *ecs.Entry +} + +var PsdMotorStateType = ecs.NewComponentType[PsdMotorState]() + +// PsdMotorState 屏蔽门电机状态 +type PsdMotorState struct { + //4编组开门通电 + Km4 bool + //8编组开门通电 + Km8 bool + //关门通电 + Gm bool +} + +var PsdPositionType = ecs.NewComponentType[PsdPosition]() + +type PsdPosition struct { + km bool + gm bool +} + +var PsdDriveCircuitType = ecs.NewComponentType[PsdDriveCircuit]() + +// PsdDriveCircuit 屏蔽门驱动电路 +type PsdDriveCircuit struct { + //屏蔽门驱动继电器接通状态 + GMJ bool + KMJ4 bool + KMJ8 bool +} + +var PsdCollectionCircuitType = ecs.NewComponentType[PsdCollectionCircuit]() + +type PsdCollectionCircuit struct { + GMJ bool + KMJ4 bool + KMJ8 bool + //MGJ吸起 + MGJ_X bool + //MGJ落下 + MGJ_L bool + MPLJ_X bool + MPLJ_L bool +} diff --git a/entity/init.go b/entity/init.go index 61d675c..585c591 100644 --- a/entity/init.go +++ b/entity/init.go @@ -14,6 +14,11 @@ func Load(w ecs.World, repo *repository.Repository) error { if err != nil { return err } + // 加载屏蔽门相关实体 + err = LoadPsd(w) + if err != nil { + return err + } return err } diff --git a/entity/psd.go b/entity/psd.go new file mode 100644 index 0000000..6f4108e --- /dev/null +++ b/entity/psd.go @@ -0,0 +1,50 @@ +package entity + +import ( + "joylink.club/ecs" + "joylink.club/rtsssimulation/component" + "joylink.club/rtsssimulation/repository" +) + +func LoadPsd(w ecs.World) error { + data := GetWorldData(w) + psds := data.Repo.PsdList() + for _, psd := range psds { + entry := NewPsdEntry(w, psd.Id(), data) + loadPsdCircuit(w, entry, psd, data.EntityMap) + } + return nil +} + +func loadPsdCircuit(world ecs.World, entry *ecs.Entry, psd *repository.Psd, entryMap map[string]*ecs.Entry) { + circuit := &component.PsdCircuit{} + for _, group := range psd.ComponentGroups() { + for _, ec := range group.Components() { + relay := ec.(*repository.Relay) + switch ec.Code() { + case "XGMJ", "SGMJ": + circuit.GMJ = NewRelayEntity(world, relay, entryMap) + case "4XKMJ", "4SKMJ": + circuit.KMJ4 = NewRelayEntity(world, relay, entryMap) + case "8XKMJ", "8SKMJ": + circuit.KMJ8 = NewRelayEntity(world, relay, entryMap) + case "XMGJ", "SMGJ": + circuit.MGJ = NewRelayEntity(world, relay, entryMap) + case "XMPLJ", "SMPLJ": + circuit.MPLJ = NewRelayEntity(world, relay, entryMap) + } + } + } + component.PsdCircuitType.Set(entry, circuit) +} + +func NewPsdEntry(world ecs.World, uid string, worldData *component.WorldData) *ecs.Entry { + entry, ok := worldData.EntityMap[uid] + if !ok { + entry := world.Entry(world.Create(component.PsdTag, component.UidType, component.TwoPositionTransformType, + component.PsdCircuitType, component.PsdDriveCircuitType, component.PsdCollectionCircuitType)) + component.UidType.SetValue(entry, component.Uid{Id: uid}) + worldData.EntityMap[uid] = entry + } + return entry +} diff --git a/examples/psd/main.go b/examples/psd/main.go new file mode 100644 index 0000000..506fcc3 --- /dev/null +++ b/examples/psd/main.go @@ -0,0 +1 @@ +package psd diff --git a/jl-ecs-go b/jl-ecs-go index af60502..e779734 160000 --- a/jl-ecs-go +++ b/jl-ecs-go @@ -1 +1 @@ -Subproject commit af605020f1bccf1f1b2ab5a4ae4966d1c6c9776c +Subproject commit e7797346722a572814539d9a453789b89ffe6bf4 diff --git a/proto/src/model.proto b/proto/src/model.proto index 243d4ec..908f721 100644 --- a/proto/src/model.proto +++ b/proto/src/model.proto @@ -18,6 +18,7 @@ message Repository { repeated Relay relays = 11; repeated PhaseFailureProtector phaseFailureProtectors = 12; repeated Button buttons = 13; + repeated Psd psds = 14; } //物理区段 @@ -58,7 +59,13 @@ message Signal { Kilometer km = 2; string sectionId = 3; //关联的区段 DevicePort turnoutPort = 4; //关联的区段端口 - repeated ElectronicComponentGroup electronicComponentGroups = 7; //关联的继电器组 + repeated ElectronicComponentGroup electronicComponentGroups = 7; //关联的电子元件组合 +} + +message Psd { + string id = 1; + string platformId = 2; + repeated ElectronicComponentGroup electronicComponentGroups = 3; //关联的电子元件组合 } //应答器 @@ -104,6 +111,7 @@ enum DeviceType { DeviceType_Relay = 10; DeviceType_PhaseFailureProtector = 11; DeviceType_Button = 12; + DeviceType_Psd = 13; } enum Port { diff --git a/repository/model/proto/model.pb.go b/repository/model/proto/model.pb.go index a45eed6..3a648ad 100644 --- a/repository/model/proto/model.pb.go +++ b/repository/model/proto/model.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.31.0 // protoc v4.23.1 // source: model.proto @@ -36,6 +36,7 @@ const ( DeviceType_DeviceType_Relay DeviceType = 10 DeviceType_DeviceType_PhaseFailureProtector DeviceType = 11 DeviceType_DeviceType_Button DeviceType = 12 + DeviceType_DeviceType_Psd DeviceType = 13 ) // Enum value maps for DeviceType. @@ -54,6 +55,7 @@ var ( 10: "DeviceType_Relay", 11: "DeviceType_PhaseFailureProtector", 12: "DeviceType_Button", + 13: "DeviceType_Psd", } DeviceType_value = map[string]int32{ "DeviceType_Unknown": 0, @@ -69,6 +71,7 @@ var ( "DeviceType_Relay": 10, "DeviceType_PhaseFailureProtector": 11, "DeviceType_Button": 12, + "DeviceType_Psd": 13, } ) @@ -361,7 +364,7 @@ func (x Relay_Model) Number() protoreflect.EnumNumber { // Deprecated: Use Relay_Model.Descriptor instead. func (Relay_Model) EnumDescriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{11, 0} + return file_model_proto_rawDescGZIP(), []int{12, 0} } type Button_ButtonType int32 @@ -416,7 +419,7 @@ func (x Button_ButtonType) Number() protoreflect.EnumNumber { // Deprecated: Use Button_ButtonType.Descriptor instead. func (Button_ButtonType) EnumDescriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{14, 0} + return file_model_proto_rawDescGZIP(), []int{15, 0} } type Repository struct { @@ -437,6 +440,7 @@ type Repository struct { Relays []*Relay `protobuf:"bytes,11,rep,name=relays,proto3" json:"relays,omitempty"` PhaseFailureProtectors []*PhaseFailureProtector `protobuf:"bytes,12,rep,name=phaseFailureProtectors,proto3" json:"phaseFailureProtectors,omitempty"` Buttons []*Button `protobuf:"bytes,13,rep,name=buttons,proto3" json:"buttons,omitempty"` + Psds []*Psd `protobuf:"bytes,14,rep,name=psds,proto3" json:"psds,omitempty"` } func (x *Repository) Reset() { @@ -562,6 +566,13 @@ func (x *Repository) GetButtons() []*Button { return nil } +func (x *Repository) GetPsds() []*Psd { + if x != nil { + return x.Psds + } + return nil +} + // 物理区段 type PhysicalSection struct { state protoimpl.MessageState @@ -812,7 +823,7 @@ type Signal struct { Km *Kilometer `protobuf:"bytes,2,opt,name=km,proto3" json:"km,omitempty"` SectionId string `protobuf:"bytes,3,opt,name=sectionId,proto3" json:"sectionId,omitempty"` //关联的区段 TurnoutPort *DevicePort `protobuf:"bytes,4,opt,name=turnoutPort,proto3" json:"turnoutPort,omitempty"` //关联的区段端口 - ElectronicComponentGroups []*ElectronicComponentGroup `protobuf:"bytes,7,rep,name=electronicComponentGroups,proto3" json:"electronicComponentGroups,omitempty"` //关联的继电器组 + ElectronicComponentGroups []*ElectronicComponentGroup `protobuf:"bytes,7,rep,name=electronicComponentGroups,proto3" json:"electronicComponentGroups,omitempty"` //关联的电子元件组合 } func (x *Signal) Reset() { @@ -882,6 +893,69 @@ func (x *Signal) GetElectronicComponentGroups() []*ElectronicComponentGroup { return nil } +type Psd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + PlatformId string `protobuf:"bytes,2,opt,name=platformId,proto3" json:"platformId,omitempty"` + ElectronicComponentGroups []*ElectronicComponentGroup `protobuf:"bytes,3,rep,name=electronicComponentGroups,proto3" json:"electronicComponentGroups,omitempty"` //关联的电子元件组合 +} + +func (x *Psd) Reset() { + *x = Psd{} + if protoimpl.UnsafeEnabled { + mi := &file_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Psd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Psd) ProtoMessage() {} + +func (x *Psd) ProtoReflect() protoreflect.Message { + mi := &file_model_proto_msgTypes[5] + 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 Psd.ProtoReflect.Descriptor instead. +func (*Psd) Descriptor() ([]byte, []int) { + return file_model_proto_rawDescGZIP(), []int{5} +} + +func (x *Psd) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Psd) GetPlatformId() string { + if x != nil { + return x.PlatformId + } + return "" +} + +func (x *Psd) GetElectronicComponentGroups() []*ElectronicComponentGroup { + if x != nil { + return x.ElectronicComponentGroups + } + return nil +} + // 应答器 type Transponder struct { state protoimpl.MessageState @@ -897,7 +971,7 @@ type Transponder struct { func (x *Transponder) Reset() { *x = Transponder{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[5] + mi := &file_model_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -910,7 +984,7 @@ func (x *Transponder) String() string { func (*Transponder) ProtoMessage() {} func (x *Transponder) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[5] + mi := &file_model_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -923,7 +997,7 @@ func (x *Transponder) ProtoReflect() protoreflect.Message { // Deprecated: Use Transponder.ProtoReflect.Descriptor instead. func (*Transponder) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{5} + return file_model_proto_rawDescGZIP(), []int{6} } func (x *Transponder) GetId() string { @@ -968,7 +1042,7 @@ type Slope struct { func (x *Slope) Reset() { *x = Slope{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[6] + mi := &file_model_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -981,7 +1055,7 @@ func (x *Slope) String() string { func (*Slope) ProtoMessage() {} func (x *Slope) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[6] + mi := &file_model_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -994,7 +1068,7 @@ func (x *Slope) ProtoReflect() protoreflect.Message { // Deprecated: Use Slope.ProtoReflect.Descriptor instead. func (*Slope) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{6} + return file_model_proto_rawDescGZIP(), []int{7} } func (x *Slope) GetId() string { @@ -1032,7 +1106,7 @@ type SectionalCurvature struct { func (x *SectionalCurvature) Reset() { *x = SectionalCurvature{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[7] + mi := &file_model_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1045,7 +1119,7 @@ func (x *SectionalCurvature) String() string { func (*SectionalCurvature) ProtoMessage() {} func (x *SectionalCurvature) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[7] + mi := &file_model_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1058,7 +1132,7 @@ func (x *SectionalCurvature) ProtoReflect() protoreflect.Message { // Deprecated: Use SectionalCurvature.ProtoReflect.Descriptor instead. func (*SectionalCurvature) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{7} + return file_model_proto_rawDescGZIP(), []int{8} } func (x *SectionalCurvature) GetId() string { @@ -1096,7 +1170,7 @@ type DevicePort struct { func (x *DevicePort) Reset() { *x = DevicePort{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[8] + mi := &file_model_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1109,7 +1183,7 @@ func (x *DevicePort) String() string { func (*DevicePort) ProtoMessage() {} func (x *DevicePort) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[8] + mi := &file_model_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1122,7 +1196,7 @@ func (x *DevicePort) ProtoReflect() protoreflect.Message { // Deprecated: Use DevicePort.ProtoReflect.Descriptor instead. func (*DevicePort) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{8} + return file_model_proto_rawDescGZIP(), []int{9} } func (x *DevicePort) GetDeviceId() string { @@ -1160,7 +1234,7 @@ type Kilometer struct { func (x *Kilometer) Reset() { *x = Kilometer{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[9] + mi := &file_model_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1173,7 +1247,7 @@ func (x *Kilometer) String() string { func (*Kilometer) ProtoMessage() {} func (x *Kilometer) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[9] + mi := &file_model_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1186,7 +1260,7 @@ func (x *Kilometer) ProtoReflect() protoreflect.Message { // Deprecated: Use Kilometer.ProtoReflect.Descriptor instead. func (*Kilometer) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{9} + return file_model_proto_rawDescGZIP(), []int{10} } func (x *Kilometer) GetValue() int64 { @@ -1224,7 +1298,7 @@ type KilometerConvert struct { func (x *KilometerConvert) Reset() { *x = KilometerConvert{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[10] + mi := &file_model_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1237,7 +1311,7 @@ func (x *KilometerConvert) String() string { func (*KilometerConvert) ProtoMessage() {} func (x *KilometerConvert) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[10] + mi := &file_model_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1250,7 +1324,7 @@ func (x *KilometerConvert) ProtoReflect() protoreflect.Message { // Deprecated: Use KilometerConvert.ProtoReflect.Descriptor instead. func (*KilometerConvert) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{10} + return file_model_proto_rawDescGZIP(), []int{11} } func (x *KilometerConvert) GetKmA() *Kilometer { @@ -1288,7 +1362,7 @@ type Relay struct { func (x *Relay) Reset() { *x = Relay{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[11] + mi := &file_model_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1301,7 +1375,7 @@ func (x *Relay) String() string { func (*Relay) ProtoMessage() {} func (x *Relay) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[11] + mi := &file_model_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1314,7 +1388,7 @@ func (x *Relay) ProtoReflect() protoreflect.Message { // Deprecated: Use Relay.ProtoReflect.Descriptor instead. func (*Relay) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{11} + return file_model_proto_rawDescGZIP(), []int{12} } func (x *Relay) GetId() string { @@ -1351,7 +1425,7 @@ type PhaseFailureProtector struct { func (x *PhaseFailureProtector) Reset() { *x = PhaseFailureProtector{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[12] + mi := &file_model_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1364,7 +1438,7 @@ func (x *PhaseFailureProtector) String() string { func (*PhaseFailureProtector) ProtoMessage() {} func (x *PhaseFailureProtector) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[12] + mi := &file_model_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1377,7 +1451,7 @@ func (x *PhaseFailureProtector) ProtoReflect() protoreflect.Message { // Deprecated: Use PhaseFailureProtector.ProtoReflect.Descriptor instead. func (*PhaseFailureProtector) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{12} + return file_model_proto_rawDescGZIP(), []int{13} } func (x *PhaseFailureProtector) GetId() string { @@ -1407,7 +1481,7 @@ type ElectronicComponentGroup struct { func (x *ElectronicComponentGroup) Reset() { *x = ElectronicComponentGroup{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[13] + mi := &file_model_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1420,7 +1494,7 @@ func (x *ElectronicComponentGroup) String() string { func (*ElectronicComponentGroup) ProtoMessage() {} func (x *ElectronicComponentGroup) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[13] + mi := &file_model_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1433,7 +1507,7 @@ func (x *ElectronicComponentGroup) ProtoReflect() protoreflect.Message { // Deprecated: Use ElectronicComponentGroup.ProtoReflect.Descriptor instead. func (*ElectronicComponentGroup) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{13} + return file_model_proto_rawDescGZIP(), []int{14} } func (x *ElectronicComponentGroup) GetCode() string { @@ -1463,7 +1537,7 @@ type Button struct { func (x *Button) Reset() { *x = Button{} if protoimpl.UnsafeEnabled { - mi := &file_model_proto_msgTypes[14] + mi := &file_model_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1476,7 +1550,7 @@ func (x *Button) String() string { func (*Button) ProtoMessage() {} func (x *Button) ProtoReflect() protoreflect.Message { - mi := &file_model_proto_msgTypes[14] + mi := &file_model_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1489,7 +1563,7 @@ func (x *Button) ProtoReflect() protoreflect.Message { // Deprecated: Use Button.ProtoReflect.Descriptor instead. func (*Button) Descriptor() ([]byte, []int) { - return file_model_proto_rawDescGZIP(), []int{14} + return file_model_proto_rawDescGZIP(), []int{15} } func (x *Button) GetId() string { @@ -1510,7 +1584,7 @@ var File_model_proto protoreflect.FileDescriptor var file_model_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x9b, 0x05, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x64, 0x65, 0x6c, 0x22, 0xbb, 0x05, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, @@ -1552,7 +1626,9 @@ var file_model_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x07, 0x62, 0x75, 0x74, 0x74, 0x6f, - 0x6e, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, + 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x73, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x50, 0x73, 0x64, 0x52, 0x04, 0x70, 0x73, + 0x64, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x75, 0x72, 0x6e, @@ -1617,119 +1693,130 @@ var file_model_proto_rawDesc = []byte{ 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, 0x92, 0x01, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 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, 0x02, - 0x6b, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x33, 0x0a, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, - 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x53, 0x0a, 0x05, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, - 0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, - 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x22, 0x60, 0x0a, 0x12, 0x53, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, - 0x03, 0x6b, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x0a, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 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, 0x12, 0x1f, 0x0a, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, - 0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x7d, 0x0a, 0x09, 0x4b, 0x69, - 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, - 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, - 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2e, 0x0a, 0x09, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x10, 0x4b, 0x69, 0x6c, - 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x22, 0x0a, - 0x03, 0x6b, 0x6d, 0x41, 0x18, 0x01, 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, - 0x41, 0x12, 0x22, 0x0a, 0x03, 0x6b, 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, 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, 0xb1, 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, 0x38, 0x0a, - 0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 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, 0x22, 0x5d, 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, 0x2a, 0xe4, 0x02, 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, 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, + 0x22, 0x94, 0x01, 0x0a, 0x03, 0x50, 0x73, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 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, 0x03, 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, 0x92, 0x01, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 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, 0x02, 0x6b, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, + 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, + 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x53, 0x0a, 0x05, + 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x67, + 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x65, 0x67, 0x72, 0x65, + 0x65, 0x22, 0x60, 0x0a, 0x12, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75, + 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, + 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x61, 0x64, + 0x69, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x31, 0x0a, + 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 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, + 0x12, 0x1f, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, + 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x22, 0x7d, 0x0a, 0x09, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x12, 0x2e, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x78, 0x0a, 0x10, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x41, 0x18, 0x01, 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, 0x41, 0x12, 0x22, 0x0a, 0x03, 0x6b, 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, 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, 0xb1, 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, 0x38, 0x0a, 0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x18, 0x02, 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, 0x22, 0x5d, + 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, 0x2a, 0xf8, 0x02, + 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, 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x5f, 0x50, 0x73, 0x64, 0x10, 0x0d, 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 ( @@ -1745,7 +1832,7 @@ func file_model_proto_rawDescGZIP() []byte { } var file_model_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_model_proto_goTypes = []interface{}{ (DeviceType)(0), // 0: model.DeviceType (Port)(0), // 1: model.Port @@ -1759,59 +1846,62 @@ var file_model_proto_goTypes = []interface{}{ (*CheckPoint)(nil), // 9: model.CheckPoint (*Turnout)(nil), // 10: model.Turnout (*Signal)(nil), // 11: model.Signal - (*Transponder)(nil), // 12: model.Transponder - (*Slope)(nil), // 13: model.Slope - (*SectionalCurvature)(nil), // 14: model.SectionalCurvature - (*DevicePort)(nil), // 15: model.DevicePort - (*Kilometer)(nil), // 16: model.Kilometer - (*KilometerConvert)(nil), // 17: model.KilometerConvert - (*Relay)(nil), // 18: model.Relay - (*PhaseFailureProtector)(nil), // 19: model.PhaseFailureProtector - (*ElectronicComponentGroup)(nil), // 20: model.ElectronicComponentGroup - (*Button)(nil), // 21: model.Button + (*Psd)(nil), // 12: model.Psd + (*Transponder)(nil), // 13: model.Transponder + (*Slope)(nil), // 14: model.Slope + (*SectionalCurvature)(nil), // 15: model.SectionalCurvature + (*DevicePort)(nil), // 16: model.DevicePort + (*Kilometer)(nil), // 17: model.Kilometer + (*KilometerConvert)(nil), // 18: model.KilometerConvert + (*Relay)(nil), // 19: model.Relay + (*PhaseFailureProtector)(nil), // 20: model.PhaseFailureProtector + (*ElectronicComponentGroup)(nil), // 21: model.ElectronicComponentGroup + (*Button)(nil), // 22: model.Button } var file_model_proto_depIdxs = []int32{ 8, // 0: model.Repository.physicalSections:type_name -> model.PhysicalSection 9, // 1: model.Repository.checkPoints:type_name -> model.CheckPoint 10, // 2: model.Repository.turnouts:type_name -> model.Turnout 11, // 3: model.Repository.signals:type_name -> model.Signal - 12, // 4: model.Repository.transponders:type_name -> model.Transponder - 13, // 5: model.Repository.slopes:type_name -> model.Slope - 14, // 6: model.Repository.sectionalCurvatures:type_name -> model.SectionalCurvature - 17, // 7: model.Repository.kilometerConverts:type_name -> model.KilometerConvert - 18, // 8: model.Repository.relays:type_name -> model.Relay - 19, // 9: model.Repository.phaseFailureProtectors:type_name -> model.PhaseFailureProtector - 21, // 10: model.Repository.buttons:type_name -> model.Button - 15, // 11: model.PhysicalSection.aDevicePort:type_name -> model.DevicePort - 15, // 12: model.PhysicalSection.bDevicePort:type_name -> model.DevicePort - 16, // 13: model.CheckPoint.km:type_name -> model.Kilometer - 3, // 14: model.CheckPoint.type:type_name -> model.CheckPointType - 15, // 15: model.CheckPoint.devicePorts:type_name -> model.DevicePort - 16, // 16: model.Turnout.km:type_name -> model.Kilometer - 15, // 17: model.Turnout.aDevicePort:type_name -> model.DevicePort - 15, // 18: model.Turnout.bDevicePort:type_name -> model.DevicePort - 15, // 19: model.Turnout.cDevicePort:type_name -> model.DevicePort - 4, // 20: model.Turnout.switchMachineType:type_name -> model.Turnout.SwitchMachineType - 20, // 21: model.Turnout.electronicComponentGroups:type_name -> model.ElectronicComponentGroup - 16, // 22: model.Signal.km:type_name -> model.Kilometer - 15, // 23: model.Signal.turnoutPort:type_name -> model.DevicePort - 20, // 24: model.Signal.electronicComponentGroups:type_name -> model.ElectronicComponentGroup - 16, // 25: model.Transponder.km:type_name -> model.Kilometer - 15, // 26: model.Transponder.turnoutPort:type_name -> model.DevicePort - 16, // 27: model.Slope.kms:type_name -> model.Kilometer - 16, // 28: model.SectionalCurvature.kms:type_name -> model.Kilometer - 0, // 29: model.DevicePort.deviceType:type_name -> model.DeviceType - 1, // 30: model.DevicePort.port:type_name -> model.Port - 2, // 31: model.Kilometer.direction:type_name -> model.Direction - 16, // 32: model.KilometerConvert.kmA:type_name -> model.Kilometer - 16, // 33: model.KilometerConvert.kmB:type_name -> model.Kilometer - 5, // 34: model.Relay.model:type_name -> model.Relay.Model - 6, // 35: model.Button.buttonType:type_name -> model.Button.ButtonType - 36, // [36:36] is the sub-list for method output_type - 36, // [36:36] is the sub-list for method input_type - 36, // [36:36] is the sub-list for extension type_name - 36, // [36:36] is the sub-list for extension extendee - 0, // [0:36] is the sub-list for field type_name + 13, // 4: model.Repository.transponders:type_name -> model.Transponder + 14, // 5: model.Repository.slopes:type_name -> model.Slope + 15, // 6: model.Repository.sectionalCurvatures:type_name -> model.SectionalCurvature + 18, // 7: model.Repository.kilometerConverts:type_name -> model.KilometerConvert + 19, // 8: model.Repository.relays:type_name -> model.Relay + 20, // 9: model.Repository.phaseFailureProtectors:type_name -> model.PhaseFailureProtector + 22, // 10: model.Repository.buttons:type_name -> model.Button + 12, // 11: model.Repository.psds:type_name -> model.Psd + 16, // 12: model.PhysicalSection.aDevicePort:type_name -> model.DevicePort + 16, // 13: model.PhysicalSection.bDevicePort:type_name -> model.DevicePort + 17, // 14: model.CheckPoint.km:type_name -> model.Kilometer + 3, // 15: model.CheckPoint.type:type_name -> model.CheckPointType + 16, // 16: model.CheckPoint.devicePorts:type_name -> model.DevicePort + 17, // 17: model.Turnout.km:type_name -> model.Kilometer + 16, // 18: model.Turnout.aDevicePort:type_name -> model.DevicePort + 16, // 19: model.Turnout.bDevicePort:type_name -> model.DevicePort + 16, // 20: model.Turnout.cDevicePort:type_name -> model.DevicePort + 4, // 21: model.Turnout.switchMachineType:type_name -> model.Turnout.SwitchMachineType + 21, // 22: model.Turnout.electronicComponentGroups:type_name -> model.ElectronicComponentGroup + 17, // 23: model.Signal.km:type_name -> model.Kilometer + 16, // 24: model.Signal.turnoutPort:type_name -> model.DevicePort + 21, // 25: model.Signal.electronicComponentGroups:type_name -> model.ElectronicComponentGroup + 21, // 26: model.Psd.electronicComponentGroups:type_name -> model.ElectronicComponentGroup + 17, // 27: model.Transponder.km:type_name -> model.Kilometer + 16, // 28: model.Transponder.turnoutPort:type_name -> model.DevicePort + 17, // 29: model.Slope.kms:type_name -> model.Kilometer + 17, // 30: model.SectionalCurvature.kms:type_name -> model.Kilometer + 0, // 31: model.DevicePort.deviceType:type_name -> model.DeviceType + 1, // 32: model.DevicePort.port:type_name -> model.Port + 2, // 33: model.Kilometer.direction:type_name -> model.Direction + 17, // 34: model.KilometerConvert.kmA:type_name -> model.Kilometer + 17, // 35: model.KilometerConvert.kmB:type_name -> model.Kilometer + 5, // 36: model.Relay.model:type_name -> model.Relay.Model + 6, // 37: model.Button.buttonType:type_name -> model.Button.ButtonType + 38, // [38:38] is the sub-list for method output_type + 38, // [38:38] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 38, // [38:38] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name } func init() { file_model_proto_init() } @@ -1881,7 +1971,7 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Transponder); i { + switch v := v.(*Psd); i { case 0: return &v.state case 1: @@ -1893,7 +1983,7 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Slope); i { + switch v := v.(*Transponder); i { case 0: return &v.state case 1: @@ -1905,7 +1995,7 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SectionalCurvature); i { + switch v := v.(*Slope); i { case 0: return &v.state case 1: @@ -1917,7 +2007,7 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DevicePort); i { + switch v := v.(*SectionalCurvature); i { case 0: return &v.state case 1: @@ -1929,7 +2019,7 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Kilometer); i { + switch v := v.(*DevicePort); i { case 0: return &v.state case 1: @@ -1941,7 +2031,7 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KilometerConvert); i { + switch v := v.(*Kilometer); i { case 0: return &v.state case 1: @@ -1953,7 +2043,7 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Relay); i { + switch v := v.(*KilometerConvert); i { case 0: return &v.state case 1: @@ -1965,7 +2055,7 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PhaseFailureProtector); i { + switch v := v.(*Relay); i { case 0: return &v.state case 1: @@ -1977,7 +2067,7 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ElectronicComponentGroup); i { + switch v := v.(*PhaseFailureProtector); i { case 0: return &v.state case 1: @@ -1989,6 +2079,18 @@ func file_model_proto_init() { } } file_model_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ElectronicComponentGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_model_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Button); i { case 0: return &v.state @@ -2007,7 +2109,7 @@ func file_model_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_model_proto_rawDesc, NumEnums: 7, - NumMessages: 15, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/repository/psd.go b/repository/psd.go new file mode 100644 index 0000000..146a4af --- /dev/null +++ b/repository/psd.go @@ -0,0 +1,18 @@ +package repository + +import "joylink.club/rtsssimulation/repository/model/proto" + +type Psd struct { + Identity + componentGroups []*ElectronicComponentGroup +} + +func newPsd(id string) *Psd { + return &Psd{ + Identity: identity{id, proto.DeviceType_DeviceType_Psd}, + } +} + +func (p *Psd) ComponentGroups() []*ElectronicComponentGroup { + return p.componentGroups +} diff --git a/repository/repository.go b/repository/repository.go index 4ac7337..02f53f4 100644 --- a/repository/repository.go +++ b/repository/repository.go @@ -21,6 +21,7 @@ type Repository struct { relayMap map[string]*Relay phaseFailureProtectorMap map[string]*PhaseFailureProtector buttonMap map[string]*Button + psdMap map[string]*Psd linkMap map[string]*Link } @@ -41,6 +42,7 @@ func newRepository(id string, version string) *Repository { phaseFailureProtectorMap: make(map[string]*PhaseFailureProtector), linkMap: make(map[string]*Link), buttonMap: make(map[string]*Button), + psdMap: make(map[string]*Psd), } } @@ -136,6 +138,13 @@ func (repo *Repository) ButtonList() []*Button { } return list } +func (repo *Repository) PsdList() []*Psd { + var list []*Psd + for _, model := range repo.psdMap { + list = append(list, model) + } + return list +} func (repo *Repository) FindModel(deviceId string, deviceType proto.DeviceType) (Identity, error) { switch deviceType { diff --git a/repository/repository_manager.go b/repository/repository_manager.go index 335d261..cca6678 100644 --- a/repository/repository_manager.go +++ b/repository/repository_manager.go @@ -90,6 +90,10 @@ func buildModels(source *proto.Repository, repository *Repository) { m := NewButton(protoData.Id, protoData.ButtonType) repository.buttonMap[m.Id()] = m } + for _, protoData := range source.Psds { + m := newPsd(protoData.Id) + repository.psdMap[m.Id()] = m + } } func buildModelRelationship(source *proto.Repository, repository *Repository) error { diff --git a/sys/circuit_sys/psd.go b/sys/circuit_sys/psd.go new file mode 100644 index 0000000..56f2fa5 --- /dev/null +++ b/sys/circuit_sys/psd.go @@ -0,0 +1,85 @@ +package circuit_sys + +import ( + "joylink.club/ecs" + "joylink.club/ecs/filter" + "joylink.club/rtsssimulation/component" +) + +type PsdSys struct { + query *ecs.Query +} + +func NewPsdSys() *PsdSys { + return &PsdSys{ + query: ecs.NewQuery(filter.Contains(component.PsdCircuitType, component.PsdDriveCircuitType)), + } +} + +func (p *PsdSys) Update(world ecs.World) { + p.query.Each(world, func(entry *ecs.Entry) { + psdMotorState := component.PsdMotorStateType.Get(entry) + psd := component.PsdCircuitType.Get(entry) + psdDrive := component.PsdDriveCircuitType.Get(entry) + p.exciteGMJ(psdMotorState, psd, psdDrive) + p.exciteKMJ4(psdMotorState, psd, psdDrive) + p.exciteKMJ8(psdMotorState, psd, psdDrive) + }) +} + +func (p *PsdSys) exciteGMJ(state *component.PsdMotorState, psd *component.PsdCircuit, psdDrive *component.PsdDriveCircuit) { + gmj := component.BitStateType.Get(psd.GMJ) + kmj4 := component.BitStateType.Get(psd.KMJ4) + kmj8 := component.BitStateType.Get(psd.KMJ8) + if psdDrive.GMJ { //驱动电路接通 + component.RelayDriveType.Get(psd.GMJ).Td = true + gmj.Val = true + } else if gmj.Val { + if !kmj4.Val && !kmj8.Val { + component.RelayDriveType.Get(psd.GMJ).Td = true + } else { + component.RelayDriveType.Get(psd.GMJ).Td = false + gmj.Val = false + } + } + if gmj.Val && !kmj4.Val && !kmj8.Val { + state.Gm = true + } +} + +func (p *PsdSys) exciteKMJ4(state *component.PsdMotorState, psd *component.PsdCircuit, psdDrive *component.PsdDriveCircuit) { + kmj4 := component.BitStateType.Get(psd.KMJ4) + gmj := component.BitStateType.Get(psd.GMJ) + kmj8 := component.BitStateType.Get(psd.KMJ8) + if psdDrive.KMJ4 { + component.RelayDriveType.Get(psd.KMJ4).Td = true + kmj4.Val = true + } else if kmj4.Val { + if !gmj.Val && !kmj8.Val { + component.RelayDriveType.Get(psd.KMJ4).Td = true + } else { + component.RelayDriveType.Get(psd.KMJ4).Td = false + kmj4.Val = false + } + } + if kmj4.Val && !gmj.Val && !kmj8.Val { + + } +} + +func (p *PsdSys) exciteKMJ8(state *component.PsdMotorState, psd *component.PsdCircuit, psdDrive *component.PsdDriveCircuit) { + kmj8 := component.BitStateType.Get(psd.KMJ8) + if psdDrive.KMJ4 { + component.RelayDriveType.Get(psd.KMJ8).Td = true + kmj8.Val = true + } else if kmj8.Val { + gmj := component.BitStateType.Get(psd.GMJ) + kmj4 := component.BitStateType.Get(psd.KMJ4) + if !gmj.Val && !kmj4.Val { + component.RelayDriveType.Get(psd.KMJ8).Td = true + } else { + component.RelayDriveType.Get(psd.KMJ8).Td = false + kmj8.Val = false + } + } +} diff --git a/sys/device_sys/psd_motor.go b/sys/device_sys/psd_motor.go new file mode 100644 index 0000000..6ed0f57 --- /dev/null +++ b/sys/device_sys/psd_motor.go @@ -0,0 +1,21 @@ +package device_sys + +import ( + "joylink.club/ecs" + "joylink.club/ecs/filter" + "joylink.club/rtsssimulation/component" +) + +type PsdMotorSys struct { + query *ecs.Query +} + +func NewPsdMotorSys() *PsdMotorSys { + return &PsdMotorSys{ + query: ecs.NewQuery(filter.Contains(component.PsdMotorStateType, component.TwoPositionTransformType)), + } +} + +func (s *PsdMotorSys) Update(w ecs.World) { + +}