diff --git a/proto/src/repo.proto b/proto/src/repo.proto index 7c1c28f..edef20f 100644 --- a/proto/src/repo.proto +++ b/proto/src/repo.proto @@ -2,34 +2,35 @@ syntax = "proto3"; package message; -option go_package = "./repository/message_proto"; - -message Simulation { - enum Type { - // 城市轨道交通 - CG = 0; - // 国铁 - GT = 1; - } -} +option go_package = "./repo/dto"; message Repo { - // 仿真类型 - Simulation.Type simType = 1; + string id = 1; oneof data { - CG cg = 2; - GT gt = 3; + CGData cgData = 2; + GTData gtData = 3; } } // 国铁数据 -message GT { +message GTData { } +// 列车运行方向(Train Running Direction) +enum TRD { + // 上行 + Upward = 0; + // 下行 + Downward = 1; +} + // 城轨数据 -message CG { +message CGData { + // 线路数据 repeated Line lines = 1; + // 监控盘(IBP/PSL/MKX等)数据,线路相关数据会引用这里 + repeated JKP jkps = 2; } // 城轨线路数据 @@ -37,62 +38,90 @@ message Line { // 所在城市 string city = 1; // 线路编号 - int32 lineId = 2; + string lineId = 2; + // 信号布置 + XHBZ xhbz = 3; + // 继电器柜布置 + repeated CiJDQBZ jdqbz = 4; } // 信号布置数据 message XHBZ { // 数据id - string gid = 1; + string id = 1; // 车站 repeated Station stations = 2; // 站台 repeated Platform platforms = 3; // 屏蔽门 repeated Psd psds = 4; - // 物理区段 - repeated PhysicalSection physicalSections = 5; + // 区段 + repeated Section sections = 5; // 道岔 repeated Turnout turnouts = 6; + // 检测点 + repeated DevidingPoint devidingPoints = 7; // 信号机 - repeated Signal signals = 7; - // 应答器 - repeated Balise balises = 8; + repeated Signal signals = 8; + // 应答器(欧标) + repeated Balise balises = 9; // 停车点 - repeated ParkingSpot parkingSpots = 9; + repeated ParkingSpot parkingSpots = 10; // 坡度 - repeated Pd pds = 10; + repeated Pd pds = 11; // 曲度 - repeated Qd qds = 11; - // 紧急关闭/停车按钮 - repeated EMP emps = 12; - // 发车计时器 - repeated TDT tdts = 13; + repeated Qd qds = 12; + // 紧急关闭(停车)按钮 + repeated EMP emps = 13; + // 发车计时器(Train Depart Timer,TDT 或 Depart Time Indicator,DTI) + repeated TDT tdts = 14; // 门控箱 - repeated Mkx mkxs = 14; + repeated Mkx mkxs = 15; // 就地控制盘 - repeated PSL psls = 15; + repeated PSL psls = 16; // 人员防护开关 - repeated SPKS spks = 16; + repeated SPKS spks = 17; + // 设备电子元件组合 + repeated DeviceEcc deviceEccs = 18; } // 人员防护开关 message SPKS { uint32 id = 1; + // 编号 + string code = 2; + // 关联站台id + uint32 platformId = 3; } // 就地控制盘 message PSL { uint32 id = 1; + // 编号 + string code = 2; + // 关联屏蔽门id + uint32 psdId = 3; } // 门控箱 message Mkx { uint32 id = 1; + // 编号 + string code = 2; + // 关联屏蔽门id + uint32 psdId = 3; } // 发车计时器 message TDT { uint32 id = 1; + // 编号 + string code = 2; + // 关联站台id + uint32 platformId = 3; } // 紧急关闭/停车按钮 message EMP { uint32 id = 1; + // 编号 + string code = 2; + // 关联站台id + uint32 platformId = 3; } // 曲度 message Qd { @@ -105,37 +134,63 @@ message Pd { // 停车点 message ParkingSpot { uint32 id = 1; + // 列车编组数量 + uint32 tgn = 2; + // 公里标 + GLB glb = 3; } // 应答器 message Balise { - uint32 id = 1; -} -//区段检测点 -message CheckPoint{ - // 检测点类型 + // 应答器类型 enum Type { - Boundary = 0; //区段边界 - JZ = 1; //计轴器 - JYJ = 2; //绝缘节 + // 无源应答器 + FB = 0; + // 有源应答器 + TB = 1; } uint32 id = 1; - // 检测点类型 + // 应答器类型 Type type = 2; + // 应答器编号 + string code = 3; + // 所属设备集中站id + uint32 ecsId = 4; +} +//区段分界点 +message DevidingPoint { + // 区段分界点类型 + enum Type { + //区段边界 + Boundary = 0; + //计轴器 + JZ = 1; + //绝缘节 + JYJ = 2; + } + uint32 id = 1; + // 区段分界点类型 + Type type = 2; + // 区段分界点编号 + string code = 3; // 公里标 - GLB glb = 3; - // 关联的物理区段/道岔端口 - repeated DevicePort devicePorts = 4; + GLB glb = 4; + // 关联的物理区段/道岔端点 + repeated SectionPort sectionPorts = 5; + // 所属设备集中站id + repeated uint32 ecsIds = 6; } // 设备 message Device { // 设备类型 enum Type { + // 错误未知类型 + Unknown = 0; // 区段 - Section = 0; + Section = 1; // 道岔 - Turnout = 1; + Turnout = 2; // 信号机 - Signal = 2; + Signal = 3; } // 设备端点(区段、道岔) enum Port { @@ -149,35 +204,128 @@ message Device { Type type = 2; } -// 设备端点 -message DevicePort { - // 设备id - uint32 id = 1; - // 设备类型 - Device.Type type = 2; - // 设备端 - Device.Port port = 3; +// 区段端点 +message SectionPort { + // 区段类型 + enum SectionType { + // 区段 + Section = 0; + // 道岔 + Turnout = 1; + } + // 端点类型 + enum PortType { + A = 0; + B = 1; + C = 2; + } + // 类型 + SectionType type = 1; + // 区段/道岔 id + uint32 id = 2; + // 端点 + PortType port = 3; } // 信号机 message Signal { + // 信号机模型型号 enum Model { - HLU = 0; + // 红绿黄三显示信号机 + // 红绿黄三显示引导为红黄 + // 红绿黄三显示,不封,有单黄,有引导 + HLU_0_1_1 = 0; + // 红绿黄三显示,不封,无单黄,有引导 + HLU_0_0_1 = 1; + // 红绿黄三显示,不封,有单黄,无引导 + HLU_0_1_0 = 2; + // 红绿黄三显示,封黄,无单黄,有引导 + HLU_U_0_0 = 3; + // 红绿黄三显示,封绿,有单黄,有引导 + HLU_L_1_1 = 4; + // 红绿黄三显示,封绿,有单黄,无引导 + HLU_L_1_0 = 5; + // 红绿黄三显示,全封 + HLU_LU_0_0 = 6; + // 红绿二显示信号机 + // 红绿二显示,不封 + HL_0 = 7; + // 红绿二显示,封绿 + HL_L = 8; + // 红黄二显示,不封 + HU_0 = 9; + // 红黄二显示,封黄 + HU_U = 10; + // 单红显示信号机 + H = 11; + // 蓝白二显示信号机 + AB = 12; + // 红白黄三显示信号机 + // 红白黄三显示,不封,有单黄,无引导 + HBU_0_1_0 = 13; + // 红白黄三显示,封黄,无单黄,无引导 + HBU_U_0_0 = 14; } uint32 id = 1; // 信号机编号 string code = 2; + // 信号机模型型号 + Model model = 3; + // 所属设备集中站id + uint32 ecsId = 4; } // 道岔 message Turnout { + // 道岔模型型号 + enum Model { + // ZDJ9单机牵引 + ZDJ9_1 = 0; + // ZDJ9双机牵引 + ZDJ9_2 = 1; + } uint32 id = 1; + // 道岔编号 + string code = 2; + // 道岔模型型号 + Model model = 3; + // 道岔A端关联的区段/道岔端点 + SectionPort asp = 4; + // 道岔B端关联的区段/道岔端点 + SectionPort bsp = 5; + // 道岔C端关联的区段/道岔端点 + SectionPort csp = 6; + // 所属设备集中站id + uint32 ecsId = 7; } // 物理区段 -message PhysicalSection { +message Section { + // 物理区段类型 + enum Type { + // 一般物理区段 + Physical = 0; + // 道岔物理区段 + TurnoutPhysical = 1; + // 逻辑区段 + Logical = 2; + } uint32 id = 1; + // 编号 + string code = 2; + // 物理区段类型 + Type type = 3; + // 物理区段A端关联的区段/道岔端点 + SectionPort asp = 4; + // 物理区段B端关联的区段/道岔端点 + SectionPort bsp = 5; + // 所属设备集中站id + uint32 ecsId = 6; } // 屏蔽门 message Psd { uint32 id = 1; + // 编号 + string code = 2; + // 关联的站台 + uint32 platformId = 3; } //站台 message Platform { @@ -196,8 +344,14 @@ message Station { string name = 2; // 车站站名 string zname = 3; - // 车站公里标(站台中心点) + // 车站公里标 GLB glb = 4; + // 是否设备集中站(Equipment centralized station) + bool isEcs = 5; + // 是否停车场/车辆段 + bool isCd = 6; + // 集中站关联下属车站 + repeated uint32 ecsStationIds = 7; } //公里标 message GLB { @@ -211,21 +365,21 @@ message GLB { // 联锁设备布置数据 -message CiSBBZ { +message CiJDQBZ { // 设备集中站uid - string ecsId = 1; + string ecsName = 1; // 继电器 repeated Relay relays = 2; // 断相保护器 repeated PFP pfps = 3; // 设备电气组合组 - repeated DeviceEcc deviceEcgs = 4; + repeated DeviceEcc deviceEcgDatas = 4; // 联锁采集码表 repeated CiCjTable cjt = 5; // 联锁驱动码表 repeated CiQdTable qdt = 6; // 联锁区段码位表 - repeated string sectionIds = 7; + repeated uint32 sectionIds = 7; } // 联锁区段码位表 message CiSectionTable { @@ -234,17 +388,18 @@ message CiSectionTable { } // 联锁驱动码表 message CiQdTable { - // 继电器id - repeated uint32 relayIds = 1; + // 继电器id(按位顺序排列) + repeated string relayIds = 1; } // 联锁采集码表 message CiCjTable { + // 采集继电器接点(按位顺序排列) repeated CiCjItem items = 1; } // 联锁采集项 message CiCjItem { // 继电器id - uint32 relayId = 1; + string uint32 = 1; // 采集继电器前后接点(前接点为吸起/定位),true-前接点,false-后接点 bool q = 2; } @@ -275,21 +430,27 @@ message Relay { } // 按钮、灯等监控盘(IBP/门控箱/PSL等) message JKP { + // 监控盘类型 enum Type { + // IBP盘(综合后备盘) IBP = 0; + // 屏蔽门就地控制盘 PSL = 1; + // 门控箱 MKX = 2; } // 数据id - uint32 gid = 1; + string gid = 1; + // 数据类型 + Type type = 2; // 开关 - repeated KaiGuan kgs = 2; + repeated KaiGuan kgs = 3; // 灯 - repeated Lamp lamps = 3; + repeated Lamp lamps = 4; // 警铃 - repeated Alarm alarms = 4; + repeated Alarm alarms = 5; // 设备电子元件组合 - repeated DeviceEcc deviceEccs = 5; + repeated DeviceEcc deviceEccs = 6; } // 警铃/蜂鸣器 message Alarm { @@ -302,8 +463,10 @@ message KaiGuan { uint32 id = 1; // 编号 string code = 2; + // 是否自复位 + bool zfw = 3; // 是否有背光灯 - bool lamp = 3; + bool lamp = 4; } // 灯 message Lamp { @@ -314,10 +477,10 @@ message Lamp { // 设备电子元件组合 message DeviceEcc { - // 设备编号 - string deviceCode = 1; // 设备类型 - Device.Type deviceType = 2; + Device.Type deviceType = 1; + // 设备编号 + string deviceCode = 2; // 电子元件组合 repeated Ecc ecc = 3; } @@ -325,6 +488,6 @@ message DeviceEcc { message Ecc { // 组合名称 string code = 1; - // 关联的电子元件id + // 关联的电子元件(包括但不限于继电器、断相保护器、按钮、灯等)id repeated uint32 ids = 2; } \ No newline at end of file diff --git a/repo/api.go b/repo/api.go new file mode 100644 index 0000000..02eb763 --- /dev/null +++ b/repo/api.go @@ -0,0 +1,17 @@ +package repo + +import "joylink.club/rtsssimulation/repo/model" + +type Repo interface { + // 模型仓库id + Id() string + // 通过uid查询模型对象 + FindByUid(uid string) model.Model +} + +type IdMap interface { + // 获取数据元素id + DeId() string + // 获取uid + Uid() string +} diff --git a/repo/check_test.go b/repo/check_test.go new file mode 100644 index 0000000..5fc7f71 --- /dev/null +++ b/repo/check_test.go @@ -0,0 +1,23 @@ +package repo + +import "testing" + +func TestIsFieldEmpty(t *testing.T) { + tests := []struct { + give any + want bool + }{ + {give: nil, want: true}, + {give: "", want: true}, + {give: 0, want: true}, + {give: []string{}, want: true}, + {give: map[string]string{}, want: true}, + {give: []int{}, want: true}, + } + + for _, tt := range tests { + if got := isFieldEmpty(tt.give); got != tt.want { + t.Errorf("IsFieldEmpty(%v) = %v, want = %v", tt.give, got, tt.want) + } + } +} diff --git a/repo/dto/repo.pb.go b/repo/dto/repo.pb.go new file mode 100644 index 0000000..08a4ba6 --- /dev/null +++ b/repo/dto/repo.pb.go @@ -0,0 +1,4239 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.23.1 +// source: repo.proto + +package dto + +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 Balise_Type int32 + +const ( + // 无源应答器 + Balise_FB Balise_Type = 0 + // 有源应答器 + Balise_TB Balise_Type = 1 +) + +// Enum value maps for Balise_Type. +var ( + Balise_Type_name = map[int32]string{ + 0: "FB", + 1: "TB", + } + Balise_Type_value = map[string]int32{ + "FB": 0, + "TB": 1, + } +) + +func (x Balise_Type) Enum() *Balise_Type { + p := new(Balise_Type) + *p = x + return p +} + +func (x Balise_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Balise_Type) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[0].Descriptor() +} + +func (Balise_Type) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[0] +} + +func (x Balise_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Balise_Type.Descriptor instead. +func (Balise_Type) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{13, 0} +} + +// 区段分界点类型 +type DevidingPoint_Type int32 + +const ( + // 区段边界 + DevidingPoint_Boundary DevidingPoint_Type = 0 + // 计轴器 + DevidingPoint_JZ DevidingPoint_Type = 1 + // 绝缘节 + DevidingPoint_JYJ DevidingPoint_Type = 2 +) + +// Enum value maps for DevidingPoint_Type. +var ( + DevidingPoint_Type_name = map[int32]string{ + 0: "Boundary", + 1: "JZ", + 2: "JYJ", + } + DevidingPoint_Type_value = map[string]int32{ + "Boundary": 0, + "JZ": 1, + "JYJ": 2, + } +) + +func (x DevidingPoint_Type) Enum() *DevidingPoint_Type { + p := new(DevidingPoint_Type) + *p = x + return p +} + +func (x DevidingPoint_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DevidingPoint_Type) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[1].Descriptor() +} + +func (DevidingPoint_Type) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[1] +} + +func (x DevidingPoint_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DevidingPoint_Type.Descriptor instead. +func (DevidingPoint_Type) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{14, 0} +} + +// 设备类型 +type Device_Type int32 + +const ( + // 错误未知类型 + Device_Unknown Device_Type = 0 + // 区段 + Device_Section Device_Type = 1 + // 道岔 + Device_Turnout Device_Type = 2 + // 信号机 + Device_Signal Device_Type = 3 +) + +// Enum value maps for Device_Type. +var ( + Device_Type_name = map[int32]string{ + 0: "Unknown", + 1: "Section", + 2: "Turnout", + 3: "Signal", + } + Device_Type_value = map[string]int32{ + "Unknown": 0, + "Section": 1, + "Turnout": 2, + "Signal": 3, + } +) + +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{15, 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{15, 1} +} + +// 区段类型 +type SectionPort_SectionType int32 + +const ( + // 区段 + SectionPort_Section SectionPort_SectionType = 0 + // 道岔 + SectionPort_Turnout SectionPort_SectionType = 1 +) + +// Enum value maps for SectionPort_SectionType. +var ( + SectionPort_SectionType_name = map[int32]string{ + 0: "Section", + 1: "Turnout", + } + SectionPort_SectionType_value = map[string]int32{ + "Section": 0, + "Turnout": 1, + } +) + +func (x SectionPort_SectionType) Enum() *SectionPort_SectionType { + p := new(SectionPort_SectionType) + *p = x + return p +} + +func (x SectionPort_SectionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SectionPort_SectionType) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[4].Descriptor() +} + +func (SectionPort_SectionType) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[4] +} + +func (x SectionPort_SectionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SectionPort_SectionType.Descriptor instead. +func (SectionPort_SectionType) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{16, 0} +} + +// 端点类型 +type SectionPort_PortType int32 + +const ( + SectionPort_A SectionPort_PortType = 0 + SectionPort_B SectionPort_PortType = 1 + SectionPort_C SectionPort_PortType = 2 +) + +// Enum value maps for SectionPort_PortType. +var ( + SectionPort_PortType_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", + } + SectionPort_PortType_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, + } +) + +func (x SectionPort_PortType) Enum() *SectionPort_PortType { + p := new(SectionPort_PortType) + *p = x + return p +} + +func (x SectionPort_PortType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SectionPort_PortType) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[5].Descriptor() +} + +func (SectionPort_PortType) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[5] +} + +func (x SectionPort_PortType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SectionPort_PortType.Descriptor instead. +func (SectionPort_PortType) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{16, 1} +} + +// 信号机模型型号 +type Signal_Model int32 + +const ( + // 红绿黄三显示信号机 + // 红绿黄三显示引导为红黄 + // 红绿黄三显示,不封,有单黄,有引导 + Signal_HLU_0_1_1 Signal_Model = 0 + // 红绿黄三显示,不封,无单黄,有引导 + Signal_HLU_0_0_1 Signal_Model = 1 + // 红绿黄三显示,不封,有单黄,无引导 + Signal_HLU_0_1_0 Signal_Model = 2 + // 红绿黄三显示,封黄,无单黄,有引导 + Signal_HLU_U_0_0 Signal_Model = 3 + // 红绿黄三显示,封绿,有单黄,有引导 + Signal_HLU_L_1_1 Signal_Model = 4 + // 红绿黄三显示,封绿,有单黄,无引导 + Signal_HLU_L_1_0 Signal_Model = 5 + // 红绿黄三显示,全封 + Signal_HLU_LU_0_0 Signal_Model = 6 + // 红绿二显示信号机 + // 红绿二显示,不封 + Signal_HL_0 Signal_Model = 7 + // 红绿二显示,封绿 + Signal_HL_L Signal_Model = 8 + // 红黄二显示,不封 + Signal_HU_0 Signal_Model = 9 + // 红黄二显示,封黄 + Signal_HU_U Signal_Model = 10 + // 单红显示信号机 + Signal_H Signal_Model = 11 + // 蓝白二显示信号机 + Signal_AB Signal_Model = 12 + // 红白黄三显示信号机 + // 红白黄三显示,不封,有单黄,无引导 + Signal_HBU_0_1_0 Signal_Model = 13 + // 红白黄三显示,封黄,无单黄,无引导 + Signal_HBU_U_0_0 Signal_Model = 14 +) + +// Enum value maps for Signal_Model. +var ( + Signal_Model_name = map[int32]string{ + 0: "HLU_0_1_1", + 1: "HLU_0_0_1", + 2: "HLU_0_1_0", + 3: "HLU_U_0_0", + 4: "HLU_L_1_1", + 5: "HLU_L_1_0", + 6: "HLU_LU_0_0", + 7: "HL_0", + 8: "HL_L", + 9: "HU_0", + 10: "HU_U", + 11: "H", + 12: "AB", + 13: "HBU_0_1_0", + 14: "HBU_U_0_0", + } + Signal_Model_value = map[string]int32{ + "HLU_0_1_1": 0, + "HLU_0_0_1": 1, + "HLU_0_1_0": 2, + "HLU_U_0_0": 3, + "HLU_L_1_1": 4, + "HLU_L_1_0": 5, + "HLU_LU_0_0": 6, + "HL_0": 7, + "HL_L": 8, + "HU_0": 9, + "HU_U": 10, + "H": 11, + "AB": 12, + "HBU_0_1_0": 13, + "HBU_U_0_0": 14, + } +) + +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[6].Descriptor() +} + +func (Signal_Model) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[6] +} + +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{17, 0} +} + +// 道岔模型型号 +type Turnout_Model int32 + +const ( + // ZDJ9单机牵引 + Turnout_ZDJ9_1 Turnout_Model = 0 + // ZDJ9双机牵引 + Turnout_ZDJ9_2 Turnout_Model = 1 +) + +// Enum value maps for Turnout_Model. +var ( + Turnout_Model_name = map[int32]string{ + 0: "ZDJ9_1", + 1: "ZDJ9_2", + } + Turnout_Model_value = map[string]int32{ + "ZDJ9_1": 0, + "ZDJ9_2": 1, + } +) + +func (x Turnout_Model) Enum() *Turnout_Model { + p := new(Turnout_Model) + *p = x + return p +} + +func (x Turnout_Model) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Turnout_Model) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[7].Descriptor() +} + +func (Turnout_Model) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[7] +} + +func (x Turnout_Model) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Turnout_Model.Descriptor instead. +func (Turnout_Model) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{18, 0} +} + +// 物理区段类型 +type PhysicalSection_Type int32 + +const ( + // 一般物理区段 + PhysicalSection_General PhysicalSection_Type = 0 + // 道岔物理区段 + PhysicalSection_Turnout PhysicalSection_Type = 1 +) + +// Enum value maps for PhysicalSection_Type. +var ( + PhysicalSection_Type_name = map[int32]string{ + 0: "General", + 1: "Turnout", + } + PhysicalSection_Type_value = map[string]int32{ + "General": 0, + "Turnout": 1, + } +) + +func (x PhysicalSection_Type) Enum() *PhysicalSection_Type { + p := new(PhysicalSection_Type) + *p = x + return p +} + +func (x PhysicalSection_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PhysicalSection_Type) Descriptor() protoreflect.EnumDescriptor { + return file_repo_proto_enumTypes[8].Descriptor() +} + +func (PhysicalSection_Type) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[8] +} + +func (x PhysicalSection_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PhysicalSection_Type.Descriptor instead. +func (PhysicalSection_Type) EnumDescriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{19, 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[9].Descriptor() +} + +func (Relay_Model) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[9] +} + +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{30, 0} +} + +// 监控盘类型 +type JKP_Type int32 + +const ( + // IBP盘(综合后备盘) + 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[10].Descriptor() +} + +func (JKP_Type) Type() protoreflect.EnumType { + return &file_repo_proto_enumTypes[10] +} + +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{31, 0} +} + +type Repo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Types that are assignable to Data: + // + // *Repo_CgData + // *Repo_GtData + Data isRepo_Data `protobuf_oneof:"data"` +} + +func (x *Repo) Reset() { + *x = Repo{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[0] + 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[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 Repo.ProtoReflect.Descriptor instead. +func (*Repo) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{0} +} + +func (x *Repo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (m *Repo) GetData() isRepo_Data { + if m != nil { + return m.Data + } + return nil +} + +func (x *Repo) GetCgData() *CGData { + if x, ok := x.GetData().(*Repo_CgData); ok { + return x.CgData + } + return nil +} + +func (x *Repo) GetGtData() *GTData { + if x, ok := x.GetData().(*Repo_GtData); ok { + return x.GtData + } + return nil +} + +type isRepo_Data interface { + isRepo_Data() +} + +type Repo_CgData struct { + CgData *CGData `protobuf:"bytes,2,opt,name=cgData,proto3,oneof"` +} + +type Repo_GtData struct { + GtData *GTData `protobuf:"bytes,3,opt,name=gtData,proto3,oneof"` +} + +func (*Repo_CgData) isRepo_Data() {} + +func (*Repo_GtData) isRepo_Data() {} + +// 国铁数据 +type GTData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GTData) Reset() { + *x = GTData{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GTData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GTData) ProtoMessage() {} + +func (x *GTData) 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 GTData.ProtoReflect.Descriptor instead. +func (*GTData) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{1} +} + +// 城轨数据 +type CGData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 线路数据 + Lines []*Line `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines,omitempty"` + // 监控盘(IBP/PSL/MKX等)数据,线路相关数据会引用这里 + Jkps []*JKP `protobuf:"bytes,2,rep,name=jkps,proto3" json:"jkps,omitempty"` +} + +func (x *CGData) Reset() { + *x = CGData{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CGData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CGData) ProtoMessage() {} + +func (x *CGData) 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 CGData.ProtoReflect.Descriptor instead. +func (*CGData) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{2} +} + +func (x *CGData) GetLines() []*Line { + if x != nil { + return x.Lines + } + return nil +} + +func (x *CGData) GetJkps() []*JKP { + if x != nil { + return x.Jkps + } + 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 string `protobuf:"bytes,2,opt,name=lineId,proto3" json:"lineId,omitempty"` + // 信号布置 + Xhbz *XHBZ `protobuf:"bytes,3,opt,name=xhbz,proto3" json:"xhbz,omitempty"` + // 继电器柜布置 + Jdqbz []*CiJDQBZ `protobuf:"bytes,4,rep,name=jdqbz,proto3" json:"jdqbz,omitempty"` +} + +func (x *Line) Reset() { + *x = Line{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[3] + 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[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 Line.ProtoReflect.Descriptor instead. +func (*Line) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{3} +} + +func (x *Line) GetCity() string { + if x != nil { + return x.City + } + return "" +} + +func (x *Line) GetLineId() string { + if x != nil { + return x.LineId + } + return "" +} + +func (x *Line) GetXhbz() *XHBZ { + if x != nil { + return x.Xhbz + } + return nil +} + +func (x *Line) GetJdqbz() []*CiJDQBZ { + if x != nil { + return x.Jdqbz + } + return nil +} + +// 信号布置数据 +type XHBZ struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 数据id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,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"` + // 检测点 + DevidingPoints []*DevidingPoint `protobuf:"bytes,7,rep,name=devidingPoints,proto3" json:"devidingPoints,omitempty"` + // 信号机 + Signals []*Signal `protobuf:"bytes,8,rep,name=signals,proto3" json:"signals,omitempty"` + // 应答器(欧标) + Balises []*Balise `protobuf:"bytes,9,rep,name=balises,proto3" json:"balises,omitempty"` + // 停车点 + ParkingSpots []*ParkingSpot `protobuf:"bytes,10,rep,name=parkingSpots,proto3" json:"parkingSpots,omitempty"` + // 坡度 + Pds []*Pd `protobuf:"bytes,11,rep,name=pds,proto3" json:"pds,omitempty"` + // 曲度 + Qds []*Qd `protobuf:"bytes,12,rep,name=qds,proto3" json:"qds,omitempty"` + // 紧急关闭(停车)按钮 + Emps []*EMP `protobuf:"bytes,13,rep,name=emps,proto3" json:"emps,omitempty"` + // 发车计时器(Train Depart Timer,TDT 或 Depart Time Indicator,DTI) + Tdts []*TDT `protobuf:"bytes,14,rep,name=tdts,proto3" json:"tdts,omitempty"` + // 门控箱 + Mkxs []*Mkx `protobuf:"bytes,15,rep,name=mkxs,proto3" json:"mkxs,omitempty"` + // 就地控制盘 + Psls []*PSL `protobuf:"bytes,16,rep,name=psls,proto3" json:"psls,omitempty"` + // 人员防护开关 + Spks []*SPKS `protobuf:"bytes,17,rep,name=spks,proto3" json:"spks,omitempty"` + // 设备电子元件组合 + DeviceEccs []*DeviceEcc `protobuf:"bytes,18,rep,name=deviceEccs,proto3" json:"deviceEccs,omitempty"` +} + +func (x *XHBZ) Reset() { + *x = XHBZ{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[4] + 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[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 XHBZ.ProtoReflect.Descriptor instead. +func (*XHBZ) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{4} +} + +func (x *XHBZ) GetId() string { + if x != nil { + return x.Id + } + 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) GetDevidingPoints() []*DevidingPoint { + if x != nil { + return x.DevidingPoints + } + 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 +} + +func (x *XHBZ) GetDeviceEccs() []*DeviceEcc { + if x != nil { + return x.DeviceEccs + } + 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"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // 关联站台id + PlatformId uint32 `protobuf:"varint,3,opt,name=platformId,proto3" json:"platformId,omitempty"` +} + +func (x *SPKS) Reset() { + *x = SPKS{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[5] + 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[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 SPKS.ProtoReflect.Descriptor instead. +func (*SPKS) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{5} +} + +func (x *SPKS) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *SPKS) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *SPKS) GetPlatformId() uint32 { + if x != nil { + return x.PlatformId + } + 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"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // 关联屏蔽门id + PsdId uint32 `protobuf:"varint,3,opt,name=psdId,proto3" json:"psdId,omitempty"` +} + +func (x *PSL) Reset() { + *x = PSL{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[6] + 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[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 PSL.ProtoReflect.Descriptor instead. +func (*PSL) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{6} +} + +func (x *PSL) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *PSL) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *PSL) GetPsdId() uint32 { + if x != nil { + return x.PsdId + } + 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"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // 关联屏蔽门id + PsdId uint32 `protobuf:"varint,3,opt,name=psdId,proto3" json:"psdId,omitempty"` +} + +func (x *Mkx) Reset() { + *x = Mkx{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[7] + 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[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 Mkx.ProtoReflect.Descriptor instead. +func (*Mkx) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{7} +} + +func (x *Mkx) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Mkx) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *Mkx) GetPsdId() uint32 { + if x != nil { + return x.PsdId + } + 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"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // 关联站台id + PlatformId uint32 `protobuf:"varint,3,opt,name=platformId,proto3" json:"platformId,omitempty"` +} + +func (x *TDT) Reset() { + *x = TDT{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[8] + 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[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 TDT.ProtoReflect.Descriptor instead. +func (*TDT) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{8} +} + +func (x *TDT) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *TDT) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *TDT) GetPlatformId() uint32 { + if x != nil { + return x.PlatformId + } + 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"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // 关联站台id + PlatformId uint32 `protobuf:"varint,3,opt,name=platformId,proto3" json:"platformId,omitempty"` +} + +func (x *EMP) Reset() { + *x = EMP{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[9] + 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[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 EMP.ProtoReflect.Descriptor instead. +func (*EMP) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{9} +} + +func (x *EMP) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *EMP) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *EMP) GetPlatformId() uint32 { + if x != nil { + return x.PlatformId + } + 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[10] + 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[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 Qd.ProtoReflect.Descriptor instead. +func (*Qd) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{10} +} + +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[11] + 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[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 Pd.ProtoReflect.Descriptor instead. +func (*Pd) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{11} +} + +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"` + // 列车编组数量 + Tgn uint32 `protobuf:"varint,2,opt,name=tgn,proto3" json:"tgn,omitempty"` + // 公里标 + Glb *GLB `protobuf:"bytes,3,opt,name=glb,proto3" json:"glb,omitempty"` +} + +func (x *ParkingSpot) Reset() { + *x = ParkingSpot{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[12] + 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[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 ParkingSpot.ProtoReflect.Descriptor instead. +func (*ParkingSpot) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{12} +} + +func (x *ParkingSpot) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ParkingSpot) GetTgn() uint32 { + if x != nil { + return x.Tgn + } + return 0 +} + +func (x *ParkingSpot) GetGlb() *GLB { + if x != nil { + return x.Glb + } + return nil +} + +// 应答器 +type Balise struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 应答器类型 + Type Balise_Type `protobuf:"varint,2,opt,name=type,proto3,enum=message.Balise_Type" json:"type,omitempty"` + // 应答器编号 + Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` + // 所属设备集中站id + EcsId uint32 `protobuf:"varint,4,opt,name=ecsId,proto3" json:"ecsId,omitempty"` +} + +func (x *Balise) Reset() { + *x = Balise{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[13] + 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[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 Balise.ProtoReflect.Descriptor instead. +func (*Balise) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{13} +} + +func (x *Balise) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Balise) GetType() Balise_Type { + if x != nil { + return x.Type + } + return Balise_FB +} + +func (x *Balise) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *Balise) GetEcsId() uint32 { + if x != nil { + return x.EcsId + } + return 0 +} + +// 区段分界点 +type DevidingPoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // 区段分界点类型 + Type DevidingPoint_Type `protobuf:"varint,2,opt,name=type,proto3,enum=message.DevidingPoint_Type" json:"type,omitempty"` + // 区段分界点编号 + Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` + // 公里标 + Glb *GLB `protobuf:"bytes,4,opt,name=glb,proto3" json:"glb,omitempty"` + // 关联的物理区段/道岔端点 + SectionPorts []*SectionPort `protobuf:"bytes,5,rep,name=sectionPorts,proto3" json:"sectionPorts,omitempty"` + // 所属设备集中站id + EcsIds []uint32 `protobuf:"varint,6,rep,packed,name=ecsIds,proto3" json:"ecsIds,omitempty"` +} + +func (x *DevidingPoint) Reset() { + *x = DevidingPoint{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DevidingPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DevidingPoint) ProtoMessage() {} + +func (x *DevidingPoint) 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 DevidingPoint.ProtoReflect.Descriptor instead. +func (*DevidingPoint) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{14} +} + +func (x *DevidingPoint) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *DevidingPoint) GetType() DevidingPoint_Type { + if x != nil { + return x.Type + } + return DevidingPoint_Boundary +} + +func (x *DevidingPoint) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *DevidingPoint) GetGlb() *GLB { + if x != nil { + return x.Glb + } + return nil +} + +func (x *DevidingPoint) GetSectionPorts() []*SectionPort { + if x != nil { + return x.SectionPorts + } + return nil +} + +func (x *DevidingPoint) GetEcsIds() []uint32 { + if x != nil { + return x.EcsIds + } + 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[15] + 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[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 Device.ProtoReflect.Descriptor instead. +func (*Device) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{15} +} + +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_Unknown +} + +// 区段端点 +type SectionPort struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 类型 + Type SectionPort_SectionType `protobuf:"varint,1,opt,name=type,proto3,enum=message.SectionPort_SectionType" json:"type,omitempty"` + // 区段/道岔 id + Id uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // 端点 + Port SectionPort_PortType `protobuf:"varint,3,opt,name=port,proto3,enum=message.SectionPort_PortType" json:"port,omitempty"` +} + +func (x *SectionPort) Reset() { + *x = SectionPort{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SectionPort) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SectionPort) ProtoMessage() {} + +func (x *SectionPort) 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 SectionPort.ProtoReflect.Descriptor instead. +func (*SectionPort) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{16} +} + +func (x *SectionPort) GetType() SectionPort_SectionType { + if x != nil { + return x.Type + } + return SectionPort_Section +} + +func (x *SectionPort) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *SectionPort) GetPort() SectionPort_PortType { + if x != nil { + return x.Port + } + return SectionPort_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"` + // 信号机模型型号 + Model Signal_Model `protobuf:"varint,3,opt,name=model,proto3,enum=message.Signal_Model" json:"model,omitempty"` + // 所属设备集中站id + EcsId uint32 `protobuf:"varint,4,opt,name=ecsId,proto3" json:"ecsId,omitempty"` +} + +func (x *Signal) Reset() { + *x = Signal{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[17] + 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[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 Signal.ProtoReflect.Descriptor instead. +func (*Signal) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{17} +} + +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 "" +} + +func (x *Signal) GetModel() Signal_Model { + if x != nil { + return x.Model + } + return Signal_HLU_0_1_1 +} + +func (x *Signal) GetEcsId() uint32 { + if x != nil { + return x.EcsId + } + return 0 +} + +// 道岔 +type Turnout 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"` + // 道岔模型型号 + Model Turnout_Model `protobuf:"varint,3,opt,name=model,proto3,enum=message.Turnout_Model" json:"model,omitempty"` + // 道岔A端关联的区段/道岔端点 + Asp *SectionPort `protobuf:"bytes,4,opt,name=asp,proto3" json:"asp,omitempty"` + // 道岔B端关联的区段/道岔端点 + Bsp *SectionPort `protobuf:"bytes,5,opt,name=bsp,proto3" json:"bsp,omitempty"` + // 道岔C端关联的区段/道岔端点 + Csp *SectionPort `protobuf:"bytes,6,opt,name=csp,proto3" json:"csp,omitempty"` + // 所属设备集中站id + EcsId uint32 `protobuf:"varint,7,opt,name=ecsId,proto3" json:"ecsId,omitempty"` +} + +func (x *Turnout) Reset() { + *x = Turnout{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[18] + 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[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 Turnout.ProtoReflect.Descriptor instead. +func (*Turnout) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{18} +} + +func (x *Turnout) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Turnout) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *Turnout) GetModel() Turnout_Model { + if x != nil { + return x.Model + } + return Turnout_ZDJ9_1 +} + +func (x *Turnout) GetAsp() *SectionPort { + if x != nil { + return x.Asp + } + return nil +} + +func (x *Turnout) GetBsp() *SectionPort { + if x != nil { + return x.Bsp + } + return nil +} + +func (x *Turnout) GetCsp() *SectionPort { + if x != nil { + return x.Csp + } + return nil +} + +func (x *Turnout) GetEcsId() uint32 { + if x != nil { + return x.EcsId + } + 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"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // 物理区段类型 + Type PhysicalSection_Type `protobuf:"varint,3,opt,name=type,proto3,enum=message.PhysicalSection_Type" json:"type,omitempty"` + // 物理区段A端关联的区段/道岔端点 + Asp *SectionPort `protobuf:"bytes,4,opt,name=asp,proto3" json:"asp,omitempty"` + // 物理区段B端关联的区段/道岔端点 + Bsp *SectionPort `protobuf:"bytes,5,opt,name=bsp,proto3" json:"bsp,omitempty"` + // 所属设备集中站id + EcsId uint32 `protobuf:"varint,6,opt,name=ecsId,proto3" json:"ecsId,omitempty"` +} + +func (x *PhysicalSection) Reset() { + *x = PhysicalSection{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[19] + 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[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 PhysicalSection.ProtoReflect.Descriptor instead. +func (*PhysicalSection) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{19} +} + +func (x *PhysicalSection) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *PhysicalSection) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *PhysicalSection) GetType() PhysicalSection_Type { + if x != nil { + return x.Type + } + return PhysicalSection_General +} + +func (x *PhysicalSection) GetAsp() *SectionPort { + if x != nil { + return x.Asp + } + return nil +} + +func (x *PhysicalSection) GetBsp() *SectionPort { + if x != nil { + return x.Bsp + } + return nil +} + +func (x *PhysicalSection) GetEcsId() uint32 { + if x != nil { + return x.EcsId + } + 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"` + // 编号 + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // 关联的站台 + PlatformId uint32 `protobuf:"varint,3,opt,name=platformId,proto3" json:"platformId,omitempty"` +} + +func (x *Psd) Reset() { + *x = Psd{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[20] + 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[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 Psd.ProtoReflect.Descriptor instead. +func (*Psd) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{20} +} + +func (x *Psd) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Psd) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *Psd) GetPlatformId() uint32 { + if x != nil { + return x.PlatformId + } + 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[21] + 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[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 Platform.ProtoReflect.Descriptor instead. +func (*Platform) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{21} +} + +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"` + // 是否设备集中站(Equipment centralized station) + IsEcs bool `protobuf:"varint,5,opt,name=isEcs,proto3" json:"isEcs,omitempty"` + // 是否停车场/车辆段 + IsCd bool `protobuf:"varint,6,opt,name=isCd,proto3" json:"isCd,omitempty"` + // 集中站关联下属车站 + EcsStationIds []uint32 `protobuf:"varint,7,rep,packed,name=ecsStationIds,proto3" json:"ecsStationIds,omitempty"` +} + +func (x *Station) Reset() { + *x = Station{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[22] + 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[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 Station.ProtoReflect.Descriptor instead. +func (*Station) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{22} +} + +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 +} + +func (x *Station) GetIsEcs() bool { + if x != nil { + return x.IsEcs + } + return false +} + +func (x *Station) GetIsCd() bool { + if x != nil { + return x.IsCd + } + return false +} + +func (x *Station) GetEcsStationIds() []uint32 { + if x != nil { + return x.EcsStationIds + } + 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[23] + 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[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 GLB.ProtoReflect.Descriptor instead. +func (*GLB) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{23} +} + +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 CiJDQBZ struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 设备集中站uid + EcsName string `protobuf:"bytes,1,opt,name=ecsName,proto3" json:"ecsName,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"` + // 设备电气组合组 + DeviceEcgDatas []*DeviceEcc `protobuf:"bytes,4,rep,name=deviceEcgDatas,proto3" json:"deviceEcgDatas,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 []uint32 `protobuf:"varint,7,rep,packed,name=sectionIds,proto3" json:"sectionIds,omitempty"` +} + +func (x *CiJDQBZ) Reset() { + *x = CiJDQBZ{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiJDQBZ) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiJDQBZ) ProtoMessage() {} + +func (x *CiJDQBZ) 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 CiJDQBZ.ProtoReflect.Descriptor instead. +func (*CiJDQBZ) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{24} +} + +func (x *CiJDQBZ) GetEcsName() string { + if x != nil { + return x.EcsName + } + return "" +} + +func (x *CiJDQBZ) GetRelays() []*Relay { + if x != nil { + return x.Relays + } + return nil +} + +func (x *CiJDQBZ) GetPfps() []*PFP { + if x != nil { + return x.Pfps + } + return nil +} + +func (x *CiJDQBZ) GetDeviceEcgDatas() []*DeviceEcc { + if x != nil { + return x.DeviceEcgDatas + } + return nil +} + +func (x *CiJDQBZ) GetCjt() []*CiCjTable { + if x != nil { + return x.Cjt + } + return nil +} + +func (x *CiJDQBZ) GetQdt() []*CiQdTable { + if x != nil { + return x.Qdt + } + return nil +} + +func (x *CiJDQBZ) GetSectionIds() []uint32 { + 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[25] + 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[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 CiSectionTable.ProtoReflect.Descriptor instead. +func (*CiSectionTable) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{25} +} + +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 []string `protobuf:"bytes,1,rep,name=relayIds,proto3" json:"relayIds,omitempty"` +} + +func (x *CiQdTable) Reset() { + *x = CiQdTable{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[26] + 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[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 CiQdTable.ProtoReflect.Descriptor instead. +func (*CiQdTable) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{26} +} + +func (x *CiQdTable) GetRelayIds() []string { + 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[27] + 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[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 CiCjTable.ProtoReflect.Descriptor instead. +func (*CiCjTable) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{27} +} + +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 + Uint32 string `protobuf:"bytes,1,opt,name=uint32,proto3" json:"uint32,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[28] + 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[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 CiCjItem.ProtoReflect.Descriptor instead. +func (*CiCjItem) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{28} +} + +func (x *CiCjItem) GetUint32() string { + if x != nil { + return x.Uint32 + } + return "" +} + +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[29] + 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[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 PFP.ProtoReflect.Descriptor instead. +func (*PFP) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{29} +} + +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[30] + 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[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 Relay.ProtoReflect.Descriptor instead. +func (*Relay) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{30} +} + +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 string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + // 数据类型 + Type JKP_Type `protobuf:"varint,2,opt,name=type,proto3,enum=message.JKP_Type" json:"type,omitempty"` + // 开关 + Kgs []*KaiGuan `protobuf:"bytes,3,rep,name=kgs,proto3" json:"kgs,omitempty"` + // 灯 + Lamps []*Lamp `protobuf:"bytes,4,rep,name=lamps,proto3" json:"lamps,omitempty"` + // 警铃 + Alarms []*Alarm `protobuf:"bytes,5,rep,name=alarms,proto3" json:"alarms,omitempty"` + // 设备电子元件组合 + DeviceEccs []*DeviceEcc `protobuf:"bytes,6,rep,name=deviceEccs,proto3" json:"deviceEccs,omitempty"` +} + +func (x *JKP) Reset() { + *x = JKP{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[31] + 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[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 JKP.ProtoReflect.Descriptor instead. +func (*JKP) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{31} +} + +func (x *JKP) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *JKP) GetType() JKP_Type { + if x != nil { + return x.Type + } + return JKP_IBP +} + +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[32] + 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[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 Alarm.ProtoReflect.Descriptor instead. +func (*Alarm) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{32} +} + +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"` + // 是否自复位 + Zfw bool `protobuf:"varint,3,opt,name=zfw,proto3" json:"zfw,omitempty"` + // 是否有背光灯 + Lamp bool `protobuf:"varint,4,opt,name=lamp,proto3" json:"lamp,omitempty"` +} + +func (x *KaiGuan) Reset() { + *x = KaiGuan{} + if protoimpl.UnsafeEnabled { + mi := &file_repo_proto_msgTypes[33] + 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[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 KaiGuan.ProtoReflect.Descriptor instead. +func (*KaiGuan) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{33} +} + +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) GetZfw() bool { + if x != nil { + return x.Zfw + } + return false +} + +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[34] + 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[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 Lamp.ProtoReflect.Descriptor instead. +func (*Lamp) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{34} +} + +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 + + // 设备类型 + DeviceType Device_Type `protobuf:"varint,1,opt,name=deviceType,proto3,enum=message.Device_Type" json:"deviceType,omitempty"` + // 设备编号 + DeviceCode string `protobuf:"bytes,2,opt,name=deviceCode,proto3" json:"deviceCode,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[35] + 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[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 DeviceEcc.ProtoReflect.Descriptor instead. +func (*DeviceEcc) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{35} +} + +func (x *DeviceEcc) GetDeviceType() Device_Type { + if x != nil { + return x.DeviceType + } + return Device_Unknown +} + +func (x *DeviceEcc) GetDeviceCode() string { + if x != nil { + return x.DeviceCode + } + return "" +} + +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[36] + 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[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 Ecc.ProtoReflect.Descriptor instead. +func (*Ecc) Descriptor() ([]byte, []int) { + return file_repo_proto_rawDescGZIP(), []int{36} +} + +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, 0x74, 0x0a, 0x04, 0x52, 0x65, 0x70, 0x6f, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, + 0x06, 0x63, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x47, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x06, 0x67, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x47, 0x54, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x06, 0x67, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x08, 0x0a, 0x06, 0x47, + 0x54, 0x44, 0x61, 0x74, 0x61, 0x22, 0x4f, 0x0a, 0x06, 0x43, 0x47, 0x44, 0x61, 0x74, 0x61, 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, 0x12, 0x20, 0x0a, 0x04, 0x6a, 0x6b, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4a, 0x4b, 0x50, + 0x52, 0x04, 0x6a, 0x6b, 0x70, 0x73, 0x22, 0x7d, 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, 0x09, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x78, 0x68, + 0x62, 0x7a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x58, 0x48, 0x42, 0x5a, 0x52, 0x04, 0x78, 0x68, 0x62, 0x7a, 0x12, 0x26, 0x0a, + 0x05, 0x6a, 0x64, 0x71, 0x62, 0x7a, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x69, 0x4a, 0x44, 0x51, 0x42, 0x5a, 0x52, 0x05, + 0x6a, 0x64, 0x71, 0x62, 0x7a, 0x22, 0xf8, 0x05, 0x0a, 0x04, 0x58, 0x48, 0x42, 0x5a, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 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, 0x3e, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x08, + 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, 0x09, 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, 0x0a, 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, 0x0b, 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, 0x0c, 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, 0x0d, 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, 0x0e, 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, 0x0f, 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, + 0x10, 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, 0x11, 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, 0x12, 0x32, 0x0a, 0x0a, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x63, 0x63, 0x73, 0x18, 0x12, 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, 0x4a, 0x0a, 0x04, 0x53, 0x50, 0x4b, 0x53, 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, 0x1e, 0x0a, 0x0a, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x03, + 0x50, 0x53, 0x4c, 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, 0x14, 0x0a, 0x05, 0x70, 0x73, 0x64, 0x49, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x73, 0x64, 0x49, 0x64, 0x22, 0x3f, 0x0a, + 0x03, 0x4d, 0x6b, 0x78, 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, 0x14, 0x0a, 0x05, 0x70, 0x73, 0x64, 0x49, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x73, 0x64, 0x49, 0x64, 0x22, 0x49, + 0x0a, 0x03, 0x54, 0x44, 0x54, 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, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x03, 0x45, 0x4d, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x49, 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, 0x4f, 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, 0x12, + 0x10, 0x0a, 0x03, 0x74, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x74, 0x67, + 0x6e, 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, 0x22, 0x84, 0x01, 0x0a, 0x06, 0x42, 0x61, 0x6c, 0x69, 0x73, 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, 0x42, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x63, + 0x73, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x63, 0x73, 0x49, 0x64, + 0x22, 0x16, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x46, 0x42, 0x10, 0x00, + 0x12, 0x06, 0x0a, 0x02, 0x54, 0x42, 0x10, 0x01, 0x22, 0xfd, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x76, + 0x69, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 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, 0x12, + 0x38, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0c, 0x73, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x63, 0x73, + 0x49, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x63, 0x73, 0x49, 0x64, + 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, 0x9a, 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, 0x39, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, + 0x0b, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x03, 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, 0xd0, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x2e, + 0x50, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x27, + 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x1f, 0x0a, 0x08, 0x50, 0x6f, 0x72, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, + 0x01, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x02, 0x22, 0xb8, 0x02, 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, 0x12, 0x2b, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x49, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x63, 0x73, 0x49, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x05, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x4c, 0x55, 0x5f, 0x30, 0x5f, 0x31, 0x5f, + 0x31, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x4c, 0x55, 0x5f, 0x30, 0x5f, 0x30, 0x5f, 0x31, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x4c, 0x55, 0x5f, 0x30, 0x5f, 0x31, 0x5f, 0x30, 0x10, + 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x4c, 0x55, 0x5f, 0x55, 0x5f, 0x30, 0x5f, 0x30, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x4c, 0x55, 0x5f, 0x4c, 0x5f, 0x31, 0x5f, 0x31, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x48, 0x4c, 0x55, 0x5f, 0x4c, 0x5f, 0x31, 0x5f, 0x30, 0x10, 0x05, 0x12, 0x0e, + 0x0a, 0x0a, 0x48, 0x4c, 0x55, 0x5f, 0x4c, 0x55, 0x5f, 0x30, 0x5f, 0x30, 0x10, 0x06, 0x12, 0x08, + 0x0a, 0x04, 0x48, 0x4c, 0x5f, 0x30, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4c, 0x5f, 0x4c, + 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x55, 0x5f, 0x30, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, + 0x48, 0x55, 0x5f, 0x55, 0x10, 0x0a, 0x12, 0x05, 0x0a, 0x01, 0x48, 0x10, 0x0b, 0x12, 0x06, 0x0a, + 0x02, 0x41, 0x42, 0x10, 0x0c, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x42, 0x55, 0x5f, 0x30, 0x5f, 0x31, + 0x5f, 0x30, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x42, 0x55, 0x5f, 0x55, 0x5f, 0x30, 0x5f, + 0x30, 0x10, 0x0e, 0x22, 0x8a, 0x02, 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, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x75, 0x72, + 0x6e, 0x6f, 0x75, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x12, 0x26, 0x0a, 0x03, 0x61, 0x73, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x72, 0x74, 0x52, 0x03, 0x61, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x03, 0x62, 0x73, 0x70, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x03, 0x62, 0x73, + 0x70, 0x12, 0x26, 0x0a, 0x03, 0x63, 0x73, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x72, 0x74, 0x52, 0x03, 0x63, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x63, 0x73, + 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x63, 0x73, 0x49, 0x64, 0x22, + 0x1f, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x0a, 0x0a, 0x06, 0x5a, 0x44, 0x4a, 0x39, + 0x5f, 0x31, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x5a, 0x44, 0x4a, 0x39, 0x5f, 0x32, 0x10, 0x01, + 0x22, 0xf0, 0x01, 0x0a, 0x0f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 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, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x61, + 0x73, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x03, + 0x61, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x03, 0x62, 0x73, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x03, 0x62, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x63, 0x73, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x63, 0x73, 0x49, + 0x64, 0x22, 0x20, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, + 0x74, 0x10, 0x01, 0x22, 0x49, 0x0a, 0x03, 0x50, 0x73, 0x64, 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, 0x1e, + 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 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, 0xb3, 0x01, 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, + 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x45, 0x63, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x69, 0x73, 0x45, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x43, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x43, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x63, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x0d, 0x65, 0x63, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, + 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, 0x95, 0x02, 0x0a, 0x07, 0x43, 0x69, 0x4a, 0x44, 0x51, 0x42, + 0x5a, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x63, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x65, 0x63, 0x73, 0x4e, 0x61, 0x6d, 0x65, 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, 0x3a, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, + 0x63, 0x67, 0x44, 0x61, 0x74, 0x61, 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, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x63, 0x67, 0x44, 0x61, 0x74, 0x61, + 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, + 0x0d, 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, 0x09, 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, 0x30, + 0x0a, 0x08, 0x43, 0x69, 0x43, 0x6a, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, + 0x33, 0x32, 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, 0x86, + 0x02, 0x0a, 0x03, 0x4a, 0x4b, 0x50, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x4a, 0x4b, 0x50, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x22, 0x0a, 0x03, 0x6b, 0x67, 0x73, 0x18, 0x03, 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, 0x04, 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, 0x05, 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, 0x06, + 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, 0x53, 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, 0x10, 0x0a, 0x03, 0x7a, 0x66, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x03, 0x7a, 0x66, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x6d, 0x70, 0x18, 0x04, 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, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x01, 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, 0x0a, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x64, 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, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x72, 0x65, 0x70, 0x6f, + 0x2f, 0x64, 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, 11) +var file_repo_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_repo_proto_goTypes = []interface{}{ + (Balise_Type)(0), // 0: message.Balise.Type + (DevidingPoint_Type)(0), // 1: message.DevidingPoint.Type + (Device_Type)(0), // 2: message.Device.Type + (Device_Port)(0), // 3: message.Device.Port + (SectionPort_SectionType)(0), // 4: message.SectionPort.SectionType + (SectionPort_PortType)(0), // 5: message.SectionPort.PortType + (Signal_Model)(0), // 6: message.Signal.Model + (Turnout_Model)(0), // 7: message.Turnout.Model + (PhysicalSection_Type)(0), // 8: message.PhysicalSection.Type + (Relay_Model)(0), // 9: message.Relay.Model + (JKP_Type)(0), // 10: message.JKP.Type + (*Repo)(nil), // 11: message.Repo + (*GTData)(nil), // 12: message.GTData + (*CGData)(nil), // 13: message.CGData + (*Line)(nil), // 14: message.Line + (*XHBZ)(nil), // 15: message.XHBZ + (*SPKS)(nil), // 16: message.SPKS + (*PSL)(nil), // 17: message.PSL + (*Mkx)(nil), // 18: message.Mkx + (*TDT)(nil), // 19: message.TDT + (*EMP)(nil), // 20: message.EMP + (*Qd)(nil), // 21: message.Qd + (*Pd)(nil), // 22: message.Pd + (*ParkingSpot)(nil), // 23: message.ParkingSpot + (*Balise)(nil), // 24: message.Balise + (*DevidingPoint)(nil), // 25: message.DevidingPoint + (*Device)(nil), // 26: message.Device + (*SectionPort)(nil), // 27: message.SectionPort + (*Signal)(nil), // 28: message.Signal + (*Turnout)(nil), // 29: message.Turnout + (*PhysicalSection)(nil), // 30: message.PhysicalSection + (*Psd)(nil), // 31: message.Psd + (*Platform)(nil), // 32: message.Platform + (*Station)(nil), // 33: message.Station + (*GLB)(nil), // 34: message.GLB + (*CiJDQBZ)(nil), // 35: message.CiJDQBZ + (*CiSectionTable)(nil), // 36: message.CiSectionTable + (*CiQdTable)(nil), // 37: message.CiQdTable + (*CiCjTable)(nil), // 38: message.CiCjTable + (*CiCjItem)(nil), // 39: message.CiCjItem + (*PFP)(nil), // 40: message.PFP + (*Relay)(nil), // 41: message.Relay + (*JKP)(nil), // 42: message.JKP + (*Alarm)(nil), // 43: message.Alarm + (*KaiGuan)(nil), // 44: message.KaiGuan + (*Lamp)(nil), // 45: message.Lamp + (*DeviceEcc)(nil), // 46: message.DeviceEcc + (*Ecc)(nil), // 47: message.Ecc +} +var file_repo_proto_depIdxs = []int32{ + 13, // 0: message.Repo.cgData:type_name -> message.CGData + 12, // 1: message.Repo.gtData:type_name -> message.GTData + 14, // 2: message.CGData.lines:type_name -> message.Line + 42, // 3: message.CGData.jkps:type_name -> message.JKP + 15, // 4: message.Line.xhbz:type_name -> message.XHBZ + 35, // 5: message.Line.jdqbz:type_name -> message.CiJDQBZ + 33, // 6: message.XHBZ.stations:type_name -> message.Station + 32, // 7: message.XHBZ.platforms:type_name -> message.Platform + 31, // 8: message.XHBZ.psds:type_name -> message.Psd + 30, // 9: message.XHBZ.physicalSections:type_name -> message.PhysicalSection + 29, // 10: message.XHBZ.turnouts:type_name -> message.Turnout + 25, // 11: message.XHBZ.devidingPoints:type_name -> message.DevidingPoint + 28, // 12: message.XHBZ.signals:type_name -> message.Signal + 24, // 13: message.XHBZ.balises:type_name -> message.Balise + 23, // 14: message.XHBZ.parkingSpots:type_name -> message.ParkingSpot + 22, // 15: message.XHBZ.pds:type_name -> message.Pd + 21, // 16: message.XHBZ.qds:type_name -> message.Qd + 20, // 17: message.XHBZ.emps:type_name -> message.EMP + 19, // 18: message.XHBZ.tdts:type_name -> message.TDT + 18, // 19: message.XHBZ.mkxs:type_name -> message.Mkx + 17, // 20: message.XHBZ.psls:type_name -> message.PSL + 16, // 21: message.XHBZ.spks:type_name -> message.SPKS + 46, // 22: message.XHBZ.deviceEccs:type_name -> message.DeviceEcc + 34, // 23: message.ParkingSpot.glb:type_name -> message.GLB + 0, // 24: message.Balise.type:type_name -> message.Balise.Type + 1, // 25: message.DevidingPoint.type:type_name -> message.DevidingPoint.Type + 34, // 26: message.DevidingPoint.glb:type_name -> message.GLB + 27, // 27: message.DevidingPoint.sectionPorts:type_name -> message.SectionPort + 2, // 28: message.Device.type:type_name -> message.Device.Type + 4, // 29: message.SectionPort.type:type_name -> message.SectionPort.SectionType + 5, // 30: message.SectionPort.port:type_name -> message.SectionPort.PortType + 6, // 31: message.Signal.model:type_name -> message.Signal.Model + 7, // 32: message.Turnout.model:type_name -> message.Turnout.Model + 27, // 33: message.Turnout.asp:type_name -> message.SectionPort + 27, // 34: message.Turnout.bsp:type_name -> message.SectionPort + 27, // 35: message.Turnout.csp:type_name -> message.SectionPort + 8, // 36: message.PhysicalSection.type:type_name -> message.PhysicalSection.Type + 27, // 37: message.PhysicalSection.asp:type_name -> message.SectionPort + 27, // 38: message.PhysicalSection.bsp:type_name -> message.SectionPort + 34, // 39: message.Station.glb:type_name -> message.GLB + 41, // 40: message.CiJDQBZ.relays:type_name -> message.Relay + 40, // 41: message.CiJDQBZ.pfps:type_name -> message.PFP + 46, // 42: message.CiJDQBZ.deviceEcgDatas:type_name -> message.DeviceEcc + 38, // 43: message.CiJDQBZ.cjt:type_name -> message.CiCjTable + 37, // 44: message.CiJDQBZ.qdt:type_name -> message.CiQdTable + 39, // 45: message.CiCjTable.items:type_name -> message.CiCjItem + 9, // 46: message.Relay.model:type_name -> message.Relay.Model + 10, // 47: message.JKP.type:type_name -> message.JKP.Type + 44, // 48: message.JKP.kgs:type_name -> message.KaiGuan + 45, // 49: message.JKP.lamps:type_name -> message.Lamp + 43, // 50: message.JKP.alarms:type_name -> message.Alarm + 46, // 51: message.JKP.deviceEccs:type_name -> message.DeviceEcc + 2, // 52: message.DeviceEcc.deviceType:type_name -> message.Device.Type + 47, // 53: message.DeviceEcc.ecc:type_name -> message.Ecc + 54, // [54:54] is the sub-list for method output_type + 54, // [54:54] is the sub-list for method input_type + 54, // [54:54] is the sub-list for extension type_name + 54, // [54:54] is the sub-list for extension extendee + 0, // [0:54] 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.(*Repo); 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.(*GTData); 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.(*CGData); 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.(*Line); 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.(*XHBZ); 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.(*SPKS); 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.(*PSL); 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.(*Mkx); 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.(*TDT); 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.(*EMP); 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.(*Qd); 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.(*Pd); 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.(*ParkingSpot); 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.(*Balise); 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.(*DevidingPoint); 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.(*Device); 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.(*SectionPort); 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.(*Signal); 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.(*Turnout); 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.(*PhysicalSection); 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.(*Psd); 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.(*Platform); 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.(*Station); 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.(*GLB); 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.(*CiJDQBZ); 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.(*CiSectionTable); 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.(*CiQdTable); 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.(*CiCjTable); 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.(*CiCjItem); 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.(*PFP); 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.(*Relay); 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.(*JKP); 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.(*Alarm); 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.(*KaiGuan); 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.(*Lamp); 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.(*DeviceEcc); 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.(*Ecc); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_repo_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Repo_CgData)(nil), + (*Repo_GtData)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_repo_proto_rawDesc, + NumEnums: 11, + NumMessages: 37, + 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 +} diff --git a/repo/error_record.go b/repo/error_record.go new file mode 100644 index 0000000..312fd52 --- /dev/null +++ b/repo/error_record.go @@ -0,0 +1,25 @@ +package repo + +// 构建错误记录 +type ErrorRecord struct { + // 告警信息 + Warns []string + // 错误信息 + Errs []string +} + +func NewErrorRecord() *ErrorRecord { + return &ErrorRecord{} +} + +func (r *ErrorRecord) AddError(err string) { + r.Errs = append(r.Errs, err) +} + +func (r *ErrorRecord) HasError() bool { + return len(r.Errs) > 0 +} + +func (r *ErrorRecord) AddWarn(warn string) { + r.Warns = append(r.Warns, warn) +} diff --git a/repo/idmapping_build.go b/repo/idmapping_build.go new file mode 100644 index 0000000..fd40257 --- /dev/null +++ b/repo/idmapping_build.go @@ -0,0 +1,484 @@ +package repo + +import ( + "fmt" + "reflect" + "strconv" + "strings" + + "joylink.club/rtsssimulation/repo/dto" + "joylink.club/rtsssimulation/repo/model" +) + +// 城轨uid +type CgUid struct { + // 城市 + city string + // 线路 + line string + // 设备编号 + codes []string + // codestr + codestr string + // uid + idstr string +} + +func NewCgUid(city string, line string, codes ...string) *CgUid { + if city == "" || line == "" { + panic(fmt.Errorf("创建城轨uid错误: 城市、线路、车站不能为空 city=%s, line=%s", city, line)) + } + l := len(codes) + if l == 0 { + panic(fmt.Errorf("创建城轨uid错误: codes不能为空")) + } + codestr := strings.Join(codes, "_") + elems := []string{city, line, codestr} + uid := strings.Join(elems, "_") + return &CgUid{ + city: city, + line: line, + codes: codes, + codestr: codestr, + idstr: uid, + } +} + +func (u *CgUid) Id() string { + return u.idstr +} + +func (u *CgUid) Code() string { + return u.codestr +} + +type idMap struct { + // 数据id + Did string + // 元素id + Eid uint32 + // 唯一id + Uid model.Uid +} + +func NewIdMap(did string, eid uint32, uid model.Uid) *idMap { + return &idMap{ + Did: did, + Eid: eid, + Uid: uid, + } +} + +func (m *idMap) DeId() string { + return DeID(m.Did, m.Eid) +} +func (m *idMap) Debug() string { + return fmt.Sprintf("{数据id=%s, 元素id=%v, uid=%s}", m.Did, m.Eid, m.Uid.Id()) +} + +// 数据元素id key生成 +// did - 数据id +// eid - 元素id +func DeID(did string, eid uint32) string { + return fmt.Sprintf("%s_%v", did, eid) +} + +// id映射表 +type IdMapping struct { + // 数据元素id映射 + deidMap map[string]*idMap + // uid映射(只存储最初的idMap,实际中一个uid可能对应多个数据元素id) + uidMap map[string]*idMap +} + +func (m *IdMapping) queryByDeId(deid string) *idMap { + return m.deidMap[deid] +} + +func (m *IdMapping) queryByDidAndEid(did string, eid uint32) *idMap { + id := DeID(did, eid) + return m.deidMap[id] +} + +func (m *IdMapping) add(idmap *idMap) { + if idmap == nil { + panic(fmt.Errorf("添加id映射表错误: idmap不能为空")) + } + m.deidMap[idmap.DeId()] = idmap +} + +func (m *IdMapping) checkUidAndAdd(idmap *idMap) (existed *idMap, uidExisted bool) { + if idmap == nil { + panic(fmt.Errorf("添加id映射表错误: idmap不能为空")) + } + m.deidMap[idmap.DeId()] = idmap + existed, ok := m.uidMap[idmap.Uid.Id()] + if ok { + uidExisted = true + } else { + m.uidMap[idmap.Uid.Id()] = idmap + + } + return +} + +// 构建id映射 +func BuildIdMapping(msgs *dto.Repo, errRecord *ErrorRecord) *IdMapping { + if cg := msgs.GetCgData(); cg != nil { + return BuildCgIdMapping(cg, errRecord) + } else if gt := msgs.GetGtData(); gt != nil { + return BuildGtIdMapping(gt) + } + errRecord.AddError("构建id映射表错误: 没有数据") + return nil +} + +// 构建城轨id映射 +func BuildCgIdMapping(cg *dto.CGData, errRecord *ErrorRecord) *IdMapping { + if cg == nil { + errRecord.AddError("构建城轨id映射表错误: 未关联任何数据") + return nil + } + idMapping := &IdMapping{ + deidMap: make(map[string]*idMap), + uidMap: make(map[string]*idMap), + } + lineSet := make(map[string]struct{}) + for _, l := range cg.Lines { + if _, ok := lineSet[l.City+l.LineId]; ok { + errRecord.AddError(fmt.Sprintf("构建城轨id映射表错误: 线路重复:%s_%s", l.City, l.LineId)) + return nil + } + lineSet[l.City+l.LineId] = struct{}{} + } + for _, line := range cg.Lines { + buildXhbz(idMapping, line, errRecord) + if errRecord.HasError() { + return nil + } + } + return idMapping +} + +// 构建信号布置数据id映射 +func buildXhbz(idMapping *IdMapping, line *dto.Line, errRecord *ErrorRecord) { + xhbz := line.Xhbz + if xhbz == nil { + errRecord.AddError("构建城轨id映射表错误: 信号布置数据为空") + return + } + city := line.City // 城市 + lineId := line.LineId // 线路id + did := xhbz.Id // 数据id + errPrefix := "信号布置数据错误" + // 车站uid + for _, station := range xhbz.Stations { + eid := station.Id + if checkFieldEmpty(did, eid, station.Name, errPrefix, "车站名称", errRecord) { + continue + } + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, station.Name)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 车站站台uid + for _, p := range xhbz.Platforms { + eid := p.Id + if checkFieldEmpty(did, eid, p.Code, errPrefix, "站台编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, p.StationId, errPrefix, "站台关联车站", errRecord) { + continue + } + stationIdm := idMapping.queryByDidAndEid(did, p.StationId) + if checkRelationNil(did, eid, p.StationId, stationIdm, errPrefix, "站台关联车站", errRecord) { + continue + } + // 站台code: 车站名称_站台编号 + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, stationIdm.Uid.Code(), p.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 屏蔽门uid + for _, p := range xhbz.Psds { + eid := p.Id + if checkFieldEmpty(did, eid, p.Code, errPrefix, "屏蔽门编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, p.PlatformId, errPrefix, "屏蔽门关联站台", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, p.PlatformId) + if checkRelationNil(did, eid, p.PlatformId, relIdMap, errPrefix, "屏蔽门关联站台", errRecord) { + continue + } + // 屏蔽门code: 站台编号_屏蔽门编号 + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), p.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 物理区段 + for _, ps := range xhbz.PhysicalSections { + eid := ps.Id + if checkFieldEmpty(did, eid, ps.Code, errPrefix, "物理区段编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, ps.EcsId, errPrefix, "物理区段关联集中站", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, ps.EcsId) + if checkRelationNil(did, eid, ps.EcsId, relIdMap, errPrefix, "物理区段关联集中站", errRecord) { + continue + } + // 物理区段code: 集中站名称_物理区段编号 + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), ps.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 道岔uid + for _, t := range xhbz.Turnouts { + eid := t.Id + if checkFieldEmpty(did, eid, t.Code, errPrefix, "道岔编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, t.EcsId, errPrefix, "道岔关联集中站", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, t.EcsId) + if checkRelationNil(did, eid, t.EcsId, relIdMap, errPrefix, "道岔关联集中站", errRecord) { + continue + } + // 道岔code: 集中站名称_道岔编号 + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), t.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 区段分界点uid + for _, c := range xhbz.DevidingPoints { + eid := c.Id + if checkFieldEmpty(did, eid, c.Code, errPrefix, "区段分界点编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, c.EcsIds, errPrefix, "区段分界点关联集中站", errRecord) { + continue + } + ecsErr := false + for _, v := range c.EcsIds { + relIdMap := idMapping.queryByDidAndEid(did, v) + if checkRelationNil(did, eid, v, relIdMap, errPrefix, "区段分界点关联集中站", errRecord) { + ecsErr = true + continue + } + } + if ecsErr { + continue + } + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, c.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 信号机uid + for _, s := range xhbz.Signals { + eid := s.Id + if checkFieldEmpty(did, eid, s.Code, errPrefix, "信号机编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, s.EcsId, errPrefix, "信号机关联集中站", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, s.EcsId) + if checkRelationNil(did, eid, s.EcsId, relIdMap, errPrefix, "信号机关联集中站", errRecord) { + continue + } + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), s.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 应答器uid + for _, b := range xhbz.Balises { + eid := b.Id + if checkFieldEmpty(did, eid, b.Code, errPrefix, "应答器编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, b.EcsId, errPrefix, "应答器关联集中站", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, b.EcsId) + if checkRelationNil(did, eid, b.EcsId, relIdMap, errPrefix, "应答器关联集中站", errRecord) { + continue + } + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), b.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 停车点 + for _, ps := range xhbz.ParkingSpots { + idmap := NewIdMap(did, ps.Id, NewCgUid(city, lineId, did, strconv.Itoa(int(ps.Id)))) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 坡度 + for _, v := range xhbz.Pds { + idmap := NewIdMap(did, v.Id, NewCgUid(city, lineId, did, strconv.Itoa(int(v.Id)))) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 曲度 + for _, v := range xhbz.Qds { + idmap := NewIdMap(did, v.Id, NewCgUid(city, lineId, did, strconv.Itoa(int(v.Id)))) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 紧急停车按钮 + for _, v := range xhbz.Emps { + eid := v.Id + if checkFieldEmpty(did, eid, v.Code, errPrefix, "紧急停车按钮编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, v.PlatformId, errPrefix, "紧急停车按钮关联站台", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, v.PlatformId) + if checkRelationNil(did, eid, v.PlatformId, relIdMap, errPrefix, "紧急停车按钮关联站台", errRecord) { + continue + } + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), v.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 停车倒计时器 + for _, v := range xhbz.Tdts { + eid := v.Id + if checkFieldEmpty(did, eid, v.Code, errPrefix, "停车倒计时器编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, v.PlatformId, errPrefix, "停车倒计时器关联站台", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, v.PlatformId) + if checkRelationNil(did, eid, v.PlatformId, relIdMap, errPrefix, "停车倒计时器关联站台", errRecord) { + continue + } + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), v.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // 门控箱 + for _, v := range xhbz.Mkxs { + eid := v.Id + if checkFieldEmpty(did, eid, v.Code, errPrefix, "门控箱编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, v.PsdId, errPrefix, "门控箱关联屏蔽门", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, v.PsdId) + if checkRelationNil(did, eid, v.PsdId, relIdMap, errPrefix, "门控箱关联屏蔽门", errRecord) { + continue + } + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), v.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // PSL + for _, v := range xhbz.Psls { + eid := v.Id + if checkFieldEmpty(did, eid, v.Code, errPrefix, "PSL编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, v.PsdId, errPrefix, "PSL关联屏蔽门", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, v.PsdId) + if checkRelationNil(did, eid, v.PsdId, relIdMap, errPrefix, "PSL关联屏蔽门", errRecord) { + continue + } + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), v.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } + // SPKS + for _, v := range xhbz.Spks { + eid := v.Id + if checkFieldEmpty(did, eid, v.Code, errPrefix, "SPKS编号", errRecord) { + continue + } + if checkFieldEmpty(did, eid, v.PlatformId, errPrefix, "SPKS关联站台", errRecord) { + continue + } + relIdMap := idMapping.queryByDidAndEid(did, v.PlatformId) + if checkRelationNil(did, eid, v.PlatformId, relIdMap, errPrefix, "SPKS关联站台", errRecord) { + continue + } + idmap := NewIdMap(did, eid, NewCgUid(city, lineId, relIdMap.Uid.Code(), v.Code)) + if checkRepeatOrAddIdMap(idmap, idMapping, errPrefix, errRecord) { + continue + } + } +} + +func checkRelationNil(did string, eid uint32, relId uint32, relIdMap *idMap, prefix string, relTip string, errRecord *ErrorRecord) bool { + if relIdMap == nil { + errRecord.AddError(fmt.Sprintf("%s: %s不存在, 数据id=%s 数据元素id=%v 关联id=%v", prefix, relTip, did, eid, relId)) + return true + } + return false +} + +// 检查字段是否为空 +func checkFieldEmpty(did string, eid uint32, field any, prefix string, tip string, errRecord *ErrorRecord) bool { + if isFieldEmpty(field) { + errRecord.AddError(fmt.Sprintf("%s: %s不能为空, 数据id=%s 数据元素id=%v ", prefix, tip, did, eid)) + return true + } + return false +} + +func isFieldEmpty(field any) bool { + if field == nil { + return true + } + vf := reflect.ValueOf(field) + switch vf.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Float32, reflect.Float64: + return field == 0 + case reflect.String: + return field == "" + case reflect.Slice, reflect.Map: + return vf.Len() == 0 + } + return false +} + +// 数据uid/deid重复检查 +func checkRepeatOrAddIdMap(idm *idMap, idMapping *IdMapping, prefix string, errRecord *ErrorRecord) (repeated bool) { + if old := idMapping.queryByDeId(idm.DeId()); old != nil { + errRecord.AddError(fmt.Sprintf("%s,数据元素重复: 数据1=%s 数据2=%s,", prefix, old.Debug(), idm.Debug())) + repeated = true + } else if old, _ := idMapping.checkUidAndAdd(idm); old != nil { + errRecord.AddError(fmt.Sprintf("%s,数据重复: 数据1=%s 数据2=%s,", prefix, old.Debug(), idm.Debug())) + repeated = true + } + return +} + +func BuildGtIdMapping(gt *dto.GTData) *IdMapping { + panic("未实现") +} diff --git a/repo/manage.go b/repo/manage.go new file mode 100644 index 0000000..b3231c8 --- /dev/null +++ b/repo/manage.go @@ -0,0 +1,39 @@ +package repo + +import ( + "sync" + + "joylink.club/rtsssimulation/repo/dto" +) + +type repoManager struct { + repoMap map[string]Repo + lock sync.Mutex +} + +var defaultManager = &repoManager{ + repoMap: make(map[string]Repo), +} + +// 获取或构建模型仓库 +func GetOrBuildRepo(id string, dc func(errRecord *ErrorRecord) *dto.Repo) (Repo, *ErrorRecord) { + manager := defaultManager + manager.lock.Lock() + defer manager.lock.Unlock() + r, ok := manager.repoMap[id] + errRecord := NewErrorRecord() + if !ok { + // 所需protobuf数据转换 + msgs := dc(errRecord) + // 数据转换出错直接返回 + if errRecord.HasError() { + return nil, errRecord + } + // 构建模型Repo + r, errRecord = BuildFrom(msgs) + if r != nil { + manager.repoMap[id] = r + } + } + return r, errRecord +} diff --git a/repo/model/api.go b/repo/model/api.go new file mode 100644 index 0000000..d564aaa --- /dev/null +++ b/repo/model/api.go @@ -0,0 +1,57 @@ +package model + +type ModelType string + +const ( + // 车站 + MT_Station ModelType = "Station" + // 站台 + MT_Stand ModelType = "Stand" + // 屏蔽门 + MT_PSD ModelType = "PSD" + // Link + MT_Link ModelType = "Link" + // 区段 + MT_Section ModelType = "Section" + // 道岔 + MT_Turnout ModelType = "Turnout" + // 信号机 + MT_Signal ModelType = "Signal" + // 应答器 + MT_Balise ModelType = "Balise" +) + +type Uid interface { + Id() string + // 设备原始编号 + Code() string +} + +// 模型接口 +type Model interface { + // Unique id,唯一id + Uid() Uid + // 模型类型 + Type() ModelType +} + +// Link +type Link interface { + Model +} + +// 物理区段(实际检测区段,一般区段两端点,道岔区段为3-4个端点) +type PhysicalSection interface { + Model + Code() string +} + +// 道岔 +type Turnout interface { + Model +} + +// 关联的端口关系 +type AssociatedPort interface { + Port() string +} diff --git a/repo/model/impl/link.go b/repo/model/impl/link.go new file mode 100644 index 0000000..872d6fa --- /dev/null +++ b/repo/model/impl/link.go @@ -0,0 +1,52 @@ +package impl + +import ( + "fmt" + "sync/atomic" + + "joylink.club/rtsssimulation/repo/dto" + "joylink.club/rtsssimulation/repo/model" +) + +// link生成uid基础值 +var link_uid_base = atomic.Uint32{} + +// 轨道链路 +type Link struct { + uid string + + apTurnout *Turnout // A端关联道岔,可能为nil + bpTurnout *Turnout // B端关联道岔,可能为nil + apGlb dto.GLB // A端公里标 + bpGlb dto.GLB // B端公里标 + length int64 // 长度 + models []model.Model // 关联的模型,从A到B排序 + physicalSections []*PhysicalSection // 关联的物理区段(包含道岔物理区段),从A到B排序 +} + +func NewLink() *Link { + return &Link{ + uid: fmt.Sprintf("%d", link_uid_base.Add(1)), + } +} + +func (l *Link) Uid() string { + return l.uid +} + +func (l *Link) Type() model.ModelType { + return model.MT_Link +} + +// link偏移 +type LinkOffset struct { + link *Link + offset int64 +} + +// link偏移范围 +type LinkRange struct { + link *Link + start int64 + end int64 +} diff --git a/repo/model/impl/physical_section.go b/repo/model/impl/physical_section.go new file mode 100644 index 0000000..cbc2d97 --- /dev/null +++ b/repo/model/impl/physical_section.go @@ -0,0 +1,33 @@ +package impl + +import ( + "joylink.club/rtsssimulation/repo/model" +) + +type PhysicalSection struct { + uid string + code string + + apSection model.Model // A端关联区段/道岔 + bpSection model.Model // B端关联区段/道岔 + linkRanges []*LinkRange // 所属link范围(道岔物理区段为多个) +} + +func NewPhysicalSection(uid string, code string) *PhysicalSection { + return &PhysicalSection{ + uid: uid, + code: code, + } +} + +func (s *PhysicalSection) Uid() string { + return s.uid +} + +func (s *PhysicalSection) Type() model.ModelType { + return model.MT_Section +} + +func (s *PhysicalSection) Code() string { + return s.code +} diff --git a/repo/model/impl/section_check_device.go b/repo/model/impl/section_check_device.go new file mode 100644 index 0000000..26129f6 --- /dev/null +++ b/repo/model/impl/section_check_device.go @@ -0,0 +1,6 @@ +package impl + +// 区段分段设备(计轴/绝缘节) +type SectionDividedDevice struct { + uid string +} diff --git a/repo/model/impl/turnout.go b/repo/model/impl/turnout.go new file mode 100644 index 0000000..d2d41b1 --- /dev/null +++ b/repo/model/impl/turnout.go @@ -0,0 +1,29 @@ +package impl + +import "joylink.club/rtsssimulation/repo/model" + +type Turnout struct { + uid string + code string + + // A端关联区段/道岔 + apSection model.Model + // B端关联区段/道岔 + bpSection model.Model + // C端关联区段/道岔 + cpSection model.Model + + // A方向Link + adLink *Link + // B方向Link + bdLink *Link + // C方向Link + cdLink *Link +} + +func NewTurnout(uid string, code string) *Turnout { + return &Turnout{ + uid: uid, + code: code, + } +} diff --git a/repo/repo.go b/repo/repo.go new file mode 100644 index 0000000..2658d76 --- /dev/null +++ b/repo/repo.go @@ -0,0 +1,44 @@ +package repo + +import ( + "joylink.club/rtsssimulation/repo/dto" + "joylink.club/rtsssimulation/repo/model" + "joylink.club/rtsssimulation/repo/model/impl" +) + +type repo struct { + id string + idMapping *IdMapping // id映射 + modelMap map[string]model.Model // 模型map,key为uid + linkMap map[string]*impl.Link // 链路map,key为uid + physicalSectionMap map[string]*impl.PhysicalSection // 物理区段map,key为uid + turnoutMap map[string]*impl.Turnout // 道岔map,key为uid +} + +func BuildFrom(msgs *dto.Repo) (Repo, *ErrorRecord) { + errRecord := NewErrorRecord() + idMapping := BuildIdMapping(msgs, errRecord) + if errRecord.HasError() { + return nil, errRecord + } + repo := &repo{ + id: msgs.Id, + idMapping: idMapping, + modelMap: make(map[string]model.Model, 1024), + linkMap: make(map[string]*impl.Link, 256), + physicalSectionMap: make(map[string]*impl.PhysicalSection, 256), + turnoutMap: make(map[string]*impl.Turnout, 128), + } + + return repo, errRecord +} + +// 模型仓库id +func (r *repo) Id() string { + return r.id +} + +// 通过uid查询模型对象 +func (r *repo) FindByUid(uid string) model.Model { + return nil +}