# Conflicts:
#	proto/src/model.proto
This commit is contained in:
weizhihong 2023-10-13 14:05:38 +08:00
commit fc3defbae3
16 changed files with 688 additions and 288 deletions

View File

@ -39,11 +39,13 @@ var (
0: "SB",
1: "DWSB",
2: "FWSB",
3: "JC",
}
Turnout_Fault_value = map[string]int32{
"SB": 0,
"DWSB": 1,
"FWSB": 2,
"JC": 3,
}
)
@ -364,20 +366,21 @@ var file_component_turnout_proto_rawDesc = []byte{
0x01, 0x28, 0x08, 0x52, 0x02, 0x64, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x77, 0x18, 0x02, 0x20,
0x01, 0x28, 0x08, 0x52, 0x02, 0x66, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x03, 0x20,
0x01, 0x28, 0x08, 0x52, 0x02, 0x64, 0x62, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x62, 0x18, 0x04, 0x20,
0x01, 0x28, 0x08, 0x52, 0x02, 0x66, 0x62, 0x22, 0x5e, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f,
0x01, 0x28, 0x08, 0x52, 0x02, 0x66, 0x62, 0x22, 0x66, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f,
0x75, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0e, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x75,
0x72, 0x6e, 0x6f, 0x75, 0x74, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x22, 0x23, 0x0a, 0x05, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x06, 0x0a, 0x02, 0x53,
0x6c, 0x74, 0x22, 0x2b, 0x0a, 0x05, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x06, 0x0a, 0x02, 0x53,
0x42, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x57, 0x53, 0x42, 0x10, 0x01, 0x12, 0x08, 0x0a,
0x04, 0x46, 0x57, 0x53, 0x42, 0x10, 0x02, 0x22, 0x10, 0x0a, 0x0e, 0x54, 0x75, 0x72, 0x6e, 0x6f,
0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x42, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x75, 0x72,
0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x77, 0x73, 0x62, 0x22, 0x12, 0x0a,
0x10, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x77, 0x73,
0x62, 0x22, 0x10, 0x0a, 0x0e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c,
0x74, 0x4a, 0x63, 0x42, 0x1d, 0x5a, 0x1b, 0x2e, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65,
0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x04, 0x46, 0x57, 0x53, 0x42, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x4a, 0x43, 0x10, 0x03, 0x22,
0x10, 0x0a, 0x0e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x53,
0x42, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c,
0x74, 0x44, 0x77, 0x73, 0x62, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74,
0x46, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x77, 0x73, 0x62, 0x22, 0x10, 0x0a, 0x0e, 0x54, 0x75, 0x72,
0x6e, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x4a, 0x63, 0x42, 0x1d, 0x5a, 0x1b, 0x2e,
0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f,
0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (

60
component/psd.go Normal file
View File

@ -0,0 +1,60 @@
package component
import "joylink.club/ecs"
var PsdTag = ecs.NewTag()
var PsdCircuitType = ecs.NewComponentType[PsdCircuit]()
type PsdCircuit struct {
//屏蔽门驱动继电器
GMJ *ecs.Entry
KMJ4 *ecs.Entry
KMJ8 *ecs.Entry
//屏蔽门表示继电器
MGJ *ecs.Entry
MPLJ *ecs.Entry
}
var PsdMotorStateType = ecs.NewComponentType[PsdMotorState]()
// PsdMotorState 屏蔽门电机状态
type PsdMotorState struct {
//4编组开门通电
Km4 bool
//8编组开门通电
Km8 bool
//关门通电
Gm bool
}
var PsdPositionType = ecs.NewComponentType[PsdPosition]()
type PsdPosition struct {
km bool
gm bool
}
var PsdDriveCircuitType = ecs.NewComponentType[PsdDriveCircuit]()
// PsdDriveCircuit 屏蔽门驱动电路
type PsdDriveCircuit struct {
//屏蔽门驱动继电器接通状态
GMJ bool
KMJ4 bool
KMJ8 bool
}
var PsdCollectionCircuitType = ecs.NewComponentType[PsdCollectionCircuit]()
type PsdCollectionCircuit struct {
GMJ bool
KMJ4 bool
KMJ8 bool
//MGJ吸起
MGJ_X bool
//MGJ落下
MGJ_L bool
MPLJ_X bool
MPLJ_L bool
}

View File

@ -322,22 +322,8 @@ type SignalJDXHElectronic struct {
JDXH_LXJ *ecs.Entry
//引导信号继电器true-吸合
JDXH_YXJ *ecs.Entry
}
// SignalJDXHFilament 信号机JDXH 灯丝状态
type SignalJDXHFilament struct {
// 物理黄灯true-灯丝正常
Uf bool
// 物理绿灯true-灯丝正常
Lf bool
// 物理红灯true-灯丝正常
Hf bool
// 物理黄灯true-亮
U bool
// 物理绿灯true-亮
L bool
// 物理红灯true-亮
H bool
//引导转换继电器,true-吸合
JDXH_YZHJ *ecs.Entry
}
// SignalJDXHLsq 联锁驱
@ -362,5 +348,6 @@ type SignalJDXHLsc struct {
var (
SignalJDXHElectronicType = ecs.NewComponentType[SignalJDXHElectronic]()
SignalJDXHFilamentType = ecs.NewComponentType[SignalJDXHFilament]()
SignalJDXHLsqType = ecs.NewComponentType[SignalJDXHLsq]()
SignalJDXHLscType = ecs.NewComponentType[SignalJDXHLsc]()
)

View File

@ -14,6 +14,11 @@ func Load(w ecs.World, repo *repository.Repository) error {
if err != nil {
return err
}
// 加载屏蔽门相关实体
err = LoadPsd(w)
if err != nil {
return err
}
return err
}

50
entity/psd.go Normal file
View File

@ -0,0 +1,50 @@
package entity
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/component"
"joylink.club/rtsssimulation/repository"
)
func LoadPsd(w ecs.World) error {
data := GetWorldData(w)
psds := data.Repo.PsdList()
for _, psd := range psds {
entry := NewPsdEntry(w, psd.Id(), data)
loadPsdCircuit(w, entry, psd, data.EntityMap)
}
return nil
}
func loadPsdCircuit(world ecs.World, entry *ecs.Entry, psd *repository.Psd, entryMap map[string]*ecs.Entry) {
circuit := &component.PsdCircuit{}
for _, group := range psd.ComponentGroups() {
for _, ec := range group.Components() {
relay := ec.(*repository.Relay)
switch ec.Code() {
case "XGMJ", "SGMJ":
circuit.GMJ = NewRelayEntity(world, relay, entryMap)
case "4XKMJ", "4SKMJ":
circuit.KMJ4 = NewRelayEntity(world, relay, entryMap)
case "8XKMJ", "8SKMJ":
circuit.KMJ8 = NewRelayEntity(world, relay, entryMap)
case "XMGJ", "SMGJ":
circuit.MGJ = NewRelayEntity(world, relay, entryMap)
case "XMPLJ", "SMPLJ":
circuit.MPLJ = NewRelayEntity(world, relay, entryMap)
}
}
}
component.PsdCircuitType.Set(entry, circuit)
}
func NewPsdEntry(world ecs.World, uid string, worldData *component.WorldData) *ecs.Entry {
entry, ok := worldData.EntityMap[uid]
if !ok {
entry := world.Entry(world.Create(component.PsdTag, component.UidType, component.TwoPositionTransformType,
component.PsdCircuitType, component.PsdDriveCircuitType, component.PsdCollectionCircuitType))
component.UidType.SetValue(entry, component.Uid{Id: uid})
worldData.EntityMap[uid] = entry
}
return entry
}

View File

@ -12,7 +12,9 @@ func loadSignalJdxh(w ecs.World, signal *repository.Signal, signalEntry *ecs.Ent
if len(elecs) == 4 { //jdxh组合类型包含3个继电器
signalEntry.AddComponent(component.SignalJDXHElectronicType)
signalEntry.AddComponent(component.SignalJDXHFilamentType)
signalEntry.AddComponent(component.SignalJDXHLsqType)
signalEntry.AddComponent(component.SignalJDXHLscType)
signalEntry.AddComponent(component.SignalLightsType)
//
elecState := &component.SignalJDXHElectronic{}
for _, elec := range elecs {
@ -31,7 +33,9 @@ func loadSignalJdxh(w ecs.World, signal *repository.Signal, signalEntry *ecs.Ent
}
//
component.SignalJDXHElectronicType.Set(signalEntry, elecState)
component.SignalJDXHFilamentType.Set(signalEntry, &component.SignalJDXHFilament{Uf: true, Lf: true, Hf: true, U: false, L: false, H: false})
component.SignalJDXHLsqType.Set(signalEntry, &component.SignalJDXHLsq{})
component.SignalJDXHLscType.Set(signalEntry, &component.SignalJDXHLsc{})
component.SignalLightsType.Set(signalEntry, newSignalLights(w, component.HdTag, component.LdTag, component.UdTag))
} else {
return fmt.Errorf("id=[%s]的信号机jdxh电子元器件数量须为4", signal.Id())
}

1
examples/psd/main.go Normal file
View File

@ -0,0 +1 @@
package psd

View File

@ -26,6 +26,8 @@ message Turnout {
DWSB = 1;
//
FWSB = 2;
//
JC = 3;
}
repeated Fault fault = 1;
}

View File

@ -18,9 +18,13 @@ message Repository {
repeated Relay relays = 11;
repeated PhaseFailureProtector phaseFailureProtectors = 12;
repeated Button buttons = 13;
<<<<<<< HEAD
repeated Light lights = 14;
repeated Alarm alarms = 15;
repeated Station stations = 16;
=======
repeated Psd psds = 14;
>>>>>>> 24c455cc6f8bc85738372cd78915117c1e4cade0
}
//
@ -61,7 +65,13 @@ message Signal {
Kilometer km = 2;
string sectionId = 3; //
DevicePort turnoutPort = 4; //
repeated ElectronicComponentGroup electronicComponentGroups = 7; //
repeated ElectronicComponentGroup electronicComponentGroups = 7; //
}
message Psd {
string id = 1;
string platformId = 2;
repeated ElectronicComponentGroup electronicComponentGroups = 3; //
}
//
@ -109,7 +119,8 @@ enum DeviceType {
DeviceType_Button = 12;
DeviceType_Light = 13;
DeviceType_Alarm = 14;
DeviceType_Station = 15;
DeviceType_Psd = 15;
DeviceType_Station = 16;
}
enum Port {

View File

@ -38,6 +38,7 @@ const (
DeviceType_DeviceType_Button DeviceType = 12
DeviceType_DeviceType_Light DeviceType = 13
DeviceType_DeviceType_Alarm DeviceType = 14
DeviceType_DeviceType_Psd DeviceType = 15
)
// Enum value maps for DeviceType.
@ -58,6 +59,7 @@ var (
12: "DeviceType_Button",
13: "DeviceType_Light",
14: "DeviceType_Alarm",
15: "DeviceType_Psd",
}
DeviceType_value = map[string]int32{
"DeviceType_Unknown": 0,
@ -75,6 +77,7 @@ var (
"DeviceType_Button": 12,
"DeviceType_Light": 13,
"DeviceType_Alarm": 14,
"DeviceType_Psd": 15,
}
)
@ -367,7 +370,7 @@ func (x Relay_Model) Number() protoreflect.EnumNumber {
// Deprecated: Use Relay_Model.Descriptor instead.
func (Relay_Model) EnumDescriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{11, 0}
return file_model_proto_rawDescGZIP(), []int{12, 0}
}
type Button_ButtonType int32
@ -425,7 +428,7 @@ func (x Button_ButtonType) Number() protoreflect.EnumNumber {
// Deprecated: Use Button_ButtonType.Descriptor instead.
func (Button_ButtonType) EnumDescriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{14, 0}
return file_model_proto_rawDescGZIP(), []int{15, 0}
}
type Repository struct {
@ -446,6 +449,7 @@ type Repository struct {
Relays []*Relay `protobuf:"bytes,11,rep,name=relays,proto3" json:"relays,omitempty"`
PhaseFailureProtectors []*PhaseFailureProtector `protobuf:"bytes,12,rep,name=phaseFailureProtectors,proto3" json:"phaseFailureProtectors,omitempty"`
Buttons []*Button `protobuf:"bytes,13,rep,name=buttons,proto3" json:"buttons,omitempty"`
Psds []*Psd `protobuf:"bytes,14,rep,name=psds,proto3" json:"psds,omitempty"`
}
func (x *Repository) Reset() {
@ -571,6 +575,13 @@ func (x *Repository) GetButtons() []*Button {
return nil
}
func (x *Repository) GetPsds() []*Psd {
if x != nil {
return x.Psds
}
return nil
}
// 物理区段
type PhysicalSection struct {
state protoimpl.MessageState
@ -821,7 +832,7 @@ type Signal struct {
Km *Kilometer `protobuf:"bytes,2,opt,name=km,proto3" json:"km,omitempty"`
SectionId string `protobuf:"bytes,3,opt,name=sectionId,proto3" json:"sectionId,omitempty"` //关联的区段
TurnoutPort *DevicePort `protobuf:"bytes,4,opt,name=turnoutPort,proto3" json:"turnoutPort,omitempty"` //关联的区段端口
ElectronicComponentGroups []*ElectronicComponentGroup `protobuf:"bytes,7,rep,name=electronicComponentGroups,proto3" json:"electronicComponentGroups,omitempty"` //关联的继电器组
ElectronicComponentGroups []*ElectronicComponentGroup `protobuf:"bytes,7,rep,name=electronicComponentGroups,proto3" json:"electronicComponentGroups,omitempty"` //关联的电子元件组合
}
func (x *Signal) Reset() {
@ -891,6 +902,69 @@ func (x *Signal) GetElectronicComponentGroups() []*ElectronicComponentGroup {
return nil
}
type Psd struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
PlatformId string `protobuf:"bytes,2,opt,name=platformId,proto3" json:"platformId,omitempty"`
ElectronicComponentGroups []*ElectronicComponentGroup `protobuf:"bytes,3,rep,name=electronicComponentGroups,proto3" json:"electronicComponentGroups,omitempty"` //关联的电子元件组合
}
func (x *Psd) Reset() {
*x = Psd{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Psd) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Psd) ProtoMessage() {}
func (x *Psd) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Psd.ProtoReflect.Descriptor instead.
func (*Psd) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{5}
}
func (x *Psd) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Psd) GetPlatformId() string {
if x != nil {
return x.PlatformId
}
return ""
}
func (x *Psd) GetElectronicComponentGroups() []*ElectronicComponentGroup {
if x != nil {
return x.ElectronicComponentGroups
}
return nil
}
// 应答器
type Transponder struct {
state protoimpl.MessageState
@ -906,7 +980,7 @@ type Transponder struct {
func (x *Transponder) Reset() {
*x = Transponder{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[5]
mi := &file_model_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -919,7 +993,7 @@ func (x *Transponder) String() string {
func (*Transponder) ProtoMessage() {}
func (x *Transponder) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[5]
mi := &file_model_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -932,7 +1006,7 @@ func (x *Transponder) ProtoReflect() protoreflect.Message {
// Deprecated: Use Transponder.ProtoReflect.Descriptor instead.
func (*Transponder) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{5}
return file_model_proto_rawDescGZIP(), []int{6}
}
func (x *Transponder) GetId() string {
@ -977,7 +1051,7 @@ type Slope struct {
func (x *Slope) Reset() {
*x = Slope{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[6]
mi := &file_model_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -990,7 +1064,7 @@ func (x *Slope) String() string {
func (*Slope) ProtoMessage() {}
func (x *Slope) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[6]
mi := &file_model_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1003,7 +1077,7 @@ func (x *Slope) ProtoReflect() protoreflect.Message {
// Deprecated: Use Slope.ProtoReflect.Descriptor instead.
func (*Slope) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{6}
return file_model_proto_rawDescGZIP(), []int{7}
}
func (x *Slope) GetId() string {
@ -1041,7 +1115,7 @@ type SectionalCurvature struct {
func (x *SectionalCurvature) Reset() {
*x = SectionalCurvature{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[7]
mi := &file_model_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1054,7 +1128,7 @@ func (x *SectionalCurvature) String() string {
func (*SectionalCurvature) ProtoMessage() {}
func (x *SectionalCurvature) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[7]
mi := &file_model_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1067,7 +1141,7 @@ func (x *SectionalCurvature) ProtoReflect() protoreflect.Message {
// Deprecated: Use SectionalCurvature.ProtoReflect.Descriptor instead.
func (*SectionalCurvature) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{7}
return file_model_proto_rawDescGZIP(), []int{8}
}
func (x *SectionalCurvature) GetId() string {
@ -1105,7 +1179,7 @@ type DevicePort struct {
func (x *DevicePort) Reset() {
*x = DevicePort{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[8]
mi := &file_model_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1118,7 +1192,7 @@ func (x *DevicePort) String() string {
func (*DevicePort) ProtoMessage() {}
func (x *DevicePort) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[8]
mi := &file_model_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1131,7 +1205,7 @@ func (x *DevicePort) ProtoReflect() protoreflect.Message {
// Deprecated: Use DevicePort.ProtoReflect.Descriptor instead.
func (*DevicePort) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{8}
return file_model_proto_rawDescGZIP(), []int{9}
}
func (x *DevicePort) GetDeviceId() string {
@ -1169,7 +1243,7 @@ type Kilometer struct {
func (x *Kilometer) Reset() {
*x = Kilometer{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[9]
mi := &file_model_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1182,7 +1256,7 @@ func (x *Kilometer) String() string {
func (*Kilometer) ProtoMessage() {}
func (x *Kilometer) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[9]
mi := &file_model_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1195,7 +1269,7 @@ func (x *Kilometer) ProtoReflect() protoreflect.Message {
// Deprecated: Use Kilometer.ProtoReflect.Descriptor instead.
func (*Kilometer) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{9}
return file_model_proto_rawDescGZIP(), []int{10}
}
func (x *Kilometer) GetValue() int64 {
@ -1233,7 +1307,7 @@ type KilometerConvert struct {
func (x *KilometerConvert) Reset() {
*x = KilometerConvert{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[10]
mi := &file_model_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1246,7 +1320,7 @@ func (x *KilometerConvert) String() string {
func (*KilometerConvert) ProtoMessage() {}
func (x *KilometerConvert) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[10]
mi := &file_model_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1259,7 +1333,7 @@ func (x *KilometerConvert) ProtoReflect() protoreflect.Message {
// Deprecated: Use KilometerConvert.ProtoReflect.Descriptor instead.
func (*KilometerConvert) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{10}
return file_model_proto_rawDescGZIP(), []int{11}
}
func (x *KilometerConvert) GetKmA() *Kilometer {
@ -1297,7 +1371,7 @@ type Relay struct {
func (x *Relay) Reset() {
*x = Relay{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[11]
mi := &file_model_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1310,7 +1384,7 @@ func (x *Relay) String() string {
func (*Relay) ProtoMessage() {}
func (x *Relay) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[11]
mi := &file_model_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1323,7 +1397,7 @@ func (x *Relay) ProtoReflect() protoreflect.Message {
// Deprecated: Use Relay.ProtoReflect.Descriptor instead.
func (*Relay) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{11}
return file_model_proto_rawDescGZIP(), []int{12}
}
func (x *Relay) GetId() string {
@ -1360,7 +1434,7 @@ type PhaseFailureProtector struct {
func (x *PhaseFailureProtector) Reset() {
*x = PhaseFailureProtector{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[12]
mi := &file_model_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1373,7 +1447,7 @@ func (x *PhaseFailureProtector) String() string {
func (*PhaseFailureProtector) ProtoMessage() {}
func (x *PhaseFailureProtector) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[12]
mi := &file_model_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1386,7 +1460,7 @@ func (x *PhaseFailureProtector) ProtoReflect() protoreflect.Message {
// Deprecated: Use PhaseFailureProtector.ProtoReflect.Descriptor instead.
func (*PhaseFailureProtector) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{12}
return file_model_proto_rawDescGZIP(), []int{13}
}
func (x *PhaseFailureProtector) GetId() string {
@ -1416,7 +1490,7 @@ type ElectronicComponentGroup struct {
func (x *ElectronicComponentGroup) Reset() {
*x = ElectronicComponentGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[13]
mi := &file_model_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1429,7 +1503,7 @@ func (x *ElectronicComponentGroup) String() string {
func (*ElectronicComponentGroup) ProtoMessage() {}
func (x *ElectronicComponentGroup) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[13]
mi := &file_model_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1442,7 +1516,7 @@ func (x *ElectronicComponentGroup) ProtoReflect() protoreflect.Message {
// Deprecated: Use ElectronicComponentGroup.ProtoReflect.Descriptor instead.
func (*ElectronicComponentGroup) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{13}
return file_model_proto_rawDescGZIP(), []int{14}
}
func (x *ElectronicComponentGroup) GetCode() string {
@ -1473,7 +1547,7 @@ type Button struct {
func (x *Button) Reset() {
*x = Button{}
if protoimpl.UnsafeEnabled {
mi := &file_model_proto_msgTypes[14]
mi := &file_model_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1486,7 +1560,7 @@ func (x *Button) String() string {
func (*Button) ProtoMessage() {}
func (x *Button) ProtoReflect() protoreflect.Message {
mi := &file_model_proto_msgTypes[14]
mi := &file_model_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1499,7 +1573,7 @@ func (x *Button) ProtoReflect() protoreflect.Message {
// Deprecated: Use Button.ProtoReflect.Descriptor instead.
func (*Button) Descriptor() ([]byte, []int) {
return file_model_proto_rawDescGZIP(), []int{14}
return file_model_proto_rawDescGZIP(), []int{15}
}
func (x *Button) GetId() string {
@ -1527,7 +1601,7 @@ var File_model_proto protoreflect.FileDescriptor
var file_model_proto_rawDesc = []byte{
0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x22, 0x9b, 0x05, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
0x6f, 0x64, 0x65, 0x6c, 0x22, 0xbb, 0x05, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a,
@ -1569,7 +1643,9 @@ var file_model_proto_rawDesc = []byte{
0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x62, 0x75, 0x74,
0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x07, 0x62, 0x75, 0x74, 0x74, 0x6f,
0x6e, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53,
0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x73, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x50, 0x73, 0x64, 0x52, 0x04, 0x70, 0x73,
0x64, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75,
0x74, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x75, 0x72, 0x6e,
@ -1634,124 +1710,135 @@ var file_model_proto_rawDesc = []byte{
0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69,
0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73,
0x22, 0x92, 0x01, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x02,
0x6b, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64,
0x12, 0x33, 0x0a, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75,
0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x53, 0x0a, 0x05, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22,
0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f,
0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b,
0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x22, 0x60, 0x0a, 0x12, 0x53, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52,
0x03, 0x6b, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x03,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x0a,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65,
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65,
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e,
0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x7d, 0x0a, 0x09, 0x4b, 0x69,
0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a,
0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e,
0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2e, 0x0a, 0x09, 0x64, 0x69, 0x72,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09,
0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x10, 0x4b, 0x69, 0x6c,
0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x22, 0x0a,
0x03, 0x6b, 0x6d, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d,
0x41, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72,
0x52, 0x03, 0x6b, 0x6d, 0x42, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65,
0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72,
0x65, 0x6e, 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x05, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x12, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d,
0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x93, 0x01, 0x0a, 0x05,
0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e,
0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, 0x58, 0x43, 0x5f, 0x31, 0x30, 0x30, 0x30, 0x10,
0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x02,
0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x4a, 0x58, 0x43, 0x5f, 0x34, 0x38, 0x30, 0x10, 0x03, 0x12,
0x11, 0x0a, 0x0d, 0x4a, 0x57, 0x4a, 0x58, 0x43, 0x5f, 0x48, 0x31, 0x32, 0x35, 0x5f, 0x38, 0x30,
0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10,
0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x58, 0x43, 0x5f, 0x48, 0x33, 0x34, 0x30, 0x10, 0x06,
0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x59, 0x4a, 0x58, 0x43, 0x5f, 0x31, 0x36, 0x30, 0x5f, 0x32, 0x36,
0x30, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x4a, 0x5a, 0x58, 0x43, 0x5f, 0x48, 0x31, 0x38, 0x10,
0x08, 0x22, 0x3b, 0x0a, 0x15, 0x50, 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72,
0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x52,
0x0a, 0x18, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70,
0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x22,
0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49,
0x64, 0x73, 0x22, 0xd3, 0x01, 0x0a, 0x06, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
0x65, 0x12, 0x38, 0x0a, 0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x42, 0x75,
0x74, 0x74, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52,
0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6b, 0x0a, 0x0a, 0x42,
0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b,
0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x5f, 0x52, 0x65, 0x73,
0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f,
0x5f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52,
0x65, 0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08,
0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x65,
0x79, 0x5f, 0x4b, 0x6e, 0x6f, 0x62, 0x10, 0x05, 0x2a, 0x90, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63,
0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12,
0x1e, 0x0a, 0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68,
0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12,
0x19, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x68,
0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74,
0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
0x5f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e,
0x64, 0x65, 0x72, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
0x79, 0x70, 0x65, 0x5f, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x10, 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x44,
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x07, 0x12, 0x13,
0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e,
0x6b, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x52, 0x65, 0x6c, 0x61, 0x79,
0x10, 0x0a, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
0x5f, 0x50, 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f,
0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x10, 0x0b, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x10, 0x0c, 0x12,
0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69,
0x67, 0x68, 0x74, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
0x79, 0x70, 0x65, 0x5f, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x10, 0x0e, 0x2a, 0x25, 0x0a, 0x04, 0x50,
0x6f, 0x72, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x05, 0x0a,
0x01, 0x41, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x43,
0x10, 0x03, 0x2a, 0x20, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47,
0x48, 0x54, 0x10, 0x01, 0x2a, 0x43, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69,
0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61,
0x72, 0x79, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x65, 0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x75, 0x6c, 0x61, 0x74,
0x65, 0x64, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x72,
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x22, 0x94, 0x01, 0x0a, 0x03, 0x50, 0x73, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c,
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x12, 0x5d, 0x0a, 0x19, 0x65, 0x6c, 0x65, 0x63,
0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6f,
0x64, 0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f,
0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x19, 0x65, 0x6c,
0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e,
0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e,
0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x02, 0x6b, 0x6d, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f,
0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x02, 0x6b, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f,
0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52,
0x0b, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x53, 0x0a, 0x05,
0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d,
0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x67,
0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x65, 0x67, 0x72, 0x65,
0x65, 0x22, 0x60, 0x0a, 0x12, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75,
0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c,
0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72,
0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x61, 0x64,
0x69, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72,
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x31, 0x0a,
0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
0x12, 0x1f, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b,
0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x72,
0x74, 0x22, 0x7d, 0x0a, 0x09, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61,
0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10,
0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
0x12, 0x2e, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x69, 0x72, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x22, 0x78, 0x0a, 0x10, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e,
0x76, 0x65, 0x72, 0x74, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x41, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x6d, 0x42, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x69,
0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x6d, 0x42, 0x12, 0x1c, 0x0a, 0x09,
0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x05, 0x52,
0x65, 0x6c, 0x61, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65,
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e,
0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x22, 0x93, 0x01, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, 0x58,
0x43, 0x5f, 0x31, 0x30, 0x30, 0x30, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, 0x58, 0x43,
0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x4a, 0x58, 0x43,
0x5f, 0x34, 0x38, 0x30, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x57, 0x4a, 0x58, 0x43, 0x5f,
0x48, 0x31, 0x32, 0x35, 0x5f, 0x38, 0x30, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x58,
0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x58, 0x43,
0x5f, 0x48, 0x33, 0x34, 0x30, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x59, 0x4a, 0x58, 0x43,
0x5f, 0x31, 0x36, 0x30, 0x5f, 0x32, 0x36, 0x30, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x4a, 0x5a,
0x58, 0x43, 0x5f, 0x48, 0x31, 0x38, 0x10, 0x08, 0x22, 0x3b, 0x0a, 0x15, 0x50, 0x68, 0x61, 0x73,
0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x52, 0x0a, 0x18, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f,
0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65,
0x6e, 0x74, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d,
0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0xd3, 0x01, 0x0a, 0x06, 0x42, 0x75,
0x74, 0x74, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x62, 0x75, 0x74, 0x74,
0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x74, 0x74,
0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79,
0x70, 0x65, 0x22, 0x6b, 0x0a, 0x0a, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x12, 0x0a,
0x0e, 0x4e, 0x4f, 0x5f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10,
0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70,
0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73,
0x73, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10,
0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x5f, 0x4b, 0x6e, 0x6f, 0x62, 0x10, 0x05, 0x2a,
0xa4, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16,
0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x55, 0x6e, 0x6b,
0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x10,
0x02, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f,
0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x04,
0x12, 0x1a, 0x0a, 0x16, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54,
0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x6c, 0x6f, 0x70, 0x65,
0x10, 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
0x5f, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74,
0x75, 0x72, 0x65, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64,
0x65, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
0x65, 0x5f, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x10, 0x0a, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69,
0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x10, 0x0b, 0x12,
0x15, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x75,
0x74, 0x74, 0x6f, 0x6e, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x41, 0x6c, 0x61, 0x72, 0x6d,
0x10, 0x0e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
0x5f, 0x50, 0x73, 0x64, 0x10, 0x0f, 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 (
@ -1767,7 +1854,7 @@ func file_model_proto_rawDescGZIP() []byte {
}
var file_model_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_model_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_model_proto_goTypes = []interface{}{
(DeviceType)(0), // 0: model.DeviceType
(Port)(0), // 1: model.Port
@ -1781,59 +1868,62 @@ var file_model_proto_goTypes = []interface{}{
(*CheckPoint)(nil), // 9: model.CheckPoint
(*Turnout)(nil), // 10: model.Turnout
(*Signal)(nil), // 11: model.Signal
(*Transponder)(nil), // 12: model.Transponder
(*Slope)(nil), // 13: model.Slope
(*SectionalCurvature)(nil), // 14: model.SectionalCurvature
(*DevicePort)(nil), // 15: model.DevicePort
(*Kilometer)(nil), // 16: model.Kilometer
(*KilometerConvert)(nil), // 17: model.KilometerConvert
(*Relay)(nil), // 18: model.Relay
(*PhaseFailureProtector)(nil), // 19: model.PhaseFailureProtector
(*ElectronicComponentGroup)(nil), // 20: model.ElectronicComponentGroup
(*Button)(nil), // 21: model.Button
(*Psd)(nil), // 12: model.Psd
(*Transponder)(nil), // 13: model.Transponder
(*Slope)(nil), // 14: model.Slope
(*SectionalCurvature)(nil), // 15: model.SectionalCurvature
(*DevicePort)(nil), // 16: model.DevicePort
(*Kilometer)(nil), // 17: model.Kilometer
(*KilometerConvert)(nil), // 18: model.KilometerConvert
(*Relay)(nil), // 19: model.Relay
(*PhaseFailureProtector)(nil), // 20: model.PhaseFailureProtector
(*ElectronicComponentGroup)(nil), // 21: model.ElectronicComponentGroup
(*Button)(nil), // 22: model.Button
}
var file_model_proto_depIdxs = []int32{
8, // 0: model.Repository.physicalSections:type_name -> model.PhysicalSection
9, // 1: model.Repository.checkPoints:type_name -> model.CheckPoint
10, // 2: model.Repository.turnouts:type_name -> model.Turnout
11, // 3: model.Repository.signals:type_name -> model.Signal
12, // 4: model.Repository.transponders:type_name -> model.Transponder
13, // 5: model.Repository.slopes:type_name -> model.Slope
14, // 6: model.Repository.sectionalCurvatures:type_name -> model.SectionalCurvature
17, // 7: model.Repository.kilometerConverts:type_name -> model.KilometerConvert
18, // 8: model.Repository.relays:type_name -> model.Relay
19, // 9: model.Repository.phaseFailureProtectors:type_name -> model.PhaseFailureProtector
21, // 10: model.Repository.buttons:type_name -> model.Button
15, // 11: model.PhysicalSection.aDevicePort:type_name -> model.DevicePort
15, // 12: model.PhysicalSection.bDevicePort:type_name -> model.DevicePort
16, // 13: model.CheckPoint.km:type_name -> model.Kilometer
3, // 14: model.CheckPoint.type:type_name -> model.CheckPointType
15, // 15: model.CheckPoint.devicePorts:type_name -> model.DevicePort
16, // 16: model.Turnout.km:type_name -> model.Kilometer
15, // 17: model.Turnout.aDevicePort:type_name -> model.DevicePort
15, // 18: model.Turnout.bDevicePort:type_name -> model.DevicePort
15, // 19: model.Turnout.cDevicePort:type_name -> model.DevicePort
4, // 20: model.Turnout.switchMachineType:type_name -> model.Turnout.SwitchMachineType
20, // 21: model.Turnout.electronicComponentGroups:type_name -> model.ElectronicComponentGroup
16, // 22: model.Signal.km:type_name -> model.Kilometer
15, // 23: model.Signal.turnoutPort:type_name -> model.DevicePort
20, // 24: model.Signal.electronicComponentGroups:type_name -> model.ElectronicComponentGroup
16, // 25: model.Transponder.km:type_name -> model.Kilometer
15, // 26: model.Transponder.turnoutPort:type_name -> model.DevicePort
16, // 27: model.Slope.kms:type_name -> model.Kilometer
16, // 28: model.SectionalCurvature.kms:type_name -> model.Kilometer
0, // 29: model.DevicePort.deviceType:type_name -> model.DeviceType
1, // 30: model.DevicePort.port:type_name -> model.Port
2, // 31: model.Kilometer.direction:type_name -> model.Direction
16, // 32: model.KilometerConvert.kmA:type_name -> model.Kilometer
16, // 33: model.KilometerConvert.kmB:type_name -> model.Kilometer
5, // 34: model.Relay.model:type_name -> model.Relay.Model
6, // 35: model.Button.buttonType:type_name -> model.Button.ButtonType
36, // [36:36] is the sub-list for method output_type
36, // [36:36] is the sub-list for method input_type
36, // [36:36] is the sub-list for extension type_name
36, // [36:36] is the sub-list for extension extendee
0, // [0:36] is the sub-list for field type_name
13, // 4: model.Repository.transponders:type_name -> model.Transponder
14, // 5: model.Repository.slopes:type_name -> model.Slope
15, // 6: model.Repository.sectionalCurvatures:type_name -> model.SectionalCurvature
18, // 7: model.Repository.kilometerConverts:type_name -> model.KilometerConvert
19, // 8: model.Repository.relays:type_name -> model.Relay
20, // 9: model.Repository.phaseFailureProtectors:type_name -> model.PhaseFailureProtector
22, // 10: model.Repository.buttons:type_name -> model.Button
12, // 11: model.Repository.psds:type_name -> model.Psd
16, // 12: model.PhysicalSection.aDevicePort:type_name -> model.DevicePort
16, // 13: model.PhysicalSection.bDevicePort:type_name -> model.DevicePort
17, // 14: model.CheckPoint.km:type_name -> model.Kilometer
3, // 15: model.CheckPoint.type:type_name -> model.CheckPointType
16, // 16: model.CheckPoint.devicePorts:type_name -> model.DevicePort
17, // 17: model.Turnout.km:type_name -> model.Kilometer
16, // 18: model.Turnout.aDevicePort:type_name -> model.DevicePort
16, // 19: model.Turnout.bDevicePort:type_name -> model.DevicePort
16, // 20: model.Turnout.cDevicePort:type_name -> model.DevicePort
4, // 21: model.Turnout.switchMachineType:type_name -> model.Turnout.SwitchMachineType
21, // 22: model.Turnout.electronicComponentGroups:type_name -> model.ElectronicComponentGroup
17, // 23: model.Signal.km:type_name -> model.Kilometer
16, // 24: model.Signal.turnoutPort:type_name -> model.DevicePort
21, // 25: model.Signal.electronicComponentGroups:type_name -> model.ElectronicComponentGroup
21, // 26: model.Psd.electronicComponentGroups:type_name -> model.ElectronicComponentGroup
17, // 27: model.Transponder.km:type_name -> model.Kilometer
16, // 28: model.Transponder.turnoutPort:type_name -> model.DevicePort
17, // 29: model.Slope.kms:type_name -> model.Kilometer
17, // 30: model.SectionalCurvature.kms:type_name -> model.Kilometer
0, // 31: model.DevicePort.deviceType:type_name -> model.DeviceType
1, // 32: model.DevicePort.port:type_name -> model.Port
2, // 33: model.Kilometer.direction:type_name -> model.Direction
17, // 34: model.KilometerConvert.kmA:type_name -> model.Kilometer
17, // 35: model.KilometerConvert.kmB:type_name -> model.Kilometer
5, // 36: model.Relay.model:type_name -> model.Relay.Model
6, // 37: model.Button.buttonType:type_name -> model.Button.ButtonType
38, // [38:38] is the sub-list for method output_type
38, // [38:38] is the sub-list for method input_type
38, // [38:38] is the sub-list for extension type_name
38, // [38:38] is the sub-list for extension extendee
0, // [0:38] is the sub-list for field type_name
}
func init() { file_model_proto_init() }
@ -1903,7 +1993,7 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transponder); i {
switch v := v.(*Psd); i {
case 0:
return &v.state
case 1:
@ -1915,7 +2005,7 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Slope); i {
switch v := v.(*Transponder); i {
case 0:
return &v.state
case 1:
@ -1927,7 +2017,7 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SectionalCurvature); i {
switch v := v.(*Slope); i {
case 0:
return &v.state
case 1:
@ -1939,7 +2029,7 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DevicePort); i {
switch v := v.(*SectionalCurvature); i {
case 0:
return &v.state
case 1:
@ -1951,7 +2041,7 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Kilometer); i {
switch v := v.(*DevicePort); i {
case 0:
return &v.state
case 1:
@ -1963,7 +2053,7 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KilometerConvert); i {
switch v := v.(*Kilometer); i {
case 0:
return &v.state
case 1:
@ -1975,7 +2065,7 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Relay); i {
switch v := v.(*KilometerConvert); i {
case 0:
return &v.state
case 1:
@ -1987,7 +2077,7 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PhaseFailureProtector); i {
switch v := v.(*Relay); i {
case 0:
return &v.state
case 1:
@ -1999,7 +2089,7 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ElectronicComponentGroup); i {
switch v := v.(*PhaseFailureProtector); i {
case 0:
return &v.state
case 1:
@ -2011,6 +2101,18 @@ func file_model_proto_init() {
}
}
file_model_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ElectronicComponentGroup); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_model_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Button); i {
case 0:
return &v.state
@ -2029,7 +2131,7 @@ func file_model_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_model_proto_rawDesc,
NumEnums: 7,
NumMessages: 15,
NumMessages: 16,
NumExtensions: 0,
NumServices: 0,
},

18
repository/psd.go Normal file
View File

@ -0,0 +1,18 @@
package repository
import "joylink.club/rtsssimulation/repository/model/proto"
type Psd struct {
Identity
componentGroups []*ElectronicComponentGroup
}
func newPsd(id string) *Psd {
return &Psd{
Identity: identity{id, proto.DeviceType_DeviceType_Psd},
}
}
func (p *Psd) ComponentGroups() []*ElectronicComponentGroup {
return p.componentGroups
}

View File

@ -21,6 +21,7 @@ type Repository struct {
relayMap map[string]*Relay
phaseFailureProtectorMap map[string]*PhaseFailureProtector
buttonMap map[string]*Button
psdMap map[string]*Psd
linkMap map[string]*Link
}
@ -41,6 +42,7 @@ func newRepository(id string, version string) *Repository {
phaseFailureProtectorMap: make(map[string]*PhaseFailureProtector),
linkMap: make(map[string]*Link),
buttonMap: make(map[string]*Button),
psdMap: make(map[string]*Psd),
}
}
@ -136,6 +138,13 @@ func (repo *Repository) ButtonList() []*Button {
}
return list
}
func (repo *Repository) PsdList() []*Psd {
var list []*Psd
for _, model := range repo.psdMap {
list = append(list, model)
}
return list
}
func (repo *Repository) FindModel(deviceId string, deviceType proto.DeviceType) (Identity, error) {
switch deviceType {

View File

@ -90,6 +90,10 @@ func buildModels(source *proto.Repository, repository *Repository) {
m := NewButton(protoData.Id, protoData.Code, protoData.ButtonType)
repository.buttonMap[m.Id()] = m
}
for _, protoData := range source.Psds {
m := newPsd(protoData.Id)
repository.psdMap[m.Id()] = m
}
}
func buildModelRelationship(source *proto.Repository, repository *Repository) error {

85
sys/circuit_sys/psd.go Normal file
View File

@ -0,0 +1,85 @@
package circuit_sys
import (
"joylink.club/ecs"
"joylink.club/ecs/filter"
"joylink.club/rtsssimulation/component"
)
type PsdSys struct {
query *ecs.Query
}
func NewPsdSys() *PsdSys {
return &PsdSys{
query: ecs.NewQuery(filter.Contains(component.PsdCircuitType, component.PsdDriveCircuitType)),
}
}
func (p *PsdSys) Update(world ecs.World) {
p.query.Each(world, func(entry *ecs.Entry) {
psdMotorState := component.PsdMotorStateType.Get(entry)
psd := component.PsdCircuitType.Get(entry)
psdDrive := component.PsdDriveCircuitType.Get(entry)
p.exciteGMJ(psdMotorState, psd, psdDrive)
p.exciteKMJ4(psdMotorState, psd, psdDrive)
p.exciteKMJ8(psdMotorState, psd, psdDrive)
})
}
func (p *PsdSys) exciteGMJ(state *component.PsdMotorState, psd *component.PsdCircuit, psdDrive *component.PsdDriveCircuit) {
gmj := component.BitStateType.Get(psd.GMJ)
kmj4 := component.BitStateType.Get(psd.KMJ4)
kmj8 := component.BitStateType.Get(psd.KMJ8)
if psdDrive.GMJ { //驱动电路接通
component.RelayDriveType.Get(psd.GMJ).Td = true
gmj.Val = true
} else if gmj.Val {
if !kmj4.Val && !kmj8.Val {
component.RelayDriveType.Get(psd.GMJ).Td = true
} else {
component.RelayDriveType.Get(psd.GMJ).Td = false
gmj.Val = false
}
}
if gmj.Val && !kmj4.Val && !kmj8.Val {
state.Gm = true
}
}
func (p *PsdSys) exciteKMJ4(state *component.PsdMotorState, psd *component.PsdCircuit, psdDrive *component.PsdDriveCircuit) {
kmj4 := component.BitStateType.Get(psd.KMJ4)
gmj := component.BitStateType.Get(psd.GMJ)
kmj8 := component.BitStateType.Get(psd.KMJ8)
if psdDrive.KMJ4 {
component.RelayDriveType.Get(psd.KMJ4).Td = true
kmj4.Val = true
} else if kmj4.Val {
if !gmj.Val && !kmj8.Val {
component.RelayDriveType.Get(psd.KMJ4).Td = true
} else {
component.RelayDriveType.Get(psd.KMJ4).Td = false
kmj4.Val = false
}
}
if kmj4.Val && !gmj.Val && !kmj8.Val {
}
}
func (p *PsdSys) exciteKMJ8(state *component.PsdMotorState, psd *component.PsdCircuit, psdDrive *component.PsdDriveCircuit) {
kmj8 := component.BitStateType.Get(psd.KMJ8)
if psdDrive.KMJ4 {
component.RelayDriveType.Get(psd.KMJ8).Td = true
kmj8.Val = true
} else if kmj8.Val {
gmj := component.BitStateType.Get(psd.GMJ)
kmj4 := component.BitStateType.Get(psd.KMJ4)
if !gmj.Val && !kmj4.Val {
component.RelayDriveType.Get(psd.KMJ8).Td = true
} else {
component.RelayDriveType.Get(psd.KMJ8).Td = false
kmj8.Val = false
}
}
}

View File

@ -11,62 +11,100 @@ type SignalJDXHSystem struct {
}
func NewSignalJDXHSystem() *SignalJDXHSystem {
return &SignalJDXHSystem{query: ecs.NewQuery(filter.Contains(component.SignalJDXHElectronicType, component.SignalJDXHFilamentType))}
return &SignalJDXHSystem{query: ecs.NewQuery(filter.Contains(
component.SignalJDXHElectronicType,
component.SignalJDXHLsqType,
component.SignalJDXHLscType,
component.SignalLightsType))}
}
// Update world 执行
func (s *SignalJDXHSystem) Update(w ecs.World) {
s.query.Each(w, func(e *ecs.Entry) {
state := component.SignalJDXHElectronicType.Get(e)
filament := component.SignalJDXHFilamentType.Get(e)
s.query.Each(w, func(entry *ecs.Entry) {
state := component.SignalJDXHElectronicType.Get(entry)
lsq := component.SignalJDXHLsqType.Get(entry)
lsc := component.SignalJDXHLscType.Get(entry)
lights := component.SignalLightsType.Get(entry)
JDXH_H := lights.GetLightByTag(component.HdTag)
JDXH_L := lights.GetLightByTag(component.LdTag)
JDXH_U := lights.GetLightByTag(component.UdTag)
//
s.calculateL(state, filament)
s.calculateU(state, filament)
s.calculateH(state, filament)
s.calculateDJ(state, filament)
s.calculate2DJ(state, filament)
s.calculateLsq(state, lsq)
s.calculateL(state, JDXH_L)
s.calculateU(state, JDXH_U)
s.calculateH(state, JDXH_H)
s.calculateDJ(state, JDXH_L, JDXH_H)
s.calculate2DJ(state, JDXH_U)
s.calculateLsc(state, lsc)
})
}
func (s *SignalJDXHSystem) calculateU(state *component.SignalJDXHElectronic, filament *component.SignalJDXHFilament) {
// 联锁驱
func (s *SignalJDXHSystem) calculateLsq(state *component.SignalJDXHElectronic, lsq *component.SignalJDXHLsq) {
lxj := component.RelayDriveType.Get(state.JDXH_LXJ)
yzhj := component.RelayDriveType.Get(state.JDXH_YZHJ)
//
lxjQ := lsq.JDXH_LXJ_Q
lxj.Td = lxjQ
lxj.Xq = lxjQ
//
yzhjQ := lsq.JDXH_YZHJ_Q
yzhj.Td = yzhjQ
yzhj.Xq = yzhjQ
}
// 联锁采
func (s *SignalJDXHSystem) calculateLsc(state *component.SignalJDXHElectronic, lsc *component.SignalJDXHLsc) {
edj := component.BitStateType.Get(state.JDXH_2DJ)
dj := component.BitStateType.Get(state.JDXH_DJ)
lxj := component.BitStateType.Get(state.JDXH_LXJ)
yxj := component.BitStateType.Get(state.JDXH_YXJ)
yzhj := component.BitStateType.Get(state.JDXH_YZHJ)
//
lsc.JDXH_2DJ_Xq = edj.Val
lsc.JDXH_DJ_Xq = dj.Val
lsc.JDXH_LXJ_Xq = lxj.Val
lsc.JDXH_YZHJ_YXJ_Xq = yxj.Val && yzhj.Val
}
func (s *SignalJDXHSystem) calculateU(state *component.SignalJDXHElectronic, JDXH_U *ecs.Entry) {
lxj := component.BitStateType.Get(state.JDXH_LXJ)
dj := component.BitStateType.Get(state.JDXH_DJ)
yxj := component.BitStateType.Get(state.JDXH_YXJ)
isU := filament.Uf && !lxj.Val && dj.Val && yxj.Val
filament.U = isU
isU := !lxj.Val && dj.Val && yxj.Val
driveU := component.LightDriveType.Get(JDXH_U)
driveU.Td = isU
}
func (s *SignalJDXHSystem) calculateL(state *component.SignalJDXHElectronic, filament *component.SignalJDXHFilament) {
func (s *SignalJDXHSystem) calculateL(state *component.SignalJDXHElectronic, JDXH_L *ecs.Entry) {
lxj := component.BitStateType.Get(state.JDXH_LXJ)
isL := filament.Lf && lxj.Val
filament.L = isL
isL := lxj.Val
driveL := component.LightDriveType.Get(JDXH_L)
driveL.Td = isL
}
func (s *SignalJDXHSystem) calculateH(state *component.SignalJDXHElectronic, filament *component.SignalJDXHFilament) {
func (s *SignalJDXHSystem) calculateH(state *component.SignalJDXHElectronic, JDXH_H *ecs.Entry) {
lxj := component.BitStateType.Get(state.JDXH_LXJ)
isH := filament.Hf && !lxj.Val
filament.H = isH
isH := !lxj.Val
driveH := component.LightDriveType.Get(JDXH_H)
driveH.Td = isH
}
func (s *SignalJDXHSystem) calculateDJ(state *component.SignalJDXHElectronic, filament *component.SignalJDXHFilament) {
func (s *SignalJDXHSystem) calculateDJ(state *component.SignalJDXHElectronic, JDXH_L *ecs.Entry, JDXH_H *ecs.Entry) {
lxj := component.BitStateType.Get(state.JDXH_LXJ)
dj := component.BitStateType.Get(state.JDXH_DJ)
isDJ := filament.Lf && lxj.Val || filament.Hf && !lxj.Val
if isDJ != dj.Val {
hd := component.BitStateType.Get(JDXH_H)
ld := component.BitStateType.Get(JDXH_L)
isDJ := ld.Val && lxj.Val || hd.Val && !lxj.Val
drive := component.RelayDriveType.Get(state.JDXH_DJ)
drive.Td = isDJ
drive.Xq = isDJ
}
}
func (s *SignalJDXHSystem) calculate2DJ(state *component.SignalJDXHElectronic, filament *component.SignalJDXHFilament) {
func (s *SignalJDXHSystem) calculate2DJ(state *component.SignalJDXHElectronic, JDXH_U *ecs.Entry) {
lxj := component.BitStateType.Get(state.JDXH_LXJ)
dj := component.BitStateType.Get(state.JDXH_DJ)
edj := component.BitStateType.Get(state.JDXH_2DJ)
yxj := component.BitStateType.Get(state.JDXH_YXJ)
is2DJ := filament.Uf && !lxj.Val && dj.Val && yxj.Val
if is2DJ != edj.Val {
ud := component.BitStateType.Get(JDXH_U)
is2DJ := ud.Val && !lxj.Val && dj.Val && yxj.Val
drive := component.RelayDriveType.Get(state.JDXH_2DJ)
drive.Td = is2DJ
drive.Xq = is2DJ
}
}

View File

@ -0,0 +1,21 @@
package device_sys
import (
"joylink.club/ecs"
"joylink.club/ecs/filter"
"joylink.club/rtsssimulation/component"
)
type PsdMotorSys struct {
query *ecs.Query
}
func NewPsdMotorSys() *PsdMotorSys {
return &PsdMotorSys{
query: ecs.NewQuery(filter.Contains(component.PsdMotorStateType, component.TwoPositionTransformType)),
}
}
func (s *PsdMotorSys) Update(w ecs.World) {
}