增加断相保护器模型及相关构建逻辑

This commit is contained in:
joylink_zhangsai 2023-09-28 14:10:15 +08:00
parent 01d9b274dc
commit d36ba6fc7d
8 changed files with 533 additions and 348 deletions

View File

@ -29,7 +29,6 @@ func main() {
goOutDir = "../" goOutDir = "../"
} }
} }
} }
// //
protoFiles := getProtoFiles() protoFiles := getProtoFiles()

View File

@ -16,6 +16,7 @@ message Repository {
repeated SectionalCurvature sectionalCurvatures = 9; repeated SectionalCurvature sectionalCurvatures = 9;
repeated KilometerConvert kilometerConverts = 10; repeated KilometerConvert kilometerConverts = 10;
repeated Relay relays = 11; repeated Relay relays = 11;
repeated PhaseFailureProtector phaseFailureProtectors = 12;
} }
// //
@ -47,7 +48,7 @@ message Turnout {
DevicePort bDevicePort = 4; DevicePort bDevicePort = 4;
DevicePort cDevicePort = 5; DevicePort cDevicePort = 5;
SwitchMachineType switchMachineType = 6; SwitchMachineType switchMachineType = 6;
repeated RelayGroup relayGroups = 7; // repeated ElectronicComponentGroup electronicComponentGroups = 7; //
} }
// //
@ -56,7 +57,7 @@ message Signal {
Kilometer km = 2; Kilometer km = 2;
string sectionId = 3; // string sectionId = 3; //
DevicePort turnoutPort = 4; // DevicePort turnoutPort = 4; //
repeated RelayGroup relayGroups = 7; // repeated ElectronicComponentGroup electronicComponentGroups = 7; //
} }
// //
@ -100,6 +101,7 @@ enum DeviceType {
DeviceType_Link = 8; DeviceType_Link = 8;
DeviceType_LinkNode = 9; DeviceType_LinkNode = 9;
DeviceType_Relay = 10; DeviceType_Relay = 10;
DeviceType_PhaseFailureProtector = 11;
} }
enum Port { enum Port {
@ -140,14 +142,28 @@ enum CheckPointType{
message Relay { message Relay {
enum Model { enum Model {
Unknown = 0; Unknown = 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 = 8;
} }
string id = 1; string id = 1;
string code = 2; string code = 2;
string model = 3; Model model = 3;
} }
// //
message RelayGroup { message PhaseFailureProtector {
string id = 1;
string code = 2;
}
//
message ElectronicComponentGroup {
string code = 1; // string code = 1; //
repeated string relayIds = 2; //id repeated string componentIds = 2; //id
} }

View File

@ -0,0 +1,59 @@
package repository
import "joylink.club/rtsssimulation/repository/model/proto"
// Relay 继电器
type Relay struct {
Identity
code string
model proto.Relay_Model
}
func newRelay(id string, code string, model proto.Relay_Model) *Relay {
return &Relay{
Identity: identity{
id: id,
deviceType: proto.DeviceType_DeviceType_Relay,
},
code: code,
model: model,
}
}
func (r *Relay) Code() string {
return r.code
}
func (r *Relay) Model() proto.Relay_Model {
return r.model
}
// ElectronicComponentGroup 电子元件组合
type ElectronicComponentGroup struct {
code string
components []Identity
}
func (r *ElectronicComponentGroup) Code() string {
return r.code
}
func (r *ElectronicComponentGroup) Components() []Identity {
return r.components
}
// PhaseFailureProtector 断相保护器
type PhaseFailureProtector struct {
Identity
code string
}
func newPhaseFailureProtector(id string, code string) *PhaseFailureProtector {
return &PhaseFailureProtector{
Identity: identity{
id: id,
deviceType: proto.DeviceType_DeviceType_PhaseFailureProtector,
},
code: code,
}
}

View File

@ -23,17 +23,18 @@ const (
type DeviceType int32 type DeviceType int32
const ( const (
DeviceType_DeviceType_Unknown DeviceType = 0 DeviceType_DeviceType_Unknown DeviceType = 0
DeviceType_DeviceType_PhysicalSection DeviceType = 1 DeviceType_DeviceType_PhysicalSection DeviceType = 1
DeviceType_DeviceType_CheckPoint DeviceType = 2 DeviceType_DeviceType_CheckPoint DeviceType = 2
DeviceType_DeviceType_Turnout DeviceType = 3 DeviceType_DeviceType_Turnout DeviceType = 3
DeviceType_DeviceType_Signal DeviceType = 4 DeviceType_DeviceType_Signal DeviceType = 4
DeviceType_DeviceType_Transponder DeviceType = 5 DeviceType_DeviceType_Transponder DeviceType = 5
DeviceType_DeviceType_Slope DeviceType = 6 DeviceType_DeviceType_Slope DeviceType = 6
DeviceType_DeviceType_SectionalCurvature DeviceType = 7 DeviceType_DeviceType_SectionalCurvature DeviceType = 7
DeviceType_DeviceType_Link DeviceType = 8 DeviceType_DeviceType_Link DeviceType = 8
DeviceType_DeviceType_LinkNode DeviceType = 9 DeviceType_DeviceType_LinkNode DeviceType = 9
DeviceType_DeviceType_Relay DeviceType = 10 DeviceType_DeviceType_Relay DeviceType = 10
DeviceType_DeviceType_PhaseFailureProtector DeviceType = 11
) )
// Enum value maps for DeviceType. // Enum value maps for DeviceType.
@ -50,19 +51,21 @@ var (
8: "DeviceType_Link", 8: "DeviceType_Link",
9: "DeviceType_LinkNode", 9: "DeviceType_LinkNode",
10: "DeviceType_Relay", 10: "DeviceType_Relay",
11: "DeviceType_PhaseFailureProtector",
} }
DeviceType_value = map[string]int32{ DeviceType_value = map[string]int32{
"DeviceType_Unknown": 0, "DeviceType_Unknown": 0,
"DeviceType_PhysicalSection": 1, "DeviceType_PhysicalSection": 1,
"DeviceType_CheckPoint": 2, "DeviceType_CheckPoint": 2,
"DeviceType_Turnout": 3, "DeviceType_Turnout": 3,
"DeviceType_Signal": 4, "DeviceType_Signal": 4,
"DeviceType_Transponder": 5, "DeviceType_Transponder": 5,
"DeviceType_Slope": 6, "DeviceType_Slope": 6,
"DeviceType_SectionalCurvature": 7, "DeviceType_SectionalCurvature": 7,
"DeviceType_Link": 8, "DeviceType_Link": 8,
"DeviceType_LinkNode": 9, "DeviceType_LinkNode": 9,
"DeviceType_Relay": 10, "DeviceType_Relay": 10,
"DeviceType_PhaseFailureProtector": 11,
} }
) )
@ -294,16 +297,40 @@ func (Turnout_SwitchMachineType) EnumDescriptor() ([]byte, []int) {
type Relay_Model int32 type Relay_Model int32
const ( const (
Relay_Unknown Relay_Model = 0 Relay_Unknown Relay_Model = 0
Relay_JPXC_1000 Relay_Model = 1
Relay_JPXC_1700 Relay_Model = 2
Relay_JWJXC_480 Relay_Model = 3
Relay_JWJXC_H125_80 Relay_Model = 4
Relay_JWXC_1700 Relay_Model = 5
Relay_JWXC_H340 Relay_Model = 6
Relay_JYJXC_160_260 Relay_Model = 7
Relay_JZXC_H18 Relay_Model = 8
) )
// Enum value maps for Relay_Model. // Enum value maps for Relay_Model.
var ( var (
Relay_Model_name = map[int32]string{ Relay_Model_name = map[int32]string{
0: "Unknown", 0: "Unknown",
1: "JPXC_1000",
2: "JPXC_1700",
3: "JWJXC_480",
4: "JWJXC_H125_80",
5: "JWXC_1700",
6: "JWXC_H340",
7: "JYJXC_160_260",
8: "JZXC_H18",
} }
Relay_Model_value = map[string]int32{ Relay_Model_value = map[string]int32{
"Unknown": 0, "Unknown": 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": 8,
} }
) )
@ -339,17 +366,18 @@ type Repository struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
PhysicalSections []*PhysicalSection `protobuf:"bytes,3,rep,name=physicalSections,proto3" json:"physicalSections,omitempty"` PhysicalSections []*PhysicalSection `protobuf:"bytes,3,rep,name=physicalSections,proto3" json:"physicalSections,omitempty"`
CheckPoints []*CheckPoint `protobuf:"bytes,4,rep,name=checkPoints,proto3" json:"checkPoints,omitempty"` CheckPoints []*CheckPoint `protobuf:"bytes,4,rep,name=checkPoints,proto3" json:"checkPoints,omitempty"`
Turnouts []*Turnout `protobuf:"bytes,5,rep,name=turnouts,proto3" json:"turnouts,omitempty"` Turnouts []*Turnout `protobuf:"bytes,5,rep,name=turnouts,proto3" json:"turnouts,omitempty"`
Signals []*Signal `protobuf:"bytes,6,rep,name=signals,proto3" json:"signals,omitempty"` Signals []*Signal `protobuf:"bytes,6,rep,name=signals,proto3" json:"signals,omitempty"`
Transponders []*Transponder `protobuf:"bytes,7,rep,name=transponders,proto3" json:"transponders,omitempty"` Transponders []*Transponder `protobuf:"bytes,7,rep,name=transponders,proto3" json:"transponders,omitempty"`
Slopes []*Slope `protobuf:"bytes,8,rep,name=slopes,proto3" json:"slopes,omitempty"` Slopes []*Slope `protobuf:"bytes,8,rep,name=slopes,proto3" json:"slopes,omitempty"`
SectionalCurvatures []*SectionalCurvature `protobuf:"bytes,9,rep,name=sectionalCurvatures,proto3" json:"sectionalCurvatures,omitempty"` SectionalCurvatures []*SectionalCurvature `protobuf:"bytes,9,rep,name=sectionalCurvatures,proto3" json:"sectionalCurvatures,omitempty"`
KilometerConverts []*KilometerConvert `protobuf:"bytes,10,rep,name=kilometerConverts,proto3" json:"kilometerConverts,omitempty"` KilometerConverts []*KilometerConvert `protobuf:"bytes,10,rep,name=kilometerConverts,proto3" json:"kilometerConverts,omitempty"`
Relays []*Relay `protobuf:"bytes,11,rep,name=relays,proto3" json:"relays,omitempty"` Relays []*Relay `protobuf:"bytes,11,rep,name=relays,proto3" json:"relays,omitempty"`
PhaseFailureProtectors []*PhaseFailureProtector `protobuf:"bytes,12,rep,name=phaseFailureProtectors,proto3" json:"phaseFailureProtectors,omitempty"`
} }
func (x *Repository) Reset() { func (x *Repository) Reset() {
@ -461,6 +489,13 @@ func (x *Repository) GetRelays() []*Relay {
return nil return nil
} }
func (x *Repository) GetPhaseFailureProtectors() []*PhaseFailureProtector {
if x != nil {
return x.PhaseFailureProtectors
}
return nil
}
// 物理区段 // 物理区段
type PhysicalSection struct { type PhysicalSection struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -611,13 +646,13 @@ type Turnout struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Km *Kilometer `protobuf:"bytes,2,opt,name=km,proto3" json:"km,omitempty"` Km *Kilometer `protobuf:"bytes,2,opt,name=km,proto3" json:"km,omitempty"`
ADevicePort *DevicePort `protobuf:"bytes,3,opt,name=aDevicePort,proto3" json:"aDevicePort,omitempty"` ADevicePort *DevicePort `protobuf:"bytes,3,opt,name=aDevicePort,proto3" json:"aDevicePort,omitempty"`
BDevicePort *DevicePort `protobuf:"bytes,4,opt,name=bDevicePort,proto3" json:"bDevicePort,omitempty"` BDevicePort *DevicePort `protobuf:"bytes,4,opt,name=bDevicePort,proto3" json:"bDevicePort,omitempty"`
CDevicePort *DevicePort `protobuf:"bytes,5,opt,name=cDevicePort,proto3" json:"cDevicePort,omitempty"` CDevicePort *DevicePort `protobuf:"bytes,5,opt,name=cDevicePort,proto3" json:"cDevicePort,omitempty"`
SwitchMachineType Turnout_SwitchMachineType `protobuf:"varint,6,opt,name=switchMachineType,proto3,enum=model.Turnout_SwitchMachineType" json:"switchMachineType,omitempty"` SwitchMachineType Turnout_SwitchMachineType `protobuf:"varint,6,opt,name=switchMachineType,proto3,enum=model.Turnout_SwitchMachineType" json:"switchMachineType,omitempty"`
RelayGroups []*RelayGroup `protobuf:"bytes,7,rep,name=relayGroups,proto3" json:"relayGroups,omitempty"` //关联的继电器组 ElectronicComponentGroups []*ElectronicComponentGroup `protobuf:"bytes,7,rep,name=electronicComponentGroups,proto3" json:"electronicComponentGroups,omitempty"` //关联的电子元件组合
} }
func (x *Turnout) Reset() { func (x *Turnout) Reset() {
@ -694,9 +729,9 @@ func (x *Turnout) GetSwitchMachineType() Turnout_SwitchMachineType {
return Turnout_Unknown return Turnout_Unknown
} }
func (x *Turnout) GetRelayGroups() []*RelayGroup { func (x *Turnout) GetElectronicComponentGroups() []*ElectronicComponentGroup {
if x != nil { if x != nil {
return x.RelayGroups return x.ElectronicComponentGroups
} }
return nil return nil
} }
@ -707,11 +742,11 @@ type Signal struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Km *Kilometer `protobuf:"bytes,2,opt,name=km,proto3" json:"km,omitempty"` Km *Kilometer `protobuf:"bytes,2,opt,name=km,proto3" json:"km,omitempty"`
SectionId string `protobuf:"bytes,3,opt,name=sectionId,proto3" json:"sectionId,omitempty"` //关联的区段 SectionId string `protobuf:"bytes,3,opt,name=sectionId,proto3" json:"sectionId,omitempty"` //关联的区段
TurnoutPort *DevicePort `protobuf:"bytes,4,opt,name=turnoutPort,proto3" json:"turnoutPort,omitempty"` //关联的区段端口 TurnoutPort *DevicePort `protobuf:"bytes,4,opt,name=turnoutPort,proto3" json:"turnoutPort,omitempty"` //关联的区段端口
RelayGroups []*RelayGroup `protobuf:"bytes,7,rep,name=relayGroups,proto3" json:"relayGroups,omitempty"` //关联的继电器组 ElectronicComponentGroups []*ElectronicComponentGroup `protobuf:"bytes,7,rep,name=electronicComponentGroups,proto3" json:"electronicComponentGroups,omitempty"` //关联的继电器组
} }
func (x *Signal) Reset() { func (x *Signal) Reset() {
@ -774,9 +809,9 @@ func (x *Signal) GetTurnoutPort() *DevicePort {
return nil return nil
} }
func (x *Signal) GetRelayGroups() []*RelayGroup { func (x *Signal) GetElectronicComponentGroups() []*ElectronicComponentGroup {
if x != nil { if x != nil {
return x.RelayGroups return x.ElectronicComponentGroups
} }
return nil return nil
} }
@ -1179,9 +1214,9 @@ type Relay struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` Model Relay_Model `protobuf:"varint,3,opt,name=model,proto3,enum=model.Relay_Model" json:"model,omitempty"`
} }
func (x *Relay) Reset() { func (x *Relay) Reset() {
@ -1230,25 +1265,25 @@ func (x *Relay) GetCode() string {
return "" return ""
} }
func (x *Relay) GetModel() string { func (x *Relay) GetModel() Relay_Model {
if x != nil { if x != nil {
return x.Model return x.Model
} }
return "" return Relay_Unknown
} }
// 继电器组合 // 断相保护器
type RelayGroup struct { type PhaseFailureProtector struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` //组合的编号(名称) Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
RelayIds []string `protobuf:"bytes,2,rep,name=relayIds,proto3" json:"relayIds,omitempty"` //组合内继电器的id Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
} }
func (x *RelayGroup) Reset() { func (x *PhaseFailureProtector) Reset() {
*x = RelayGroup{} *x = PhaseFailureProtector{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[12] mi := &file_model_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -1256,13 +1291,13 @@ func (x *RelayGroup) Reset() {
} }
} }
func (x *RelayGroup) String() string { func (x *PhaseFailureProtector) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*RelayGroup) ProtoMessage() {} func (*PhaseFailureProtector) ProtoMessage() {}
func (x *RelayGroup) ProtoReflect() protoreflect.Message { func (x *PhaseFailureProtector) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[12] mi := &file_model_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -1274,21 +1309,77 @@ func (x *RelayGroup) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use RelayGroup.ProtoReflect.Descriptor instead. // Deprecated: Use PhaseFailureProtector.ProtoReflect.Descriptor instead.
func (*RelayGroup) Descriptor() ([]byte, []int) { func (*PhaseFailureProtector) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{12} return file_model_proto_rawDescGZIP(), []int{12}
} }
func (x *RelayGroup) GetCode() string { func (x *PhaseFailureProtector) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *PhaseFailureProtector) GetCode() string {
if x != nil { if x != nil {
return x.Code return x.Code
} }
return "" return ""
} }
func (x *RelayGroup) GetRelayIds() []string { // 电子元件组合
type ElectronicComponentGroup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` //组合的编号(名称)
ComponentIds []string `protobuf:"bytes,2,rep,name=componentIds,proto3" json:"componentIds,omitempty"` //组合内电子元件的id
}
func (x *ElectronicComponentGroup) Reset() {
*x = ElectronicComponentGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ElectronicComponentGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ElectronicComponentGroup) ProtoMessage() {}
func (x *ElectronicComponentGroup) ProtoReflect() protoreflect.Message {
mi := &file_model_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 ElectronicComponentGroup.ProtoReflect.Descriptor instead.
func (*ElectronicComponentGroup) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{13}
}
func (x *ElectronicComponentGroup) GetCode() string {
if x != nil { if x != nil {
return x.RelayIds return x.Code
}
return ""
}
func (x *ElectronicComponentGroup) GetComponentIds() []string {
if x != nil {
return x.ComponentIds
} }
return nil return nil
} }
@ -1297,7 +1388,7 @@ var File_model_proto protoreflect.FileDescriptor
var file_model_proto_rawDesc = []byte{ var file_model_proto_rawDesc = []byte{
0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x22, 0x9c, 0x04, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0xf2, 0x04, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a,
@ -1331,54 +1422,62 @@ var file_model_proto_rawDesc = []byte{
0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x73, 0x12, 0x24, 0x0a,
0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e,
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x06, 0x72, 0x65, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x06, 0x72, 0x65, 0x6c,
0x61, 0x79, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x12, 0x54, 0x0a, 0x16, 0x70, 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c,
0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0c, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x50, 0x68, 0x61, 0x73,
0x75, 0x74, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x75, 0x72, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f,
0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x73, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x44, 0x65, 0x76, 0x69, 0x72, 0x52, 0x16, 0x70, 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50,
0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x50, 0x68,
0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a,
0x0b, 0x61, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a,
0x62, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x09, 0x52, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x73, 0x12, 0x33, 0x0a,
0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x62, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x0b, 0x61, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01,
0x74, 0x22, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x02,
0x6b, 0x6d, 0x12, 0x29, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x15, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f,
0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a,
0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63,
0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x61, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f,
0x74, 0x73, 0x22, 0xa3, 0x03, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x12, 0x0e, 0x72, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x62, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e,
0x0a, 0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x62, 0x44, 0x65, 0x76,
0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x02, 0x6b, 0x6d, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63,
0x12, 0x33, 0x0a, 0x0b, 0x61, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20, 0x01,
0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x61, 0x44, 0x65, 0x76, 0x69, 0x63, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d,
0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x62, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x65, 0x74, 0x65, 0x72, 0x52, 0x02, 0x6b, 0x6d, 0x12, 0x29, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43,
0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x62, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x44, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72,
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x64, 0x65, 0x76,
0x72, 0x74, 0x52, 0x0b, 0x63, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x22, 0xcd, 0x03, 0x0a, 0x07, 0x54, 0x75, 0x72,
0x4e, 0x0a, 0x11, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x6e, 0x6f, 0x75, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x6f, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x65, 0x6c, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74,
0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x11, 0x73, 0x77, 0x65, 0x72, 0x52, 0x02, 0x6b, 0x6d, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x44, 0x65, 0x76, 0x69, 0x63,
0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f,
0x33, 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x07, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x62,
0x61, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x47, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
0x6f, 0x72, 0x74, 0x52, 0x0b, 0x62, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74,
0x12, 0x33, 0x0a, 0x0b, 0x63, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x63, 0x44, 0x65, 0x76, 0x69, 0x63,
0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d,
0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x20, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74,
0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79,
0x70, 0x65, 0x52, 0x11, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e,
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5d, 0x0a, 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f,
0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f,
0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74,
0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72,
0x6f, 0x75, 0x70, 0x73, 0x22, 0x42, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x42, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61,
0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b,
0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, 0x5f, 0x53, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, 0x5f, 0x53,
0x69, 0x6e, 0x67, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, 0x5f, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, 0x5f,
0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x22, 0xc2, 0x01, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x22, 0xec, 0x01, 0x0a, 0x06, 0x53, 0x69, 0x67,
0x6e, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x6e, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65,
@ -1387,94 +1486,113 @@ var file_model_proto_rawDesc = []byte{
0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f,
0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x74, 0x75, 0x72, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x74, 0x75, 0x72,
0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x5d, 0x0a, 0x19, 0x65, 0x6c, 0x65, 0x63,
0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47,
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6f,
0x52, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x92, 0x01, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f,
0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x19, 0x65, 0x6c,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e,
0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e,
0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x02, 0x6b, 0x6d, 0x12, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20,
0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f,
0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x02, 0x6b, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63,
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65,
0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f,
0x72, 0x74, 0x22, 0x53, 0x0a, 0x05, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52,
0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x53, 0x0a, 0x05,
0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x73, 0x12, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x16, 0x0a, 0x06, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03,
0x06, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x22, 0x60, 0x0a, 0x12, 0x53, 0x65, 0x63, 0x74, 0x69, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d,
0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x0e, 0x0a, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x67,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x65, 0x67, 0x72, 0x65,
0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x60, 0x0a, 0x12, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75,
0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02,
0x05, 0x52, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c,
0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72,
0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x61, 0x64,
0x65, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x69, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x31, 0x0a,
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x50, 0x6f, 0x72, 0x0e, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x74, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x7d, 0x0a, 0x09, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x12, 0x1f, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b,
0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x72,
0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x74, 0x22, 0x7d, 0x0a, 0x09, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14,
0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2e, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61,
0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10,
0x6c, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x10, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x69, 0x72, 0x65,
0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x41, 0x12, 0x22, 0x22, 0x78, 0x0a, 0x10, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e,
0x0a, 0x03, 0x6b, 0x6d, 0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x72, 0x74, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28,
0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65,
0x6d, 0x42, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x18, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x41, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x42, 0x18,
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69,
0x22, 0x57, 0x0a, 0x05, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x42, 0x12, 0x1c, 0x0a, 0x09,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x05, 0x52,
0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x64, 0x65, 0x6c, 0x22, 0x14, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x22, 0x3c, 0x0a, 0x0a, 0x52, 0x65, 0x6c, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65,
0x61, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x61, 0x79, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x22, 0x93, 0x01, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x0b, 0x0a, 0x07,
0x65, 0x6c, 0x61, 0x79, 0x49, 0x64, 0x73, 0x2a, 0xa7, 0x02, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, 0x58,
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x5f, 0x31, 0x30, 0x30, 0x30, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, 0x58, 0x43,
0x54, 0x79, 0x70, 0x65, 0x5f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x1e, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x4a, 0x58, 0x43,
0x0a, 0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x79, 0x5f, 0x34, 0x38, 0x30, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x57, 0x4a, 0x58, 0x43, 0x5f,
0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x19, 0x48, 0x31, 0x32, 0x35, 0x5f, 0x38, 0x30, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x58,
0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x68, 0x65, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x58, 0x43,
0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x5f, 0x48, 0x33, 0x34, 0x30, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x59, 0x4a, 0x58, 0x43,
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x5f, 0x31, 0x36, 0x30, 0x5f, 0x32, 0x36, 0x30, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x4a, 0x5a,
0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x58, 0x43, 0x5f, 0x48, 0x31, 0x38, 0x10, 0x08, 0x22, 0x3b, 0x0a, 0x15, 0x50, 0x68, 0x61, 0x73,
0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x65, 0x76, 0x69, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f,
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x65, 0x72, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x70, 0x65, 0x5f, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x10, 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x44, 0x65, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x52, 0x0a, 0x18, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f,
0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75,
0x61, 0x6c, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0f, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65,
0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d,
0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x2a, 0xcd, 0x02, 0x0a, 0x0a, 0x44, 0x65,
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x10, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69,
0x0a, 0x2a, 0x25, 0x0a, 0x04, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00,
0x65, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50,
0x02, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x03, 0x2a, 0x20, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x00, 0x12, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43,
0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x2a, 0x43, 0x0a, 0x0e, 0x43, 0x68, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x44,
0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75,
0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x78, 0x74, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x65, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x65,
0x6e, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x42, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6e, 0x64, 0x65, 0x72, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x10, 0x06, 0x12, 0x21, 0x0a, 0x1d,
0x74, 0x6f, 0x33, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x07, 0x12,
0x13, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69,
0x6e, 0x6b, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79,
0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x10, 0x09, 0x12, 0x14, 0x0a,
0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x52, 0x65, 0x6c, 0x61,
0x79, 0x10, 0x0a, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
0x65, 0x5f, 0x50, 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72,
0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x10, 0x0b, 0x2a, 0x25, 0x0a, 0x04, 0x50, 0x6f, 0x72,
0x74, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x41,
0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x03,
0x2a, 0x20, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a,
0x04, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54,
0x10, 0x01, 0x2a, 0x43, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74,
0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79,
0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65,
0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64,
0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x72, 0x65, 0x70,
0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -1490,27 +1608,28 @@ func file_model_proto_rawDescGZIP() []byte {
} }
var file_model_proto_enumTypes = make([]protoimpl.EnumInfo, 6) var file_model_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_model_proto_goTypes = []interface{}{ var file_model_proto_goTypes = []interface{}{
(DeviceType)(0), // 0: model.DeviceType (DeviceType)(0), // 0: model.DeviceType
(Port)(0), // 1: model.Port (Port)(0), // 1: model.Port
(Direction)(0), // 2: model.Direction (Direction)(0), // 2: model.Direction
(CheckPointType)(0), // 3: model.CheckPointType (CheckPointType)(0), // 3: model.CheckPointType
(Turnout_SwitchMachineType)(0), // 4: model.Turnout.SwitchMachineType (Turnout_SwitchMachineType)(0), // 4: model.Turnout.SwitchMachineType
(Relay_Model)(0), // 5: model.Relay.Model (Relay_Model)(0), // 5: model.Relay.Model
(*Repository)(nil), // 6: model.Repository (*Repository)(nil), // 6: model.Repository
(*PhysicalSection)(nil), // 7: model.PhysicalSection (*PhysicalSection)(nil), // 7: model.PhysicalSection
(*CheckPoint)(nil), // 8: model.CheckPoint (*CheckPoint)(nil), // 8: model.CheckPoint
(*Turnout)(nil), // 9: model.Turnout (*Turnout)(nil), // 9: model.Turnout
(*Signal)(nil), // 10: model.Signal (*Signal)(nil), // 10: model.Signal
(*Transponder)(nil), // 11: model.Transponder (*Transponder)(nil), // 11: model.Transponder
(*Slope)(nil), // 12: model.Slope (*Slope)(nil), // 12: model.Slope
(*SectionalCurvature)(nil), // 13: model.SectionalCurvature (*SectionalCurvature)(nil), // 13: model.SectionalCurvature
(*DevicePort)(nil), // 14: model.DevicePort (*DevicePort)(nil), // 14: model.DevicePort
(*Kilometer)(nil), // 15: model.Kilometer (*Kilometer)(nil), // 15: model.Kilometer
(*KilometerConvert)(nil), // 16: model.KilometerConvert (*KilometerConvert)(nil), // 16: model.KilometerConvert
(*Relay)(nil), // 17: model.Relay (*Relay)(nil), // 17: model.Relay
(*RelayGroup)(nil), // 18: model.RelayGroup (*PhaseFailureProtector)(nil), // 18: model.PhaseFailureProtector
(*ElectronicComponentGroup)(nil), // 19: model.ElectronicComponentGroup
} }
var file_model_proto_depIdxs = []int32{ var file_model_proto_depIdxs = []int32{
7, // 0: model.Repository.physicalSections:type_name -> model.PhysicalSection 7, // 0: model.Repository.physicalSections:type_name -> model.PhysicalSection
@ -1522,34 +1641,36 @@ var file_model_proto_depIdxs = []int32{
13, // 6: model.Repository.sectionalCurvatures:type_name -> model.SectionalCurvature 13, // 6: model.Repository.sectionalCurvatures:type_name -> model.SectionalCurvature
16, // 7: model.Repository.kilometerConverts:type_name -> model.KilometerConvert 16, // 7: model.Repository.kilometerConverts:type_name -> model.KilometerConvert
17, // 8: model.Repository.relays:type_name -> model.Relay 17, // 8: model.Repository.relays:type_name -> model.Relay
14, // 9: model.PhysicalSection.aDevicePort:type_name -> model.DevicePort 18, // 9: model.Repository.phaseFailureProtectors:type_name -> model.PhaseFailureProtector
14, // 10: model.PhysicalSection.bDevicePort:type_name -> model.DevicePort 14, // 10: model.PhysicalSection.aDevicePort:type_name -> model.DevicePort
15, // 11: model.CheckPoint.km:type_name -> model.Kilometer 14, // 11: model.PhysicalSection.bDevicePort:type_name -> model.DevicePort
3, // 12: model.CheckPoint.type:type_name -> model.CheckPointType 15, // 12: model.CheckPoint.km:type_name -> model.Kilometer
14, // 13: model.CheckPoint.devicePorts:type_name -> model.DevicePort 3, // 13: model.CheckPoint.type:type_name -> model.CheckPointType
15, // 14: model.Turnout.km:type_name -> model.Kilometer 14, // 14: model.CheckPoint.devicePorts:type_name -> model.DevicePort
14, // 15: model.Turnout.aDevicePort:type_name -> model.DevicePort 15, // 15: model.Turnout.km:type_name -> model.Kilometer
14, // 16: model.Turnout.bDevicePort:type_name -> model.DevicePort 14, // 16: model.Turnout.aDevicePort:type_name -> model.DevicePort
14, // 17: model.Turnout.cDevicePort:type_name -> model.DevicePort 14, // 17: model.Turnout.bDevicePort:type_name -> model.DevicePort
4, // 18: model.Turnout.switchMachineType:type_name -> model.Turnout.SwitchMachineType 14, // 18: model.Turnout.cDevicePort:type_name -> model.DevicePort
18, // 19: model.Turnout.relayGroups:type_name -> model.RelayGroup 4, // 19: model.Turnout.switchMachineType:type_name -> model.Turnout.SwitchMachineType
15, // 20: model.Signal.km:type_name -> model.Kilometer 19, // 20: model.Turnout.electronicComponentGroups:type_name -> model.ElectronicComponentGroup
14, // 21: model.Signal.turnoutPort:type_name -> model.DevicePort 15, // 21: model.Signal.km:type_name -> model.Kilometer
18, // 22: model.Signal.relayGroups:type_name -> model.RelayGroup 14, // 22: model.Signal.turnoutPort:type_name -> model.DevicePort
15, // 23: model.Transponder.km:type_name -> model.Kilometer 19, // 23: model.Signal.electronicComponentGroups:type_name -> model.ElectronicComponentGroup
14, // 24: model.Transponder.turnoutPort:type_name -> model.DevicePort 15, // 24: model.Transponder.km:type_name -> model.Kilometer
15, // 25: model.Slope.kms:type_name -> model.Kilometer 14, // 25: model.Transponder.turnoutPort:type_name -> model.DevicePort
15, // 26: model.SectionalCurvature.kms:type_name -> model.Kilometer 15, // 26: model.Slope.kms:type_name -> model.Kilometer
0, // 27: model.DevicePort.deviceType:type_name -> model.DeviceType 15, // 27: model.SectionalCurvature.kms:type_name -> model.Kilometer
1, // 28: model.DevicePort.port:type_name -> model.Port 0, // 28: model.DevicePort.deviceType:type_name -> model.DeviceType
2, // 29: model.Kilometer.direction:type_name -> model.Direction 1, // 29: model.DevicePort.port:type_name -> model.Port
15, // 30: model.KilometerConvert.kmA:type_name -> model.Kilometer 2, // 30: model.Kilometer.direction:type_name -> model.Direction
15, // 31: model.KilometerConvert.kmB:type_name -> model.Kilometer 15, // 31: model.KilometerConvert.kmA:type_name -> model.Kilometer
32, // [32:32] is the sub-list for method output_type 15, // 32: model.KilometerConvert.kmB:type_name -> model.Kilometer
32, // [32:32] is the sub-list for method input_type 5, // 33: model.Relay.model:type_name -> model.Relay.Model
32, // [32:32] is the sub-list for extension type_name 34, // [34:34] is the sub-list for method output_type
32, // [32:32] is the sub-list for extension extendee 34, // [34:34] is the sub-list for method input_type
0, // [0:32] is the sub-list for field type_name 34, // [34:34] is the sub-list for extension type_name
34, // [34:34] is the sub-list for extension extendee
0, // [0:34] is the sub-list for field type_name
} }
func init() { file_model_proto_init() } func init() { file_model_proto_init() }
@ -1703,7 +1824,19 @@ func file_model_proto_init() {
} }
} }
file_model_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { file_model_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RelayGroup); i { switch v := v.(*PhaseFailureProtector); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_model_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ElectronicComponentGroup); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1721,7 +1854,7 @@ func file_model_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_model_proto_rawDesc, RawDescriptor: file_model_proto_rawDesc,
NumEnums: 6, NumEnums: 6,
NumMessages: 13, NumMessages: 14,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -1,41 +0,0 @@
package repository
import "joylink.club/rtsssimulation/repository/model/proto"
type Relay struct {
Identity
code string
model string
}
func newRelay(id string, code string, model string) *Relay {
return &Relay{
Identity: identity{
id: id,
deviceType: proto.DeviceType_DeviceType_Relay,
},
code: code,
model: model,
}
}
func (r *Relay) Code() string {
return r.code
}
func (r *Relay) Model() string {
return r.model
}
type RelayGroup struct {
code string
relays []*Relay
}
func (r *RelayGroup) Code() string {
return r.code
}
func (r *RelayGroup) Relays() []*Relay {
return r.relays
}

View File

@ -8,35 +8,37 @@ import (
) )
type Repository struct { type Repository struct {
id string id string
version string version string
physicalSectionMap map[string]*PhysicalSection physicalSectionMap map[string]*PhysicalSection
checkPointMap map[string]*CheckPoint checkPointMap map[string]*CheckPoint
turnoutMap map[string]*Turnout turnoutMap map[string]*Turnout
signalMap map[string]*Signal signalMap map[string]*Signal
responderMap map[string]*Transponder responderMap map[string]*Transponder
slopeMap map[string]*Slope slopeMap map[string]*Slope
sectionalCurvatureMap map[string]*SectionalCurvature sectionalCurvatureMap map[string]*SectionalCurvature
kilometerConvertMap map[string]*proto.KilometerConvert kilometerConvertMap map[string]*proto.KilometerConvert
relayMap map[string]*Relay relayMap map[string]*Relay
phaseFailureProtectorMap map[string]*PhaseFailureProtector
linkMap map[string]*Link linkMap map[string]*Link
} }
func newRepository(id string, version string) *Repository { func newRepository(id string, version string) *Repository {
return &Repository{ return &Repository{
id: id, id: id,
version: version, version: version,
physicalSectionMap: make(map[string]*PhysicalSection), physicalSectionMap: make(map[string]*PhysicalSection),
checkPointMap: make(map[string]*CheckPoint), checkPointMap: make(map[string]*CheckPoint),
turnoutMap: make(map[string]*Turnout), turnoutMap: make(map[string]*Turnout),
signalMap: make(map[string]*Signal), signalMap: make(map[string]*Signal),
responderMap: make(map[string]*Transponder), responderMap: make(map[string]*Transponder),
slopeMap: make(map[string]*Slope), slopeMap: make(map[string]*Slope),
sectionalCurvatureMap: make(map[string]*SectionalCurvature), sectionalCurvatureMap: make(map[string]*SectionalCurvature),
kilometerConvertMap: make(map[string]*proto.KilometerConvert), kilometerConvertMap: make(map[string]*proto.KilometerConvert),
relayMap: make(map[string]*Relay), relayMap: make(map[string]*Relay),
linkMap: make(map[string]*Link), phaseFailureProtectorMap: make(map[string]*PhaseFailureProtector),
linkMap: make(map[string]*Link),
} }
} }

View File

@ -83,6 +83,10 @@ func buildModels(source *proto.Repository, repository *Repository) {
m := newRelay(protoData.Id, protoData.Code, protoData.Model) m := newRelay(protoData.Id, protoData.Code, protoData.Model)
repository.relayMap[m.Id()] = m repository.relayMap[m.Id()] = m
} }
for _, protoData := range source.PhaseFailureProtectors {
m := newPhaseFailureProtector(protoData.Id, protoData.Code)
repository.phaseFailureProtectorMap[m.Id()] = m
}
} }
func buildModelRelationship(source *proto.Repository, repository *Repository) error { func buildModelRelationship(source *proto.Repository, repository *Repository) error {
@ -257,17 +261,18 @@ func buildTurnoutRelationShip(source *proto.Repository, repo *Repository) error
return err return err
} }
//关联继电器组 //关联继电器组
for _, group := range protoData.RelayGroups { for _, group := range protoData.ElectronicComponentGroups {
var relays []*Relay var components []Identity
for _, id := range group.RelayIds { for _, id := range group.GetComponentIds() {
relay := repo.relayMap[id] if relay := repo.relayMap[id]; relay != nil {
if relay != nil { components = append(components, relay)
relays = append(relays, relay) } else if pfp := repo.phaseFailureProtectorMap[id]; pfp != nil {
components = append(components, pfp)
} }
} }
turnout.relayGroups = append(turnout.relayGroups, &RelayGroup{ turnout.componentGroups = append(turnout.componentGroups, &ElectronicComponentGroup{
code: group.Code, code: group.Code,
relays: relays, components: components,
}) })
} }
} }

View File

@ -41,7 +41,7 @@ type Turnout struct {
bDevices []Identity bDevices []Identity
cDevices []Identity cDevices []Identity
relayGroups []*RelayGroup componentGroups []*ElectronicComponentGroup
} }
func NewTurnout(id string, km *proto.Kilometer, switchMachineType proto.Turnout_SwitchMachineType) *Turnout { func NewTurnout(id string, km *proto.Kilometer, switchMachineType proto.Turnout_SwitchMachineType) *Turnout {
@ -58,11 +58,16 @@ func NewTurnout(id string, km *proto.Kilometer, switchMachineType proto.Turnout_
// relayName-继电器在电路中的名称 // relayName-继电器在电路中的名称
// find-true找到false未找到 // find-true找到false未找到
func (t *Turnout) FindCircuitRoleById(relayId string) (relayGroup string, relayName string, find bool) { func (t *Turnout) FindCircuitRoleById(relayId string) (relayGroup string, relayName string, find bool) {
if t.relayGroups != nil { if t.componentGroups != nil {
for _, rg := range t.relayGroups { for _, rg := range t.componentGroups {
for _, relay := range rg.relays { for _, component := range rg.components {
if relayId == relay.Id() { if relayId == component.Id() {
return rg.code, relay.code, true switch component.Type() {
case proto.DeviceType_DeviceType_Relay:
return rg.code, component.(*Relay).code, true
case proto.DeviceType_DeviceType_PhaseFailureProtector:
return rg.code, component.(*PhaseFailureProtector).code, true
}
} }
} }
} }
@ -74,11 +79,18 @@ func (t *Turnout) FindCircuitRoleById(relayId string) (relayGroup string, relayN
// relayGroup-继电器组合类型 // relayGroup-继电器组合类型
// relayName-继电器在电路中的名称 // relayName-继电器在电路中的名称
func (t *Turnout) FindRelayModelByCRole(relayGroup string, relayName string) Identity { func (t *Turnout) FindRelayModelByCRole(relayGroup string, relayName string) Identity {
if t.relayGroups != nil { if t.componentGroups != nil {
for _, rg := range t.relayGroups { for _, rg := range t.componentGroups {
for _, relay := range rg.relays { for _, component := range rg.components {
if rg.code == relayGroup && relay.code == relayName { switch component.Type() {
return relay case proto.DeviceType_DeviceType_Relay:
if rg.code == relayGroup && component.(*Relay).code == relayName {
return component
}
case proto.DeviceType_DeviceType_PhaseFailureProtector:
if rg.code == relayGroup && component.(*PhaseFailureProtector).code == relayName {
return component
}
} }
} }
} }
@ -248,17 +260,17 @@ func (t *Turnout) GetTurnoutKm(port proto.Port) *proto.Kilometer {
return t.km return t.km
} }
func (t *Turnout) RelayGroups() []*RelayGroup { func (t *Turnout) RelayGroups() []*ElectronicComponentGroup {
return t.relayGroups return t.componentGroups
} }
func (t *Turnout) FindRelay(groupCode, relayCode string) *Relay { func (t *Turnout) FindRelay(groupCode, relayCode string) *Relay {
for _, group := range t.relayGroups { for _, group := range t.componentGroups {
if group.code != groupCode { if group.code != groupCode {
continue continue
} }
for _, relay := range group.relays { for _, component := range group.components {
if relay.code == relayCode { if relay, ok := component.(*Relay); ok && relay.code == relayCode {
return relay return relay
} }
} }