This commit is contained in:
weizhihong 2023-11-03 13:36:15 +08:00
commit 20949cc937
14 changed files with 560 additions and 249 deletions

@ -1 +1 @@
Subproject commit 29711ded19ff3819898805f9e61fe74f819995aa
Subproject commit 280219a91abaa9c58fd9979ad7340fe5d85caad1

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc-gen-go v1.31.0
// protoc v4.23.1
// source: request.proto
@ -236,43 +236,55 @@ func (Section_Operation) EnumDescriptor() ([]byte, []int) {
type Psd_Operation int32
const (
Psd_Undefined Psd_Operation = 0
Psd_Km4 Psd_Operation = 1 //四编组开门
Psd_CancelKm4 Psd_Operation = 2 //取消四编组开门
Psd_Km8 Psd_Operation = 3 //八编组开门
Psd_CancelKm8 Psd_Operation = 4 //取消八编组开门
Psd_Gm Psd_Operation = 5 //关门
Psd_CancelGm Psd_Operation = 6 //取消关门
Psd_ForceKm4 Psd_Operation = 7 //强制四编组开门
Psd_ForceKm8 Psd_Operation = 8 //强制八编组开门
Psd_ForceGm Psd_Operation = 9 //强制关门
Psd_Undefined Psd_Operation = 0
Psd_Km4 Psd_Operation = 1 //四编组开门
Psd_CancelKm4 Psd_Operation = 2 //取消四编组开门
Psd_Km8 Psd_Operation = 3 //八编组开门
Psd_CancelKm8 Psd_Operation = 4 //取消八编组开门
Psd_Gm Psd_Operation = 5 //关门
Psd_CancelGm Psd_Operation = 6 //取消关门
Psd_ForceKm4 Psd_Operation = 7 //强制四编组开门
Psd_ForceKm8 Psd_Operation = 8 //强制八编组开门
Psd_ForceGm Psd_Operation = 9 //强制关门
Psd_AsdCannotOpen Psd_Operation = 10 //滑动门无法开门
Psd_CancelAsdCannotOpen Psd_Operation = 11 //取消滑动门无法开门
Psd_AsdCannotClose Psd_Operation = 12 //滑动门无法关闭
Psd_CancelAsdCannotClose Psd_Operation = 13 //取消滑动门无法关闭
)
// Enum value maps for Psd_Operation.
var (
Psd_Operation_name = map[int32]string{
0: "Undefined",
1: "Km4",
2: "CancelKm4",
3: "Km8",
4: "CancelKm8",
5: "Gm",
6: "CancelGm",
7: "ForceKm4",
8: "ForceKm8",
9: "ForceGm",
0: "Undefined",
1: "Km4",
2: "CancelKm4",
3: "Km8",
4: "CancelKm8",
5: "Gm",
6: "CancelGm",
7: "ForceKm4",
8: "ForceKm8",
9: "ForceGm",
10: "AsdCannotOpen",
11: "CancelAsdCannotOpen",
12: "AsdCannotClose",
13: "CancelAsdCannotClose",
}
Psd_Operation_value = map[string]int32{
"Undefined": 0,
"Km4": 1,
"CancelKm4": 2,
"Km8": 3,
"CancelKm8": 4,
"Gm": 5,
"CancelGm": 6,
"ForceKm4": 7,
"ForceKm8": 8,
"ForceGm": 9,
"Undefined": 0,
"Km4": 1,
"CancelKm4": 2,
"Km8": 3,
"CancelKm8": 4,
"Gm": 5,
"CancelGm": 6,
"ForceKm4": 7,
"ForceKm8": 8,
"ForceGm": 9,
"AsdCannotOpen": 10,
"CancelAsdCannotOpen": 11,
"AsdCannotClose": 12,
"CancelAsdCannotClose": 13,
}
)
@ -541,6 +553,7 @@ type PsdOperationReq struct {
MapId int32 `protobuf:"varint,2,opt,name=mapId,proto3" json:"mapId,omitempty"` // 图id
DeviceId string `protobuf:"bytes,3,opt,name=deviceId,proto3" json:"deviceId,omitempty"` // 设备id
Operation Psd_Operation `protobuf:"varint,4,opt,name=operation,proto3,enum=request.Psd_Operation" json:"operation,omitempty"` // 操作
AsdCodes []int32 `protobuf:"varint,5,rep,packed,name=asdCodes,proto3" json:"asdCodes,omitempty"` //无法关闭/无法开启故障涉及的滑动门的编号
}
func (x *PsdOperationReq) Reset() {
@ -603,6 +616,13 @@ func (x *PsdOperationReq) GetOperation() Psd_Operation {
return Psd_Undefined
}
func (x *PsdOperationReq) GetAsdCodes() []int32 {
if x != nil {
return x.AsdCodes
}
return nil
}
var File_request_proto protoreflect.FileDescriptor
var file_request_proto_rawDesc = []byte{
@ -652,7 +672,7 @@ var file_request_proto_rawDesc = []byte{
0x0b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x64, 0x72, 0x73, 0x74, 0x10, 0x03, 0x12, 0x0f,
0x0a, 0x0b, 0x53, 0x65, 0x74, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x63, 0x63, 0x10, 0x04, 0x12,
0x12, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x63,
0x63, 0x10, 0x05, 0x22, 0x91, 0x01, 0x0a, 0x03, 0x50, 0x73, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x09,
0x63, 0x10, 0x05, 0x22, 0xeb, 0x01, 0x0a, 0x03, 0x50, 0x73, 0x64, 0x22, 0xe3, 0x01, 0x0a, 0x09,
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x6e, 0x64,
0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4b, 0x6d, 0x34, 0x10,
0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4b, 0x6d, 0x34, 0x10, 0x02,
@ -661,19 +681,26 @@ var file_request_proto_rawDesc = []byte{
0x12, 0x0c, 0x0a, 0x08, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x47, 0x6d, 0x10, 0x06, 0x12, 0x0c,
0x0a, 0x08, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x4b, 0x6d, 0x34, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08,
0x46, 0x6f, 0x72, 0x63, 0x65, 0x4b, 0x6d, 0x38, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x6f,
0x72, 0x63, 0x65, 0x47, 0x6d, 0x10, 0x09, 0x22, 0x9d, 0x01, 0x0a, 0x0f, 0x50, 0x73, 0x64, 0x4f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x73,
0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
0x14, 0x0a, 0x05, 0x6d, 0x61, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x6d, 0x61, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
0x64, 0x12, 0x34, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50,
0x73, 0x64, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x15, 0x5a, 0x13, 0x2e, 0x2f, 0x64, 0x74, 0x6f,
0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x63, 0x65, 0x47, 0x6d, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x73, 0x64, 0x43, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x10, 0x0a, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x61,
0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x64, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x4f, 0x70, 0x65,
0x6e, 0x10, 0x0b, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x73, 0x64, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10, 0x0c, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65,
0x6c, 0x41, 0x73, 0x64, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10,
0x0d, 0x22, 0xb9, 0x01, 0x0a, 0x0f, 0x50, 0x73, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x69, 0x6d,
0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x70,
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x70, 0x49, 0x64, 0x12,
0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x09, 0x6f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16,
0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x73, 0x64, 0x2e, 0x4f, 0x70, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x73, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20,
0x03, 0x28, 0x05, 0x52, 0x08, 0x61, 0x73, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x42, 0x15, 0x5a,
0x13, 0x2e, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -2,6 +2,7 @@ package message_server
import (
"fmt"
"strconv"
"time"
"google.golang.org/protobuf/proto"
@ -102,16 +103,21 @@ func (ms *SfpMs) collectPsdStates() ([]*state.PsdState, error) {
uid := uidStructure.PsdIds[door.Common.Id].Uid
psdEntry, ok := entity.GetEntityByUid(world, uid)
if ok {
var openSubDoor []int32
for i, asd := range component.AsdListType.Get(psdEntry).List {
if !component.AsdMotorStateType.Get(asd).MG {
openSubDoor = append(openSubDoor, int32(i+1))
list := component.AsdListType.Get(psdEntry).List
asdStates := make([]*state.AsdState, len(list), len(list))
for i, asdEntry := range list {
asdState := component.AsdStateType.Get(asdEntry)
asdStates[i] = &state.AsdState{
Code: strconv.Itoa(i + 1),
Kmdw: asdState.Kmdw,
Gmdw: asdState.Gmdw,
Mgj: asdState.Mgj,
}
}
psdStateArr = append(psdStateArr, &state.PsdState{
Id: door.Common.Id,
Close: component.PsdStateType.Get(psdEntry).Close,
OpenAsdCodes: openSubDoor,
Id: door.Common.Id,
AsdStates: asdStates,
Mgj: component.PsdStateType.Get(psdEntry).Close,
})
}
}

@ -1 +1 @@
Subproject commit 8cf9e419b8a67ce1102870e0a8342cb3fb2f2a6c
Subproject commit d080a2a1fc3224f1a9c1696d57dad95635523956

View File

@ -1,10 +1,10 @@
package axle_device
// AxleDeviceConfig CI系统与计轴设备的安全通信协议配置参数
// RsspConfig CI系统与计轴设备的安全通信协议配置参数
// 计轴设备(管理一个集中站的所有计轴器)配置
type AxleDeviceConfig struct {
SrcAddr uint16 //16位源地址
DstAddr uint16 //16位目的地址
type RsspConfig struct {
SrcAddr uint16 //16位源地址,本地地址
DstAddr uint16 //16位目的地址,远程地址
DataVer1 uint32 //通道1数据版本
DataVer2 uint32 //通道2数据版本
SID1 uint32 //通道1源标识
@ -13,11 +13,11 @@ type AxleDeviceConfig struct {
SINIT2 uint32 //通道2序列初始
SendingPeriod uint32 //接收方每个安全通信会话对应的发送周期值,单位ms
SSRTimeout uint32 //等待SSR回应的定时器超时值,单位ms
Mtv uint32 //每个安全通信会话可容忍的最大时序偏差
Mtv uint32 //每个安全通信会话可容忍的最大时序偏差,即当前接收的RSD的序列号与上一次RSD的序列号最大允许差值
Udl uint32 //每个安全通信会话RSD应用数据长度发送和接收的配置值支持固定长度和可变长度;0-可变长度大于0即固定长度
}
// CheckAddress 检测目标源地址目的地址是否在配置中
func (c *AxleDeviceConfig) CheckAddress(srcAddr uint16, dstAddr uint16) bool {
func (c *RsspConfig) CheckAddress(srcAddr uint16, dstAddr uint16) bool {
return true
}

View File

@ -1,41 +1,183 @@
package axle_device
import "joylink.club/bj-rtsts-server/third_party/message"
import (
"joylink.club/bj-rtsts-server/third_party/message"
"log/slog"
)
// 实现rssp通信流程
type RsspServer struct {
// RsspChannel 实现rssp通信
type RsspChannel struct {
config *RsspConfig
//批次编号,发送序列号,周期计数器
sn *message.RsspSn
//安全通道1时间戳
ch1Ts *message.RsspLFSR
//安全通道2时间戳
ch2Ts *message.RsspLFSR
//协议交互类别
picType message.PicType
//true-A机false-B机
deviceA bool
//最近一次接收到的报文的安全通道1时间戳
rcvCh1Ts uint32
//最近一次接收到的报文的安全通道2时间戳
rcvCh2Ts uint32
//最近一次接收到的报文的序列号
rcvSn uint32
}
// HandleRsspMsg 处理接收到的rssp报文
func (s *RsspServer) HandleRsspMsg(pack []byte, config *AxleDeviceConfig) {
func (s *RsspChannel) HandleRsspMsg(pack []byte) {
//报文头校验
head := &message.RsspHead{}
if !head.Parse(pack) { //解析报文头失败
slog.Debug("丢弃接收的RSSP报文解析报文头失败")
return
}
if !message.RsspHeadMcCheck(head) { //报文类别检测未通过
slog.Debug("丢弃接收的RSSP报文报文类别检测未通过")
return
}
if !message.RsspHeadPicCheck(head) { //协议交互类别检测未通过
slog.Debug("丢弃接收的RSSP报文协议交互类别检测未通过")
return
}
if !config.CheckAddress(head.Sa, head.Da) { //校验报文头中源地址和目的地址是否包含在已配置列表中
if !s.config.CheckAddress(head.Sa, head.Da) { //校验报文头中源地址和目的地址是否包含在已配置列表中
slog.Debug("丢弃接收的RSSP报文报文头中源地址或目的地址不在在已配置列表中")
return
}
//报文尾校验
if !message.RsspPackCrc16Check(pack) { //整个报文crc16校验未通过
slog.Debug("丢弃接收的RSSP报文报文尾CRC16校验未通过")
return
}
//解析得到RSD、SSE或SRE
rssp := message.ParseRsspPack(head, pack)
if rssp == nil { //解析具体rssp包失败
slog.Debug("丢弃接收的RSSP报文解析具体类别包失败")
return
}
//处理接收到的具体类别RSSP包
switch rssp.Type() {
case message.RSD_A:
fallthrough
case message.RSD_B:
s.handleRsspRsd(rssp.(*message.RsspRsd))
case message.SSE:
s.handleRsspSse(rssp.(*message.RsspSse))
case message.SSR:
s.handleRsspSsr(rssp.(*message.RsspSsr))
}
}
// 处理接收到的实时安全数据
func (s *RsspChannel) handleRsspRsd(rsd *message.RsspRsd) {
//序列号校验
//接收的序列号小于最近一次有效序列号则触发SSE时序校验
if rsd.Sn < s.rcvSn {
slog.Debug("丢弃接收的RSSP-RSD报文当前接收RSD的序列号小于最近一次接收的RSD的序列号触发SSE")
s.fireSse(rsd)
return
}
if rsd.Sn-s.rcvSn > s.config.Mtv {
slog.Debug("丢弃接收的RSSP-RSD报文当前接收RSD的序列号与最近一次接收的RSD的序列号差值过大触发SSE")
s.fireSse(rsd)
return
}
//SVC校验
}
// 触发时序校正请求
func (s *RsspChannel) fireSse(rsd *message.RsspRsd) {
}
// 接收到时序校正请求
func (s *RsspChannel) handleRsspSse(rsd *message.RsspSse) {
}
// 接收到时序校正应答
func (s *RsspChannel) handleRsspSsr(rsd *message.RsspSsr) {
}
// 将序列号和时间戳更新到下一个值
func (s *RsspChannel) freshSnTs() {
s.sn.GetAndAdd()
s.ch1Ts.GetAndMove()
s.ch2Ts.GetAndMove()
}
// 发送时序校正应答
func (s *RsspChannel) sendSsr(sse *message.RsspSse) {
ssr := &message.RsspSsr{}
//
ssr.Pic = message.PIC_MASTER
ssr.Mc = message.SSR
ssr.Sa = s.config.SrcAddr
ssr.Da = s.config.DstAddr
ssr.SrSn = s.sn.Get() //当前序列号
ssr.SeSn = sse.Sn
ssr.Tic1 = sse.SeqEnq1 ^ s.config.SID1 ^ s.ch1Ts.Get() ^ s.config.DataVer1
ssr.Tic2 = sse.SeqEnq2 ^ s.config.SID2 ^ s.ch2Ts.Get() ^ s.config.DataVer2
ssr.Dvn = 0x01 //预留固定值
//
rsspPack := ssr.Encode()
s.sendPack(rsspPack)
}
// 发送时序校正请求
func (s *RsspChannel) sendSse() {
sse := &message.RsspSse{}
//
sse.Pic = message.PIC_MASTER
sse.Mc = message.SSE
sse.Sa = s.config.SrcAddr
sse.Da = s.config.DstAddr
//时序校正请求,把最近一次接收到的报文中的序列号时间戳发送给发送方
sse.Sn = s.rcvSn
sse.SeqEnq1 = s.createSeqNeq(s.config.SID1, s.rcvCh1Ts)
sse.SeqEnq2 = s.createSeqNeq(s.config.SID2, s.rcvCh2Ts)
//
rsspPack := sse.Encode()
s.sendPack(rsspPack)
}
// 发送用户数据即通过rssp安全通道发送应用层数据通过rssp的RSD报文发送
func (s *RsspChannel) sendUserData(userData []byte) {
rsd := &message.RsspRsd{}
rsd.Pic = s.picType
if s.deviceA {
rsd.Mc = message.RSD_A
} else {
rsd.Mc = message.RSD_B
}
rsd.Sa = s.config.SrcAddr
rsd.Da = s.config.DstAddr
//
rsd.Sn = s.sn.Get()
rsd.Sdl = uint16(len(userData) + 8)
//安全校验通道SVC_1
crc_c1 := message.RsspC1Crc32(userData)
rsd.Svc1 = s.createSvcCode(crc_c1, s.config.SID1, s.ch1Ts.Get(), message.SCW_C1)
//安全校验通道SVC_2
crc_c2 := message.RsspC2Crc32(userData)
rsd.Svc1 = s.createSvcCode(crc_c2, s.config.SID2, s.ch2Ts.Get(), message.SCW_C2)
rsd.Sad = userData
//
rsspPack := rsd.Encode()
s.sendPack(rsspPack)
}
func (s *RsspChannel) createSvcCode(crc32 uint32, sid uint32, ts uint32, scw uint32) uint32 {
return crc32 ^ sid ^ ts ^ scw
}
func (s *RsspChannel) createSeqNeq(sid uint32, ts uint32) uint32 {
return sid ^ ts
}
// 通过网络发送数据
func (s *RsspChannel) sendPack(rsspPack []byte) {
}

View File

@ -86,15 +86,6 @@ type RsspRsd struct {
Crc16 uint16
}
const (
CRC32_G_C1 = (uint64(0x01) << 32) | uint64(0x100d4e63) //crc32生成多项式
CRC32_G_C2 = (uint64(0x01) << 32) | uint64(0x8ce56011) //crc32生成多项式
SCW_C1 = uint32(0xae390b5a) //SCW常
SCW_C2 = uint32(0xc103589c) //SCW常
SJC_C1 = uint32(0x0fc22f87) //时间戳生成多项式
SJC_C2 = uint32(0xc3e887e1) //时间戳生成多项式
)
func (r *RsspRsd) Encode() []byte {
data := make([]byte, 0, 6+14+len(r.Sad)+2)
//报文头

View File

@ -16,6 +16,10 @@ const ( //时间戳生成多项式
RsspTsC1 uint32 = 0x0fc22f87
RsspTsC2 uint32 = 0xc3e887e1
)
const (
SCW_C1 = uint32(0xae390b5a) //SCW常
SCW_C2 = uint32(0xc103589c) //SCW常
)
// InitRsspCrcTable 初始化RSSP协议中需要的CRC表
func InitRsspCrcTable() {
@ -198,31 +202,50 @@ func Crc(data []byte,
return (register1 ^ final_xor_value) & significant_mask
}
////////////////////////////////////////////////////////
//////////////////////////LFSR//////////////////////////////
// 线性反馈移位寄存器
type RsspLFSR struct {
polynomial uint32 //生成多项式
width int //寄存器宽度
register uint32 //寄存器
initValue uint32 //初始值
rightShift bool //true-右移false-左移
}
func NewRsspLFSR(polynomial uint32, width int, init_value uint32) *RsspLFSR {
func NewRsspLFSR(polynomial uint32, width int, init_value uint32, rightShift bool) *RsspLFSR {
var wd_msb_mask uint32 = 1 << (width - 1)
var wd_mask uint32 = 0xffffffff >> (32 - width)
init_value &= wd_mask
polynomial &= wd_mask
polynomial = (polynomial >> 1) | wd_msb_mask
//
return &RsspLFSR{polynomial: polynomial, width: width, register: init_value}
return &RsspLFSR{polynomial: polynomial, width: width, register: init_value, initValue: init_value, rightShift: rightShift}
}
func (r *RsspLFSR) move() {
r.move0(r.rightShift)
}
func (r *RsspLFSR) MoveRight() *RsspLFSR {
r.move0(true)
return r
}
func (r *RsspLFSR) MoveLeft() *RsspLFSR {
r.move0(false)
return r
}
func (r *RsspLFSR) move0(rightShift bool) {
var significant_mask uint32 = 0xffffffff >> (32 - r.width)
//
r.register &= significant_mask
cb := r.register & r.polynomial & significant_mask
out := bitXor(cb, r.width)
r.register >>= 1
r.register = r.register | (out << (r.width - 1))
if rightShift {
r.register >>= 1
r.register = r.register | (out << (r.width - 1))
} else {
r.register <<= 1
r.register = r.register | out
}
r.register &= significant_mask
}
@ -231,6 +254,12 @@ func (r *RsspLFSR) GetAndMove() uint32 {
r.move()
return rt
}
func (r *RsspLFSR) Get() uint32 {
return r.register
}
func (r *RsspLFSR) Reset() {
r.register = r.initValue
}
// return 0 或 1
func bitXor(data uint32, width int) uint32 {
@ -241,3 +270,27 @@ func bitXor(data uint32, width int) uint32 {
}
return v & lsb_mask
}
// ///////////////////////////////////////////////////////
const RsspSnMax = uint32(4294967295)
type RsspSn struct {
sn uint32 //顺序序列号最大值4294967295
initValue uint32
}
func NewRsspSn(initValue uint32) *RsspSn {
return &RsspSn{sn: initValue, initValue: initValue}
}
func (s *RsspSn) GetAndAdd() uint32 {
if s.sn < RsspSnMax {
s.sn++
return s.sn
} else {
s.sn = s.initValue
return s.sn
}
}
func (s *RsspSn) Get() uint32 {
return s.sn
}

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc-gen-go v1.31.0
// protoc v4.23.1
// source: ibpGraphics.proto

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc-gen-go v1.31.0
// protoc v4.23.1
// source: picture.proto

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc-gen-go v1.31.0
// protoc v4.23.1
// source: pslGraphics.proto

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc-gen-go v1.31.0
// protoc v4.23.1
// source: relayCabinetLayoutGraphics.proto

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc-gen-go v1.31.0
// protoc v4.23.1
// source: stationLayoutGraphics.proto

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc-gen-go v1.31.0
// protoc v4.23.1
// source: device_state.proto
@ -198,7 +198,7 @@ func (x SimulationStatus_SimulationState) Number() protoreflect.EnumNumber {
// Deprecated: Use SimulationStatus_SimulationState.Descriptor instead.
func (SimulationStatus_SimulationState) EnumDescriptor() ([]byte, []int) {
return file_device_state_proto_rawDescGZIP(), []int{20, 0}
return file_device_state_proto_rawDescGZIP(), []int{21, 0}
}
// 相邻端点定义的link的状态
@ -1643,9 +1643,9 @@ type PsdState struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //屏蔽门的id
OpenAsdCodes []int32 `protobuf:"varint,2,rep,packed,name=openAsdCodes,proto3" json:"openAsdCodes,omitempty"` //开启的滑动门的编号
Close bool `protobuf:"varint,3,opt,name=close,proto3" json:"close,omitempty"` //屏蔽门整体的关闭(继电器)状态
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //屏蔽门的id
AsdStates []*AsdState `protobuf:"bytes,2,rep,name=asdStates,proto3" json:"asdStates,omitempty"` //滑动门状态
Mgj bool `protobuf:"varint,3,opt,name=mgj,proto3" json:"mgj,omitempty"` //屏蔽门整体的关闭(继电器)状态
}
func (x *PsdState) Reset() {
@ -1687,16 +1687,88 @@ func (x *PsdState) GetId() string {
return ""
}
func (x *PsdState) GetOpenAsdCodes() []int32 {
func (x *PsdState) GetAsdStates() []*AsdState {
if x != nil {
return x.OpenAsdCodes
return x.AsdStates
}
return nil
}
func (x *PsdState) GetClose() bool {
func (x *PsdState) GetMgj() bool {
if x != nil {
return x.Close
return x.Mgj
}
return false
}
// 滑动门状态
type AsdState struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` //滑动门的编号
Kmdw bool `protobuf:"varint,2,opt,name=kmdw,proto3" json:"kmdw,omitempty"` //开门到位(实际位置)
Gmdw bool `protobuf:"varint,3,opt,name=gmdw,proto3" json:"gmdw,omitempty"` //关门到位(实际位置)
Mgj bool `protobuf:"varint,4,opt,name=mgj,proto3" json:"mgj,omitempty"` //门关继电器
}
func (x *AsdState) Reset() {
*x = AsdState{}
if protoimpl.UnsafeEnabled {
mi := &file_device_state_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AsdState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AsdState) ProtoMessage() {}
func (x *AsdState) ProtoReflect() protoreflect.Message {
mi := &file_device_state_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AsdState.ProtoReflect.Descriptor instead.
func (*AsdState) Descriptor() ([]byte, []int) {
return file_device_state_proto_rawDescGZIP(), []int{15}
}
func (x *AsdState) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *AsdState) GetKmdw() bool {
if x != nil {
return x.Kmdw
}
return false
}
func (x *AsdState) GetGmdw() bool {
if x != nil {
return x.Gmdw
}
return false
}
func (x *AsdState) GetMgj() bool {
if x != nil {
return x.Mgj
}
return false
}
@ -1714,7 +1786,7 @@ type KeyState struct {
func (x *KeyState) Reset() {
*x = KeyState{}
if protoimpl.UnsafeEnabled {
mi := &file_device_state_proto_msgTypes[15]
mi := &file_device_state_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1727,7 +1799,7 @@ func (x *KeyState) String() string {
func (*KeyState) ProtoMessage() {}
func (x *KeyState) ProtoReflect() protoreflect.Message {
mi := &file_device_state_proto_msgTypes[15]
mi := &file_device_state_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1740,7 +1812,7 @@ func (x *KeyState) ProtoReflect() protoreflect.Message {
// Deprecated: Use KeyState.ProtoReflect.Descriptor instead.
func (*KeyState) Descriptor() ([]byte, []int) {
return file_device_state_proto_rawDescGZIP(), []int{15}
return file_device_state_proto_rawDescGZIP(), []int{16}
}
func (x *KeyState) GetId() string {
@ -1774,7 +1846,7 @@ type SpksState struct {
func (x *SpksState) Reset() {
*x = SpksState{}
if protoimpl.UnsafeEnabled {
mi := &file_device_state_proto_msgTypes[16]
mi := &file_device_state_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1787,7 +1859,7 @@ func (x *SpksState) String() string {
func (*SpksState) ProtoMessage() {}
func (x *SpksState) ProtoReflect() protoreflect.Message {
mi := &file_device_state_proto_msgTypes[16]
mi := &file_device_state_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1800,7 +1872,7 @@ func (x *SpksState) ProtoReflect() protoreflect.Message {
// Deprecated: Use SpksState.ProtoReflect.Descriptor instead.
func (*SpksState) Descriptor() ([]byte, []int) {
return file_device_state_proto_rawDescGZIP(), []int{16}
return file_device_state_proto_rawDescGZIP(), []int{17}
}
func (x *SpksState) GetId() string {
@ -1866,7 +1938,7 @@ type VariationStatus struct {
func (x *VariationStatus) Reset() {
*x = VariationStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_device_state_proto_msgTypes[17]
mi := &file_device_state_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1879,7 +1951,7 @@ func (x *VariationStatus) String() string {
func (*VariationStatus) ProtoMessage() {}
func (x *VariationStatus) ProtoReflect() protoreflect.Message {
mi := &file_device_state_proto_msgTypes[17]
mi := &file_device_state_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1892,7 +1964,7 @@ func (x *VariationStatus) ProtoReflect() protoreflect.Message {
// Deprecated: Use VariationStatus.ProtoReflect.Descriptor instead.
func (*VariationStatus) Descriptor() ([]byte, []int) {
return file_device_state_proto_rawDescGZIP(), []int{17}
return file_device_state_proto_rawDescGZIP(), []int{18}
}
func (x *VariationStatus) GetUpdatedTrain() []*TrainState {
@ -1963,7 +2035,7 @@ type AllDevicesStatus struct {
func (x *AllDevicesStatus) Reset() {
*x = AllDevicesStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_device_state_proto_msgTypes[18]
mi := &file_device_state_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1976,7 +2048,7 @@ func (x *AllDevicesStatus) String() string {
func (*AllDevicesStatus) ProtoMessage() {}
func (x *AllDevicesStatus) ProtoReflect() protoreflect.Message {
mi := &file_device_state_proto_msgTypes[18]
mi := &file_device_state_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1989,7 +2061,7 @@ func (x *AllDevicesStatus) ProtoReflect() protoreflect.Message {
// Deprecated: Use AllDevicesStatus.ProtoReflect.Descriptor instead.
func (*AllDevicesStatus) Descriptor() ([]byte, []int) {
return file_device_state_proto_rawDescGZIP(), []int{18}
return file_device_state_proto_rawDescGZIP(), []int{19}
}
func (x *AllDevicesStatus) GetTrainState() []*TrainState {
@ -2087,7 +2159,7 @@ type PushedDevicesStatus struct {
func (x *PushedDevicesStatus) Reset() {
*x = PushedDevicesStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_device_state_proto_msgTypes[19]
mi := &file_device_state_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2100,7 +2172,7 @@ func (x *PushedDevicesStatus) String() string {
func (*PushedDevicesStatus) ProtoMessage() {}
func (x *PushedDevicesStatus) ProtoReflect() protoreflect.Message {
mi := &file_device_state_proto_msgTypes[19]
mi := &file_device_state_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2113,7 +2185,7 @@ func (x *PushedDevicesStatus) ProtoReflect() protoreflect.Message {
// Deprecated: Use PushedDevicesStatus.ProtoReflect.Descriptor instead.
func (*PushedDevicesStatus) Descriptor() ([]byte, []int) {
return file_device_state_proto_rawDescGZIP(), []int{19}
return file_device_state_proto_rawDescGZIP(), []int{20}
}
func (x *PushedDevicesStatus) GetAll() bool {
@ -2151,7 +2223,7 @@ type SimulationStatus struct {
func (x *SimulationStatus) Reset() {
*x = SimulationStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_device_state_proto_msgTypes[20]
mi := &file_device_state_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2164,7 +2236,7 @@ func (x *SimulationStatus) String() string {
func (*SimulationStatus) ProtoMessage() {}
func (x *SimulationStatus) ProtoReflect() protoreflect.Message {
mi := &file_device_state_proto_msgTypes[20]
mi := &file_device_state_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2177,7 +2249,7 @@ func (x *SimulationStatus) ProtoReflect() protoreflect.Message {
// Deprecated: Use SimulationStatus.ProtoReflect.Descriptor instead.
func (*SimulationStatus) Descriptor() ([]byte, []int) {
return file_device_state_proto_rawDescGZIP(), []int{20}
return file_device_state_proto_rawDescGZIP(), []int{21}
}
func (x *SimulationStatus) GetSimulationId() string {
@ -2414,110 +2486,116 @@ var file_device_state_proto_rawDesc = []byte{
0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x34, 0x0a, 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74,
0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x54, 0x0a,
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x5b, 0x0a,
0x08, 0x50, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x70, 0x65,
0x6e, 0x41, 0x73, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52,
0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x41, 0x73, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x14, 0x0a,
0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x6c,
0x6f, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x67, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67,
0x65, 0x61, 0x72, 0x22, 0x7b, 0x0a, 0x09, 0x53, 0x70, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x09, 0x61, 0x73, 0x64,
0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73,
0x74, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x61,
0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x67, 0x6a, 0x18,
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6d, 0x67, 0x6a, 0x22, 0x58, 0x0a, 0x08, 0x41, 0x73,
0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x6d,
0x64, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6b, 0x6d, 0x64, 0x77, 0x12, 0x12,
0x0a, 0x04, 0x67, 0x6d, 0x64, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x67, 0x6d,
0x64, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x67, 0x6a, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
0x03, 0x6d, 0x67, 0x6a, 0x22, 0x2e, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
0x12, 0x12, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
0x6f, 0x70, 0x65, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x78, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
0x52, 0x02, 0x78, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20,
0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x6c,
0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x70, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6c,
0x6a, 0x78, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x70, 0x6c, 0x6a, 0x78, 0x68,
0x22, 0x9e, 0x02, 0x0a, 0x0f, 0x56, 0x61, 0x72, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54,
0x72, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61,
0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x72,
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20,
0x03, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69,
0x6e, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61,
0x74, 0x65, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x3b, 0x0a,
0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0c, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74,
0x61, 0x74, 0x65, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0xc3, 0x04, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x53,
0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61,
0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x74,
0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x77, 0x69,
0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12,
0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61,
0x74, 0x65, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
0x37, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18,
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c,
0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73,
0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,
0x0a, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53,
0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74,
0x65, 0x12, 0x34, 0x0a, 0x0b, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x42,
0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x62, 0x75, 0x74, 0x74,
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x41, 0x6c, 0x61, 0x72, 0x6d,
0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x65, 0x2e, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a,
0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x4c, 0x69,
0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11,
0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74,
0x65, 0x52, 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a,
0x08, 0x70, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65,
0x52, 0x08, 0x70, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x4b, 0x65,
0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73,
0x74, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x4b,
0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x73, 0x70, 0x6b, 0x73, 0x53,
0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x74, 0x61,
0x74, 0x65, 0x2e, 0x53, 0x70, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x73, 0x70,
0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x50, 0x75, 0x73, 0x68,
0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c,
0x6c, 0x12, 0x34, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x56, 0x61, 0x72,
0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x76, 0x61,
0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61,
0x74, 0x65, 0x2e, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xd8,
0x01, 0x0a, 0x10, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53,
0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,
0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x0f, 0x53, 0x69, 0x6d, 0x75,
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x50,
0x41, 0x55, 0x53, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10,
0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07,
0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x10, 0x03, 0x2a, 0x37, 0x0a, 0x0b, 0x53, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x6e, 0x79, 0x10,
0x00, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x78, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4c,
0x6f, 0x67, 0x69, 0x63, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63,
0x10, 0x03, 0x42, 0x4c, 0x0a, 0x25, 0x63, 0x6c, 0x75, 0x62, 0x2e, 0x6a, 0x6f, 0x79, 0x6c, 0x69,
0x6e, 0x6b, 0x2e, 0x62, 0x6a, 0x72, 0x74, 0x73, 0x73, 0x2e, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x65,
0x72, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x10, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x11, 0x2e,
0x2f, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x12, 0x12, 0x0a, 0x04, 0x67, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x67, 0x65, 0x61, 0x72, 0x22, 0x7b, 0x0a, 0x09, 0x53, 0x70, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74,
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x04, 0x6f, 0x70, 0x65, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x78, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28,
0x08, 0x52, 0x02, 0x78, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x70,
0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x70, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70,
0x6c, 0x6a, 0x78, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x70, 0x6c, 0x6a, 0x78,
0x68, 0x22, 0x9e, 0x02, 0x0a, 0x0f, 0x56, 0x61, 0x72, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
0x54, 0x72, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0e,
0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x02,
0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61,
0x69, 0x6e, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x65, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,
0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x3b,
0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0c, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53,
0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70,
0x6c, 0x79, 0x22, 0xc3, 0x04, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e,
0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a,
0x74, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x77,
0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74,
0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65,
0x12, 0x37, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x73, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x72, 0x65, 0x70,
0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e,
0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65,
0x52, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b,
0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c,
0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61,
0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74,
0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e,
0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x62, 0x75, 0x74,
0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x41, 0x6c, 0x61, 0x72,
0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73,
0x74, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,
0x0a, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x4c,
0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61,
0x74, 0x65, 0x52, 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b,
0x0a, 0x08, 0x70, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74,
0x65, 0x52, 0x08, 0x70, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x4b,
0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08,
0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x73, 0x70, 0x6b, 0x73,
0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x65, 0x2e, 0x53, 0x70, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x73,
0x70, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x50, 0x75, 0x73,
0x68, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61,
0x6c, 0x6c, 0x12, 0x34, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x76,
0x61, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x65, 0x2e, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22,
0xd8, 0x01, 0x0a, 0x10, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x69, 0x6d, 0x75,
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e,
0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x0f, 0x53, 0x69, 0x6d,
0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x09, 0x0a, 0x05,
0x50, 0x41, 0x55, 0x53, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x52, 0x54,
0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x0b, 0x0a,
0x07, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x10, 0x03, 0x2a, 0x37, 0x0a, 0x0b, 0x53, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x6e, 0x79,
0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x78, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05,
0x4c, 0x6f, 0x67, 0x69, 0x63, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x68, 0x79, 0x73, 0x69,
0x63, 0x10, 0x03, 0x42, 0x4c, 0x0a, 0x25, 0x63, 0x6c, 0x75, 0x62, 0x2e, 0x6a, 0x6f, 0x79, 0x6c,
0x69, 0x6e, 0x6b, 0x2e, 0x62, 0x6a, 0x72, 0x74, 0x73, 0x73, 0x2e, 0x61, 0x74, 0x73, 0x2e, 0x76,
0x65, 0x72, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x10, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x11,
0x2e, 0x2f, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74,
0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -2533,7 +2611,7 @@ func file_device_state_proto_rawDescGZIP() []byte {
}
var file_device_state_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_device_state_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
var file_device_state_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_device_state_proto_goTypes = []interface{}{
(SectionType)(0), // 0: state.SectionType
(Signal_Aspect)(0), // 1: state.Signal.Aspect
@ -2553,40 +2631,42 @@ var file_device_state_proto_goTypes = []interface{}{
(*AlarmState)(nil), // 15: state.AlarmState
(*LightState)(nil), // 16: state.LightState
(*PsdState)(nil), // 17: state.PsdState
(*KeyState)(nil), // 18: state.KeyState
(*SpksState)(nil), // 19: state.SpksState
(*VariationStatus)(nil), // 20: state.VariationStatus
(*AllDevicesStatus)(nil), // 21: state.AllDevicesStatus
(*PushedDevicesStatus)(nil), // 22: state.PushedDevicesStatus
(*SimulationStatus)(nil), // 23: state.SimulationStatus
(*AsdState)(nil), // 18: state.AsdState
(*KeyState)(nil), // 19: state.KeyState
(*SpksState)(nil), // 20: state.SpksState
(*VariationStatus)(nil), // 21: state.VariationStatus
(*AllDevicesStatus)(nil), // 22: state.AllDevicesStatus
(*PushedDevicesStatus)(nil), // 23: state.PushedDevicesStatus
(*SimulationStatus)(nil), // 24: state.SimulationStatus
}
var file_device_state_proto_depIdxs = []int32{
1, // 0: state.SignalState.aspect:type_name -> state.Signal.Aspect
11, // 1: state.TrainState.dynamicState:type_name -> state.TrainDynamicState
12, // 2: state.TrainState.vobcState:type_name -> state.TrainVobcState
10, // 3: state.VariationStatus.updatedTrain:type_name -> state.TrainState
5, // 4: state.VariationStatus.updatedSwitch:type_name -> state.SwitchState
4, // 5: state.VariationStatus.updatedSection:type_name -> state.SectionState
13, // 6: state.VariationStatus.updatedReply:type_name -> state.ReplyState
10, // 7: state.AllDevicesStatus.trainState:type_name -> state.TrainState
5, // 8: state.AllDevicesStatus.switchState:type_name -> state.SwitchState
4, // 9: state.AllDevicesStatus.sectionState:type_name -> state.SectionState
13, // 10: state.AllDevicesStatus.replyState:type_name -> state.ReplyState
6, // 11: state.AllDevicesStatus.signalState:type_name -> state.SignalState
14, // 12: state.AllDevicesStatus.buttonState:type_name -> state.ButtonState
15, // 13: state.AllDevicesStatus.AlarmState:type_name -> state.AlarmState
16, // 14: state.AllDevicesStatus.LightState:type_name -> state.LightState
17, // 15: state.AllDevicesStatus.psdState:type_name -> state.PsdState
18, // 16: state.AllDevicesStatus.KeyState:type_name -> state.KeyState
19, // 17: state.AllDevicesStatus.spksState:type_name -> state.SpksState
20, // 18: state.PushedDevicesStatus.varStatus:type_name -> state.VariationStatus
21, // 19: state.PushedDevicesStatus.allStatus:type_name -> state.AllDevicesStatus
2, // 20: state.SimulationStatus.state:type_name -> state.SimulationStatus.SimulationState
21, // [21:21] is the sub-list for method output_type
21, // [21:21] is the sub-list for method input_type
21, // [21:21] is the sub-list for extension type_name
21, // [21:21] is the sub-list for extension extendee
0, // [0:21] is the sub-list for field type_name
18, // 3: state.PsdState.asdStates:type_name -> state.AsdState
10, // 4: state.VariationStatus.updatedTrain:type_name -> state.TrainState
5, // 5: state.VariationStatus.updatedSwitch:type_name -> state.SwitchState
4, // 6: state.VariationStatus.updatedSection:type_name -> state.SectionState
13, // 7: state.VariationStatus.updatedReply:type_name -> state.ReplyState
10, // 8: state.AllDevicesStatus.trainState:type_name -> state.TrainState
5, // 9: state.AllDevicesStatus.switchState:type_name -> state.SwitchState
4, // 10: state.AllDevicesStatus.sectionState:type_name -> state.SectionState
13, // 11: state.AllDevicesStatus.replyState:type_name -> state.ReplyState
6, // 12: state.AllDevicesStatus.signalState:type_name -> state.SignalState
14, // 13: state.AllDevicesStatus.buttonState:type_name -> state.ButtonState
15, // 14: state.AllDevicesStatus.AlarmState:type_name -> state.AlarmState
16, // 15: state.AllDevicesStatus.LightState:type_name -> state.LightState
17, // 16: state.AllDevicesStatus.psdState:type_name -> state.PsdState
19, // 17: state.AllDevicesStatus.KeyState:type_name -> state.KeyState
20, // 18: state.AllDevicesStatus.spksState:type_name -> state.SpksState
21, // 19: state.PushedDevicesStatus.varStatus:type_name -> state.VariationStatus
22, // 20: state.PushedDevicesStatus.allStatus:type_name -> state.AllDevicesStatus
2, // 21: state.SimulationStatus.state:type_name -> state.SimulationStatus.SimulationState
22, // [22:22] is the sub-list for method output_type
22, // [22:22] is the sub-list for method input_type
22, // [22:22] is the sub-list for extension type_name
22, // [22:22] is the sub-list for extension extendee
0, // [0:22] is the sub-list for field type_name
}
func init() { file_device_state_proto_init() }
@ -2776,7 +2856,7 @@ func file_device_state_proto_init() {
}
}
file_device_state_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyState); i {
switch v := v.(*AsdState); i {
case 0:
return &v.state
case 1:
@ -2788,7 +2868,7 @@ func file_device_state_proto_init() {
}
}
file_device_state_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SpksState); i {
switch v := v.(*KeyState); i {
case 0:
return &v.state
case 1:
@ -2800,7 +2880,7 @@ func file_device_state_proto_init() {
}
}
file_device_state_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariationStatus); i {
switch v := v.(*SpksState); i {
case 0:
return &v.state
case 1:
@ -2812,7 +2892,7 @@ func file_device_state_proto_init() {
}
}
file_device_state_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AllDevicesStatus); i {
switch v := v.(*VariationStatus); i {
case 0:
return &v.state
case 1:
@ -2824,7 +2904,7 @@ func file_device_state_proto_init() {
}
}
file_device_state_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PushedDevicesStatus); i {
switch v := v.(*AllDevicesStatus); i {
case 0:
return &v.state
case 1:
@ -2836,6 +2916,18 @@ func file_device_state_proto_init() {
}
}
file_device_state_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PushedDevicesStatus); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_device_state_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SimulationStatus); i {
case 0:
return &v.state
@ -2854,7 +2946,7 @@ func file_device_state_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_device_state_proto_rawDesc,
NumEnums: 3,
NumMessages: 21,
NumMessages: 22,
NumExtensions: 0,
NumServices: 0,
},