From d443ee3c416807f7e69aac4099eff5167071d1cf Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Tue, 9 Jan 2024 09:39:03 +0800 Subject: [PATCH 1/4] =?UTF-8?q?iscs=20=20bas=20=20=E5=A4=A7=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/iscs_bas_air_conditioner.go | 4 - component/iscs_bas_air_pavilion.go | 4 +- ...environment.go => iscs_bas_environment.go} | 0 component/iscs_bas_pipe.go | 7 +- entity/iscs_bas.go | 28 +++--- entity/iscs_load.go | 2 +- sys/iscs_sys/iscs_bas_air_conditioner.go | 5 + sys/iscs_sys/iscs_bas_fluid.go | 99 ++++++++++++------- 8 files changed, 86 insertions(+), 63 deletions(-) rename component/{iscs_bas_gas_environment.go => iscs_bas_environment.go} (100%) diff --git a/component/iscs_bas_air_conditioner.go b/component/iscs_bas_air_conditioner.go index 303c415..fc1ec78 100644 --- a/component/iscs_bas_air_conditioner.go +++ b/component/iscs_bas_air_conditioner.go @@ -9,8 +9,4 @@ type AirConditioning struct { var ( AirConditioningType = ecs.NewComponentType[AirConditioning]() //空调 - - CombinationAirConditionerTag = ecs.NewTag() //组合式空调(变频空调) - AirConditioningGroupTag = ecs.NewTag() //空调群控系统 - AirConditionerTag = ecs.NewTag() //空调器 ) diff --git a/component/iscs_bas_air_pavilion.go b/component/iscs_bas_air_pavilion.go index dbd89f7..de9d93c 100644 --- a/component/iscs_bas_air_pavilion.go +++ b/component/iscs_bas_air_pavilion.go @@ -8,7 +8,5 @@ type AirPavilion struct { } var ( - AirPavilionType = ecs.NewComponentType[AirPavilion]() //风亭 - ExhaustPavilionTag = ecs.NewTag() //排风亭 - AirSupplyPavilionTag = ecs.NewTag() //送风亭 + AirPavilionType = ecs.NewComponentType[AirPavilion]() //风亭 ) diff --git a/component/iscs_bas_gas_environment.go b/component/iscs_bas_environment.go similarity index 100% rename from component/iscs_bas_gas_environment.go rename to component/iscs_bas_environment.go diff --git a/component/iscs_bas_pipe.go b/component/iscs_bas_pipe.go index 8c15ea3..28b0719 100644 --- a/component/iscs_bas_pipe.go +++ b/component/iscs_bas_pipe.go @@ -115,10 +115,9 @@ func NewPipeFluid() *PipeFluid { } var ( - PipeType = ecs.NewComponentType[Pipe]() //电线 - PipeElectricityType = ecs.NewComponentType[PipeElectricity]() //电线电力 - PipeFluidType = ecs.NewComponentType[PipeFluid]() //管线流体 - + PipeType = ecs.NewComponentType[Pipe]() //电线 + PipeElectricityType = ecs.NewComponentType[PipeElectricity]() //电线电力 + PipeFluidType = ecs.NewComponentType[PipeFluid]() //管线流体 ElectricitySourceType = ecs.NewComponentType[ElectricitySource]() //电源 ) diff --git a/entity/iscs_bas.go b/entity/iscs_bas.go index 8633648..5890ef7 100644 --- a/entity/iscs_bas.go +++ b/entity/iscs_bas.go @@ -34,19 +34,12 @@ func NewNetworkSwitchEntity(w ecs.World, id string) *ecs.Entry { } // NewAirPavilionEntity 创建风亭实体 -func NewAirPavilionEntity(w ecs.World, id string, apType proto.AirPavilion_Type) *ecs.Entry { +func NewAirPavilionEntity(w ecs.World, id string) *ecs.Entry { wd := GetWorldData(w) e, ok := wd.EntityMap[id] if !ok { e = w.Entry(w.Create(component.UidType, component.AirPavilionType)) // - switch apType { - case proto.AirPavilion_ExhaustPavilion: - e.AddComponent(component.ExhaustPavilionTag) - case proto.AirPavilion_AirSupplyPavilion: - e.AddComponent(component.AirSupplyPavilionTag) - } - // component.UidType.SetValue(e, component.Uid{Id: id}) component.AirPavilionType.Set(e, &component.AirPavilion{Normal: true}) wd.EntityMap[id] = e @@ -93,15 +86,24 @@ func NewGasMixingChamberEntity(w ecs.World, id string) *ecs.Entry { return e } -// NewCombinationAirConditionerEntity 创建组合式空调实体 +// NewCombinationAirConditionerEntity 创建组合式空调(变频)实体 func NewCombinationAirConditionerEntity(w ecs.World, id string) *ecs.Entry { - return newAirConditioningEntity(w, id, component.CombinationAirConditionerTag) -} -func newAirConditioningEntity(w ecs.World, id string, tag *ecs.ComponentType[struct{}]) *ecs.Entry { wd := GetWorldData(w) e, ok := wd.EntityMap[id] if !ok { - e = w.Entry(w.Create(component.UidType, component.MotorType, component.AirConditioningType, component.DeviceExceptionType, tag)) + e = w.Entry(w.Create(component.UidType, component.MotorType, component.MotorFcType, component.FluidDriverType, component.AirConditioningType, component.DeviceExceptionType)) + component.UidType.SetValue(e, component.Uid{Id: id}) + wd.EntityMap[id] = e + } + return e +} + +// NewAirConditionerEntity 创建空调实体 +func NewAirConditionerEntity(w ecs.World, id string) *ecs.Entry { + wd := GetWorldData(w) + e, ok := wd.EntityMap[id] + if !ok { + e = w.Entry(w.Create(component.UidType, component.MotorType, component.AirConditioningType, component.DeviceExceptionType)) component.UidType.SetValue(e, component.Uid{Id: id}) wd.EntityMap[id] = e } diff --git a/entity/iscs_load.go b/entity/iscs_load.go index 37e0bf6..fd04738 100644 --- a/entity/iscs_load.go +++ b/entity/iscs_load.go @@ -57,7 +57,7 @@ func LoadIscs(w ecs.World) error { } //风亭(排风亭、送风亭) for _, ap := range data.Repo.AirPavilionMap { - NewAirPavilionEntity(w, ap.Id(), ap.PavilionType) + NewAirPavilionEntity(w, ap.Id()) } //阀门 for _, valve := range data.Repo.ValveMap { diff --git a/sys/iscs_sys/iscs_bas_air_conditioner.go b/sys/iscs_sys/iscs_bas_air_conditioner.go index 1978bfa..da41c2f 100644 --- a/sys/iscs_sys/iscs_bas_air_conditioner.go +++ b/sys/iscs_sys/iscs_bas_air_conditioner.go @@ -22,5 +22,10 @@ func (s *AirConditionerSystem) Update(w ecs.World) { air := component.AirConditioningType.Get(entry) // air.Running = motor.Speed > 0 + // + if entry.HasComponent(component.FluidDriverType) { + fd := component.FluidDriverType.Get(entry) + fd.On = motor.Speed > 0 + } }) } diff --git a/sys/iscs_sys/iscs_bas_fluid.go b/sys/iscs_sys/iscs_bas_fluid.go index 62f0a33..b918e15 100644 --- a/sys/iscs_sys/iscs_bas_fluid.go +++ b/sys/iscs_sys/iscs_bas_fluid.go @@ -13,17 +13,17 @@ import ( // FluidDriverSystem 流体驱动系统 // 实现流体在设备、管线中流动 -// 流体驱动源(风机、送风亭、泵) +// 流体驱动源(风机、泵、组合式空调) type FluidDriverSystem struct { - query *ecs.Query //流体驱动源 - drivePathMap map[string][]*SearchedPath //key pipePortId,value 驱动源驱动流体的路径 - queryFluidPipe *ecs.Query + queryFluidDriver *ecs.Query //流体驱动源 + drivePathMap map[string][]*SearchedPath //key pipePortId,value 驱动源驱动流体的路径 + queryFluidPipe *ecs.Query } func NewFluidDriverSystem() *FluidDriverSystem { return &FluidDriverSystem{ - query: ecs.NewQuery(filter.Contains(component.UidType, component.FluidDriverType)), - queryFluidPipe: ecs.NewQuery(filter.Contains(component.UidType, component.PipeFluidType)), + queryFluidDriver: ecs.NewQuery(filter.Contains(component.UidType, component.FluidDriverType)), + queryFluidPipe: ecs.NewQuery(filter.Contains(component.UidType, component.PipeFluidType)), } } @@ -38,7 +38,9 @@ func (s *FluidDriverSystem) findFluidPath(fromDevice repository.Identity, fromDe return sp } func (s *FluidDriverSystem) Update(w ecs.World) { - + s.queryFluidDriver.Each(w, func(entry *ecs.Entry) { + //fdId := component.UidType.Get(entry).Id + }) } // 判断路径是否畅通 @@ -110,7 +112,7 @@ func newFluidDriverPathSearcher(fromDevice repository.Identity, fromDevicePortPi func (s *fluidDriverPathSearcher) search() []*SearchedPath { var rt []*SearchedPath if !s.exclude(s.fromDevicePortPipe.Device().Id()) { - searchContext := &fluidPath{} + searchContext := &fluidPath{viaPipeFittings: make(map[string]string)} searchContext.addPipe(s.fromDevicePortPipe) s.doSearch(searchContext) } else { @@ -149,50 +151,67 @@ func (s *fluidDriverPathSearcher) addSearchedPath(searchContext *fluidPath) { s.searchedPaths = append(s.searchedPaths, searchContext) } -// 递归搜索 +// 搜索 func (s *fluidDriverPathSearcher) doSearch(searchContext *fluidPath) { - nextViaPipes := searchContext.nextViaPathPipes() + nextViaPipes, end := searchContext.nextViaPathPipes() lenNextPipes := len(nextViaPipes) - if lenNextPipes == 0 { + if end { s.addSearchedPath(searchContext) - } else if lenNextPipes == 1 { - if !searchContext.viaPipe(nextViaPipes[0].Device().Id()) && !s.exclude(nextViaPipes[0].Device().Id()) { - searchContext.addPipe(nextViaPipes[0]) - s.doSearch(searchContext) - } } else { - for _, nextViaPipe := range nextViaPipes { - if searchContext.viaPipe(nextViaPipe.Device().Id()) { //舍弃回头路径 - continue + if lenNextPipes == 1 { + if !searchContext.viaPipe(nextViaPipes[0].Device().Id()) && !s.exclude(nextViaPipes[0].Device().Id()) { + searchContext.addPipe(nextViaPipes[0]) + s.doSearch(searchContext) } - if s.exclude(nextViaPipe.Device().Id()) { //舍弃排除路径 - continue + } else { + for _, nextViaPipe := range nextViaPipes { + if searchContext.viaPipe(nextViaPipe.Device().Id()) { //舍弃回头路径 + continue + } + if s.exclude(nextViaPipe.Device().Id()) { //舍弃排除路径 + continue + } + // + cp := searchContext.clone() + cp.addPipe(nextViaPipe) + s.doSearch(cp) } - // - cp := searchContext.clone() - cp.addPipe(nextViaPipe) - s.doSearch(cp) } } } -func (p *fluidPath) nextViaPathPipes() []repository.PipePort { +// 从当前管线找下一个管线 +// 泵、风机、空调 提供驱动力,承接进出 +// 返回bool : true-搜索达终点 +func (p *fluidPath) nextViaPathPipes() ([]repository.PipePort, bool) { nextDevice := p.nextDevice() + // switch nextDevice.Type() { case proto.DeviceType_DeviceType_PipeFitting: - return p.nextDeviceViaPipes(nextDevice.(*repository.PipeFitting).Ports(), p.curPipe) + { + if _, has := p.viaPipeFittings[nextDevice.Id()]; has { //排除已经经过的管件的路径 + return nil, false + } else { + p.viaPipeFittings[nextDevice.Id()] = nextDevice.Id() + return p.nextDeviceViaPipes(nextDevice.(*repository.PipeFitting).Ports(), p.curPipe), false + } + } case proto.DeviceType_DeviceType_Valve: - return p.nextDeviceViaPipes(nextDevice.(*repository.Valve).Ports(), p.curPipe) - case proto.DeviceType_DeviceType_GasMixingChamber: - return p.nextGasMixingChamberViaPipes(nextDevice.(*repository.GasMixingChamber), p.curPipe) - case proto.DeviceType_DeviceType_CombinationAirConditioner: - return p.nextCombinationAirConditionerViaPipes(nextDevice.(*repository.CombinationAirConditioner), p.curPipe) - case proto.DeviceType_DeviceType_AirPurificationDevice: - return p.nextDeviceViaPipes(nextDevice.(*repository.AirPurificationDevice).Ports(), p.curPipe) + return p.nextDeviceViaPipes(nextDevice.(*repository.Valve).Ports(), p.curPipe), false + case proto.DeviceType_DeviceType_GasMixingChamber: //静压箱 + return p.nextGasMixingChamberViaPipes(nextDevice.(*repository.GasMixingChamber), p.curPipe), false + case proto.DeviceType_DeviceType_AirPurificationDevice: //净化装置 + return p.nextDeviceViaPipes(nextDevice.(*repository.AirPurificationDevice).Ports(), p.curPipe), false + case proto.DeviceType_DeviceType_Environment: //环境 + fallthrough + case proto.DeviceType_DeviceType_AirPavilion: //风亭 + fallthrough + case proto.DeviceType_DeviceType_CombinationAirConditioner: //组合式空调 + return nil, true //路径搜索终点 default: slog.Warn("管线路径中的设备[%d]无法处理", nextDevice.Type()) } - return nil + return nil, false //排除(舍弃)该路径搜索 } /////////////////////////////////////////////////////////////////////////////////////////// @@ -240,8 +259,9 @@ func (p *fluidPath) nextGasMixingChamberViaPipes(nextDevice *repository.GasMixin } type fluidPath struct { - curPipe repository.PipePort //路径中当前有向管线 - viaPipes []repository.PipePort //路径所经过的有向管线 + curPipe repository.PipePort //路径中当前有向管线 + viaPipes []repository.PipePort //路径所经过的有向管线 + viaPipeFittings map[string]string //经过的管件,用于排除闭环路径,key和value均为deviceId } func (p *fluidPath) addPipe(viaPipe repository.PipePort) { @@ -257,8 +277,11 @@ func (p *fluidPath) viaPipe(pipeId string) bool { return false } func (p *fluidPath) clone() *fluidPath { - cp := &fluidPath{viaPipes: make([]repository.PipePort, 0, len(p.viaPipes)), curPipe: p.curPipe} + cp := &fluidPath{viaPipes: make([]repository.PipePort, 0, len(p.viaPipes)), curPipe: p.curPipe, viaPipeFittings: make(map[string]string)} copy(cp.viaPipes, p.viaPipes) + for k, v := range p.viaPipeFittings { + cp.viaPipeFittings[k] = v + } return cp } func (p *fluidPath) nextDevice() repository.Identity { From f215374f9bf6afe72d214472d510ce811e0ce448 Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Tue, 9 Jan 2024 09:40:28 +0800 Subject: [PATCH 2/4] =?UTF-8?q?iscs=20=20bas=20=20=E5=A4=A7=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repository/message_proto/repo.pb.go | 3519 +++++++++++++++++++++++++++ 1 file changed, 3519 insertions(+) create mode 100644 repository/message_proto/repo.pb.go diff --git a/repository/message_proto/repo.pb.go b/repository/message_proto/repo.pb.go new file mode 100644 index 0000000..4822de6 --- /dev/null +++ b/repository/message_proto/repo.pb.go @@ -0,0 +1,3519 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.23.1 +// source: repo.proto + +package message_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 Simulation_Type int32 + +const ( + // 城市轨道交通 + Simulation_CG Simulation_Type = 0 + // 国铁 + Simulation_GT Simulation_Type = 1 +) + +// Enum value maps for Simulation_Type. +var ( + Simulation_Type_name = map[int32]string{ + 0: "CG", + 1: "GT", + } + Simulation_Type_value = map[string]int32{ + "CG": 0, + "GT": 1, + } +) + +func (x Simulation_Type) Enum() *Simulation_Type { + p := new(Simulation_Type) + *p = x + return p +} + +func (x Simulation_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Simulation_Type) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[0].Descriptor() +} + +func (Simulation_Type) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[0] +} + +func (x Simulation_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Simulation_Type.Descriptor instead. +func (Simulation_Type) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{0, 0} +} + +// 检测点类型 +type CheckPoint_Type int32 + +const ( + CheckPoint_Boundary CheckPoint_Type = 0 //区段边界 + CheckPoint_JZ CheckPoint_Type = 1 //计轴器 + CheckPoint_JYJ CheckPoint_Type = 2 //绝缘节 +) + +// Enum value maps for CheckPoint_Type. +var ( + CheckPoint_Type_name = map[int32]string{ + 0: "Boundary", + 1: "JZ", + 2: "JYJ", + } + CheckPoint_Type_value = map[string]int32{ + "Boundary": 0, + "JZ": 1, + "JYJ": 2, + } +) + +func (x CheckPoint_Type) Enum() *CheckPoint_Type { + p := new(CheckPoint_Type) + *p = x + return p +} + +func (x CheckPoint_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CheckPoint_Type) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[1].Descriptor() +} + +func (CheckPoint_Type) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[1] +} + +func (x CheckPoint_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CheckPoint_Type.Descriptor instead. +func (CheckPoint_Type) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{15, 0} +} + +// 设备类型 +type Device_Type int32 + +const ( + // 区段 + Device_Section Device_Type = 0 + // 道岔 + Device_Turnout Device_Type = 1 + // 信号机 + Device_Signal Device_Type = 2 +) + +// Enum value maps for Device_Type. +var ( + Device_Type_name = map[int32]string{ + 0: "Section", + 1: "Turnout", + 2: "Signal", + } + Device_Type_value = map[string]int32{ + "Section": 0, + "Turnout": 1, + "Signal": 2, + } +) + +func (x Device_Type) Enum() *Device_Type { + p := new(Device_Type) + *p = x + return p +} + +func (x Device_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Device_Type) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[2].Descriptor() +} + +func (Device_Type) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[2] +} + +func (x Device_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Device_Type.Descriptor instead. +func (Device_Type) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{16, 0} +} + +// 设备端点(区段、道岔) +type Device_Port int32 + +const ( + Device_A Device_Port = 0 + Device_B Device_Port = 1 + Device_C Device_Port = 2 +) + +// Enum value maps for Device_Port. +var ( + Device_Port_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", + } + Device_Port_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, + } +) + +func (x Device_Port) Enum() *Device_Port { + p := new(Device_Port) + *p = x + return p +} + +func (x Device_Port) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Device_Port) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[3].Descriptor() +} + +func (Device_Port) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[3] +} + +func (x Device_Port) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Device_Port.Descriptor instead. +func (Device_Port) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{16, 1} +} + +type Signal_Model int32 + +const ( + Signal_HLU Signal_Model = 0 +) + +// Enum value maps for Signal_Model. +var ( + Signal_Model_name = map[int32]string{ + 0: "HLU", + } + Signal_Model_value = map[string]int32{ + "HLU": 0, + } +) + +func (x Signal_Model) Enum() *Signal_Model { + p := new(Signal_Model) + *p = x + return p +} + +func (x Signal_Model) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Signal_Model) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[4].Descriptor() +} + +func (Signal_Model) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[4] +} + +func (x Signal_Model) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Signal_Model.Descriptor instead. +func (Signal_Model) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{18, 0} +} + +// 继电器型号 +type Relay_Model int32 + +const ( + Relay_JPXC_1000 Relay_Model = 0 + Relay_JPXC_1700 Relay_Model = 1 + Relay_JWJXC_480 Relay_Model = 2 + Relay_JWJXC_H125_80 Relay_Model = 3 + Relay_JWXC_1700 Relay_Model = 4 + Relay_JWXC_H340 Relay_Model = 5 + Relay_JYJXC_160_260 Relay_Model = 6 + Relay_JZXC_H18 Relay_Model = 7 +) + +// Enum value maps for Relay_Model. +var ( + Relay_Model_name = map[int32]string{ + 0: "JPXC_1000", + 1: "JPXC_1700", + 2: "JWJXC_480", + 3: "JWJXC_H125_80", + 4: "JWXC_1700", + 5: "JWXC_H340", + 6: "JYJXC_160_260", + 7: "JZXC_H18", + } + Relay_Model_value = map[string]int32{ + "JPXC_1000": 0, + "JPXC_1700": 1, + "JWJXC_480": 2, + "JWJXC_H125_80": 3, + "JWXC_1700": 4, + "JWXC_H340": 5, + "JYJXC_160_260": 6, + "JZXC_H18": 7, + } +) + +func (x Relay_Model) Enum() *Relay_Model { + p := new(Relay_Model) + *p = x + return p +} + +func (x Relay_Model) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Relay_Model) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[5].Descriptor() +} + +func (Relay_Model) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[5] +} + +func (x Relay_Model) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Relay_Model.Descriptor instead. +func (Relay_Model) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{31, 0} +} + +type JKP_Type int32 + +const ( + JKP_IBP JKP_Type = 0 + JKP_PSL JKP_Type = 1 + JKP_MKX JKP_Type = 2 +) + +// Enum value maps for JKP_Type. +var ( + JKP_Type_name = map[int32]string{ + 0: "IBP", + 1: "PSL", + 2: "MKX", + } + JKP_Type_value = map[string]int32{ + "IBP": 0, + "PSL": 1, + "MKX": 2, + } +) + +func (x JKP_Type) Enum() *JKP_Type { + p := new(JKP_Type) + *p = x + return p +} + +func (x JKP_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JKP_Type) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[6].Descriptor() +} + +func (JKP_Type) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[6] +} + +func (x JKP_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JKP_Type.Descriptor instead. +func (JKP_Type) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{32, 0} +} + +type Simulation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Simulation) Reset() { + *x = Simulation{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Simulation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Simulation) ProtoMessage() {} + +func (x *Simulation) ProtoReflect() protoreflect.Message { + mi := &file_repo_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 Simulation.ProtoReflect.Descriptor instead. +func (*Simulation) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{0} +} + +type Repo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 仿真类型 + SimType Simulation_Type `protobuf:"varint,1,opt,name=simType,proto3,enum=message.Simulation_Type" json:"simType,omitempty"` + // Types that are assignable to Data: + // + // *Repo_Cg + // *Repo_Gt + Data isRepo_Data `protobuf_oneof:"data"` +} + +func (x *Repo) Reset() { + *x = Repo{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Repo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Repo) ProtoMessage() {} + +func (x *Repo) ProtoReflect() protoreflect.Message { + mi := &file_repo_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 Repo.ProtoReflect.Descriptor instead. +func (*Repo) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{1} +} + +func (x *Repo) GetSimType() Simulation_Type { + if x != nil { + return x.SimType + } + return Simulation_CG +} + +func (m *Repo) GetData() isRepo_Data { + if m != nil { + return m.Data + } + return nil +} + +func (x *Repo) GetCg() *CG { + if x, ok := x.GetData().(*Repo_Cg); ok { + return x.Cg + } + return nil +} + +func (x *Repo) GetGt() *GT { + if x, ok := x.GetData().(*Repo_Gt); ok { + return x.Gt + } + return nil +} + +type isRepo_Data interface { + isRepo_Data() +} + +type Repo_Cg struct { + Cg *CG `protobuf:"bytes,2,opt,name=cg,proto3,oneof"` +} + +type Repo_Gt struct { + Gt *GT `protobuf:"bytes,3,opt,name=gt,proto3,oneof"` +} + +func (*Repo_Cg) isRepo_Data() {} + +func (*Repo_Gt) isRepo_Data() {} + +// 国铁数据 +type GT struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GT) Reset() { + *x = GT{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GT) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GT) ProtoMessage() {} + +func (x *GT) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[2] + 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 GT.ProtoReflect.Descriptor instead. +func (*GT) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{2} +} + +// 城轨数据 +type CG struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Lines []*Line `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines,omitempty"` +} + +func (x *CG) Reset() { + *x = CG{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CG) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CG) ProtoMessage() {} + +func (x *CG) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[3] + 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 CG.ProtoReflect.Descriptor instead. +func (*CG) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{3} +} + +func (x *CG) GetLines() []*Line { + if x != nil { + return x.Lines + } + return nil +} + +// 城轨线路数据 +type Line struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 所在城市 + City string `protobuf:"bytes,1,opt,name=city,proto3" json:"city,omitempty"` + // 线路编号 + LineId int32 `protobuf:"varint,2,opt,name=lineId,proto3" json:"lineId,omitempty"` +} + +func (x *Line) Reset() { + *x = Line{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Line) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Line) ProtoMessage() {} + +func (x *Line) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[4] + 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 Line.ProtoReflect.Descriptor instead. +func (*Line) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{4} +} + +func (x *Line) GetCity() string { + if x != nil { + return x.City + } + return "" +} + +func (x *Line) GetLineId() int32 { + if x != nil { + return x.LineId + } + return 0 +} + +// 信号布置数据 +type XHBZ struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 数据id + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + // 车站 + Stations []*Station `protobuf:"bytes,2,rep,name=stations,proto3" json:"stations,omitempty"` + // 站台 + Platforms []*Platform `protobuf:"bytes,3,rep,name=platforms,proto3" json:"platforms,omitempty"` + // 屏蔽门 + Psds []*Psd `protobuf:"bytes,4,rep,name=psds,proto3" json:"psds,omitempty"` + // 物理区段 + PhysicalSections []*PhysicalSection `protobuf:"bytes,5,rep,name=physicalSections,proto3" json:"physicalSections,omitempty"` + // 道岔 + Turnouts []*Turnout `protobuf:"bytes,6,rep,name=turnouts,proto3" json:"turnouts,omitempty"` + // 信号机 + Signals []*Signal `protobuf:"bytes,7,rep,name=signals,proto3" json:"signals,omitempty"` + // 应答器 + Balises []*Balise `protobuf:"bytes,8,rep,name=balises,proto3" json:"balises,omitempty"` + // 停车点 + ParkingSpots []*ParkingSpot `protobuf:"bytes,9,rep,name=parkingSpots,proto3" json:"parkingSpots,omitempty"` + // 坡度 + Pds []*Pd `protobuf:"bytes,10,rep,name=pds,proto3" json:"pds,omitempty"` + // 曲度 + Qds []*Qd `protobuf:"bytes,11,rep,name=qds,proto3" json:"qds,omitempty"` + // 紧急关闭/停车按钮 + Emps []*EMP `protobuf:"bytes,12,rep,name=emps,proto3" json:"emps,omitempty"` + // 发车计时器 + Tdts []*TDT `protobuf:"bytes,13,rep,name=tdts,proto3" json:"tdts,omitempty"` + // 门控箱 + Mkxs []*Mkx `protobuf:"bytes,14,rep,name=mkxs,proto3" json:"mkxs,omitempty"` + // 就地控制盘 + Psls []*PSL `protobuf:"bytes,15,rep,name=psls,proto3" json:"psls,omitempty"` + // 人员防护开关 + Spks []*SPKS `protobuf:"bytes,16,rep,name=spks,proto3" json:"spks,omitempty"` +} + +func (x *XHBZ) Reset() { + *x = XHBZ{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XHBZ) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XHBZ) ProtoMessage() {} + +func (x *XHBZ) ProtoReflect() protoreflect.Message { + mi := &file_repo_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 XHBZ.ProtoReflect.Descriptor instead. +func (*XHBZ) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{5} +} + +func (x *XHBZ) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *XHBZ) GetStations() []*Station { + if x != nil { + return x.Stations + } + return nil +} + +func (x *XHBZ) GetPlatforms() []*Platform { + if x != nil { + return x.Platforms + } + return nil +} + +func (x *XHBZ) GetPsds() []*Psd { + if x != nil { + return x.Psds + } + return nil +} + +func (x *XHBZ) GetPhysicalSections() []*PhysicalSection { + if x != nil { + return x.PhysicalSections + } + return nil +} + +func (x *XHBZ) GetTurnouts() []*Turnout { + if x != nil { + return x.Turnouts + } + return nil +} + +func (x *XHBZ) GetSignals() []*Signal { + if x != nil { + return x.Signals + } + return nil +} + +func (x *XHBZ) GetBalises() []*Balise { + if x != nil { + return x.Balises + } + return nil +} + +func (x *XHBZ) GetParkingSpots() []*ParkingSpot { + if x != nil { + return x.ParkingSpots + } + return nil +} + +func (x *XHBZ) GetPds() []*Pd { + if x != nil { + return x.Pds + } + return nil +} + +func (x *XHBZ) GetQds() []*Qd { + if x != nil { + return x.Qds + } + return nil +} + +func (x *XHBZ) GetEmps() []*EMP { + if x != nil { + return x.Emps + } + return nil +} + +func (x *XHBZ) GetTdts() []*TDT { + if x != nil { + return x.Tdts + } + return nil +} + +func (x *XHBZ) GetMkxs() []*Mkx { + if x != nil { + return x.Mkxs + } + return nil +} + +func (x *XHBZ) GetPsls() []*PSL { + if x != nil { + return x.Psls + } + return nil +} + +func (x *XHBZ) GetSpks() []*SPKS { + if x != nil { + return x.Spks + } + return nil +} + +// 人员防护开关 +type SPKS struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *SPKS) Reset() { + *x = SPKS{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SPKS) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SPKS) ProtoMessage() {} + +func (x *SPKS) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[6] + 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 SPKS.ProtoReflect.Descriptor instead. +func (*SPKS) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{6} +} + +func (x *SPKS) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 就地控制盘 +type PSL struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *PSL) Reset() { + *x = PSL{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PSL) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PSL) ProtoMessage() {} + +func (x *PSL) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[7] + 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 PSL.ProtoReflect.Descriptor instead. +func (*PSL) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{7} +} + +func (x *PSL) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 门控箱 +type Mkx struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Mkx) Reset() { + *x = Mkx{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Mkx) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Mkx) ProtoMessage() {} + +func (x *Mkx) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[8] + 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 Mkx.ProtoReflect.Descriptor instead. +func (*Mkx) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{8} +} + +func (x *Mkx) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 发车计时器 +type TDT struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *TDT) Reset() { + *x = TDT{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TDT) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TDT) ProtoMessage() {} + +func (x *TDT) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[9] + 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 TDT.ProtoReflect.Descriptor instead. +func (*TDT) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{9} +} + +func (x *TDT) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 紧急关闭/停车按钮 +type EMP struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *EMP) Reset() { + *x = EMP{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EMP) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EMP) ProtoMessage() {} + +func (x *EMP) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[10] + 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 EMP.ProtoReflect.Descriptor instead. +func (*EMP) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{10} +} + +func (x *EMP) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 曲度 +type Qd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Qd) Reset() { + *x = Qd{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Qd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Qd) ProtoMessage() {} + +func (x *Qd) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[11] + 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 Qd.ProtoReflect.Descriptor instead. +func (*Qd) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{11} +} + +func (x *Qd) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 坡度 +type Pd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Pd) Reset() { + *x = Pd{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Pd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pd) ProtoMessage() {} + +func (x *Pd) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[12] + 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 Pd.ProtoReflect.Descriptor instead. +func (*Pd) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{12} +} + +func (x *Pd) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 停车点 +type ParkingSpot struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ParkingSpot) Reset() { + *x = ParkingSpot{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParkingSpot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParkingSpot) ProtoMessage() {} + +func (x *ParkingSpot) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[13] + 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 ParkingSpot.ProtoReflect.Descriptor instead. +func (*ParkingSpot) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{13} +} + +func (x *ParkingSpot) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 应答器 +type Balise struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Balise) Reset() { + *x = Balise{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Balise) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Balise) ProtoMessage() {} + +func (x *Balise) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[14] + 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 Balise.ProtoReflect.Descriptor instead. +func (*Balise) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{14} +} + +func (x *Balise) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 区段检测点 +type CheckPoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 检测点类型 + Type CheckPoint_Type `protobuf:"varint,2,opt,name=type,proto3,enum=message.CheckPoint_Type" json:"type,omitempty"` + // 公里标 + Glb *GLB `protobuf:"bytes,3,opt,name=glb,proto3" json:"glb,omitempty"` + // 关联的物理区段/道岔端口 + DevicePorts []*DevicePort `protobuf:"bytes,4,rep,name=devicePorts,proto3" json:"devicePorts,omitempty"` +} + +func (x *CheckPoint) Reset() { + *x = CheckPoint{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckPoint) ProtoMessage() {} + +func (x *CheckPoint) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[15] + 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 CheckPoint.ProtoReflect.Descriptor instead. +func (*CheckPoint) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{15} +} + +func (x *CheckPoint) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *CheckPoint) GetType() CheckPoint_Type { + if x != nil { + return x.Type + } + return CheckPoint_Boundary +} + +func (x *CheckPoint) GetGlb() *GLB { + if x != nil { + return x.Glb + } + return nil +} + +func (x *CheckPoint) GetDevicePorts() []*DevicePort { + if x != nil { + return x.DevicePorts + } + return nil +} + +// 设备 +type Device struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 设备id + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 设备类型 + Type Device_Type `protobuf:"varint,2,opt,name=type,proto3,enum=message.Device_Type" json:"type,omitempty"` +} + +func (x *Device) Reset() { + *x = Device{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Device) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Device) ProtoMessage() {} + +func (x *Device) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[16] + 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 Device.ProtoReflect.Descriptor instead. +func (*Device) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{16} +} + +func (x *Device) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Device) GetType() Device_Type { + if x != nil { + return x.Type + } + return Device_Section +} + +// 设备端点 +type DevicePort struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 设备id + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 设备类型 + Type Device_Type `protobuf:"varint,2,opt,name=type,proto3,enum=message.Device_Type" json:"type,omitempty"` + // 设备端 + Port Device_Port `protobuf:"varint,3,opt,name=port,proto3,enum=message.Device_Port" json:"port,omitempty"` +} + +func (x *DevicePort) Reset() { + *x = DevicePort{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DevicePort) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DevicePort) ProtoMessage() {} + +func (x *DevicePort) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[17] + 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 DevicePort.ProtoReflect.Descriptor instead. +func (*DevicePort) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{17} +} + +func (x *DevicePort) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *DevicePort) GetType() Device_Type { + if x != nil { + return x.Type + } + return Device_Section +} + +func (x *DevicePort) GetPort() Device_Port { + if x != nil { + return x.Port + } + return Device_A +} + +// 信号机 +type Signal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 信号机编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *Signal) Reset() { + *x = Signal{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Signal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signal) ProtoMessage() {} + +func (x *Signal) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[18] + 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 Signal.ProtoReflect.Descriptor instead. +func (*Signal) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{18} +} + +func (x *Signal) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Signal) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +// 道岔 +type Turnout struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Turnout) Reset() { + *x = Turnout{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Turnout) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Turnout) ProtoMessage() {} + +func (x *Turnout) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[19] + 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 Turnout.ProtoReflect.Descriptor instead. +func (*Turnout) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{19} +} + +func (x *Turnout) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 物理区段 +type PhysicalSection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *PhysicalSection) Reset() { + *x = PhysicalSection{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PhysicalSection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PhysicalSection) ProtoMessage() {} + +func (x *PhysicalSection) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[20] + 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 PhysicalSection.ProtoReflect.Descriptor instead. +func (*PhysicalSection) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{20} +} + +func (x *PhysicalSection) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 屏蔽门 +type Psd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Psd) Reset() { + *x = Psd{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[21] + 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_repo_proto_msgTypes[21] + 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_repo_proto_rawDescGZIP(), []int{21} +} + +func (x *Psd) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +// 站台 +type Platform struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // 所属车站 + StationId uint32 `protobuf:"varint,3,opt,name=stationId,proto3" json:"stationId,omitempty"` + // 关联物理区段(站台轨) + PhysicalSectionId uint32 `protobuf:"varint,4,opt,name=physicalSectionId,proto3" json:"physicalSectionId,omitempty"` +} + +func (x *Platform) Reset() { + *x = Platform{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Platform) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Platform) ProtoMessage() {} + +func (x *Platform) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[22] + 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 Platform.ProtoReflect.Descriptor instead. +func (*Platform) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{22} +} + +func (x *Platform) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Platform) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *Platform) GetStationId() uint32 { + if x != nil { + return x.StationId + } + return 0 +} + +func (x *Platform) GetPhysicalSectionId() uint32 { + if x != nil { + return x.PhysicalSectionId + } + return 0 +} + +// 车站 +type Station struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 车站名 + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // 车站站名 + Zname string `protobuf:"bytes,3,opt,name=zname,proto3" json:"zname,omitempty"` + // 车站公里标(站台中心点) + Glb *GLB `protobuf:"bytes,4,opt,name=glb,proto3" json:"glb,omitempty"` +} + +func (x *Station) Reset() { + *x = Station{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Station) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Station) ProtoMessage() {} + +func (x *Station) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[23] + 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 Station.ProtoReflect.Descriptor instead. +func (*Station) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{23} +} + +func (x *Station) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Station) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Station) GetZname() string { + if x != nil { + return x.Zname + } + return "" +} + +func (x *Station) GetGlb() *GLB { + if x != nil { + return x.Glb + } + return nil +} + +// 公里标 +type GLB struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 坐标系编号 + Zbx string `protobuf:"bytes,1,opt,name=zbx,proto3" json:"zbx,omitempty"` + // 左右行 + Right bool `protobuf:"varint,2,opt,name=right,proto3" json:"right,omitempty"` + // 公里标值,单位mm + Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *GLB) Reset() { + *x = GLB{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GLB) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GLB) ProtoMessage() {} + +func (x *GLB) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[24] + 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 GLB.ProtoReflect.Descriptor instead. +func (*GLB) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{24} +} + +func (x *GLB) GetZbx() string { + if x != nil { + return x.Zbx + } + return "" +} + +func (x *GLB) GetRight() bool { + if x != nil { + return x.Right + } + return false +} + +func (x *GLB) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +// 联锁设备布置数据 +type CiSBBZ struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 设备集中站uid + EcsId string `protobuf:"bytes,1,opt,name=ecsId,proto3" json:"ecsId,omitempty"` + // 继电器 + Relays []*Relay `protobuf:"bytes,2,rep,name=relays,proto3" json:"relays,omitempty"` + // 断相保护器 + Pfps []*PFP `protobuf:"bytes,3,rep,name=pfps,proto3" json:"pfps,omitempty"` + // 设备电气组合组 + DeviceEcgs []*DeviceEcc `protobuf:"bytes,4,rep,name=deviceEcgs,proto3" json:"deviceEcgs,omitempty"` + // 联锁采集码表 + Cjt []*CiCjTable `protobuf:"bytes,5,rep,name=cjt,proto3" json:"cjt,omitempty"` + // 联锁驱动码表 + Qdt []*CiQdTable `protobuf:"bytes,6,rep,name=qdt,proto3" json:"qdt,omitempty"` + // 联锁区段码位表 + SectionIds []string `protobuf:"bytes,7,rep,name=sectionIds,proto3" json:"sectionIds,omitempty"` +} + +func (x *CiSBBZ) Reset() { + *x = CiSBBZ{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiSBBZ) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiSBBZ) ProtoMessage() {} + +func (x *CiSBBZ) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[25] + 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 CiSBBZ.ProtoReflect.Descriptor instead. +func (*CiSBBZ) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{25} +} + +func (x *CiSBBZ) GetEcsId() string { + if x != nil { + return x.EcsId + } + return "" +} + +func (x *CiSBBZ) GetRelays() []*Relay { + if x != nil { + return x.Relays + } + return nil +} + +func (x *CiSBBZ) GetPfps() []*PFP { + if x != nil { + return x.Pfps + } + return nil +} + +func (x *CiSBBZ) GetDeviceEcgs() []*DeviceEcc { + if x != nil { + return x.DeviceEcgs + } + return nil +} + +func (x *CiSBBZ) GetCjt() []*CiCjTable { + if x != nil { + return x.Cjt + } + return nil +} + +func (x *CiSBBZ) GetQdt() []*CiQdTable { + if x != nil { + return x.Qdt + } + return nil +} + +func (x *CiSBBZ) GetSectionIds() []string { + if x != nil { + return x.SectionIds + } + return nil +} + +// 联锁区段码位表 +type CiSectionTable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 区段id + SectionIds []uint32 `protobuf:"varint,1,rep,packed,name=sectionIds,proto3" json:"sectionIds,omitempty"` +} + +func (x *CiSectionTable) Reset() { + *x = CiSectionTable{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiSectionTable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiSectionTable) ProtoMessage() {} + +func (x *CiSectionTable) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[26] + 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 CiSectionTable.ProtoReflect.Descriptor instead. +func (*CiSectionTable) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{26} +} + +func (x *CiSectionTable) GetSectionIds() []uint32 { + if x != nil { + return x.SectionIds + } + return nil +} + +// 联锁驱动码表 +type CiQdTable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 继电器id + RelayIds []uint32 `protobuf:"varint,1,rep,packed,name=relayIds,proto3" json:"relayIds,omitempty"` +} + +func (x *CiQdTable) Reset() { + *x = CiQdTable{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiQdTable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiQdTable) ProtoMessage() {} + +func (x *CiQdTable) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[27] + 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 CiQdTable.ProtoReflect.Descriptor instead. +func (*CiQdTable) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{27} +} + +func (x *CiQdTable) GetRelayIds() []uint32 { + if x != nil { + return x.RelayIds + } + return nil +} + +// 联锁采集码表 +type CiCjTable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*CiCjItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *CiCjTable) Reset() { + *x = CiCjTable{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiCjTable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiCjTable) ProtoMessage() {} + +func (x *CiCjTable) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[28] + 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 CiCjTable.ProtoReflect.Descriptor instead. +func (*CiCjTable) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{28} +} + +func (x *CiCjTable) GetItems() []*CiCjItem { + if x != nil { + return x.Items + } + return nil +} + +// 联锁采集项 +type CiCjItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 继电器id + RelayId uint32 `protobuf:"varint,1,opt,name=relayId,proto3" json:"relayId,omitempty"` + // 采集继电器前后接点(前接点为吸起/定位),true-前接点,false-后接点 + Q bool `protobuf:"varint,2,opt,name=q,proto3" json:"q,omitempty"` +} + +func (x *CiCjItem) Reset() { + *x = CiCjItem{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiCjItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiCjItem) ProtoMessage() {} + +func (x *CiCjItem) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[29] + 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 CiCjItem.ProtoReflect.Descriptor instead. +func (*CiCjItem) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{29} +} + +func (x *CiCjItem) GetRelayId() uint32 { + if x != nil { + return x.RelayId + } + return 0 +} + +func (x *CiCjItem) GetQ() bool { + if x != nil { + return x.Q + } + return false +} + +// 断相保护器(Phase failure protector) +type PFP struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *PFP) Reset() { + *x = PFP{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PFP) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PFP) ProtoMessage() {} + +func (x *PFP) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[30] + 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 PFP.ProtoReflect.Descriptor instead. +func (*PFP) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{30} +} + +func (x *PFP) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *PFP) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +// 继电器 +type Relay struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 继电器型号 + Model Relay_Model `protobuf:"varint,2,opt,name=model,proto3,enum=message.Relay_Model" json:"model,omitempty"` + // 编号 + Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *Relay) Reset() { + *x = Relay{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Relay) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Relay) ProtoMessage() {} + +func (x *Relay) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[31] + 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 Relay.ProtoReflect.Descriptor instead. +func (*Relay) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{31} +} + +func (x *Relay) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Relay) GetModel() Relay_Model { + if x != nil { + return x.Model + } + return Relay_JPXC_1000 +} + +func (x *Relay) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +// 按钮、灯等监控盘(IBP/门控箱/PSL等) +type JKP struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 数据id + Gid uint32 `protobuf:"varint,1,opt,name=gid,proto3" json:"gid,omitempty"` + // 开关 + Kgs []*KaiGuan `protobuf:"bytes,2,rep,name=kgs,proto3" json:"kgs,omitempty"` + // 灯 + Lamps []*Lamp `protobuf:"bytes,3,rep,name=lamps,proto3" json:"lamps,omitempty"` + // 警铃 + Alarms []*Alarm `protobuf:"bytes,4,rep,name=alarms,proto3" json:"alarms,omitempty"` + // 设备电子元件组合 + DeviceEccs []*DeviceEcc `protobuf:"bytes,5,rep,name=deviceEccs,proto3" json:"deviceEccs,omitempty"` +} + +func (x *JKP) Reset() { + *x = JKP{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JKP) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JKP) ProtoMessage() {} + +func (x *JKP) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[32] + 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 JKP.ProtoReflect.Descriptor instead. +func (*JKP) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{32} +} + +func (x *JKP) GetGid() uint32 { + if x != nil { + return x.Gid + } + return 0 +} + +func (x *JKP) GetKgs() []*KaiGuan { + if x != nil { + return x.Kgs + } + return nil +} + +func (x *JKP) GetLamps() []*Lamp { + if x != nil { + return x.Lamps + } + return nil +} + +func (x *JKP) GetAlarms() []*Alarm { + if x != nil { + return x.Alarms + } + return nil +} + +func (x *JKP) GetDeviceEccs() []*DeviceEcc { + if x != nil { + return x.DeviceEccs + } + return nil +} + +// 警铃/蜂鸣器 +type Alarm struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *Alarm) Reset() { + *x = Alarm{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Alarm) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Alarm) ProtoMessage() {} + +func (x *Alarm) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[33] + 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 Alarm.ProtoReflect.Descriptor instead. +func (*Alarm) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{33} +} + +func (x *Alarm) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Alarm) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +// 开关 +type KaiGuan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // 是否有背光灯 + Lamp bool `protobuf:"varint,3,opt,name=lamp,proto3" json:"lamp,omitempty"` +} + +func (x *KaiGuan) Reset() { + *x = KaiGuan{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KaiGuan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KaiGuan) ProtoMessage() {} + +func (x *KaiGuan) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[34] + 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 KaiGuan.ProtoReflect.Descriptor instead. +func (*KaiGuan) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{34} +} + +func (x *KaiGuan) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *KaiGuan) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *KaiGuan) GetLamp() bool { + if x != nil { + return x.Lamp + } + return false +} + +// 灯 +type Lamp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *Lamp) Reset() { + *x = Lamp{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Lamp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Lamp) ProtoMessage() {} + +func (x *Lamp) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[35] + 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 Lamp.ProtoReflect.Descriptor instead. +func (*Lamp) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{35} +} + +func (x *Lamp) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Lamp) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +// 设备电子元件组合 +type DeviceEcc struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 设备编号 + DeviceCode string `protobuf:"bytes,1,opt,name=deviceCode,proto3" json:"deviceCode,omitempty"` + // 设备类型 + DeviceType Device_Type `protobuf:"varint,2,opt,name=deviceType,proto3,enum=message.Device_Type" json:"deviceType,omitempty"` + // 电子元件组合 + Ecc []*Ecc `protobuf:"bytes,3,rep,name=ecc,proto3" json:"ecc,omitempty"` +} + +func (x *DeviceEcc) Reset() { + *x = DeviceEcc{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeviceEcc) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeviceEcc) ProtoMessage() {} + +func (x *DeviceEcc) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[36] + 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 DeviceEcc.ProtoReflect.Descriptor instead. +func (*DeviceEcc) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{36} +} + +func (x *DeviceEcc) GetDeviceCode() string { + if x != nil { + return x.DeviceCode + } + return "" +} + +func (x *DeviceEcc) GetDeviceType() Device_Type { + if x != nil { + return x.DeviceType + } + return Device_Section +} + +func (x *DeviceEcc) GetEcc() []*Ecc { + if x != nil { + return x.Ecc + } + return nil +} + +// 电子元件组合 +type Ecc struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 组合名称 + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + // 关联的电子元件id + Ids []uint32 `protobuf:"varint,2,rep,packed,name=ids,proto3" json:"ids,omitempty"` +} + +func (x *Ecc) Reset() { + *x = Ecc{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ecc) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ecc) ProtoMessage() {} + +func (x *Ecc) ProtoReflect() protoreflect.Message { + mi := &file_repo_proto_msgTypes[37] + 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 Ecc.ProtoReflect.Descriptor instead. +func (*Ecc) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{37} +} + +func (x *Ecc) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *Ecc) GetIds() []uint32 { + if x != nil { + return x.Ids + } + return nil +} + +var File_repo_proto protoreflect.FileDescriptor + +var file_repo_proto_rawDesc = []byte{ + 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x24, 0x0a, 0x0a, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x43, + 0x47, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x54, 0x10, 0x01, 0x22, 0x80, 0x01, 0x0a, 0x04, + 0x52, 0x65, 0x70, 0x6f, 0x12, 0x32, 0x0a, 0x07, 0x73, 0x69, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x07, 0x73, 0x69, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x02, 0x63, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, + 0x47, 0x48, 0x00, 0x52, 0x02, 0x63, 0x67, 0x12, 0x1d, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x54, + 0x48, 0x00, 0x52, 0x02, 0x67, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x04, + 0x0a, 0x02, 0x47, 0x54, 0x22, 0x29, 0x0a, 0x02, 0x43, 0x47, 0x12, 0x23, 0x0a, 0x05, 0x6c, 0x69, + 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x22, + 0x32, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, + 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x69, 0x6e, + 0x65, 0x49, 0x64, 0x22, 0x86, 0x05, 0x0a, 0x04, 0x58, 0x48, 0x42, 0x5a, 0x12, 0x10, 0x0a, 0x03, + 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x2c, + 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x09, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x12, 0x20, 0x0a, + 0x04, 0x70, 0x73, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x73, 0x64, 0x52, 0x04, 0x70, 0x73, 0x64, 0x73, 0x12, + 0x44, 0x0a, 0x10, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x52, 0x08, 0x74, 0x75, 0x72, 0x6e, 0x6f, + 0x75, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x29, + 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x61, 0x6c, 0x69, 0x73, 0x65, + 0x52, 0x07, 0x62, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0c, 0x70, 0x61, 0x72, + 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x6f, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x6b, 0x69, 0x6e, + 0x67, 0x53, 0x70, 0x6f, 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x70, + 0x6f, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x70, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x64, 0x52, 0x03, 0x70, + 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x71, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x51, 0x64, 0x52, 0x03, 0x71, 0x64, + 0x73, 0x12, 0x20, 0x0a, 0x04, 0x65, 0x6d, 0x70, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x4d, 0x50, 0x52, 0x04, 0x65, + 0x6d, 0x70, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x64, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x44, 0x54, 0x52, + 0x04, 0x74, 0x64, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x6d, 0x6b, 0x78, 0x73, 0x18, 0x0e, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x6b, + 0x78, 0x52, 0x04, 0x6d, 0x6b, 0x78, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x70, 0x73, 0x6c, 0x73, 0x18, + 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x50, 0x53, 0x4c, 0x52, 0x04, 0x70, 0x73, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x04, 0x73, 0x70, 0x6b, + 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x53, 0x50, 0x4b, 0x53, 0x52, 0x04, 0x73, 0x70, 0x6b, 0x73, 0x22, 0x16, 0x0a, 0x04, + 0x53, 0x50, 0x4b, 0x53, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x03, 0x50, 0x53, 0x4c, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x03, 0x4d, + 0x6b, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x15, 0x0a, 0x03, 0x54, 0x44, 0x54, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x03, 0x45, 0x4d, 0x50, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x14, 0x0a, 0x02, 0x51, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x02, 0x50, 0x64, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x0b, + 0x50, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x6f, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x06, 0x42, + 0x61, 0x6c, 0x69, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0xc8, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x67, 0x6c, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x4c, 0x42, 0x52, 0x03, 0x67, + 0x6c, 0x62, 0x12, 0x35, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x25, 0x0a, 0x04, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x10, 0x00, 0x12, + 0x06, 0x0a, 0x02, 0x4a, 0x5a, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x59, 0x4a, 0x10, 0x02, + 0x22, 0x8d, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, + 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x75, + 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x10, 0x02, 0x22, 0x1b, 0x0a, 0x04, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x41, + 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x02, + 0x22, 0x70, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, + 0x72, 0x74, 0x22, 0x3e, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 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, 0x10, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x07, 0x0a, 0x03, 0x48, 0x4c, 0x55, + 0x10, 0x00, 0x22, 0x19, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x21, 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, 0x0d, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x15, 0x0a, 0x03, 0x50, 0x73, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 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, 0x0d, 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, 0x0d, + 0x52, 0x11, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0x63, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x7a, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x7a, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x67, 0x6c, 0x62, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x47, 0x4c, 0x42, 0x52, 0x03, 0x67, 0x6c, 0x62, 0x22, 0x43, 0x0a, 0x03, 0x47, 0x4c, 0x42, 0x12, + 0x10, 0x0a, 0x03, 0x7a, 0x62, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x7a, 0x62, + 0x78, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x88, 0x02, + 0x0a, 0x06, 0x43, 0x69, 0x53, 0x42, 0x42, 0x5a, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x63, 0x73, 0x49, 0x64, 0x12, 0x26, + 0x0a, 0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x06, + 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x70, 0x66, 0x70, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, + 0x46, 0x50, 0x52, 0x04, 0x70, 0x66, 0x70, 0x73, 0x12, 0x32, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x45, 0x63, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x63, 0x63, + 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x63, 0x67, 0x73, 0x12, 0x24, 0x0a, 0x03, + 0x63, 0x6a, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x43, 0x69, 0x43, 0x6a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x63, + 0x6a, 0x74, 0x12, 0x24, 0x0a, 0x03, 0x71, 0x64, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x69, 0x51, 0x64, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x03, 0x71, 0x64, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x30, 0x0a, 0x0e, 0x43, 0x69, 0x53, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0a, + 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x27, 0x0a, 0x09, 0x43, 0x69, + 0x51, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x49, 0x64, 0x73, 0x22, 0x34, 0x0a, 0x09, 0x43, 0x69, 0x43, 0x6a, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x27, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x69, 0x43, 0x6a, 0x49, 0x74, + 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x32, 0x0a, 0x08, 0x43, 0x69, 0x43, + 0x6a, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x64, 0x12, + 0x0c, 0x0a, 0x01, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x01, 0x71, 0x22, 0x29, 0x0a, + 0x03, 0x50, 0x46, 0x50, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 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, 0xe0, 0x01, 0x0a, 0x05, 0x52, 0x65, 0x6c, + 0x61, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x79, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x22, 0x86, 0x01, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x0d, 0x0a, 0x09, + 0x4a, 0x50, 0x58, 0x43, 0x5f, 0x31, 0x30, 0x30, 0x30, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, + 0x50, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, + 0x4a, 0x58, 0x43, 0x5f, 0x34, 0x38, 0x30, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x57, 0x4a, + 0x58, 0x43, 0x5f, 0x48, 0x31, 0x32, 0x35, 0x5f, 0x38, 0x30, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, + 0x4a, 0x57, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4a, + 0x57, 0x58, 0x43, 0x5f, 0x48, 0x33, 0x34, 0x30, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x59, + 0x4a, 0x58, 0x43, 0x5f, 0x31, 0x36, 0x30, 0x5f, 0x32, 0x36, 0x30, 0x10, 0x06, 0x12, 0x0c, 0x0a, + 0x08, 0x4a, 0x5a, 0x58, 0x43, 0x5f, 0x48, 0x31, 0x38, 0x10, 0x07, 0x22, 0xdf, 0x01, 0x0a, 0x03, + 0x4a, 0x4b, 0x50, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4b, 0x61, 0x69, + 0x47, 0x75, 0x61, 0x6e, 0x52, 0x03, 0x6b, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x05, 0x6c, 0x61, 0x6d, + 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x4c, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x6c, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x26, + 0x0a, 0x06, 0x61, 0x6c, 0x61, 0x72, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x52, 0x06, + 0x61, 0x6c, 0x61, 0x72, 0x6d, 0x73, 0x12, 0x32, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x45, 0x63, 0x63, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x63, 0x63, 0x52, 0x0a, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x63, 0x63, 0x73, 0x22, 0x21, 0x0a, 0x04, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x42, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, + 0x53, 0x4c, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x4b, 0x58, 0x10, 0x02, 0x22, 0x2b, 0x0a, + 0x05, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 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, 0x41, 0x0a, 0x07, 0x4b, 0x61, + 0x69, 0x47, 0x75, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 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, 0x6c, 0x61, 0x6d, + 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6c, 0x61, 0x6d, 0x70, 0x22, 0x2a, 0x0a, + 0x04, 0x4c, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 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, 0x81, 0x01, 0x0a, 0x09, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x45, 0x63, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, + 0x03, 0x65, 0x63, 0x63, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x63, 0x63, 0x52, 0x03, 0x65, 0x63, 0x63, 0x22, 0x2b, 0x0a, + 0x03, 0x45, 0x63, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x03, 0x69, 0x64, 0x73, 0x42, 0x1c, 0x5a, 0x1a, 0x2e, 0x2f, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_repo_proto_rawDescOnce sync.Once + file_repo_proto_rawDescData = file_repo_proto_rawDesc +) + +func file_repo_proto_rawDescGZIP() []byte { + file_repo_proto_rawDescOnce.Do(func() { + file_repo_proto_rawDescData = protoimpl.X.CompressGZIP(file_repo_proto_rawDescData) + }) + return file_repo_proto_rawDescData +} + +var file_repo_proto_enumTypes = make([]protoimpl.EnumInfo, 7) +var file_repo_proto_msgTypes = make([]protoimpl.MessageInfo, 38) +var file_repo_proto_goTypes = []interface{}{ + (Simulation_Type)(0), // 0: message.Simulation.Type + (CheckPoint_Type)(0), // 1: message.CheckPoint.Type + (Device_Type)(0), // 2: message.Device.Type + (Device_Port)(0), // 3: message.Device.Port + (Signal_Model)(0), // 4: message.Signal.Model + (Relay_Model)(0), // 5: message.Relay.Model + (JKP_Type)(0), // 6: message.JKP.Type + (*Simulation)(nil), // 7: message.Simulation + (*Repo)(nil), // 8: message.Repo + (*GT)(nil), // 9: message.GT + (*CG)(nil), // 10: message.CG + (*Line)(nil), // 11: message.Line + (*XHBZ)(nil), // 12: message.XHBZ + (*SPKS)(nil), // 13: message.SPKS + (*PSL)(nil), // 14: message.PSL + (*Mkx)(nil), // 15: message.Mkx + (*TDT)(nil), // 16: message.TDT + (*EMP)(nil), // 17: message.EMP + (*Qd)(nil), // 18: message.Qd + (*Pd)(nil), // 19: message.Pd + (*ParkingSpot)(nil), // 20: message.ParkingSpot + (*Balise)(nil), // 21: message.Balise + (*CheckPoint)(nil), // 22: message.CheckPoint + (*Device)(nil), // 23: message.Device + (*DevicePort)(nil), // 24: message.DevicePort + (*Signal)(nil), // 25: message.Signal + (*Turnout)(nil), // 26: message.Turnout + (*PhysicalSection)(nil), // 27: message.PhysicalSection + (*Psd)(nil), // 28: message.Psd + (*Platform)(nil), // 29: message.Platform + (*Station)(nil), // 30: message.Station + (*GLB)(nil), // 31: message.GLB + (*CiSBBZ)(nil), // 32: message.CiSBBZ + (*CiSectionTable)(nil), // 33: message.CiSectionTable + (*CiQdTable)(nil), // 34: message.CiQdTable + (*CiCjTable)(nil), // 35: message.CiCjTable + (*CiCjItem)(nil), // 36: message.CiCjItem + (*PFP)(nil), // 37: message.PFP + (*Relay)(nil), // 38: message.Relay + (*JKP)(nil), // 39: message.JKP + (*Alarm)(nil), // 40: message.Alarm + (*KaiGuan)(nil), // 41: message.KaiGuan + (*Lamp)(nil), // 42: message.Lamp + (*DeviceEcc)(nil), // 43: message.DeviceEcc + (*Ecc)(nil), // 44: message.Ecc +} +var file_repo_proto_depIdxs = []int32{ + 0, // 0: message.Repo.simType:type_name -> message.Simulation.Type + 10, // 1: message.Repo.cg:type_name -> message.CG + 9, // 2: message.Repo.gt:type_name -> message.GT + 11, // 3: message.CG.lines:type_name -> message.Line + 30, // 4: message.XHBZ.stations:type_name -> message.Station + 29, // 5: message.XHBZ.platforms:type_name -> message.Platform + 28, // 6: message.XHBZ.psds:type_name -> message.Psd + 27, // 7: message.XHBZ.physicalSections:type_name -> message.PhysicalSection + 26, // 8: message.XHBZ.turnouts:type_name -> message.Turnout + 25, // 9: message.XHBZ.signals:type_name -> message.Signal + 21, // 10: message.XHBZ.balises:type_name -> message.Balise + 20, // 11: message.XHBZ.parkingSpots:type_name -> message.ParkingSpot + 19, // 12: message.XHBZ.pds:type_name -> message.Pd + 18, // 13: message.XHBZ.qds:type_name -> message.Qd + 17, // 14: message.XHBZ.emps:type_name -> message.EMP + 16, // 15: message.XHBZ.tdts:type_name -> message.TDT + 15, // 16: message.XHBZ.mkxs:type_name -> message.Mkx + 14, // 17: message.XHBZ.psls:type_name -> message.PSL + 13, // 18: message.XHBZ.spks:type_name -> message.SPKS + 1, // 19: message.CheckPoint.type:type_name -> message.CheckPoint.Type + 31, // 20: message.CheckPoint.glb:type_name -> message.GLB + 24, // 21: message.CheckPoint.devicePorts:type_name -> message.DevicePort + 2, // 22: message.Device.type:type_name -> message.Device.Type + 2, // 23: message.DevicePort.type:type_name -> message.Device.Type + 3, // 24: message.DevicePort.port:type_name -> message.Device.Port + 31, // 25: message.Station.glb:type_name -> message.GLB + 38, // 26: message.CiSBBZ.relays:type_name -> message.Relay + 37, // 27: message.CiSBBZ.pfps:type_name -> message.PFP + 43, // 28: message.CiSBBZ.deviceEcgs:type_name -> message.DeviceEcc + 35, // 29: message.CiSBBZ.cjt:type_name -> message.CiCjTable + 34, // 30: message.CiSBBZ.qdt:type_name -> message.CiQdTable + 36, // 31: message.CiCjTable.items:type_name -> message.CiCjItem + 5, // 32: message.Relay.model:type_name -> message.Relay.Model + 41, // 33: message.JKP.kgs:type_name -> message.KaiGuan + 42, // 34: message.JKP.lamps:type_name -> message.Lamp + 40, // 35: message.JKP.alarms:type_name -> message.Alarm + 43, // 36: message.JKP.deviceEccs:type_name -> message.DeviceEcc + 2, // 37: message.DeviceEcc.deviceType:type_name -> message.Device.Type + 44, // 38: message.DeviceEcc.ecc:type_name -> message.Ecc + 39, // [39:39] is the sub-list for method output_type + 39, // [39:39] is the sub-list for method input_type + 39, // [39:39] is the sub-list for extension type_name + 39, // [39:39] is the sub-list for extension extendee + 0, // [0:39] is the sub-list for field type_name +} + +func init() { file_repo_proto_init() } +func file_repo_proto_init() { + if File_repo_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_repo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Simulation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Repo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GT); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CG); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Line); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XHBZ); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SPKS); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PSL); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Mkx); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TDT); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EMP); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Qd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Pd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParkingSpot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Balise); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckPoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Device); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DevicePort); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Signal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Turnout); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PhysicalSection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Psd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Platform); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Station); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GLB); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CiSBBZ); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CiSectionTable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CiQdTable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CiCjTable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CiCjItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PFP); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Relay); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JKP); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Alarm); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KaiGuan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Lamp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceEcc); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_repo_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ecc); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_repo_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Repo_Cg)(nil), + (*Repo_Gt)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_repo_proto_rawDesc, + NumEnums: 7, + NumMessages: 38, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_repo_proto_goTypes, + DependencyIndexes: file_repo_proto_depIdxs, + EnumInfos: file_repo_proto_enumTypes, + MessageInfos: file_repo_proto_msgTypes, + }.Build() + File_repo_proto = out.File + file_repo_proto_rawDesc = nil + file_repo_proto_goTypes = nil + file_repo_proto_depIdxs = nil +} From a9ea711f0012ea9cc63b32d529328cae4697dd39 Mon Sep 17 00:00:00 2001 From: walker Date: Wed, 10 Jan 2024 10:57:47 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BB=A7=E7=94=B5=E5=99=A8=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E5=89=8D/=E5=90=8E=E4=BD=8D=E5=8F=8A=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=BC=BA=E5=88=B6=E5=8A=9F=E8=83=BD=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/ci_qc.go | 6 +- component/common.go | 5 +- component/component_data/ci.pb.go | 178 +++++------ component/component_data/common.pb.go | 263 +++++++++++++---- component/component_data/equipment.pb.go | 144 +++++++++ component/component_proto/ci.pb.go | 155 ---------- component/component_proto/common.pb.go | 361 ----------------------- component/equipment.go | 20 ++ entity/iscs_bas.go | 4 +- fi/relay.go | 28 ++ jl-ecs-go | 2 +- proto/src/component/ci.proto | 4 +- proto/src/component/equipment.proto | 9 + sys/device_sys/relay.go | 4 + 14 files changed, 513 insertions(+), 670 deletions(-) create mode 100644 component/component_data/equipment.pb.go delete mode 100644 component/component_proto/ci.pb.go delete mode 100644 component/component_proto/common.pb.go create mode 100644 component/equipment.go create mode 100644 proto/src/component/equipment.proto diff --git a/component/ci_qc.go b/component/ci_qc.go index bf986c8..087749b 100644 --- a/component/ci_qc.go +++ b/component/ci_qc.go @@ -4,7 +4,7 @@ import ( "fmt" "joylink.club/ecs" - "joylink.club/rtsssimulation/component/component_proto" + "joylink.club/rtsssimulation/component/component_data" "joylink.club/rtsssimulation/repository/model/proto" ) @@ -55,7 +55,7 @@ func (qc *CiQcTable) QueryQdIndex(uid string) (int, bool) { } type CiQcState struct { - component_proto.CiQcState + component_data.CiQcState } func NewCiQcState(qlen int, clen int) *CiQcState { @@ -68,7 +68,7 @@ func NewCiQcState(qlen int, clen int) *CiQcState { cbl++ } return &CiQcState{ - component_proto.CiQcState{ + component_data.CiQcState{ Qbs: make([]byte, qbl), Cbs: make([]byte, cbl), }, diff --git a/component/common.go b/component/common.go index 33c7ca3..a735ecf 100644 --- a/component/common.go +++ b/component/common.go @@ -3,7 +3,6 @@ package component import ( "joylink.club/ecs" "joylink.club/rtsssimulation/component/component_data" - "joylink.club/rtsssimulation/component/component_proto" "joylink.club/rtsssimulation/consts" ) @@ -12,7 +11,7 @@ var ( // 固定位置转换组件类型 FixedPositionTransformType = ecs.NewComponentType[FixedPositionTransform]() // 电机状态组件类型 - MotorStateType = ecs.NewComponentType[component_data.Motor]() + MotorStateType = ecs.NewComponentType[component_data.MotorState]() BitStateType = ecs.NewComponentType[BitState]() ) @@ -28,7 +27,7 @@ type Uid struct { // } type FixedPositionTransform struct { - component_proto.TwoPositionTransform + component_data.FixedPositionTransform } // 当前位置百分比值 diff --git a/component/component_data/ci.pb.go b/component/component_data/ci.pb.go index 29804be..c665552 100644 --- a/component/component_data/ci.pb.go +++ b/component/component_data/ci.pb.go @@ -21,26 +21,26 @@ const ( ) // 信号显示 -type Signal_Aspect int32 +type CiSignal_Aspect int32 const ( // 红灯亮 - Signal_H Signal_Aspect = 0 + CiSignal_H CiSignal_Aspect = 0 // 绿灯亮 - Signal_L Signal_Aspect = 1 + CiSignal_L CiSignal_Aspect = 1 // 黄灯亮 - Signal_U Signal_Aspect = 2 + CiSignal_U CiSignal_Aspect = 2 // 黄红灯亮(引导信号) - Signal_UH Signal_Aspect = 3 + CiSignal_UH CiSignal_Aspect = 3 // 白灯亮 - Signal_B Signal_Aspect = 4 + CiSignal_B CiSignal_Aspect = 4 // 蓝灯亮 - Signal_A Signal_Aspect = 5 + CiSignal_A CiSignal_Aspect = 5 ) -// Enum value maps for Signal_Aspect. +// Enum value maps for CiSignal_Aspect. var ( - Signal_Aspect_name = map[int32]string{ + CiSignal_Aspect_name = map[int32]string{ 0: "H", 1: "L", 2: "U", @@ -48,7 +48,7 @@ var ( 4: "B", 5: "A", } - Signal_Aspect_value = map[string]int32{ + CiSignal_Aspect_value = map[string]int32{ "H": 0, "L": 1, "U": 2, @@ -58,30 +58,30 @@ var ( } ) -func (x Signal_Aspect) Enum() *Signal_Aspect { - p := new(Signal_Aspect) +func (x CiSignal_Aspect) Enum() *CiSignal_Aspect { + p := new(CiSignal_Aspect) *p = x return p } -func (x Signal_Aspect) String() string { +func (x CiSignal_Aspect) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (Signal_Aspect) Descriptor() protoreflect.EnumDescriptor { +func (CiSignal_Aspect) Descriptor() protoreflect.EnumDescriptor { return file_component_ci_proto_enumTypes[0].Descriptor() } -func (Signal_Aspect) Type() protoreflect.EnumType { +func (CiSignal_Aspect) Type() protoreflect.EnumType { return &file_component_ci_proto_enumTypes[0] } -func (x Signal_Aspect) Number() protoreflect.EnumNumber { +func (x CiSignal_Aspect) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use Signal_Aspect.Descriptor instead. -func (Signal_Aspect) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use CiSignal_Aspect.Descriptor instead. +func (CiSignal_Aspect) EnumDescriptor() ([]byte, []int) { return file_component_ci_proto_rawDescGZIP(), []int{4, 0} } @@ -520,14 +520,14 @@ func (x *CiPointsState) GetSingleLock() bool { return false } -type Signal struct { +type CiSignal struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *Signal) Reset() { - *x = Signal{} +func (x *CiSignal) Reset() { + *x = CiSignal{} if protoimpl.UnsafeEnabled { mi := &file_component_ci_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -535,13 +535,13 @@ func (x *Signal) Reset() { } } -func (x *Signal) String() string { +func (x *CiSignal) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Signal) ProtoMessage() {} +func (*CiSignal) ProtoMessage() {} -func (x *Signal) ProtoReflect() protoreflect.Message { +func (x *CiSignal) ProtoReflect() protoreflect.Message { mi := &file_component_ci_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -553,8 +553,8 @@ func (x *Signal) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Signal.ProtoReflect.Descriptor instead. -func (*Signal) Descriptor() ([]byte, []int) { +// Deprecated: Use CiSignal.ProtoReflect.Descriptor instead. +func (*CiSignal) Descriptor() ([]byte, []int) { return file_component_ci_proto_rawDescGZIP(), []int{4} } @@ -565,7 +565,7 @@ type CiSignalState struct { unknownFields protoimpl.UnknownFields // 信号显示 - Aspect Signal_Aspect `protobuf:"varint,1,opt,name=aspect,proto3,enum=component.Signal_Aspect" json:"aspect,omitempty"` + Aspect CiSignal_Aspect `protobuf:"varint,1,opt,name=aspect,proto3,enum=component.CiSignal_Aspect" json:"aspect,omitempty"` // 是否逻辑点灯(即室外灭灯) Logic bool `protobuf:"varint,2,opt,name=logic,proto3" json:"logic,omitempty"` // 是否封锁 @@ -606,11 +606,11 @@ func (*CiSignalState) Descriptor() ([]byte, []int) { return file_component_ci_proto_rawDescGZIP(), []int{5} } -func (x *CiSignalState) GetAspect() Signal_Aspect { +func (x *CiSignalState) GetAspect() CiSignal_Aspect { if x != nil { return x.Aspect } - return Signal_H + return CiSignal_H } func (x *CiSignalState) GetLogic() bool { @@ -1040,61 +1040,61 @@ var file_component_ci_proto_rawDesc = []byte{ 0x6d, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6a, 0x61, 0x6d, 0x6d, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, - 0x6b, 0x22, 0x3d, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x22, 0x33, 0x0a, 0x06, 0x41, - 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x48, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, - 0x4c, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x55, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x55, 0x48, - 0x10, 0x03, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x04, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x05, - 0x22, 0x8b, 0x01, 0x0a, 0x0d, 0x43, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x06, 0x61, 0x73, - 0x70, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x6d, 0x70, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x61, 0x6d, 0x70, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x22, 0xf9, - 0x01, 0x0a, 0x0f, 0x43, 0x69, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x77, 0x61, 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x70, 0x77, 0x61, 0x72, 0x64, 0x48, 0x6f, - 0x6c, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x77, 0x61, 0x72, 0x64, 0x48, 0x6f, - 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x77, 0x61, - 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x63, 0x63, 0x55, 0x70, 0x77, - 0x61, 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, - 0x63, 0x63, 0x55, 0x70, 0x77, 0x61, 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0f, - 0x6f, 0x63, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x77, 0x61, 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6f, 0x63, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x77, 0x61, - 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x73, 0x64, 0x4f, 0x70, 0x65, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x73, 0x64, 0x4f, 0x70, 0x65, 0x6e, - 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6d, 0x65, 0x72, 0x67, 0x53, 0x74, 0x6f, 0x70, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6d, 0x65, 0x72, 0x67, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x47, 0x0a, 0x0b, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x22, 0x38, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x6c, 0x6f, - 0x73, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x6e, 0x10, 0x01, - 0x12, 0x07, 0x0a, 0x03, 0x43, 0x54, 0x43, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x61, 0x69, - 0x6e, 0x10, 0x03, 0x22, 0x89, 0x02, 0x0a, 0x0c, 0x43, 0x69, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x72, - 0x6f, 0x61, 0x63, 0x68, 0x4c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x61, 0x70, 0x70, 0x72, 0x6f, 0x61, 0x63, 0x68, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x0a, 0x09, - 0x66, 0x6c, 0x65, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x66, 0x6c, 0x65, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x69, - 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x63, 0x69, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x74, - 0x73, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x61, 0x74, 0x73, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, - 0x24, 0x0a, 0x0e, 0x43, 0x69, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x1c, 0x5a, 0x1a, 0x2e, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6b, 0x22, 0x3f, 0x0a, 0x08, 0x43, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x22, 0x33, 0x0a, + 0x06, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x48, 0x10, 0x00, 0x12, 0x05, + 0x0a, 0x01, 0x4c, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x55, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, + 0x55, 0x48, 0x10, 0x03, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x04, 0x12, 0x05, 0x0a, 0x01, 0x41, + 0x10, 0x05, 0x22, 0x8d, 0x01, 0x0a, 0x0d, 0x43, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2e, 0x43, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, + 0x52, 0x06, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x12, 0x14, + 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x6d, 0x70, 0x46, 0x61, 0x75, 0x6c, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x61, 0x6d, 0x70, 0x46, 0x61, 0x75, + 0x6c, 0x74, 0x22, 0xf9, 0x01, 0x0a, 0x0f, 0x43, 0x69, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x77, 0x61, 0x72, 0x64, + 0x48, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x70, 0x77, 0x61, + 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x77, 0x61, + 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x6f, + 0x77, 0x6e, 0x77, 0x61, 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x63, + 0x63, 0x55, 0x70, 0x77, 0x61, 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x6f, 0x63, 0x63, 0x55, 0x70, 0x77, 0x61, 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, + 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x63, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x77, 0x61, 0x72, 0x64, 0x48, + 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6f, 0x63, 0x63, 0x44, 0x6f, + 0x77, 0x6e, 0x77, 0x61, 0x72, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x73, + 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x73, 0x64, + 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6d, 0x65, 0x72, 0x67, 0x53, 0x74, 0x6f, + 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6d, 0x65, 0x72, 0x67, 0x53, 0x74, + 0x6f, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x47, + 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x22, 0x38, 0x0a, + 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, + 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x61, 0x6c, 0x6c, + 0x4f, 0x6e, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x43, 0x54, 0x43, 0x10, 0x02, 0x12, 0x08, 0x0a, + 0x04, 0x4d, 0x61, 0x69, 0x6e, 0x10, 0x03, 0x22, 0x89, 0x02, 0x0a, 0x0c, 0x43, 0x69, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x22, 0x0a, 0x0c, + 0x61, 0x70, 0x70, 0x72, 0x6f, 0x61, 0x63, 0x68, 0x4c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x61, 0x63, 0x68, 0x4c, 0x6f, 0x63, 0x6b, + 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x6c, 0x65, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x6c, 0x65, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x63, 0x69, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x63, 0x69, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x61, 0x74, 0x73, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x74, 0x73, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6f, 0x64, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x0c, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x22, 0x24, 0x0a, 0x0e, 0x43, 0x69, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x1c, 0x5a, 0x1a, 0x2e, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1112,13 +1112,13 @@ func file_component_ci_proto_rawDescGZIP() []byte { var file_component_ci_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_component_ci_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_component_ci_proto_goTypes = []interface{}{ - (Signal_Aspect)(0), // 0: component.Signal.Aspect + (CiSignal_Aspect)(0), // 0: component.CiSignal.Aspect (RouteSignal_ControlLevel)(0), // 1: component.RouteSignal.ControlLevel (*CiSysRAM)(nil), // 2: component.CiSysRAM (*CiQcState)(nil), // 3: component.CiQcState (*CiSectionState)(nil), // 4: component.CiSectionState (*CiPointsState)(nil), // 5: component.CiPointsState - (*Signal)(nil), // 6: component.Signal + (*CiSignal)(nil), // 6: component.CiSignal (*CiSignalState)(nil), // 7: component.CiSignalState (*CiPlatformState)(nil), // 8: component.CiPlatformState (*RouteSignal)(nil), // 9: component.RouteSignal @@ -1140,7 +1140,7 @@ var file_component_ci_proto_depIdxs = []int32{ 16, // 4: component.CiSysRAM.platformStates:type_name -> component.CiSysRAM.PlatformStatesEntry 17, // 5: component.CiSysRAM.routeStates:type_name -> component.CiSysRAM.RouteStatesEntry 18, // 6: component.CiSysRAM.overlapStates:type_name -> component.CiSysRAM.OverlapStatesEntry - 0, // 7: component.CiSignalState.aspect:type_name -> component.Signal.Aspect + 0, // 7: component.CiSignalState.aspect:type_name -> component.CiSignal.Aspect 1, // 8: component.CiRouteState.controlLevel:type_name -> component.RouteSignal.ControlLevel 3, // 9: component.CiSysRAM.QcStatesEntry.value:type_name -> component.CiQcState 4, // 10: component.CiSysRAM.SectionStatesEntry.value:type_name -> component.CiSectionState @@ -1156,7 +1156,7 @@ var file_component_ci_proto_depIdxs = []int32{ 0, // [0:16] is the sub-list for field type_name } -//func init() { file_component_ci_proto_init() } +func init() { file_component_ci_proto_init() } func file_component_ci_proto_init() { if File_component_ci_proto != nil { return @@ -1211,7 +1211,7 @@ func file_component_ci_proto_init() { } } file_component_ci_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Signal); i { + switch v := v.(*CiSignal); i { case 0: return &v.state case 1: diff --git a/component/component_data/common.pb.go b/component/component_data/common.pb.go index d1dc220..049c190 100644 --- a/component/component_data/common.pb.go +++ b/component/component_data/common.pb.go @@ -21,7 +21,7 @@ const ( ) // 电机 -type Motor struct { +type MotorState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -32,8 +32,8 @@ type Motor struct { Forward bool `protobuf:"varint,2,opt,name=forward,proto3" json:"forward,omitempty"` } -func (x *Motor) Reset() { - *x = Motor{} +func (x *MotorState) Reset() { + *x = MotorState{} if protoimpl.UnsafeEnabled { mi := &file_component_common_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -41,13 +41,13 @@ func (x *Motor) Reset() { } } -func (x *Motor) String() string { +func (x *MotorState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Motor) ProtoMessage() {} +func (*MotorState) ProtoMessage() {} -func (x *Motor) ProtoReflect() protoreflect.Message { +func (x *MotorState) ProtoReflect() protoreflect.Message { mi := &file_component_common_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59,39 +59,161 @@ func (x *Motor) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Motor.ProtoReflect.Descriptor instead. -func (*Motor) Descriptor() ([]byte, []int) { +// Deprecated: Use MotorState.ProtoReflect.Descriptor instead. +func (*MotorState) Descriptor() ([]byte, []int) { return file_component_common_proto_rawDescGZIP(), []int{0} } -func (x *Motor) GetPowerUp() bool { +func (x *MotorState) GetPowerUp() bool { if x != nil { return x.PowerUp } return false } -func (x *Motor) GetForward() bool { +func (x *MotorState) GetForward() bool { if x != nil { return x.Forward } return false } +// 无极继电器和偏极继电器稳态为落下,也就是后接点(8组采集接点中的1,3接点,1为中接点),吸气为前接点(1,2接点) +// 有极继电器是定位反位双稳态(有永久磁钢),前接点为定位,后接点为反位 +// 有极继电器(对于道岔中的2DQJ),励磁接点1,2接通为反位;3,4接通为定位 +// 定义继电器状态时,false表示落下/反位/后接点,true表示吸起/定位/前接点 +// 缓动继电器:指从通电或断电起,至接点转接止所需时间在0.3s以上的继电器。可分为缓放继电器(如无极缓放继电器等)和缓吸继电器(如热力继电器和时间继电器等)。 +// 偏极继电器:只有通过规定方向的电流时,才吸起 +// 继电器状态 +type RelayState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 是否通电 + PowerUp bool `protobuf:"varint,1,opt,name=powerUp,proto3" json:"powerUp,omitempty"` + // 是否励磁到前接点 + Qq bool `protobuf:"varint,2,opt,name=qq,proto3" json:"qq,omitempty"` + // 是否在前接点位置 + Q bool `protobuf:"varint,3,opt,name=q,proto3" json:"q,omitempty"` +} + +func (x *RelayState) Reset() { + *x = RelayState{} + if protoimpl.UnsafeEnabled { + mi := &file_component_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelayState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelayState) ProtoMessage() {} + +func (x *RelayState) ProtoReflect() protoreflect.Message { + mi := &file_component_common_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 RelayState.ProtoReflect.Descriptor instead. +func (*RelayState) Descriptor() ([]byte, []int) { + return file_component_common_proto_rawDescGZIP(), []int{1} +} + +func (x *RelayState) GetPowerUp() bool { + if x != nil { + return x.PowerUp + } + return false +} + +func (x *RelayState) GetQq() bool { + if x != nil { + return x.Qq + } + return false +} + +func (x *RelayState) GetQ() bool { + if x != nil { + return x.Q + } + return false +} + +// 开关类设备状态 +type SwitchState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 是否按下(按钮式开关true表示按下,旋钮开关true非常态位) + Pressed bool `protobuf:"varint,2,opt,name=pressed,proto3" json:"pressed,omitempty"` +} + +func (x *SwitchState) Reset() { + *x = SwitchState{} + if protoimpl.UnsafeEnabled { + mi := &file_component_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SwitchState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SwitchState) ProtoMessage() {} + +func (x *SwitchState) ProtoReflect() protoreflect.Message { + mi := &file_component_common_proto_msgTypes[2] + 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 SwitchState.ProtoReflect.Descriptor instead. +func (*SwitchState) Descriptor() ([]byte, []int) { + return file_component_common_proto_rawDescGZIP(), []int{2} +} + +func (x *SwitchState) GetPressed() bool { + if x != nil { + return x.Pressed + } + return false +} + // 固定位置转换组件 type FixedPositionTransform struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Pos int32 `protobuf:"varint,1,opt,name=pos,proto3" json:"pos,omitempty"` // 当前位置百分比,[0, 10000],两位小数 + Pos int32 `protobuf:"varint,1,opt,name=pos,proto3" json:"pos,omitempty"` // 当前位置百分比,[0, 100] Speed int32 `protobuf:"varint,2,opt,name=speed,proto3" json:"speed,omitempty"` } func (x *FixedPositionTransform) Reset() { *x = FixedPositionTransform{} if protoimpl.UnsafeEnabled { - mi := &file_component_common_proto_msgTypes[1] + mi := &file_component_common_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -104,7 +226,7 @@ func (x *FixedPositionTransform) String() string { func (*FixedPositionTransform) ProtoMessage() {} func (x *FixedPositionTransform) ProtoReflect() protoreflect.Message { - mi := &file_component_common_proto_msgTypes[1] + mi := &file_component_common_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -117,7 +239,7 @@ func (x *FixedPositionTransform) ProtoReflect() protoreflect.Message { // Deprecated: Use FixedPositionTransform.ProtoReflect.Descriptor instead. func (*FixedPositionTransform) Descriptor() ([]byte, []int) { - return file_component_common_proto_rawDescGZIP(), []int{1} + return file_component_common_proto_rawDescGZIP(), []int{3} } func (x *FixedPositionTransform) GetPos() int32 { @@ -146,7 +268,7 @@ type BitState struct { func (x *BitState) Reset() { *x = BitState{} if protoimpl.UnsafeEnabled { - mi := &file_component_common_proto_msgTypes[2] + mi := &file_component_common_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -159,7 +281,7 @@ func (x *BitState) String() string { func (*BitState) ProtoMessage() {} func (x *BitState) ProtoReflect() protoreflect.Message { - mi := &file_component_common_proto_msgTypes[2] + mi := &file_component_common_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -172,7 +294,7 @@ func (x *BitState) ProtoReflect() protoreflect.Message { // Deprecated: Use BitState.ProtoReflect.Descriptor instead. func (*BitState) Descriptor() ([]byte, []int) { - return file_component_common_proto_rawDescGZIP(), []int{2} + return file_component_common_proto_rawDescGZIP(), []int{4} } func (x *BitState) GetVal() bool { @@ -195,7 +317,7 @@ type Counter struct { func (x *Counter) Reset() { *x = Counter{} if protoimpl.UnsafeEnabled { - mi := &file_component_common_proto_msgTypes[3] + mi := &file_component_common_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -208,7 +330,7 @@ func (x *Counter) String() string { func (*Counter) ProtoMessage() {} func (x *Counter) ProtoReflect() protoreflect.Message { - mi := &file_component_common_proto_msgTypes[3] + mi := &file_component_common_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -221,7 +343,7 @@ func (x *Counter) ProtoReflect() protoreflect.Message { // Deprecated: Use Counter.ProtoReflect.Descriptor instead. func (*Counter) Descriptor() ([]byte, []int) { - return file_component_common_proto_rawDescGZIP(), []int{3} + return file_component_common_proto_rawDescGZIP(), []int{5} } func (x *Counter) GetVal() int32 { @@ -251,7 +373,7 @@ type CounterDown struct { func (x *CounterDown) Reset() { *x = CounterDown{} if protoimpl.UnsafeEnabled { - mi := &file_component_common_proto_msgTypes[4] + mi := &file_component_common_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -264,7 +386,7 @@ func (x *CounterDown) String() string { func (*CounterDown) ProtoMessage() {} func (x *CounterDown) ProtoReflect() protoreflect.Message { - mi := &file_component_common_proto_msgTypes[4] + mi := &file_component_common_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -277,7 +399,7 @@ func (x *CounterDown) ProtoReflect() protoreflect.Message { // Deprecated: Use CounterDown.ProtoReflect.Descriptor instead. func (*CounterDown) Descriptor() ([]byte, []int) { - return file_component_common_proto_rawDescGZIP(), []int{4} + return file_component_common_proto_rawDescGZIP(), []int{6} } func (x *CounterDown) GetVal() int32 { @@ -299,25 +421,32 @@ var File_component_common_proto protoreflect.FileDescriptor var file_component_common_proto_rawDesc = []byte{ 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x05, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x55, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, - 0x6f, 0x77, 0x65, 0x72, 0x55, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x22, 0x40, 0x0a, 0x16, 0x46, 0x69, 0x78, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x70, 0x65, - 0x65, 0x64, 0x22, 0x1c, 0x0a, 0x08, 0x42, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, 0x61, 0x6c, - 0x22, 0x2f, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x76, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x22, 0x33, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, - 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, - 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x42, 0x1c, 0x5a, 0x1a, 0x2e, 0x2f, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x74, 0x22, 0x40, 0x0a, 0x0a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x55, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x55, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x66, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x22, 0x44, 0x0a, 0x0a, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x55, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x55, 0x70, 0x12, 0x0e, 0x0a, + 0x02, 0x71, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x71, 0x71, 0x12, 0x0c, 0x0a, + 0x01, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x01, 0x71, 0x22, 0x27, 0x0a, 0x0b, 0x53, + 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x64, 0x22, 0x40, 0x0a, 0x16, 0x46, 0x69, 0x78, 0x65, 0x64, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x10, + 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x22, 0x1c, 0x0a, 0x08, 0x42, 0x69, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x03, 0x76, 0x61, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, + 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x22, 0x33, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x44, 0x6f, 0x77, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x42, 0x1c, 0x5a, 0x1a, 0x2e, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -332,13 +461,15 @@ func file_component_common_proto_rawDescGZIP() []byte { return file_component_common_proto_rawDescData } -var file_component_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_component_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_component_common_proto_goTypes = []interface{}{ - (*Motor)(nil), // 0: component.Motor - (*FixedPositionTransform)(nil), // 1: component.FixedPositionTransform - (*BitState)(nil), // 2: component.BitState - (*Counter)(nil), // 3: component.Counter - (*CounterDown)(nil), // 4: component.CounterDown + (*MotorState)(nil), // 0: component.MotorState + (*RelayState)(nil), // 1: component.RelayState + (*SwitchState)(nil), // 2: component.SwitchState + (*FixedPositionTransform)(nil), // 3: component.FixedPositionTransform + (*BitState)(nil), // 4: component.BitState + (*Counter)(nil), // 5: component.Counter + (*CounterDown)(nil), // 6: component.CounterDown } var file_component_common_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -348,14 +479,14 @@ var file_component_common_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -//func init() { file_component_common_proto_init() } +func init() { file_component_common_proto_init() } func file_component_common_proto_init() { if File_component_common_proto != nil { return } if !protoimpl.UnsafeEnabled { file_component_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Motor); i { + switch v := v.(*MotorState); i { case 0: return &v.state case 1: @@ -367,7 +498,7 @@ func file_component_common_proto_init() { } } file_component_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FixedPositionTransform); i { + switch v := v.(*RelayState); i { case 0: return &v.state case 1: @@ -379,7 +510,7 @@ func file_component_common_proto_init() { } } file_component_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BitState); i { + switch v := v.(*SwitchState); i { case 0: return &v.state case 1: @@ -391,7 +522,7 @@ func file_component_common_proto_init() { } } file_component_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Counter); i { + switch v := v.(*FixedPositionTransform); i { case 0: return &v.state case 1: @@ -403,6 +534,30 @@ func file_component_common_proto_init() { } } file_component_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BitState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Counter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CounterDown); i { case 0: return &v.state @@ -421,7 +576,7 @@ func file_component_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_component_common_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/component/component_data/equipment.pb.go b/component/component_data/equipment.pb.go new file mode 100644 index 0000000..68eb9d0 --- /dev/null +++ b/component/component_data/equipment.pb.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.23.1 +// source: component/equipment.proto + +package component_data + +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 RelayFaultForce struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Q bool `protobuf:"varint,1,opt,name=q,proto3" json:"q,omitempty"` // 是否强制到前接点(吸起)位置 +} + +func (x *RelayFaultForce) Reset() { + *x = RelayFaultForce{} + if protoimpl.UnsafeEnabled { + mi := &file_component_equipment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelayFaultForce) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelayFaultForce) ProtoMessage() {} + +func (x *RelayFaultForce) ProtoReflect() protoreflect.Message { + mi := &file_component_equipment_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 RelayFaultForce.ProtoReflect.Descriptor instead. +func (*RelayFaultForce) Descriptor() ([]byte, []int) { + return file_component_equipment_proto_rawDescGZIP(), []int{0} +} + +func (x *RelayFaultForce) GetQ() bool { + if x != nil { + return x.Q + } + return false +} + +var File_component_equipment_proto protoreflect.FileDescriptor + +var file_component_equipment_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x71, 0x75, 0x69, + 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x22, 0x1f, 0x0a, 0x0f, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x46, + 0x61, 0x75, 0x6c, 0x74, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x71, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x01, 0x71, 0x42, 0x1c, 0x5a, 0x1a, 0x2e, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_equipment_proto_rawDescOnce sync.Once + file_component_equipment_proto_rawDescData = file_component_equipment_proto_rawDesc +) + +func file_component_equipment_proto_rawDescGZIP() []byte { + file_component_equipment_proto_rawDescOnce.Do(func() { + file_component_equipment_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_equipment_proto_rawDescData) + }) + return file_component_equipment_proto_rawDescData +} + +var file_component_equipment_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_component_equipment_proto_goTypes = []interface{}{ + (*RelayFaultForce)(nil), // 0: component.RelayFaultForce +} +var file_component_equipment_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_equipment_proto_init() } +func file_component_equipment_proto_init() { + if File_component_equipment_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_equipment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelayFaultForce); 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_equipment_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_component_equipment_proto_goTypes, + DependencyIndexes: file_component_equipment_proto_depIdxs, + MessageInfos: file_component_equipment_proto_msgTypes, + }.Build() + File_component_equipment_proto = out.File + file_component_equipment_proto_rawDesc = nil + file_component_equipment_proto_goTypes = nil + file_component_equipment_proto_depIdxs = nil +} diff --git a/component/component_proto/ci.pb.go b/component/component_proto/ci.pb.go deleted file mode 100644 index 0c0b93f..0000000 --- a/component/component_proto/ci.pb.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// 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 CiQcState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 驱动bit表 - Qbs []byte `protobuf:"bytes,1,opt,name=qbs,proto3" json:"qbs,omitempty"` - // 采集bit表 - Cbs []byte `protobuf:"bytes,2,opt,name=cbs,proto3" json:"cbs,omitempty"` -} - -func (x *CiQcState) Reset() { - *x = CiQcState{} - if protoimpl.UnsafeEnabled { - mi := &file_component_ci_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CiQcState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CiQcState) ProtoMessage() {} - -func (x *CiQcState) 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 CiQcState.ProtoReflect.Descriptor instead. -func (*CiQcState) Descriptor() ([]byte, []int) { - return file_component_ci_proto_rawDescGZIP(), []int{0} -} - -func (x *CiQcState) GetQbs() []byte { - if x != nil { - return x.Qbs - } - return nil -} - -func (x *CiQcState) GetCbs() []byte { - if x != nil { - return x.Cbs - } - 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, - 0x2f, 0x0a, 0x09, 0x43, 0x69, 0x51, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x71, 0x62, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x71, 0x62, 0x73, 0x12, 0x10, - 0x0a, 0x03, 0x63, 0x62, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x63, 0x62, 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, 1) -var file_component_ci_proto_goTypes = []interface{}{ - (*CiQcState)(nil), // 0: component.CiQcState -} -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.(*CiQcState); 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: 1, - 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/common.pb.go b/component/component_proto/common.pb.go deleted file mode 100644 index 8e42744..0000000 --- a/component/component_proto/common.pb.go +++ /dev/null @@ -1,361 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v4.23.1 -// source: component/common.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 TwoPositionTransform struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pos int32 `protobuf:"varint,1,opt,name=pos,proto3" json:"pos,omitempty"` // 当前位置百分比,[0, 10000],两位小数 - Speed int32 `protobuf:"varint,2,opt,name=speed,proto3" json:"speed,omitempty"` -} - -func (x *TwoPositionTransform) Reset() { - *x = TwoPositionTransform{} - if protoimpl.UnsafeEnabled { - mi := &file_component_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TwoPositionTransform) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TwoPositionTransform) ProtoMessage() {} - -func (x *TwoPositionTransform) ProtoReflect() protoreflect.Message { - mi := &file_component_common_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 TwoPositionTransform.ProtoReflect.Descriptor instead. -func (*TwoPositionTransform) Descriptor() ([]byte, []int) { - return file_component_common_proto_rawDescGZIP(), []int{0} -} - -func (x *TwoPositionTransform) GetPos() int32 { - if x != nil { - return x.Pos - } - return 0 -} - -func (x *TwoPositionTransform) GetSpeed() int32 { - if x != nil { - return x.Speed - } - return 0 -} - -// 仅有两状态的组件 -type BitState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Val bool `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"` -} - -func (x *BitState) Reset() { - *x = BitState{} - if protoimpl.UnsafeEnabled { - mi := &file_component_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BitState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BitState) ProtoMessage() {} - -func (x *BitState) ProtoReflect() protoreflect.Message { - mi := &file_component_common_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 BitState.ProtoReflect.Descriptor instead. -func (*BitState) Descriptor() ([]byte, []int) { - return file_component_common_proto_rawDescGZIP(), []int{1} -} - -func (x *BitState) GetVal() bool { - if x != nil { - return x.Val - } - return false -} - -// 计数/计时组件 -type Counter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Val int32 `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"` - Step int32 `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"` -} - -func (x *Counter) Reset() { - *x = Counter{} - if protoimpl.UnsafeEnabled { - mi := &file_component_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Counter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Counter) ProtoMessage() {} - -func (x *Counter) ProtoReflect() protoreflect.Message { - mi := &file_component_common_proto_msgTypes[2] - 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 Counter.ProtoReflect.Descriptor instead. -func (*Counter) Descriptor() ([]byte, []int) { - return file_component_common_proto_rawDescGZIP(), []int{2} -} - -func (x *Counter) GetVal() int32 { - if x != nil { - return x.Val - } - return 0 -} - -func (x *Counter) GetStep() int32 { - if x != nil { - return x.Step - } - return 0 -} - -// 倒数/倒计时组件 -type CounterDown struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Val int32 `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"` - Step int32 `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"` -} - -func (x *CounterDown) Reset() { - *x = CounterDown{} - if protoimpl.UnsafeEnabled { - mi := &file_component_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CounterDown) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CounterDown) ProtoMessage() {} - -func (x *CounterDown) ProtoReflect() protoreflect.Message { - mi := &file_component_common_proto_msgTypes[3] - 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 CounterDown.ProtoReflect.Descriptor instead. -func (*CounterDown) Descriptor() ([]byte, []int) { - return file_component_common_proto_rawDescGZIP(), []int{3} -} - -func (x *CounterDown) GetVal() int32 { - if x != nil { - return x.Val - } - return 0 -} - -func (x *CounterDown) GetStep() int32 { - if x != nil { - return x.Step - } - return 0 -} - -var File_component_common_proto protoreflect.FileDescriptor - -var file_component_common_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x0a, 0x14, 0x54, 0x77, 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x70, - 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x70, - 0x65, 0x65, 0x64, 0x22, 0x1c, 0x0a, 0x08, 0x42, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, 0x61, - 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, - 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x22, 0x33, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x44, 0x6f, 0x77, - 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, - 0x76, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 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_common_proto_rawDescOnce sync.Once - file_component_common_proto_rawDescData = file_component_common_proto_rawDesc -) - -func file_component_common_proto_rawDescGZIP() []byte { - file_component_common_proto_rawDescOnce.Do(func() { - file_component_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_common_proto_rawDescData) - }) - return file_component_common_proto_rawDescData -} - -var file_component_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_component_common_proto_goTypes = []interface{}{ - (*TwoPositionTransform)(nil), // 0: component.TwoPositionTransform - (*BitState)(nil), // 1: component.BitState - (*Counter)(nil), // 2: component.Counter - (*CounterDown)(nil), // 3: component.CounterDown -} -var file_component_common_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_common_proto_init() } -func file_component_common_proto_init() { - if File_component_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_component_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TwoPositionTransform); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_component_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BitState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_component_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Counter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_component_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CounterDown); 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_common_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_component_common_proto_goTypes, - DependencyIndexes: file_component_common_proto_depIdxs, - MessageInfos: file_component_common_proto_msgTypes, - }.Build() - File_component_common_proto = out.File - file_component_common_proto_rawDesc = nil - file_component_common_proto_goTypes = nil - file_component_common_proto_depIdxs = nil -} diff --git a/component/equipment.go b/component/equipment.go new file mode 100644 index 0000000..266a503 --- /dev/null +++ b/component/equipment.go @@ -0,0 +1,20 @@ +package component + +import ( + "unsafe" + + "joylink.club/ecs" + "joylink.club/rtsssimulation/component/component_data" +) + +var ( + RelayFaultForceType = ecs.NewComponentType[component_data.RelayFaultForce]() +) + +func AddOrUpdateRelayFaultForce(entry *ecs.Entry, q bool) { + if entry.HasComponent(RelayFaultForceType) { + entry.SetComponent(RelayFaultForceType, unsafe.Pointer(&component_data.RelayFaultForce{Q: q})) + } else { + entry.AddComponent(RelayFaultForceType, unsafe.Pointer(&component_data.RelayFaultForce{Q: q})) + } +} diff --git a/entity/iscs_bas.go b/entity/iscs_bas.go index 8633648..994bb6d 100644 --- a/entity/iscs_bas.go +++ b/entity/iscs_bas.go @@ -3,7 +3,7 @@ package entity import ( "joylink.club/ecs" "joylink.club/rtsssimulation/component" - "joylink.club/rtsssimulation/component/component_proto" + "joylink.club/rtsssimulation/component/component_data" "joylink.club/rtsssimulation/consts" "joylink.club/rtsssimulation/repository/model/proto" ) @@ -62,7 +62,7 @@ func NewValveEntity(w ecs.World, id string, valveType proto.Valve_Type) *ecs.Ent e = w.Entry(w.Create(component.UidType, component.ValveType, component.ValveControllerType, component.FixedPositionTransformType, component.DeviceExceptionType)) component.UidType.SetValue(e, component.Uid{Id: id}) //默认全关位置 - component.FixedPositionTransformType.Set(e, &component.FixedPositionTransform{TwoPositionTransform: component_proto.TwoPositionTransform{Pos: consts.TwoPosMin}}) + component.FixedPositionTransformType.Set(e, &component.FixedPositionTransform{FixedPositionTransform: component_data.FixedPositionTransform{Pos: consts.TwoPosMin}}) component.ValveControllerType.Set(e, &component.ValveController{TargetOpenRate: 0}) // switch valveType { diff --git a/fi/relay.go b/fi/relay.go index 90f199a..425ab7b 100644 --- a/fi/relay.go +++ b/fi/relay.go @@ -66,3 +66,31 @@ func DriveRelayDown(w ecs.World, id string) error { }) return result.Err } + +// 设置继电器强制故障 +func SetRelayFaultForce(w ecs.World, id string, q bool) error { + return updateRelayFault(w, id, func(entry *ecs.Entry) { + component.AddOrUpdateRelayFaultForce(entry, q) + }) +} + +// 取消继电器强制故障 +func CancelRelayFaultForce(w ecs.World, id string) error { + return updateRelayFault(w, id, func(entry *ecs.Entry) { + entry.RemoveComponent(component.RelayFaultForceType) + }) +} + +func updateRelayFault(w ecs.World, id string, faultHandle func(entry *ecs.Entry)) error { + result := <-ecs.Request[ecs.EmptyType](w, func() ecs.Result[ecs.EmptyType] { + wd := entity.GetWorldData(w) + entry, ok := wd.EntityMap[id] + if ok { + faultHandle(entry) + } else { + return ecs.NewErrResult(fmt.Errorf("未找到id=%s的继电器", id)) + } + return ecs.NewOkEmptyResult() + }) + return result.Err +} diff --git a/jl-ecs-go b/jl-ecs-go index f25027e..2757e2c 160000 --- a/jl-ecs-go +++ b/jl-ecs-go @@ -1 +1 @@ -Subproject commit f25027e20535e0ae4940a34b80276c56597517fb +Subproject commit 2757e2c4e06b03afab94727cee9d948dae6d1754 diff --git a/proto/src/component/ci.proto b/proto/src/component/ci.proto index 414bb42..baa2070 100644 --- a/proto/src/component/ci.proto +++ b/proto/src/component/ci.proto @@ -63,7 +63,7 @@ message CiPointsState { bool singleLock = 10; } -message Signal { +message CiSignal { // 信号显示 enum Aspect { // 红灯亮 @@ -84,7 +84,7 @@ message Signal { // 联锁信号机状态 message CiSignalState { // 信号显示 - Signal.Aspect aspect = 1; + CiSignal.Aspect aspect = 1; // 是否逻辑点灯(即室外灭灯) bool logic = 2; // 是否封锁 diff --git a/proto/src/component/equipment.proto b/proto/src/component/equipment.proto new file mode 100644 index 0000000..e5d7bbe --- /dev/null +++ b/proto/src/component/equipment.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package component; +option go_package = "./component/component_data"; + +// 继电器强制故障(强制在某个位置) +message RelayFaultForce { + bool q = 1; // 是否强制到前接点(吸起)位置 +} \ No newline at end of file diff --git a/sys/device_sys/relay.go b/sys/device_sys/relay.go index ad3d136..e743179 100644 --- a/sys/device_sys/relay.go +++ b/sys/device_sys/relay.go @@ -24,6 +24,10 @@ func (rs *RelaySys) Update(w ecs.World) { // 查询实体是哪种继电器类型,根据继电器类型处理继电器吸起落下逻辑(暂时先简化直接处理) rd := component.RelayDriveType.Get(entry) state := component.BitStateType.Get(entry) + if entry.HasComponent(component.RelayFaultForceType) { + state.Val = component.RelayFaultForceType.Get(entry).Q + return + } if entry.HasComponent(component.WjRelayTag) { // 无极继电器 if rd.Td && !state.Val { // 通电吸起 state.Val = true From 972bac0561d75dec406b03a87283d81411cd668a Mon Sep 17 00:00:00 2001 From: walker Date: Wed, 10 Jan 2024 11:12:19 +0800 Subject: [PATCH 4/4] =?UTF-8?q?merge=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/common.go | 2 +- component/component_data/common.pb.go | 89 ++++++++++++++++++++++++--- entity/balise.go | 6 +- repository/repository.go | 20 +++--- repository/repository_manager.go | 4 +- 5 files changed, 98 insertions(+), 23 deletions(-) diff --git a/component/common.go b/component/common.go index b627284..fd38a41 100644 --- a/component/common.go +++ b/component/common.go @@ -63,4 +63,4 @@ type Counter struct { var CounterType = ecs.NewComponentType[Counter]() -var LinkPositionType = ecs.NewComponentType[component_proto.LinkPosition]() +var LinkPositionType = ecs.NewComponentType[component_data.LinkPosition]() diff --git a/component/component_data/common.pb.go b/component/component_data/common.pb.go index 049c190..af3e632 100644 --- a/component/component_data/common.pb.go +++ b/component/component_data/common.pb.go @@ -360,6 +360,64 @@ func (x *Counter) GetStep() int32 { return 0 } +// Link位置 +type LinkPosition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Link的ID + LinkId string `protobuf:"bytes,1,opt,name=linkId,proto3" json:"linkId,omitempty"` + // Link的偏移量 + Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` +} + +func (x *LinkPosition) Reset() { + *x = LinkPosition{} + if protoimpl.UnsafeEnabled { + mi := &file_component_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LinkPosition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LinkPosition) ProtoMessage() {} + +func (x *LinkPosition) ProtoReflect() protoreflect.Message { + mi := &file_component_common_proto_msgTypes[6] + 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 LinkPosition.ProtoReflect.Descriptor instead. +func (*LinkPosition) Descriptor() ([]byte, []int) { + return file_component_common_proto_rawDescGZIP(), []int{6} +} + +func (x *LinkPosition) GetLinkId() string { + if x != nil { + return x.LinkId + } + return "" +} + +func (x *LinkPosition) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + // 倒数/倒计时组件 type CounterDown struct { state protoimpl.MessageState @@ -373,7 +431,7 @@ type CounterDown struct { func (x *CounterDown) Reset() { *x = CounterDown{} if protoimpl.UnsafeEnabled { - mi := &file_component_common_proto_msgTypes[6] + mi := &file_component_common_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -386,7 +444,7 @@ func (x *CounterDown) String() string { func (*CounterDown) ProtoMessage() {} func (x *CounterDown) ProtoReflect() protoreflect.Message { - mi := &file_component_common_proto_msgTypes[6] + mi := &file_component_common_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -399,7 +457,7 @@ func (x *CounterDown) ProtoReflect() protoreflect.Message { // Deprecated: Use CounterDown.ProtoReflect.Descriptor instead. func (*CounterDown) Descriptor() ([]byte, []int) { - return file_component_common_proto_rawDescGZIP(), []int{6} + return file_component_common_proto_rawDescGZIP(), []int{7} } func (x *CounterDown) GetVal() int32 { @@ -441,7 +499,11 @@ var file_component_common_proto_rawDesc = []byte{ 0x03, 0x76, 0x61, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x22, 0x33, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x22, 0x3e, 0x0a, 0x0c, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x33, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x42, 0x1c, 0x5a, 0x1a, 0x2e, 0x2f, @@ -461,7 +523,7 @@ func file_component_common_proto_rawDescGZIP() []byte { return file_component_common_proto_rawDescData } -var file_component_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_component_common_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_component_common_proto_goTypes = []interface{}{ (*MotorState)(nil), // 0: component.MotorState (*RelayState)(nil), // 1: component.RelayState @@ -469,7 +531,8 @@ var file_component_common_proto_goTypes = []interface{}{ (*FixedPositionTransform)(nil), // 3: component.FixedPositionTransform (*BitState)(nil), // 4: component.BitState (*Counter)(nil), // 5: component.Counter - (*CounterDown)(nil), // 6: component.CounterDown + (*LinkPosition)(nil), // 6: component.LinkPosition + (*CounterDown)(nil), // 7: component.CounterDown } var file_component_common_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -558,6 +621,18 @@ func file_component_common_proto_init() { } } file_component_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinkPosition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CounterDown); i { case 0: return &v.state @@ -576,7 +651,7 @@ func file_component_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_component_common_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/entity/balise.go b/entity/balise.go index 6cc61dc..89344ef 100644 --- a/entity/balise.go +++ b/entity/balise.go @@ -3,7 +3,7 @@ package entity import ( "joylink.club/ecs" "joylink.club/rtsssimulation/component" - "joylink.club/rtsssimulation/component/component_proto" + "joylink.club/rtsssimulation/component/component_data" "joylink.club/rtsssimulation/repository" "joylink.club/rtsssimulation/repository/model/proto" ) @@ -11,12 +11,12 @@ import ( // LoadBalises 加载应答器实体 func LoadBalises(w ecs.World) error { data := GetWorldData(w) - balises := data.Repo.TransponderList() + balises := data.Repo.ResponderList() for _, b := range balises { be := newBaliseEntity(w, b, data) //应答器位置 be.AddComponent(component.LinkPositionType) - component.LinkPositionType.SetValue(be, component_proto.LinkPosition{ + component.LinkPositionType.SetValue(be, component_data.LinkPosition{ LinkId: b.LinkPosition().Link().Id(), Offset: b.LinkPosition().Offset(), }) diff --git a/repository/repository.go b/repository/repository.go index e65cac0..eddf03a 100644 --- a/repository/repository.go +++ b/repository/repository.go @@ -15,7 +15,7 @@ type Repository struct { checkPointMap map[string]*CheckPoint turnoutMap map[string]*Turnout signalMap map[string]*Signal - transponderMap map[string]*Transponder + responderMap map[string]*Transponder slopeMap map[string]*Slope sectionalCurvatureMap map[string]*SectionalCurvature kilometerConvertMap map[string]*proto.KilometerConvert @@ -62,7 +62,7 @@ func newRepository(id string, version string) *Repository { checkPointMap: make(map[string]*CheckPoint), turnoutMap: make(map[string]*Turnout), signalMap: make(map[string]*Signal), - transponderMap: make(map[string]*Transponder), + responderMap: make(map[string]*Transponder), slopeMap: make(map[string]*Slope), sectionalCurvatureMap: make(map[string]*SectionalCurvature), kilometerConvertMap: make(map[string]*proto.KilometerConvert), @@ -119,7 +119,7 @@ func (repo *Repository) FindById(id string) Identity { if md, ok := repo.checkPointMap[id]; ok { return md } - if md, ok := repo.transponderMap[id]; ok { + if md, ok := repo.responderMap[id]; ok { return md } if md, ok := repo.stationMap[id]; ok { @@ -225,16 +225,16 @@ func (repo *Repository) SignalList() []*Signal { } return list } -func (repo *Repository) TransponderList() []*Transponder { +func (repo *Repository) ResponderList() []*Transponder { var list []*Transponder - for _, model := range repo.transponderMap { + for _, model := range repo.responderMap { list = append(list, model) } return list } func (repo *Repository) ResponderListByLink(linkId string) []*Transponder { var list []*Transponder - for _, model := range repo.transponderMap { + for _, model := range repo.responderMap { if model.linkPosition.link.Id() == linkId { list = append(list, model) } @@ -336,7 +336,7 @@ func (repo *Repository) FindModel(deviceId string, deviceType proto.DeviceType) case proto.DeviceType_DeviceType_Signal: return repo.signalMap[deviceId], nil case proto.DeviceType_DeviceType_Transponder: - return repo.transponderMap[deviceId], nil + return repo.responderMap[deviceId], nil case proto.DeviceType_DeviceType_Slope: return repo.slopeMap[deviceId], nil case proto.DeviceType_DeviceType_SectionalCurvature: @@ -396,7 +396,7 @@ func (repo *Repository) FindLink(id string) *Link { return repo.linkMap[id] } func (repo *Repository) FindTransponder(id string) *Transponder { - return repo.transponderMap[id] + return repo.responderMap[id] } func (repo *Repository) FindTurnout(id string) *Turnout { return repo.turnoutMap[id] @@ -419,7 +419,7 @@ func (repo *Repository) FindPsd(id string) *Psd { return repo.psdMap[id] } -func (repo *Repository) FindPlatform(id string) *Platform { +func (repo *Repository) FindPlatfrom(id string) *Platform { return repo.platformMap[id] } @@ -499,7 +499,7 @@ func (repo *Repository) generateCoordinateInfo(coordinateSystem string) error { return nil } -func (repo *Repository) GetCoordinateInfo() *MapCoordinate { +func (repo Repository) GetCoordinateInfo() *MapCoordinate { return repo.coordinate } diff --git a/repository/repository_manager.go b/repository/repository_manager.go index dabd686..e006d8e 100644 --- a/repository/repository_manager.go +++ b/repository/repository_manager.go @@ -85,7 +85,7 @@ func buildModels(source *proto.Repository, repository *Repository) error { } for _, protoData := range source.Transponders { m := NewTransponder(protoData.Id, protoData.Km, protoData.FixedTelegram, protoData.Type) - repository.transponderMap[m.Id()] = m + repository.responderMap[m.Id()] = m } for _, protoData := range source.Slopes { m := NewSlope(protoData.Id, protoData.Kms, protoData.Degree) @@ -346,7 +346,7 @@ func buildCheckPointRelationShip(source *proto.Repository, repo *Repository) err func buildResponderRelationShip(source *proto.Repository, repository *Repository) error { for _, protoData := range source.Transponders { - responder := repository.transponderMap[protoData.Id] + responder := repository.responderMap[protoData.Id] //应答器和区段相互关联 if protoData.SectionId != "" { interrelateResponderAndPhysicalSection(responder, repository.physicalSectionMap[protoData.SectionId])