From a4745d7a67fbe62e853d6979950153ea06555e4a Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Fri, 18 Aug 2023 11:23:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=93=E5=B2=94=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/common.go | 10 +- memory/init_world.go | 2 +- proto/src/status.proto | 38 +-- state/status.pb.go | 610 ++++++++++++++-------------------------- system/debug_system.go | 21 +- system/switch_system.go | 97 +------ 6 files changed, 226 insertions(+), 552 deletions(-) diff --git a/components/common.go b/components/common.go index f51f69b..d88cebe 100644 --- a/components/common.go +++ b/components/common.go @@ -18,14 +18,8 @@ var EntityTagHandlerComponent = ecs.NewComponentType[state.EntityTagHandler]() var PercentageDeviceComponent = ecs.NewComponentType[state.PercentageDeviceState]() var PercentageDeviceOperatingComponent = ecs.NewComponentType[state.PercentageDeviceOperating]() -// 道岔状态组件 -var SwitchStateComponent = ecs.NewComponentType[state.SwitchState]() - -// 道岔定反操继电器动作组件 -var SwitchNRRelayOperatingComponent = ecs.NewComponentType[state.SwitchNRRelayOperating]() - -// 道岔正常转动组件 -var SwitchTurnOperatingComponent = ecs.NewComponentType[state.SwitchTurnOperating]() +// 道岔继电器状态组件 +var SwitchRelayStateComponent = ecs.NewComponentType[state.SwitchRelayState]() // 物理区段状态组件 var PhysicalSectionStateComponent = ecs.NewComponentType[state.PhysicalSectionState]() diff --git a/memory/init_world.go b/memory/init_world.go index 4b9b402..86a3dd2 100644 --- a/memory/init_world.go +++ b/memory/init_world.go @@ -26,7 +26,7 @@ func InitializeWorld(w ecs.World, worldTime time.Time) *system.FaceSystem { // 创建道岔实体 func CreateSwitchEntity(w ecs.World) *ecs.Entry { - return w.Create(components.DeviceIdentityComponent, components.SwitchStateComponent) + return w.Create(components.DeviceIdentityComponent, components.SwitchRelayStateComponent, components.PercentageDeviceComponent) } // 创建信号机实体 diff --git a/proto/src/status.proto b/proto/src/status.proto index 0758b9d..2b87bd9 100644 --- a/proto/src/status.proto +++ b/proto/src/status.proto @@ -10,41 +10,21 @@ message DeviceIdentity{ ///////////////////////////////////////////////////////// -//道岔状态 -message SwitchState{ +//道岔继电器状态 +message SwitchRelayState{ //定操继电器 - //true-继电器吸合触发道岔转动到定位操作,当定操完成该继电器断开 - bool normalRelay = 1; + //true-继电器吸合 + bool dcJ = 1; //反操继电器 - //true-继电器吸合触发道岔转动到反位操作,当反操完成该继电器断开 - bool reverseRelay = 2; + //true-继电器吸合 + bool fcJ = 2; //定表继电器 //true-继电器吸合表示道岔转动到定位 - bool normalTable = 3; + bool dbJ = 3; //反表继电器 //true-继电器吸合表示道岔转动到反位 - bool reverseTable = 4; -} -//道岔定反操继电器动作过程操作 -message SwitchNRRelayOperating{ - //true-定操继电器,false-反操继电器 - bool normal = 1; - //启动定反操继电器 - bool start = 2; - //该继电器动作剩余时间,单位ms - int64 operateTime = 3; - //true-吸合,false-断开 - bool close = 4; -} -//道岔转动操作 -message SwitchTurnOperating{ - //是否执行转动操作,true-开始执行或正在执行转动操作 - bool start = 1; - //执行转动操作需要的剩余时长,单位ms - int64 operateTime = 2; - //执行转动操作的目标,true-道岔转向定位,false-道岔转向反位 - bool turnNormal = 3; -} + bool fbJ = 4; +} /////////////////////////////////////////////////////////// diff --git a/state/status.pb.go b/state/status.pb.go index 3808b95..45fa188 100644 --- a/state/status.pb.go +++ b/state/status.pb.go @@ -223,28 +223,28 @@ func (x *DeviceIdentity) GetId() string { return "" } -// 道岔状态 -type SwitchState struct { +// 道岔继电器状态 +type SwitchRelayState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // 定操继电器 - // true-继电器吸合触发道岔转动到定位操作,当定操完成该继电器断开 - NormalRelay bool `protobuf:"varint,1,opt,name=normalRelay,proto3" json:"normalRelay,omitempty"` + // true-继电器吸合 + DcJ bool `protobuf:"varint,1,opt,name=dcJ,proto3" json:"dcJ,omitempty"` // 反操继电器 - // true-继电器吸合触发道岔转动到反位操作,当反操完成该继电器断开 - ReverseRelay bool `protobuf:"varint,2,opt,name=reverseRelay,proto3" json:"reverseRelay,omitempty"` + // true-继电器吸合 + FcJ bool `protobuf:"varint,2,opt,name=fcJ,proto3" json:"fcJ,omitempty"` // 定表继电器 // true-继电器吸合表示道岔转动到定位 - NormalTable bool `protobuf:"varint,3,opt,name=normalTable,proto3" json:"normalTable,omitempty"` + DbJ bool `protobuf:"varint,3,opt,name=dbJ,proto3" json:"dbJ,omitempty"` // 反表继电器 // true-继电器吸合表示道岔转动到反位 - ReverseTable bool `protobuf:"varint,4,opt,name=reverseTable,proto3" json:"reverseTable,omitempty"` + FbJ bool `protobuf:"varint,4,opt,name=fbJ,proto3" json:"fbJ,omitempty"` } -func (x *SwitchState) Reset() { - *x = SwitchState{} +func (x *SwitchRelayState) Reset() { + *x = SwitchRelayState{} if protoimpl.UnsafeEnabled { mi := &file_status_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -252,13 +252,13 @@ func (x *SwitchState) Reset() { } } -func (x *SwitchState) String() string { +func (x *SwitchRelayState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SwitchState) ProtoMessage() {} +func (*SwitchRelayState) ProtoMessage() {} -func (x *SwitchState) ProtoReflect() protoreflect.Message { +func (x *SwitchRelayState) ProtoReflect() protoreflect.Message { mi := &file_status_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -270,178 +270,35 @@ func (x *SwitchState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SwitchState.ProtoReflect.Descriptor instead. -func (*SwitchState) Descriptor() ([]byte, []int) { +// Deprecated: Use SwitchRelayState.ProtoReflect.Descriptor instead. +func (*SwitchRelayState) Descriptor() ([]byte, []int) { return file_status_proto_rawDescGZIP(), []int{1} } -func (x *SwitchState) GetNormalRelay() bool { +func (x *SwitchRelayState) GetDcJ() bool { if x != nil { - return x.NormalRelay + return x.DcJ } return false } -func (x *SwitchState) GetReverseRelay() bool { +func (x *SwitchRelayState) GetFcJ() bool { if x != nil { - return x.ReverseRelay + return x.FcJ } return false } -func (x *SwitchState) GetNormalTable() bool { +func (x *SwitchRelayState) GetDbJ() bool { if x != nil { - return x.NormalTable + return x.DbJ } return false } -func (x *SwitchState) GetReverseTable() bool { +func (x *SwitchRelayState) GetFbJ() bool { if x != nil { - return x.ReverseTable - } - return false -} - -// 道岔定反操继电器动作过程操作 -type SwitchNRRelayOperating struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // true-定操继电器,false-反操继电器 - Normal bool `protobuf:"varint,1,opt,name=normal,proto3" json:"normal,omitempty"` - // 启动定反操继电器 - Start bool `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` - // 该继电器动作剩余时间,单位ms - OperateTime int64 `protobuf:"varint,3,opt,name=operateTime,proto3" json:"operateTime,omitempty"` - // true-吸合,false-断开 - Close bool `protobuf:"varint,4,opt,name=close,proto3" json:"close,omitempty"` -} - -func (x *SwitchNRRelayOperating) Reset() { - *x = SwitchNRRelayOperating{} - if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SwitchNRRelayOperating) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SwitchNRRelayOperating) ProtoMessage() {} - -func (x *SwitchNRRelayOperating) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SwitchNRRelayOperating.ProtoReflect.Descriptor instead. -func (*SwitchNRRelayOperating) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{2} -} - -func (x *SwitchNRRelayOperating) GetNormal() bool { - if x != nil { - return x.Normal - } - return false -} - -func (x *SwitchNRRelayOperating) GetStart() bool { - if x != nil { - return x.Start - } - return false -} - -func (x *SwitchNRRelayOperating) GetOperateTime() int64 { - if x != nil { - return x.OperateTime - } - return 0 -} - -func (x *SwitchNRRelayOperating) GetClose() bool { - if x != nil { - return x.Close - } - return false -} - -// 道岔转动操作 -type SwitchTurnOperating struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 是否执行转动操作,true-开始执行或正在执行转动操作 - Start bool `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - // 执行转动操作需要的剩余时长,单位ms - OperateTime int64 `protobuf:"varint,2,opt,name=operateTime,proto3" json:"operateTime,omitempty"` - // 执行转动操作的目标,true-道岔转向定位,false-道岔转向反位 - TurnNormal bool `protobuf:"varint,3,opt,name=turnNormal,proto3" json:"turnNormal,omitempty"` -} - -func (x *SwitchTurnOperating) Reset() { - *x = SwitchTurnOperating{} - if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SwitchTurnOperating) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SwitchTurnOperating) ProtoMessage() {} - -func (x *SwitchTurnOperating) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SwitchTurnOperating.ProtoReflect.Descriptor instead. -func (*SwitchTurnOperating) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{3} -} - -func (x *SwitchTurnOperating) GetStart() bool { - if x != nil { - return x.Start - } - return false -} - -func (x *SwitchTurnOperating) GetOperateTime() int64 { - if x != nil { - return x.OperateTime - } - return 0 -} - -func (x *SwitchTurnOperating) GetTurnNormal() bool { - if x != nil { - return x.TurnNormal + return x.FbJ } return false } @@ -459,7 +316,7 @@ type PhysicalSectionState struct { func (x *PhysicalSectionState) Reset() { *x = PhysicalSectionState{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[4] + mi := &file_status_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -472,7 +329,7 @@ func (x *PhysicalSectionState) String() string { func (*PhysicalSectionState) ProtoMessage() {} func (x *PhysicalSectionState) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[4] + mi := &file_status_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -485,7 +342,7 @@ func (x *PhysicalSectionState) ProtoReflect() protoreflect.Message { // Deprecated: Use PhysicalSectionState.ProtoReflect.Descriptor instead. func (*PhysicalSectionState) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{4} + return file_status_proto_rawDescGZIP(), []int{2} } func (x *PhysicalSectionState) GetOccupied() bool { @@ -508,7 +365,7 @@ type SignalState struct { func (x *SignalState) Reset() { *x = SignalState{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[5] + mi := &file_status_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -521,7 +378,7 @@ func (x *SignalState) String() string { func (*SignalState) ProtoMessage() {} func (x *SignalState) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[5] + mi := &file_status_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -534,7 +391,7 @@ func (x *SignalState) ProtoReflect() protoreflect.Message { // Deprecated: Use SignalState.ProtoReflect.Descriptor instead. func (*SignalState) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{5} + return file_status_proto_rawDescGZIP(), []int{3} } func (x *SignalState) GetDisplay() SignalAspect { @@ -561,7 +418,7 @@ type SignalDisplayOperating struct { func (x *SignalDisplayOperating) Reset() { *x = SignalDisplayOperating{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[6] + mi := &file_status_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -574,7 +431,7 @@ func (x *SignalDisplayOperating) String() string { func (*SignalDisplayOperating) ProtoMessage() {} func (x *SignalDisplayOperating) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[6] + mi := &file_status_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -587,7 +444,7 @@ func (x *SignalDisplayOperating) ProtoReflect() protoreflect.Message { // Deprecated: Use SignalDisplayOperating.ProtoReflect.Descriptor instead. func (*SignalDisplayOperating) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{6} + return file_status_proto_rawDescGZIP(), []int{4} } func (x *SignalDisplayOperating) GetStartOperate() bool { @@ -624,7 +481,7 @@ type PsdCellState struct { func (x *PsdCellState) Reset() { *x = PsdCellState{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[7] + mi := &file_status_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -637,7 +494,7 @@ func (x *PsdCellState) String() string { func (*PsdCellState) ProtoMessage() {} func (x *PsdCellState) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[7] + mi := &file_status_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -650,7 +507,7 @@ func (x *PsdCellState) ProtoReflect() protoreflect.Message { // Deprecated: Use PsdCellState.ProtoReflect.Descriptor instead. func (*PsdCellState) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{7} + return file_status_proto_rawDescGZIP(), []int{5} } func (x *PsdCellState) GetCloseRate() int32 { @@ -677,7 +534,7 @@ type PsdState struct { func (x *PsdState) Reset() { *x = PsdState{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[8] + mi := &file_status_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -690,7 +547,7 @@ func (x *PsdState) String() string { func (*PsdState) ProtoMessage() {} func (x *PsdState) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[8] + mi := &file_status_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -703,7 +560,7 @@ func (x *PsdState) ProtoReflect() protoreflect.Message { // Deprecated: Use PsdState.ProtoReflect.Descriptor instead. func (*PsdState) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{8} + return file_status_proto_rawDescGZIP(), []int{6} } func (x *PsdState) GetAllClosed() bool { @@ -749,7 +606,7 @@ type PsdCellOperating struct { func (x *PsdCellOperating) Reset() { *x = PsdCellOperating{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[9] + mi := &file_status_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -762,7 +619,7 @@ func (x *PsdCellOperating) String() string { func (*PsdCellOperating) ProtoMessage() {} func (x *PsdCellOperating) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[9] + mi := &file_status_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -775,7 +632,7 @@ func (x *PsdCellOperating) ProtoReflect() protoreflect.Message { // Deprecated: Use PsdCellOperating.ProtoReflect.Descriptor instead. func (*PsdCellOperating) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{9} + return file_status_proto_rawDescGZIP(), []int{7} } func (x *PsdCellOperating) GetStart() bool { @@ -826,7 +683,7 @@ type PercentageDeviceState struct { func (x *PercentageDeviceState) Reset() { *x = PercentageDeviceState{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[10] + mi := &file_status_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -839,7 +696,7 @@ func (x *PercentageDeviceState) String() string { func (*PercentageDeviceState) ProtoMessage() {} func (x *PercentageDeviceState) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[10] + mi := &file_status_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -852,7 +709,7 @@ func (x *PercentageDeviceState) ProtoReflect() protoreflect.Message { // Deprecated: Use PercentageDeviceState.ProtoReflect.Descriptor instead. func (*PercentageDeviceState) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{10} + return file_status_proto_rawDescGZIP(), []int{8} } func (x *PercentageDeviceState) GetRate() int32 { @@ -883,7 +740,7 @@ type PercentageDeviceOperating struct { func (x *PercentageDeviceOperating) Reset() { *x = PercentageDeviceOperating{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[11] + mi := &file_status_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -896,7 +753,7 @@ func (x *PercentageDeviceOperating) String() string { func (*PercentageDeviceOperating) ProtoMessage() {} func (x *PercentageDeviceOperating) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[11] + mi := &file_status_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -909,7 +766,7 @@ func (x *PercentageDeviceOperating) ProtoReflect() protoreflect.Message { // Deprecated: Use PercentageDeviceOperating.ProtoReflect.Descriptor instead. func (*PercentageDeviceOperating) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{11} + return file_status_proto_rawDescGZIP(), []int{9} } func (x *PercentageDeviceOperating) GetToH() bool { @@ -960,7 +817,7 @@ type BaliseState struct { func (x *BaliseState) Reset() { *x = BaliseState{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[12] + mi := &file_status_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -973,7 +830,7 @@ func (x *BaliseState) String() string { func (*BaliseState) ProtoMessage() {} func (x *BaliseState) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[12] + mi := &file_status_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -986,7 +843,7 @@ func (x *BaliseState) ProtoReflect() protoreflect.Message { // Deprecated: Use BaliseState.ProtoReflect.Descriptor instead. func (*BaliseState) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{12} + return file_status_proto_rawDescGZIP(), []int{10} } func (x *BaliseState) GetContent() *BaliseContent { @@ -1013,7 +870,7 @@ type BaliseContent struct { func (x *BaliseContent) Reset() { *x = BaliseContent{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[13] + mi := &file_status_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1026,7 +883,7 @@ func (x *BaliseContent) String() string { func (*BaliseContent) ProtoMessage() {} func (x *BaliseContent) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[13] + mi := &file_status_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1039,7 +896,7 @@ func (x *BaliseContent) ProtoReflect() protoreflect.Message { // Deprecated: Use BaliseContent.ProtoReflect.Descriptor instead. func (*BaliseContent) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{13} + return file_status_proto_rawDescGZIP(), []int{11} } func (x *BaliseContent) GetId() string { @@ -1081,7 +938,7 @@ type OccupiedLinkPosition struct { func (x *OccupiedLinkPosition) Reset() { *x = OccupiedLinkPosition{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[14] + mi := &file_status_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1094,7 +951,7 @@ func (x *OccupiedLinkPosition) String() string { func (*OccupiedLinkPosition) ProtoMessage() {} func (x *OccupiedLinkPosition) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[14] + mi := &file_status_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1107,7 +964,7 @@ func (x *OccupiedLinkPosition) ProtoReflect() protoreflect.Message { // Deprecated: Use OccupiedLinkPosition.ProtoReflect.Descriptor instead. func (*OccupiedLinkPosition) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{14} + return file_status_proto_rawDescGZIP(), []int{12} } func (x *OccupiedLinkPosition) GetLinkId() string { @@ -1146,7 +1003,7 @@ type TrainState struct { func (x *TrainState) Reset() { *x = TrainState{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[15] + mi := &file_status_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1159,7 +1016,7 @@ func (x *TrainState) String() string { func (*TrainState) ProtoMessage() {} func (x *TrainState) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[15] + mi := &file_status_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1172,7 +1029,7 @@ func (x *TrainState) ProtoReflect() protoreflect.Message { // Deprecated: Use TrainState.ProtoReflect.Descriptor instead. func (*TrainState) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{15} + return file_status_proto_rawDescGZIP(), []int{13} } func (x *TrainState) GetActiveHead() TrainActiveEnum { @@ -1202,7 +1059,7 @@ type ButtonState struct { func (x *ButtonState) Reset() { *x = ButtonState{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[16] + mi := &file_status_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1215,7 +1072,7 @@ func (x *ButtonState) String() string { func (*ButtonState) ProtoMessage() {} func (x *ButtonState) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[16] + mi := &file_status_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1228,7 +1085,7 @@ func (x *ButtonState) ProtoReflect() protoreflect.Message { // Deprecated: Use ButtonState.ProtoReflect.Descriptor instead. func (*ButtonState) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{16} + return file_status_proto_rawDescGZIP(), []int{14} } func (x *ButtonState) GetPressDown() bool { @@ -1257,7 +1114,7 @@ type ButtonPressOperating struct { func (x *ButtonPressOperating) Reset() { *x = ButtonPressOperating{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[17] + mi := &file_status_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1270,7 +1127,7 @@ func (x *ButtonPressOperating) String() string { func (*ButtonPressOperating) ProtoMessage() {} func (x *ButtonPressOperating) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[17] + mi := &file_status_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1283,7 +1140,7 @@ func (x *ButtonPressOperating) ProtoReflect() protoreflect.Message { // Deprecated: Use ButtonPressOperating.ProtoReflect.Descriptor instead. func (*ButtonPressOperating) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{17} + return file_status_proto_rawDescGZIP(), []int{15} } func (x *ButtonPressOperating) GetStart() bool { @@ -1329,7 +1186,7 @@ type ButtonConfirmOperating struct { func (x *ButtonConfirmOperating) Reset() { *x = ButtonConfirmOperating{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[18] + mi := &file_status_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1342,7 +1199,7 @@ func (x *ButtonConfirmOperating) String() string { func (*ButtonConfirmOperating) ProtoMessage() {} func (x *ButtonConfirmOperating) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[18] + mi := &file_status_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1355,7 +1212,7 @@ func (x *ButtonConfirmOperating) ProtoReflect() protoreflect.Message { // Deprecated: Use ButtonConfirmOperating.ProtoReflect.Descriptor instead. func (*ButtonConfirmOperating) Descriptor() ([]byte, []int) { - return file_status_proto_rawDescGZIP(), []int{18} + return file_status_proto_rawDescGZIP(), []int{16} } func (x *ButtonConfirmOperating) GetConfirm() bool { @@ -1378,139 +1235,120 @@ var file_status_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x20, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x99, 0x01, 0x0a, 0x0b, 0x53, 0x77, 0x69, 0x74, - 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, - 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x6f, - 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0c, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x20, 0x0a, - 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x22, 0x7e, 0x0a, 0x16, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4e, 0x52, 0x52, - 0x65, 0x6c, 0x61, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, - 0x06, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6e, - 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x6c, - 0x6f, 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x13, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x54, 0x75, 0x72, - 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x4e, 0x6f, 0x72, 0x6d, - 0x61, 0x6c, 0x22, 0x32, 0x0a, 0x14, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x63, - 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x63, - 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x22, 0x3c, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x07, 0x64, 0x69, 0x73, - 0x70, 0x6c, 0x61, 0x79, 0x22, 0x97, 0x01, 0x0a, 0x16, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, - 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, - 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, - 0x73, 0x70, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, - 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x22, 0x2c, - 0x0a, 0x0c, 0x50, 0x73, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0x74, 0x0a, 0x08, - 0x50, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x43, - 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, - 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x65, - 0x6e, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x4f, 0x70, - 0x65, 0x6e, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, - 0x65, 0x64, 0x22, 0xc0, 0x01, 0x0a, 0x10, 0x50, 0x73, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x22, 0x0a, - 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x44, 0x69, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x75, 0x6d, 0x44, 0x69, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x75, 0x6d, 0x44, - 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x61, 0x69, - 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x2b, 0x0a, 0x15, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x61, 0x67, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, - 0x74, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x19, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, - 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, - 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6f, 0x48, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, - 0x6f, 0x48, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x68, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x68, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5a, 0x0a, 0x10, 0x53, 0x77, 0x69, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, + 0x63, 0x4a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x63, 0x4a, 0x12, 0x10, 0x0a, + 0x03, 0x66, 0x63, 0x4a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x66, 0x63, 0x4a, 0x12, + 0x10, 0x0a, 0x03, 0x64, 0x62, 0x4a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x62, + 0x4a, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x62, 0x4a, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, + 0x66, 0x62, 0x4a, 0x22, 0x32, 0x0a, 0x14, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x53, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, + 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, + 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x22, 0x3c, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x07, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x22, 0x97, 0x01, 0x0a, 0x16, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x41, 0x73, 0x70, 0x65, 0x63, + 0x74, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x22, + 0x2c, 0x0a, 0x0c, 0x50, 0x73, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0x74, 0x0a, + 0x08, 0x50, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, + 0x6c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x4f, 0x70, + 0x65, 0x6e, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x4f, + 0x70, 0x65, 0x6e, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6c, 0x6f, + 0x63, 0x6b, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x64, 0x22, 0xc0, 0x01, 0x0a, 0x10, 0x50, 0x73, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x75, 0x6d, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x75, 0x6d, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x69, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x3d, 0x0a, 0x0b, 0x42, 0x61, 0x6c, 0x69, 0x73, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x42, - 0x61, 0x6c, 0x69, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x4d, 0x0a, 0x0d, 0x42, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x22, 0x6e, 0x0a, 0x14, 0x4f, 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, - 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, - 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x69, - 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x4f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x22, 0x87, 0x01, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x54, 0x72, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, - 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x65, 0x61, 0x64, 0x12, 0x41, 0x0a, 0x0d, 0x6f, - 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x63, 0x63, 0x75, 0x70, - 0x69, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0d, 0x6f, 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x2b, - 0x0a, 0x0b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x70, 0x72, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x70, 0x72, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x14, - 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, - 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x20, - 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x72, 0x6d, 0x22, 0x4a, 0x0a, 0x16, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x2a, 0x81, - 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, - 0x06, 0x0a, 0x02, 0x4e, 0x6f, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x52, 0x10, 0x01, 0x12, 0x05, - 0x0a, 0x01, 0x47, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x59, 0x10, 0x03, 0x12, 0x05, 0x0a, 0x01, - 0x57, 0x10, 0x04, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x05, 0x12, 0x06, 0x0a, 0x02, 0x52, 0x59, - 0x10, 0x06, 0x12, 0x06, 0x0a, 0x02, 0x52, 0x57, 0x10, 0x07, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x47, - 0x10, 0x08, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x59, 0x10, 0x09, 0x12, 0x06, 0x0a, 0x02, 0x59, 0x59, - 0x10, 0x0a, 0x12, 0x06, 0x0a, 0x02, 0x52, 0x46, 0x10, 0x0b, 0x12, 0x06, 0x0a, 0x02, 0x59, 0x46, - 0x10, 0x0c, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x46, 0x10, 0x0d, 0x12, 0x06, 0x0a, 0x02, 0x57, 0x46, - 0x10, 0x0e, 0x2a, 0x35, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x5f, 0x4e, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x5f, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x48, 0x45, 0x41, 0x44, 0x5f, 0x42, 0x10, 0x02, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x2b, 0x0a, 0x15, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, + 0x61, 0x74, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x19, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, + 0x67, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6f, 0x48, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, + 0x74, 0x6f, 0x48, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x68, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x68, 0x44, 0x69, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x44, 0x69, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x44, + 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x75, 0x6d, 0x44, 0x69, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x75, + 0x6d, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x6d, + 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x44, + 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x3d, 0x0a, 0x0b, 0x42, 0x61, 0x6c, 0x69, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x42, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x4d, 0x0a, 0x0d, 0x42, 0x61, 0x6c, 0x69, 0x73, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x6e, 0x0a, 0x14, 0x4f, 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, + 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, + 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x4f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x4f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x87, 0x01, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x65, + 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x75, 0x6d, + 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x65, 0x61, 0x64, 0x12, 0x41, 0x0a, 0x0d, + 0x6f, 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x63, 0x63, 0x75, + 0x70, 0x69, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0d, 0x6f, 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x22, + 0x2b, 0x0a, 0x0b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x70, 0x72, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x70, 0x72, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x22, 0x84, 0x01, 0x0a, + 0x14, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x6f, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x12, + 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x72, 0x6d, 0x22, 0x4a, 0x0a, 0x16, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x72, 0x6d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x2a, + 0x81, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, + 0x12, 0x06, 0x0a, 0x02, 0x4e, 0x6f, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x52, 0x10, 0x01, 0x12, + 0x05, 0x0a, 0x01, 0x47, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x59, 0x10, 0x03, 0x12, 0x05, 0x0a, + 0x01, 0x57, 0x10, 0x04, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x05, 0x12, 0x06, 0x0a, 0x02, 0x52, + 0x59, 0x10, 0x06, 0x12, 0x06, 0x0a, 0x02, 0x52, 0x57, 0x10, 0x07, 0x12, 0x06, 0x0a, 0x02, 0x47, + 0x47, 0x10, 0x08, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x59, 0x10, 0x09, 0x12, 0x06, 0x0a, 0x02, 0x59, + 0x59, 0x10, 0x0a, 0x12, 0x06, 0x0a, 0x02, 0x52, 0x46, 0x10, 0x0b, 0x12, 0x06, 0x0a, 0x02, 0x59, + 0x46, 0x10, 0x0c, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x46, 0x10, 0x0d, 0x12, 0x06, 0x0a, 0x02, 0x57, + 0x46, 0x10, 0x0e, 0x2a, 0x35, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x5f, 0x4e, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x5f, 0x41, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x5f, 0x42, 0x10, 0x02, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1526,36 +1364,34 @@ func file_status_proto_rawDescGZIP() []byte { } var file_status_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_status_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_status_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_status_proto_goTypes = []interface{}{ (SignalAspect)(0), // 0: state.SignalAspect (TrainActiveEnum)(0), // 1: state.TrainActiveEnum (*DeviceIdentity)(nil), // 2: state.DeviceIdentity - (*SwitchState)(nil), // 3: state.SwitchState - (*SwitchNRRelayOperating)(nil), // 4: state.SwitchNRRelayOperating - (*SwitchTurnOperating)(nil), // 5: state.SwitchTurnOperating - (*PhysicalSectionState)(nil), // 6: state.PhysicalSectionState - (*SignalState)(nil), // 7: state.SignalState - (*SignalDisplayOperating)(nil), // 8: state.SignalDisplayOperating - (*PsdCellState)(nil), // 9: state.PsdCellState - (*PsdState)(nil), // 10: state.PsdState - (*PsdCellOperating)(nil), // 11: state.PsdCellOperating - (*PercentageDeviceState)(nil), // 12: state.PercentageDeviceState - (*PercentageDeviceOperating)(nil), // 13: state.PercentageDeviceOperating - (*BaliseState)(nil), // 14: state.BaliseState - (*BaliseContent)(nil), // 15: state.BaliseContent - (*OccupiedLinkPosition)(nil), // 16: state.OccupiedLinkPosition - (*TrainState)(nil), // 17: state.TrainState - (*ButtonState)(nil), // 18: state.ButtonState - (*ButtonPressOperating)(nil), // 19: state.ButtonPressOperating - (*ButtonConfirmOperating)(nil), // 20: state.ButtonConfirmOperating + (*SwitchRelayState)(nil), // 3: state.SwitchRelayState + (*PhysicalSectionState)(nil), // 4: state.PhysicalSectionState + (*SignalState)(nil), // 5: state.SignalState + (*SignalDisplayOperating)(nil), // 6: state.SignalDisplayOperating + (*PsdCellState)(nil), // 7: state.PsdCellState + (*PsdState)(nil), // 8: state.PsdState + (*PsdCellOperating)(nil), // 9: state.PsdCellOperating + (*PercentageDeviceState)(nil), // 10: state.PercentageDeviceState + (*PercentageDeviceOperating)(nil), // 11: state.PercentageDeviceOperating + (*BaliseState)(nil), // 12: state.BaliseState + (*BaliseContent)(nil), // 13: state.BaliseContent + (*OccupiedLinkPosition)(nil), // 14: state.OccupiedLinkPosition + (*TrainState)(nil), // 15: state.TrainState + (*ButtonState)(nil), // 16: state.ButtonState + (*ButtonPressOperating)(nil), // 17: state.ButtonPressOperating + (*ButtonConfirmOperating)(nil), // 18: state.ButtonConfirmOperating } var file_status_proto_depIdxs = []int32{ 0, // 0: state.SignalState.display:type_name -> state.SignalAspect 0, // 1: state.SignalDisplayOperating.targetAspect:type_name -> state.SignalAspect - 15, // 2: state.BaliseState.content:type_name -> state.BaliseContent + 13, // 2: state.BaliseState.content:type_name -> state.BaliseContent 1, // 3: state.TrainState.activeHead:type_name -> state.TrainActiveEnum - 16, // 4: state.TrainState.occupiedLinks:type_name -> state.OccupiedLinkPosition + 14, // 4: state.TrainState.occupiedLinks:type_name -> state.OccupiedLinkPosition 5, // [5:5] is the sub-list for method output_type 5, // [5:5] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name @@ -1582,7 +1418,7 @@ func file_status_proto_init() { } } file_status_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SwitchState); i { + switch v := v.(*SwitchRelayState); i { case 0: return &v.state case 1: @@ -1594,30 +1430,6 @@ func file_status_proto_init() { } } file_status_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SwitchNRRelayOperating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_status_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SwitchTurnOperating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_status_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PhysicalSectionState); i { case 0: return &v.state @@ -1629,7 +1441,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignalState); i { case 0: return &v.state @@ -1641,7 +1453,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignalDisplayOperating); i { case 0: return &v.state @@ -1653,7 +1465,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PsdCellState); i { case 0: return &v.state @@ -1665,7 +1477,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PsdState); i { case 0: return &v.state @@ -1677,7 +1489,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PsdCellOperating); i { case 0: return &v.state @@ -1689,7 +1501,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PercentageDeviceState); i { case 0: return &v.state @@ -1701,7 +1513,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PercentageDeviceOperating); i { case 0: return &v.state @@ -1713,7 +1525,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BaliseState); i { case 0: return &v.state @@ -1725,7 +1537,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BaliseContent); i { case 0: return &v.state @@ -1737,7 +1549,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OccupiedLinkPosition); i { case 0: return &v.state @@ -1749,7 +1561,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrainState); i { case 0: return &v.state @@ -1761,7 +1573,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ButtonState); i { case 0: return &v.state @@ -1773,7 +1585,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ButtonPressOperating); i { case 0: return &v.state @@ -1785,7 +1597,7 @@ func file_status_proto_init() { return nil } } - file_status_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_status_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ButtonConfirmOperating); i { case 0: return &v.state @@ -1804,7 +1616,7 @@ func file_status_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_status_proto_rawDesc, NumEnums: 2, - NumMessages: 19, + NumMessages: 17, NumExtensions: 0, NumServices: 0, }, diff --git a/system/debug_system.go b/system/debug_system.go index acc6cef..774e270 100644 --- a/system/debug_system.go +++ b/system/debug_system.go @@ -62,23 +62,6 @@ func debugSignal(w ecs.World) { // 显示道岔状态 func debugSwitch(w ecs.World) { - switchesQuery := ecs.NewQuery(filter.Contains(components.DeviceIdentityComponent, components.SwitchStateComponent)) - switchesQuery.Each(w, func(e *ecs.Entry) { - id := components.DeviceIdentityComponent.Get(e).Id - state := components.SwitchStateComponent.Get(e) - fmt.Printf("==>>道岔[%s] ,定操Relay=%t ,反操Relay=%t ,定表Relay=%t ,反表Relay=%t ,", id, state.NormalRelay, state.ReverseRelay, state.NormalTable, state.ReverseTable) - if e.HasComponent(components.SwitchNRRelayOperatingComponent) { - nrOperation := components.SwitchNRRelayOperatingComponent.Get(e) - if nrOperation.Normal { - fmt.Printf("定操动作Start=%t ,剩余时间=%d ,吸合动作=%t ,", nrOperation.Start, nrOperation.OperateTime, nrOperation.Close) - } else { - fmt.Printf("反操动作Start=%t ,剩余时间=%d ,吸合动作=%t ,", nrOperation.Start, nrOperation.OperateTime, nrOperation.Close) - } - } - if e.HasComponent(components.SwitchTurnOperatingComponent) { - turnOperation := components.SwitchTurnOperatingComponent.Get(e) - fmt.Printf("转动操作Start=%t ,转动到定位=%t ,剩余时间=%d", turnOperation.Start, turnOperation.TurnNormal, turnOperation.OperateTime) - } - fmt.Println() - }) + //switchesQuery := ecs.NewQuery(filter.Contains(components.DeviceIdentityComponent, components.SwitchStateComponent)) + } diff --git a/system/switch_system.go b/system/switch_system.go index 76885f1..8890541 100644 --- a/system/switch_system.go +++ b/system/switch_system.go @@ -1,21 +1,9 @@ package system import ( - "github.com/yohamta/donburi/filter" "joylink.club/ecs" - "joylink.club/rtsssimulation/components" - "joylink.club/rtsssimulation/state" ) -// 定反操继电器查询 -var nrRelayQuery *ecs.Query = ecs.NewQuery(filter.Contains(components.SwitchNRRelayOperatingComponent)) - -// 道岔转动查询 -var turningQuery *ecs.Query = ecs.NewQuery(filter.Contains(components.SwitchTurnOperatingComponent)) - -// 道岔状态查询 -var switchStateQuery *ecs.Query = ecs.NewQuery(filter.Contains(components.DeviceIdentityComponent, components.SwitchStateComponent)) - // 道岔系统操作 type SwitchSystem struct { } @@ -29,96 +17,13 @@ func NewSwitchSystem() *SwitchSystem { // switchId: 道岔id // turnNormal: true-道岔转动到定位,false-道岔转动到反位 func FireSwitchTurn(w ecs.World, switchId string, turnNormal bool) bool { - var switchEntry *ecs.Entry = nil - switchStateQuery.Each(w, func(e *ecs.Entry) { - if id := components.DeviceIdentityComponent.Get(e).Id; id == switchId { - switchEntry = e - } - }) - // - if nil == switchEntry { - return false - } - // - switchState := components.SwitchStateComponent.Get(switchEntry) - if turnNormal == switchState.NormalTable && !turnNormal == switchState.ReverseTable { - return true - } - // - nrRelayTime := getSwitchNRDelayTime(switchId) - if !switchEntry.HasComponent(components.SwitchNRRelayOperatingComponent) { - switchEntry.AddComponent(components.SwitchNRRelayOperatingComponent) - } - *(components.SwitchNRRelayOperatingComponent.Get(switchEntry)) = state.SwitchNRRelayOperating{Start: true, OperateTime: nrRelayTime, Close: true, Normal: turnNormal} - // + return true } // world 执行 func (me *SwitchSystem) Update(w ecs.World) { - updateNormalReverseRelay(w) - updateTurnOperating(w) -} -// 道岔转动动作 -func updateTurnOperating(w ecs.World) { - turningQuery.Each(w, func(e *ecs.Entry) { - if !e.HasComponent(components.SwitchNRRelayOperatingComponent) { - operation := components.SwitchTurnOperatingComponent.Get(e) - switchState := components.SwitchStateComponent.Get(e) - if operation.Start { - if operation.OperateTime <= 0 { - operation.Start = false - switchState.NormalTable = operation.TurnNormal - switchState.ReverseTable = !operation.TurnNormal - switchState.NormalRelay = false - switchState.ReverseRelay = false - } else { //此时道岔失表 - operation.OperateTime -= int64(w.Tick()) - switchState.NormalTable = false - switchState.ReverseTable = false - } - } - if !operation.Start { - e.RemoveComponent(components.SwitchTurnOperatingComponent) - } - } else { - e.RemoveComponent(components.SwitchTurnOperatingComponent) - } - }) -} - -// 定反操继电器操作 -func updateNormalReverseRelay(w ecs.World) { - nrRelayQuery.Each(w, func(e *ecs.Entry) { - operation := components.SwitchNRRelayOperatingComponent.Get(e) - if operation.Start { - if operation.OperateTime <= 0 { - operation.Start = false - // - switchState := components.SwitchStateComponent.Get(e) - if operation.Normal { - switchState.NormalRelay = operation.Close - } else { - switchState.ReverseRelay = operation.Close - } - // - if operation.Close { //触发道岔转动操作 - if !e.HasComponent(components.SwitchTurnOperatingComponent) { - e.AddComponent(components.SwitchTurnOperatingComponent) - } - switchId := components.DeviceIdentityComponent.Get(e).Id - turnTime := getSwitchTurnTime(switchId) - *(components.SwitchTurnOperatingComponent.Get(e)) = state.SwitchTurnOperating{Start: true, OperateTime: turnTime, TurnNormal: operation.Normal} - } - } else { - operation.OperateTime -= int64(w.Tick()) - } - } - if !operation.Start { - e.RemoveComponent(components.SwitchNRRelayOperatingComponent) - } - }) } // 获取道岔转动耗时ms