diff --git a/dto/state_proto/device_state.pb.go b/dto/state_proto/device_state.pb.go index 866671b..5697d37 100644 --- a/dto/state_proto/device_state.pb.go +++ b/dto/state_proto/device_state.pb.go @@ -3043,10 +3043,11 @@ type BTMState struct { DataSerialNumber uint32 `protobuf:"varint,1,opt,name=dataSerialNumber,proto3" json:"dataSerialNumber,omitempty"` //数据流水号,0~255变化,每次加一 BaliseCount uint32 `protobuf:"varint,2,opt,name=baliseCount,proto3" json:"baliseCount,omitempty"` //应答器计数(每过一个应答器加一,在同一个应答器内不变)(0~255) MessageCounter uint32 `protobuf:"varint,3,opt,name=messageCounter,proto3" json:"messageCounter,omitempty"` //报文计数器 (每解出一个报文加一)(0~255) - Telegram string `protobuf:"bytes,4,opt,name=telegram,proto3" json:"telegram,omitempty"` //报文(16进制字符串) + Telegram string `protobuf:"bytes,4,opt,name=telegram,proto3" json:"telegram,omitempty"` //应答器用户报文(16进制字符串) Distance int64 `protobuf:"varint,5,opt,name=distance,proto3" json:"distance,omitempty"` //BTM天线中心到应答器的距离,mm AboveBalise bool `protobuf:"varint,6,opt,name=aboveBalise,proto3" json:"aboveBalise,omitempty"` //BTM天线即将经过应答器 BaliseTelegramForPcSimResend string `protobuf:"bytes,7,opt,name=baliseTelegramForPcSimResend,proto3" json:"baliseTelegramForPcSimResend,omitempty"` //列车pc仿真暂存应答器回复数据 + Telegram128 string `protobuf:"bytes,8,opt,name=telegram128,proto3" json:"telegram128,omitempty"` //应答器报文128(16进制字符串) } func (x *BTMState) Reset() { @@ -3130,6 +3131,13 @@ func (x *BTMState) GetBaliseTelegramForPcSimResend() string { return "" } +func (x *BTMState) GetTelegram128() string { + if x != nil { + return x.Telegram128 + } + return "" +} + // 动力学相关参数返回数据,因golang float类型数据序列化后丢失精度故使用string // 此类型需要与 common_data 中的 TrainDynamicConfig类型属性保持一致 type TrainDynamicConfigMqtt struct { @@ -6154,7 +6162,7 @@ var file_device_state_proto_rawDesc = []byte{ 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x46, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x63, - 0x6f, 0x6e, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x9e, 0x02, 0x0a, 0x08, 0x42, 0x54, 0x4d, + 0x6f, 0x6e, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xc0, 0x02, 0x0a, 0x08, 0x42, 0x54, 0x4d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, @@ -6172,377 +6180,379 @@ var file_device_state_proto_rawDesc = []byte{ 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x46, 0x6f, 0x72, 0x50, 0x63, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x62, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x46, 0x6f, 0x72, 0x50, 0x63, - 0x53, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x22, 0xe4, 0x04, 0x0a, 0x16, 0x54, 0x72, - 0x61, 0x69, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x4d, 0x71, 0x74, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x61, 0x76, 0x69, 0x73, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x61, 0x76, 0x69, 0x73, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x41, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x61, 0x76, 0x69, 0x73, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x61, 0x76, - 0x69, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x42, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x61, 0x76, 0x69, - 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x43, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x61, 0x76, 0x69, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x43, 0x12, 0x36, 0x0a, 0x16, 0x63, 0x75, + 0x53, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x6c, + 0x65, 0x67, 0x72, 0x61, 0x6d, 0x31, 0x32, 0x38, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x31, 0x32, 0x38, 0x22, 0xe4, 0x04, 0x0a, 0x16, + 0x54, 0x72, 0x61, 0x69, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x4d, 0x71, 0x74, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x61, 0x76, 0x69, 0x73, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x61, 0x76, + 0x69, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x41, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x61, 0x76, 0x69, + 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x61, 0x76, 0x69, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x42, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x61, + 0x76, 0x69, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x43, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x61, 0x76, 0x69, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x43, 0x12, 0x36, 0x0a, 0x16, + 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x52, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x52, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, - 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x52, 0x31, 0x12, 0x36, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x32, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x32, 0x12, 0x36, 0x0a, 0x16, 0x63, 0x75, + 0x61, 0x6d, 0x52, 0x31, 0x12, 0x36, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, + 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x32, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x32, 0x12, 0x36, 0x0a, 0x16, + 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x52, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x52, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, - 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x52, 0x33, 0x12, 0x36, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x34, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x34, 0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, - 0x76, 0x6f, 0x6c, 0x76, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x76, 0x69, 0x6e, - 0x67, 0x4d, 0x61, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x75, - 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6a, 0x75, 0x6d, 0x70, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x41, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, - 0x6c, 0x69, 0x70, 0x41, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x52, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x52, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, - 0x69, 0x70, 0x44, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x44, - 0x12, 0x18, 0x0a, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x64, - 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x64, 0x6c, - 0x69, 0x6e, 0x67, 0x52, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, - 0x69, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x64, 0x65, - 0x22, 0xa8, 0x03, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x64, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x4d, 0x71, 0x74, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, - 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, - 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x61, 0x64, 0x61, 0x72, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x61, - 0x64, 0x61, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x72, 0x61, 0x64, - 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x12, 0x26, 0x0a, 0x0e, 0x72, - 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, - 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x63, - 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x12, - 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, - 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x4f, 0x75, 0x74, - 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x61, 0x64, 0x61, 0x72, 0x4f, 0x75, - 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x61, - 0x64, 0x61, 0x72, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x22, 0x56, 0x0a, 0x0a, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x78, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x78, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x22, 0x49, 0x0a, 0x0b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x34, - 0x0a, 0x0a, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 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, 0x34, 0x0a, 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 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, 0x96, 0x01, 0x0a, 0x08, 0x50, - 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 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, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x50, 0x73, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x7a, 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, - 0x7a, 0x61, 0x77, 0x22, 0x80, 0x01, 0x0a, 0x08, 0x41, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x12, 0x10, - 0x0a, 0x03, 0x7a, 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x7a, 0x61, 0x77, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x2e, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 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, 0x52, 0x0a, 0x09, 0x4d, 0x6b, 0x78, 0x4a, 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, 0x31, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 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, 0x22, 0x93, 0x02, 0x0a, 0x0b, 0x42, - 0x61, 0x6c, 0x69, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x02, 0x6b, 0x6d, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, - 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x52, 0x02, 0x6b, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x2c, - 0x0a, 0x11, 0x66, 0x69, 0x78, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x65, 0x67, - 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x2a, 0x0a, 0x10, - 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x32, 0x0a, 0x14, 0x76, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, - 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x6f, 0x72, 0x6b, - 0x22, 0xb0, 0x01, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x63, 0x12, 0x32, - 0x0a, 0x08, 0x71, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x51, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x71, 0x64, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x73, 0x12, 0x32, 0x0a, 0x08, 0x63, 0x6a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x63, 0x6a, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x3b, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x72, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x6f, - 0x77, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, - 0x63, 0x6f, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x02, 0x6f, 0x6e, 0x22, 0x7f, 0x0a, 0x08, 0x43, 0x6b, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x6d, 0x67, 0x6a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6d, 0x67, - 0x6a, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6b, 0x6d, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x70, 0x6c, 0x6a, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, - 0x6d, 0x70, 0x6c, 0x6a, 0x22, 0xf1, 0x01, 0x0a, 0x08, 0x58, 0x63, 0x6a, 0x53, 0x74, 0x61, 0x74, + 0x61, 0x6d, 0x52, 0x33, 0x12, 0x36, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, + 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x34, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x34, 0x12, 0x2e, 0x0a, 0x12, + 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x76, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x73, 0x73, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x76, + 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, + 0x6a, 0x75, 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6a, 0x75, 0x6d, 0x70, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x41, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x6c, 0x69, 0x70, 0x41, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x52, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x52, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x6c, 0x69, 0x70, 0x44, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x6c, 0x69, + 0x70, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x12, 0x18, 0x0a, 0x07, + 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, + 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, + 0x44, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x44, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x6c, 0x69, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x6c, 0x69, + 0x64, 0x65, 0x22, 0xa8, 0x03, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x64, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x71, 0x74, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x70, 0x65, + 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x70, 0x65, + 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x61, 0x64, + 0x61, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x72, 0x61, 0x64, 0x61, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x72, + 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, + 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x12, 0x26, 0x0a, + 0x0e, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x63, 0x63, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, + 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, + 0x66, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x4f, 0x75, 0x74, 0x53, + 0x70, 0x65, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x4f, + 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x61, 0x64, 0x61, 0x72, + 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, + 0x72, 0x61, 0x64, 0x61, 0x72, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x22, 0x56, 0x0a, + 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x78, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x78, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x49, 0x0a, 0x0b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x22, 0x34, 0x0a, 0x0a, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 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, 0x34, 0x0a, 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 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, 0x96, 0x01, 0x0a, + 0x08, 0x50, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 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, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x50, 0x73, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x05, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x7a, 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x03, 0x7a, 0x61, 0x77, 0x22, 0x80, 0x01, 0x0a, 0x08, 0x41, 0x73, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 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, + 0x12, 0x10, 0x0a, 0x03, 0x7a, 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x7a, + 0x61, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x2e, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 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, 0x52, 0x0a, 0x09, 0x4d, 0x6b, 0x78, 0x4a, + 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, 0x31, 0x0a, 0x0a, 0x72, 0x65, 0x70, + 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 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, 0x22, 0x93, 0x02, 0x0a, + 0x0b, 0x42, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x02, + 0x6b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x02, 0x6b, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, + 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x69, 0x78, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, + 0x65, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x2a, + 0x0a, 0x10, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, + 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x32, 0x0a, 0x14, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, + 0x61, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x12, + 0x0a, 0x04, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x6f, + 0x72, 0x6b, 0x22, 0xb0, 0x01, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x63, + 0x12, 0x32, 0x0a, 0x08, 0x71, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x51, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x71, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x08, 0x63, 0x6a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, + 0x63, 0x6a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x3b, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x72, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x63, 0x6f, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x02, 0x6f, 0x6e, 0x22, 0x7f, 0x0a, 0x08, 0x43, 0x6b, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x58, 0x63, 0x6a, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x78, 0x71, - 0x6a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x78, 0x71, 0x6a, 0x12, 0x18, 0x0a, 0x07, - 0x74, 0x77, 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x08, 0x52, 0x07, 0x74, - 0x77, 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x67, 0x71, 0x6a, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x74, 0x67, 0x71, 0x6a, 0x12, 0x14, 0x0a, 0x05, 0x78, 0x63, - 0x6a, 0x78, 0x6a, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x78, 0x63, 0x6a, 0x78, 0x6a, - 0x12, 0x14, 0x0a, 0x05, 0x78, 0x63, 0x79, 0x78, 0x6a, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x78, 0x63, 0x79, 0x78, 0x6a, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x66, 0x6a, 0x4c, 0x69, 0x73, - 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x08, 0x52, 0x07, 0x63, 0x66, 0x6a, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x74, 0x6a, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6a, - 0x74, 0x6a, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x67, 0x79, 0x78, 0x6a, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x74, 0x67, 0x79, 0x78, 0x6a, 0x22, 0xa1, 0x02, 0x0a, 0x0f, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x0c, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, - 0x4d, 0x61, 0x70, 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, 0xc5, 0x06, 0x0a, - 0x10, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, - 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x70, 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, 0x3a, 0x0a, 0x0d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x62, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x42, - 0x61, 0x6c, 0x69, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x62, 0x61, 0x6c, 0x69, - 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x51, 0x63, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x63, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x63, 0x12, 0x2d, 0x0a, 0x09, 0x63, 0x6b, 0x6d, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x43, 0x6b, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x63, 0x6b, 0x6d, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x09, 0x66, 0x79, 0x6d, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x43, 0x6b, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x66, 0x79, 0x6d, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x09, 0x78, 0x63, 0x6a, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x58, 0x63, 0x6a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x78, 0x63, 0x6a, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x73, 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, 0xc2, 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, 0x22, 0x4b, 0x0a, 0x0f, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x09, 0x0a, - 0x05, 0x50, 0x61, 0x75, 0x73, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x10, 0x04, - 0x22, 0xd2, 0x01, 0x0a, 0x1e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6d, 0x75, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x67, 0x6a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, + 0x6d, 0x67, 0x6a, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6b, 0x6d, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x70, 0x6c, 0x6a, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x04, 0x6d, 0x70, 0x6c, 0x6a, 0x22, 0xf1, 0x01, 0x0a, 0x08, 0x58, 0x63, 0x6a, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x58, 0x63, 0x6a, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x10, 0x0a, 0x03, + 0x78, 0x71, 0x6a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x78, 0x71, 0x6a, 0x12, 0x18, + 0x0a, 0x07, 0x74, 0x77, 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x08, 0x52, + 0x07, 0x74, 0x77, 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x67, 0x71, 0x6a, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x74, 0x67, 0x71, 0x6a, 0x12, 0x14, 0x0a, 0x05, + 0x78, 0x63, 0x6a, 0x78, 0x6a, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x78, 0x63, 0x6a, + 0x78, 0x6a, 0x12, 0x14, 0x0a, 0x05, 0x78, 0x63, 0x79, 0x78, 0x6a, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x78, 0x63, 0x79, 0x78, 0x6a, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x66, 0x6a, 0x4c, + 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x08, 0x52, 0x07, 0x63, 0x66, 0x6a, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x74, 0x6a, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x03, 0x6a, 0x74, 0x6a, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x67, 0x79, 0x78, 0x6a, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x74, 0x67, 0x79, 0x78, 0x6a, 0x22, 0xa1, 0x02, 0x0a, 0x0f, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, + 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, + 0x69, 0x6e, 0x4d, 0x61, 0x70, 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, 0xc5, + 0x06, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x70, 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, 0x3a, 0x0a, 0x0d, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x62, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x2e, 0x42, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x62, 0x61, + 0x6c, 0x69, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x63, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x63, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x63, 0x12, 0x2d, 0x0a, 0x09, 0x63, 0x6b, 0x6d, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6b, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x63, + 0x6b, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x09, 0x66, 0x79, 0x6d, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6b, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x66, 0x79, + 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x09, 0x78, 0x63, 0x6a, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x2e, 0x58, 0x63, 0x6a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x78, 0x63, 0x6a, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 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, 0xc2, 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, 0x22, 0x4b, 0x0a, 0x0f, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x50, 0x61, 0x75, 0x73, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, + 0x10, 0x04, 0x22, 0xd2, 0x01, 0x0a, 0x1e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x70, 0x69, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, + 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x41, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x04, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x73, 0x10, 0x01, 0x12, 0x15, + 0x0a, 0x11, 0x53, 0x65, 0x6d, 0x69, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x54, 0x72, + 0x61, 0x69, 0x6e, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x70, + 0x63, 0x5f, 0x73, 0x69, 0x6d, 0x10, 0x03, 0x22, 0x1e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x22, 0xca, 0x01, 0x0a, 0x23, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, - 0x41, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0d, 0x0a, 0x09, 0x55, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, - 0x0a, 0x08, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x73, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, - 0x53, 0x65, 0x6d, 0x69, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x69, - 0x6e, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x63, 0x5f, - 0x73, 0x69, 0x6d, 0x10, 0x03, 0x22, 0x1e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, - 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x10, 0x01, 0x22, 0xca, 0x01, 0x0a, 0x23, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x70, - 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3e, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, - 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x22, 0x9a, 0x07, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x07, 0x62, 0x75, 0x74, 0x74, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x07, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x72, 0x69, - 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x12, 0x43, 0x0a, 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x06, - 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, + 0x41, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x70, 0x69, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x70, 0x69, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x9a, 0x07, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x07, 0x62, 0x75, + 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x45, - 0x0a, 0x09, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4d, 0x61, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x67, 0x68, - 0x74, 0x4d, 0x61, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6c, 0x69, 0x67, 0x68, - 0x74, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x69, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x31, 0x32, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x13, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x53, 0x74, 0x61, 0x6d, 0x70, 0x31, 0x32, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x69, 0x6e, 0x65, 0x31, - 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x45, 0x72, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, - 0x6c, 0x69, 0x6e, 0x65, 0x31, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x45, 0x72, 0x72, 0x1a, 0x62, 0x0a, - 0x0c, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x07, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x64, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x63, 0x0a, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4d, 0x61, 0x70, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, - 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x37, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x73, 0x73, 0x65, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x1a, - 0x33, 0x0a, 0x0f, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, - 0x63, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x36, 0x0a, 0x12, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x2f, 0x0a, 0x0b, - 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x76, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x30, 0x0a, - 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, - 0xec, 0x02, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x40, 0x0a, 0x07, 0x62, 0x75, 0x74, 0x74, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x75, 0x74, 0x74, 0x6f, - 0x6e, 0x52, 0x07, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x72, - 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, + 0x52, 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x70, 0x75, 0x73, 0x68, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x12, 0x43, 0x0a, 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, - 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x48, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, - 0x3d, 0x0a, 0x06, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x52, 0x06, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 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, 0x67, 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, 0x2c, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x6c, 0x75, 0x62, - 0x2f, 0x62, 0x6a, 0x2d, 0x72, 0x74, 0x73, 0x74, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x72, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, + 0x12, 0x45, 0x0a, 0x09, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4d, 0x61, 0x70, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, + 0x67, 0x68, 0x74, 0x4d, 0x61, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x6c, 0x69, 0x6e, 0x65, 0x49, + 0x6e, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x31, 0x32, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x31, 0x32, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x69, 0x6e, + 0x65, 0x31, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x45, 0x72, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x6c, 0x69, 0x6e, 0x65, 0x31, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x45, 0x72, 0x72, 0x1a, + 0x62, 0x0a, 0x0c, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x63, 0x0a, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4d, 0x61, 0x70, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, + 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x37, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x73, + 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x73, 0x73, 0x65, + 0x64, 0x1a, 0x33, 0x0a, 0x0f, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x53, 0x77, + 0x69, 0x74, 0x63, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x36, 0x0a, 0x12, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x2f, + 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a, + 0x30, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, 0x61, + 0x6c, 0x22, 0xec, 0x02, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x40, 0x0a, 0x07, 0x62, 0x75, + 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x75, 0x74, + 0x74, 0x6f, 0x6e, 0x52, 0x07, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x09, + 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, + 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, + 0x68, 0x52, 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x70, 0x75, 0x73, + 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x12, 0x3d, 0x0a, 0x06, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x52, 0x06, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, + 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, 0x67, 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, 0x2c, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x6c, + 0x75, 0x62, 0x2f, 0x62, 0x6a, 0x2d, 0x72, 0x74, 0x73, 0x74, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go.mod b/go.mod index c1a0eba..78ccb1b 100644 --- a/go.mod +++ b/go.mod @@ -100,3 +100,5 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +require github.com/yousifnimah/Cryptx v1.0.1 diff --git a/go.sum b/go.sum index aa14500..f2b71f1 100644 --- a/go.sum +++ b/go.sum @@ -222,6 +222,8 @@ github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4d github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/yohamta/donburi v1.3.9 h1:sYAPaelSnxmoTGjgH9ZlYt4pUKrnwvAv4YGXxLZCK6E= github.com/yohamta/donburi v1.3.9/go.mod h1:5QkyraUjkzbMVTD2b8jaPFy1Uwjm/zdFN1c1lZGaezg= +github.com/yousifnimah/Cryptx v1.0.1 h1:oZbB6CjvqOzkmoghsncb3/4sV2As8nqOJCjZPd08Xdw= +github.com/yousifnimah/Cryptx v1.0.1/go.mod h1:vmpiwqtg+fR+KaAisCdz2+6k30jWb+/X7EyUysDKh0U= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= diff --git a/rts-sim-testing-message b/rts-sim-testing-message index 2f5d8c3..3a6df9a 160000 --- a/rts-sim-testing-message +++ b/rts-sim-testing-message @@ -1 +1 @@ -Subproject commit 2f5d8c3cfdf06ced1a0b0a50f47f9353c441e196 +Subproject commit 3a6df9a689212c49f8728e5eec98b77564307e1b diff --git a/third_party/can_btm/balise_btm.go b/third_party/can_btm/balise_btm.go index 64dbca1..7551dd3 100644 --- a/third_party/can_btm/balise_btm.go +++ b/third_party/can_btm/balise_btm.go @@ -59,11 +59,14 @@ func (s *btmCanetClient) GetState() state_proto.BTMState { detector := s.baliseDetector var telegram string + var tel128 string info := detector.eq[len(detector.eq)-1] if /*detector.aboveBalise &&*/ info != nil && len(info.telegram) != 0 { telegram = fmt.Sprintf("%X", info.telegram) + tel128 = fmt.Sprintf("%X", info.telegram128) } else { telegram = strings.Repeat("00", balise_const.UserTelegramByteLen) + tel128 = strings.Repeat("00", balise_const.TelegramByteLen) } var dis int64 if info != nil { @@ -74,6 +77,7 @@ func (s *btmCanetClient) GetState() state_proto.BTMState { BaliseCount: uint32(detector.baliseCounter), MessageCounter: uint32(detector.messageCounter), Telegram: telegram, + Telegram128: tel128, Distance: dis, AboveBalise: detector.aboveBalise, } @@ -163,7 +167,7 @@ func (s *btmCanetClient) handleCanetFrames(cfs []byte) { dms := make([]*message.CanetFrame, 0, 16) //13个应答器报文数据帧+TimeA帧+TimeB帧+结束帧 for cfi := 0; cfi < cfSum; cfi++ { cfStart := cfi * 13 - cf := message.NewCanetFrame(cfs[cfStart:cfStart+13], false) + cf := message.NewCanetFrame(cfs[cfStart : cfStart+13]) // switch cf.CanFrameType() { case message.CfReq: @@ -263,7 +267,7 @@ func (s *btmCanetClient) rspResendToAtp() { // 当未收到应答器报文时响应:时间同步帧、状态应答帧 func (s *btmCanetClient) rspToAtp(sb *BtmAntennaScanningBaliseInfo) { //BTM状态 - statusF := message.NewBtmStatusRspFrame(s.atpReqSn, false) + statusF := message.NewBtmStatusRspFrame(s.atpReqSn) btmStatus := s.createTrainBtmStatus() statusF.AntennaFault = btmStatus.AntennaFault @@ -284,9 +288,9 @@ func (s *btmCanetClient) rspToAtp(sb *BtmAntennaScanningBaliseInfo) { //true-收到应答器报文 isRcvTelegram := sb != nil && len(sb.telegram) > 0 if isRcvTelegram { //当收到应答器报文时响应:时间同步帧、状态应答帧、数据帧 - statusDataCf, statusDataCfOk := message.CreateBtmRspFramesData(statusF, sb.telegram, false, s.btmTime.TkNow(), s.btmTime.TkNow(), s.btmTime.TkNow(), false) + statusDataCf, statusDataCfOk := message.CreateBtmRspFramesData(statusF, sb.telegram, false, s.btmTime.TkNow(), s.btmTime.TkNow(), s.btmTime.TkNow()) if statusDataCfOk { - timeSyncF := message.NewBtmTimeSyncCheckFrame(s.atpReqSn, false) + timeSyncF := message.NewBtmTimeSyncCheckFrame(s.atpReqSn) timeSyncF.T2 = s.btmTime.BtmTk timeSyncF.T3 = s.btmTime.TkNow() s.sendCanetFrame(timeSyncF.Encode().Encode()) @@ -297,7 +301,7 @@ func (s *btmCanetClient) rspToAtp(sb *BtmAntennaScanningBaliseInfo) { slog.Warn("BtmCanetClient应答帧、数据帧编码失败") } } else { //当未收到应答器报文时响应:时间同步帧、状态应答帧 - timeSyncF := message.NewBtmTimeSyncCheckFrame(s.atpReqSn, false) + timeSyncF := message.NewBtmTimeSyncCheckFrame(s.atpReqSn) timeSyncF.T2 = s.btmTime.BtmTk timeSyncF.T3 = s.btmTime.TkNow() s.sendCanetFrame(timeSyncF.Encode().Encode()) diff --git a/third_party/can_btm/balise_detection.go b/third_party/can_btm/balise_detection.go index 3c0c691..a0dfdd4 100644 --- a/third_party/can_btm/balise_detection.go +++ b/third_party/can_btm/balise_detection.go @@ -39,12 +39,13 @@ type BtmAntennaToBaliseInfo struct { BaliseType proto.Transponder_Type //应答器类型 } type BtmAntennaScanningBaliseInfo struct { - BaliseId string //应答器id - Time time.Time //应答器预计被BTM天线激活的时刻 - active bool //true-激活过,即列车扫过 - telegram []byte //应答器报文 - Distance int64 //BTM天线中心到应答器的距离,mm - BaliseType proto.Transponder_Type //应答器类型 + BaliseId string //应答器id + Time time.Time //应答器预计被BTM天线激活的时刻 + active bool //true-激活过,即列车扫过 + telegram []byte //应答器用户报文 + telegram128 []byte //应答器报文 + Distance int64 //BTM天线中心到应答器的距离,mm + BaliseType proto.Transponder_Type //应答器类型 } // BaliseDetector 车载BTM天线,应答器探测器 @@ -88,7 +89,7 @@ func (t *BaliseDetector) detect(wd *component.WorldData, repo *repository.Reposi if curExpect != nil && curExpect.Time.UnixMilli()-curTime.UnixMilli() < 20 { //20ms //slog.Debug("将要激活应答器", "BaliseId", curExpect.BaliseId, "ActiveTime", dt) - telegram := t.rcvTelegram(wd, curExpect.BaliseId) + telegram, utel := t.rcvTelegram(wd, curExpect.BaliseId) if curExpect.Distance <= 50 { btm_vobc.Default().AppendBaliseMsgForTrain(vobcBtm, curExpect.BaliseId, telegram, curTime.UnixMilli()) @@ -97,7 +98,8 @@ func (t *BaliseDetector) detect(wd *component.WorldData, repo *repository.Reposi if t.addExpectedBalise(curExpect) { t.baliseCounterAdd1() //应答器计数器 if len(telegram) > 0 { - curExpect.telegram = telegram + curExpect.telegram = utel + curExpect.telegram128 = telegram t.baliseMessageCounterAdd1() //报文计数器 } @@ -137,14 +139,17 @@ func (t *BaliseDetector) baliseMessageCounterAdd1() { } // BTM天线接收应答器报文(线程不安全) -func (t *BaliseDetector) rcvTelegram(wd *component.WorldData, baliseId string) []byte { +func (t *BaliseDetector) rcvTelegram(wd *component.WorldData, baliseId string) ([]byte, []byte) { entry, ok := wd.EntityMap[baliseId] if ok { if component.BaliseWorkStateType.Get(entry).Work { - return component.BaliseFixedTelegramType.Get(entry).Telegram + tel := component.BaliseFixedTelegramType.Get(entry).Telegram + utel := component.BaliseFixedTelegramType.Get(entry).UserTelegram + return tel, utel + //return component.BaliseFixedTelegramType.Get(entry).Telegram } } - return nil + return nil, nil } // true-新增;false-更新 diff --git a/third_party/message/accelerometer.go b/third_party/message/accelerometer.go index 87fac1f..14856bc 100644 --- a/third_party/message/accelerometer.go +++ b/third_party/message/accelerometer.go @@ -67,7 +67,7 @@ func (acc *Accelerometer) BuildCanData() []byte { appData = append(appData, accData...) appData = append(appData, byte(0)) canId := CanFrameId{ID1: 0xff, ID2: 0xff, ID3: 0xff, ID4: 0xff} - canNet := &CanetFrame{FF: false, RTR: false, CanLen: 7, CanId: canId, CanData: appData, IsTrainPcSim: false} + canNet := &CanetFrame{FF: false, RTR: false, CanLen: 7, CanId: canId, CanData: appData} return canNet.Encode() } func (acc *Accelerometer) Encode() []byte { diff --git a/third_party/message/btm_data.go b/third_party/message/btm_data.go new file mode 100644 index 0000000..d692aba --- /dev/null +++ b/third_party/message/btm_data.go @@ -0,0 +1,94 @@ +package message + +import "encoding/binary" + +//数据帧(0x80+扩展类型),一个CAN帧只能存储8个字节,对于一个应答器报文,分片到多个CAN数据帧中 + +// BtmDataMessageFrame 数据帧-应答器报文 +// offset = [0x00,0x0c] 共13个即可用于存储应答器报文的共104个字节 +// BtmDataMessageTimeAFrame 数据帧-时间戳A +// offset = 0x0d +// BtmDataMessageTimeBFrame 数据帧-时间戳B +// offset = 0x0e +// BtmDataMessageEndFrame 数据帧-结束 +// offset = 0x7f +const ( + DATA_TIME_A_OFFSET = 0x0d + DATA_TIME_B_OFFSET = 0x0e + DATA_END_OFFSET = 0x7f +) + +type BtmDataMessageAtpFrame struct { + //帧ID + FId CanFrameId + //8字节,应答器报文片段 + Message []byte +} +type BtmDataMessageAtpTimeAndEndFrame struct { + //帧ID + FId CanFrameId + //时间戳A + Time uint32 + //CRC + Crc32 uint32 +} + +func CreateBtmDataMessageDataAtpFrame(sn byte, offset byte) *BtmDataMessageAtpFrame { + return &BtmDataMessageAtpFrame{ + FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+offset, sn), + } +} + +func (f *BtmDataMessageAtpFrame) Encode() *BtmHeadFrame { + cf := &BtmHeadFrame{} + cf.CanId = f.FId + cf.CanLen = 8 + + dataBuf := make([]byte, 0, 8) + for _, data := range f.Message { + dataBuf = append(dataBuf, data) + } + cf.CanData = dataBuf + return cf +} +func (f *BtmDataMessageAtpFrame) Decode(cf *BtmHeadFrame) bool { + f.FId = cf.CanId + // + reader := NewCanBitsReader(cf.CanData, 8) + // + f.Message = make([]byte, 0, 8) + for c := 0; c < 8; c++ { + data, ok := reader.ReadByte() + if !ok { + return false + } + f.Message = append(f.Message, data) + } + // + return true +} + +///////////////////////////////////////////////////// + +func (atp *BtmDataMessageAtpTimeAndEndFrame) Encode() *BtmHeadFrame { + cf := &BtmHeadFrame{} + cf.CanId = atp.FId + cf.CanLen = 8 + data := make([]byte, 0) + data = binary.BigEndian.AppendUint32(data, atp.Time) + data = binary.BigEndian.AppendUint32(data, atp.Crc32) + cf.CanData = data + return cf +} + +func CreateBtmDataMessageTimeAtpFrame(sn byte, offset byte) *BtmDataMessageAtpTimeAndEndFrame { + return &BtmDataMessageAtpTimeAndEndFrame{FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+offset, sn)} +} + +//////////////////////////////////////////////////////////// + +func BtmDataMessageEndAtpFrame(sn byte) *BtmDataMessageAtpTimeAndEndFrame { + return &BtmDataMessageAtpTimeAndEndFrame{ + FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0xff, sn), + } +} diff --git a/third_party/message/btm_net.go b/third_party/message/btm_net.go new file mode 100644 index 0000000..c721cbe --- /dev/null +++ b/third_party/message/btm_net.go @@ -0,0 +1,67 @@ +package message + +import ( + "bytes" + "encoding/binary" + "fmt" + "strings" +) + +// CanetFrame USR-CANET200_V1.0.7 设备 以太网-CAN 透传协议帧(12字节) +type BtmHeadFrame struct { + CanLen byte //CAN帧数据长度[0,8],CanData中有效数据字节数 + CanId CanFrameId //CAN帧ID + CanData []byte //CAN帧数据,8字节 + +} + +func NewBtmHeadFrame(buf []byte) *BtmHeadFrame { + cf := &BtmHeadFrame{} + cf.Decode(buf) + return cf +} +func (p *BtmHeadFrame) Encode() []byte { + buf := make([]byte, 0) + //CAN 帧ID + frameId := uint32(p.CanId.ID1)<<21 | uint32(p.CanId.ID2)<<13 | uint32(p.CanId.ID3)<<5 | uint32(p.CanId.ID4) + buf = binary.BigEndian.AppendUint32(buf, frameId) + //CAN 帧数据 + if len(p.CanData) != 8 { + panic(fmt.Sprintf("len(p.CanData)!=8 datalen:%v", len(p.CanData))) + } + buf = append(buf, p.CanData...) + return buf +} + +func (p *BtmHeadFrame) Decode(buf []byte) { + bb := bytes.NewBuffer(buf) + var idSource uint32 + binary.Read(bb, binary.BigEndian, &idSource) + data := make([]byte, bb.Len()) + _, err := bb.Read(data) + if err != nil { + fmt.Println(err) + return + } + b1 := byte((idSource >> 21) & 0xFF) + b2 := byte((idSource >> 13) & 0xFF) + b3 := byte((idSource >> 5) & 0xFF) + b4 := byte(idSource & 0x1F) + + p.CanId.ID1 = b1 + p.CanId.ID2 = b2 + p.CanId.ID3 = b3 + p.CanId.ID4 = b4 + p.CanData = data +} + +func (p *BtmHeadFrame) String() string { + sb := strings.Builder{} + sb.WriteString(fmt.Sprintf("CanetFrame CanLen = %d, ID1 = 0x%0x, ID2 = 0x%0x, ID3 = 0x%0x, ID4 = 0x%0x", p.CanLen, + p.CanId.ID1, p.CanId.ID2, p.CanId.ID3, p.CanId.ID4)) + sb.WriteString("CanData = ") + for _, d := range p.CanData { + sb.WriteString(fmt.Sprintf(" 0x%0x ", d)) + } + return sb.String() +} diff --git a/third_party/message/can_atp_req.go b/third_party/message/can_atp_req.go index 1a67950..d0ac277 100644 --- a/third_party/message/can_atp_req.go +++ b/third_party/message/can_atp_req.go @@ -1,6 +1,8 @@ package message import ( + "bytes" + "encoding/binary" "fmt" "log/slog" "strings" @@ -68,7 +70,7 @@ type AtpRequestFrame struct { Crc16 uint16 //解码时CRC16校验结果,true-校验通过 Crc16CheckOk bool - IsTrainPcSim bool + //IsTrainPcSim bool } // NewAtpRequestFrame 创建ATP查询帧 @@ -90,6 +92,38 @@ func (f *AtpRequestFrame) String() string { sb.WriteString(fmt.Sprintf(",Crc16CheckOk = %t", f.Crc16CheckOk)) return sb.String() } + +func (f *AtpRequestFrame) Decode2(cf *BtmHeadFrame) bool { + f.FId = cf.CanId + buf := bytes.NewBuffer(cf.CanData) + if d, err := buf.ReadByte(); err == nil { + f.Speed = uint16(d << 4) + + f.ResendRequest = GetBit(d, 5)>>5 | GetBit(d, 4)>>6 + f.PowerAmplifierControlledByAtp = true + f.PowerAmplifierTurnOn = true + } else { + return false + } + if d, err := buf.ReadByte(); err == nil { + f.Speed |= uint16(d) + } + var time uint32 + binary.Read(buf, binary.BigEndian, &time) + f.Time = time + var crc uint16 + binary.Read(buf, binary.BigEndian, &crc) + f.Crc16 = crc + timeArr := make([]byte, 4) + binary.BigEndian.PutUint32(timeArr, time) + crc16 := Can_Crc16BtmReq(timeArr) + f.Crc16CheckOk = f.Crc16 == crc16 + if !f.Crc16CheckOk { + slog.Debug("解码AtpRequestFrame,CRC16校验未通过!!") + } + return true + +} func (f *AtpRequestFrame) Decode(cf *CanetFrame) bool { f.FId = cf.CanId // @@ -146,7 +180,7 @@ func (f *AtpRequestFrame) Decode(cf *CanetFrame) bool { } else { return false } - crc16 := Can_Crc16(timeArr) + crc16 := Can_Crc16BtmReq(timeArr) t1 := uint32(timeArr[0]) t2 := uint32(timeArr[1]) t3 := uint32(timeArr[2]) @@ -179,7 +213,7 @@ func (f *AtpRequestFrame) Decode(cf *CanetFrame) bool { } func (f *AtpRequestFrame) Encode() *CanetFrame { cf := &CanetFrame{} - cf.IsTrainPcSim = f.IsTrainPcSim + cf.CanId = f.FId cf.CanLen = 8 cf.FF = true diff --git a/third_party/message/can_btm_data.go b/third_party/message/can_btm_data.go index 4e10dec..0cba0f7 100644 --- a/third_party/message/can_btm_data.go +++ b/third_party/message/can_btm_data.go @@ -8,30 +8,28 @@ type BtmDataMessageFrame struct { //帧ID FId CanFrameId //8字节,应答器报文片段 - Message []byte - IsTrainPcSim bool + Message []byte } -func NewBtmDataMessageFrame(sn byte, offset byte, isTrainPcSim bool) *BtmDataMessageFrame { +func NewBtmDataMessageFrame(sn byte, offset byte) *BtmDataMessageFrame { return &BtmDataMessageFrame{ - FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+offset, sn), - IsTrainPcSim: isTrainPcSim, + FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+offset, sn), } } func (f *BtmDataMessageFrame) Encode() *CanetFrame { cf := &CanetFrame{} - cf.IsTrainPcSim = f.IsTrainPcSim + cf.CanId = f.FId cf.CanLen = 8 cf.FF = true cf.RTR = false // writer := NewCanBitsWriter(8) - // for _, data := range f.Message { writer.AddByte(data) } cf.CanData = writer.(CanBusData).GetData() + // return cf } @@ -62,46 +60,39 @@ type BtmDataMessageTimeAFrame struct { //时间戳A TimeA uint32 //CRC - Crc32A uint32 - IsTrainPcSim bool + Crc32A uint32 } -func NewBtmDataMessageTimeAFrame2(sn byte, isTrainPcSim bool) *BtmDataMessageTimeAFrame { +func NewBtmDataMessageTimeAFrame(sn byte) *BtmDataMessageTimeAFrame { return &BtmDataMessageTimeAFrame{ - FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+0x0e, sn), - IsTrainPcSim: isTrainPcSim, - } -} -func NewBtmDataMessageTimeAFrame(sn byte, isTrainPcSim bool) *BtmDataMessageTimeAFrame { - return &BtmDataMessageTimeAFrame{ - FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+0x0d, sn), - IsTrainPcSim: isTrainPcSim, + FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+0x0d, sn), } } + func (f *BtmDataMessageTimeAFrame) Encode() *CanetFrame { cf := &CanetFrame{} - cf.IsTrainPcSim = f.IsTrainPcSim + cf.CanId = f.FId cf.CanLen = 8 cf.FF = true cf.RTR = false - // + writer := NewCanBitsWriter(8) - // + byteMsk := uint32(0x00_00_00_ff) - // + writer.AddByte(byte((f.TimeA >> 24) & byteMsk)) writer.AddByte(byte((f.TimeA >> 16) & byteMsk)) writer.AddByte(byte((f.TimeA >> 8) & byteMsk)) writer.AddByte(byte(f.TimeA & byteMsk)) - // + writer.AddByte(byte((f.Crc32A >> 24) & byteMsk)) writer.AddByte(byte((f.Crc32A >> 16) & byteMsk)) writer.AddByte(byte((f.Crc32A >> 8) & byteMsk)) writer.AddByte(byte(f.Crc32A & byteMsk)) - // + cf.CanData = writer.(CanBusData).GetData() - // + return cf } @@ -173,40 +164,37 @@ type BtmDataMessageTimeBFrame struct { //时间戳B TimeB uint32 //CRC - Crc32B uint32 - IsTrainPcSim bool + Crc32B uint32 } -func NewBtmDataMessageTimeBFrame(sn byte, isTrainPcSim bool) *BtmDataMessageTimeBFrame { +func NewBtmDataMessageTimeBFrame(sn byte) *BtmDataMessageTimeBFrame { return &BtmDataMessageTimeBFrame{ - FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+0x0e, sn), - IsTrainPcSim: isTrainPcSim, + FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+0x0e, sn), } } func (f *BtmDataMessageTimeBFrame) Encode() *CanetFrame { cf := &CanetFrame{} - cf.IsTrainPcSim = f.IsTrainPcSim cf.CanId = f.FId cf.CanLen = 8 cf.FF = true cf.RTR = false // writer := NewCanBitsWriter(8) - // + byteMsk := uint32(0x00_00_00_ff) - // + writer.AddByte(byte((f.TimeB >> 24) & byteMsk)) writer.AddByte(byte((f.TimeB >> 16) & byteMsk)) writer.AddByte(byte((f.TimeB >> 8) & byteMsk)) writer.AddByte(byte(f.TimeB & byteMsk)) - // + writer.AddByte(byte((f.Crc32B >> 24) & byteMsk)) writer.AddByte(byte((f.Crc32B >> 16) & byteMsk)) writer.AddByte(byte((f.Crc32B >> 8) & byteMsk)) writer.AddByte(byte(f.Crc32B & byteMsk)) - // + cf.CanData = writer.(CanBusData).GetData() - // + return cf } func (f *BtmDataMessageTimeBFrame) Decode(cf *CanetFrame) bool { @@ -278,25 +266,18 @@ type BtmDataMessageEndFrame struct { TkB uint32 //CRC32C校验包含对状态应答帧与数据帧的总校验,总共为8×17-4=132字节,4-即Crc32C //1个状态应答帧 + 13个BtmDataMessageFrame + 1个BtmDataMessageTimeAFrame + 1个BtmDataMessageTimeBFrame + 1个BtmDataMessageEndFrame - Crc32C uint32 - IsTrainPcSim bool + Crc32C uint32 } -func NewBtmDataMessageEndFrame2(sn byte, isTrainPcSim bool) *BtmDataMessageEndFrame { +func NewBtmDataMessageEndFrame(sn byte) *BtmDataMessageEndFrame { return &BtmDataMessageEndFrame{ - FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0xff, sn), - IsTrainPcSim: isTrainPcSim, - } -} -func NewBtmDataMessageEndFrame(sn byte, isTrainPcSim bool) *BtmDataMessageEndFrame { - return &BtmDataMessageEndFrame{ - FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+0x7f, sn), - IsTrainPcSim: isTrainPcSim, + FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, 0x80+0x7f, sn), } } + func (f *BtmDataMessageEndFrame) Encode() *CanetFrame { cf := &CanetFrame{} - cf.IsTrainPcSim = f.IsTrainPcSim + cf.CanId = f.FId cf.CanLen = 8 cf.FF = true diff --git a/third_party/message/can_btm_rsp.go b/third_party/message/can_btm_rsp.go index aee9231..efd94a6 100644 --- a/third_party/message/can_btm_rsp.go +++ b/third_party/message/can_btm_rsp.go @@ -1,18 +1,19 @@ package message -import "log/slog" +import ( + "encoding/binary" + "fmt" + "log/slog" +) -func CreateBtmRspFramesData2(statusRsp *BtmStatusRspFrame, msg []byte, msgPackError bool, msgTimeA uint32, msgTimeB uint32, tkTimeB uint32, isTrainPcSim bool) ([]byte, bool) { - /* if len(msg) > 104 { //数据帧最多存储13*8个字节 - return nil, false - }*/ - //最近一次ATP查询请求序列号 - sn := statusRsp.FId.ID4 - //13个BtmDataMessageFrame [0x00,0x0c] +// 返回应答器数据帧(数据帧 + timeA+timeB+结束帧) +func CreateBtmAtpDataRspFramesData(statusRsp *BtmHeadFrame, msg []byte, msgPackError bool, msgTimeA uint32, msgTimeB uint32, tkTimeB uint32) ([]byte, bool) { + sn := statusRsp.CanId.ID4 + //应答器整个是16个数据帧,其中报文占13帧,timeA,timeB 占2帧,最后是结束帧 //数据 - dms := make([]*BtmDataMessageFrame, 13) + dms := make([]*BtmDataMessageAtpFrame, 13) for mr := 0x00; mr <= 0x0c; mr++ { - dms[mr] = NewBtmDataMessageFrame(sn, byte(mr), isTrainPcSim) + dms[mr] = CreateBtmDataMessageDataAtpFrame(sn, byte(mr)) dms[mr].Message = make([]byte, 8) //8字节数组,默认值0 // if !msgPackError { @@ -32,70 +33,62 @@ func CreateBtmRspFramesData2(statusRsp *BtmStatusRspFrame, msg []byte, msgPackEr } } } - // - dtA := NewBtmDataMessageTimeAFrame(sn, isTrainPcSim) - dtA.TimeA = msgTimeA - if !msgPackError { - var crc32AData []byte - crc32AData = append(crc32AData, msg...) - crc32AData = append(crc32AData, canTimeToBytes(dtA.TimeA)...) - dtA.Crc32A = Can_Crc32(crc32AData) //CRC32A的校验范围是:报文+时间戳A - } else { //BTM解包发生错误,则数据帧及CRC32A/B全填“0xFF” - dtA.Crc32A = 0xff_ff_ff_ff - } - // - dtB := NewBtmDataMessageTimeBFrame(sn, isTrainPcSim) - dtB.TimeB = msgTimeB - if !msgPackError { - var crc32BData []byte - crc32BData = append(crc32BData, msg...) - crc32BData = append(crc32BData, canTimeToBytes(dtB.TimeB)...) - dtB.Crc32B = Can_Crc32(crc32BData) //CRC32B的校验范围是:报文+时间戳B - } else { //BTM解包发生错误,则数据帧及CRC32A/B全填“0xFF” - dtB.Crc32B = 0xff_ff_ff_ff - } - // - end := NewBtmDataMessageEndFrame(sn, isTrainPcSim) - end.TkB = tkTimeB - // - statusCf := statusRsp.Encode() - dmsCfs := make([]*CanetFrame, 0, 13) - for _, dm := range dms { - dmsCfs = append(dmsCfs, dm.Encode()) - } + dtA := createTimeA(sn, DATA_TIME_A_OFFSET, msgTimeA, msgPackError, msg) + dtB := createTimeA(sn, DATA_TIME_B_OFFSET, msgTimeB, msgPackError, msg) dtACf := dtA.Encode() dtBCf := dtB.Encode() - // - crc32cData := make([]byte, 0, 132) - crc32cData = append(crc32cData, statusCf.CanData...) - for _, dmCf := range dmsCfs { - crc32cData = append(crc32cData, dmCf.CanData...) - } - crc32cData = append(crc32cData, dtACf.CanData...) - crc32cData = append(crc32cData, dtBCf.CanData...) - crc32cData = append(crc32cData, canTimeToBytes(end.TkB)...) - // - end.Crc32C = Can_Crc32(crc32cData) - // - endCf := end.Encode() - // - rt := make([]byte, 0, 221) //17*13 - rt = append(rt, statusCf.Encode2()...) - for _, dmCf := range dmsCfs { - rt = append(rt, dmCf.Encode2()...) - } - rt = append(rt, dtACf.Encode2()...) - rt = append(rt, dtBCf.Encode2()...) - rt = append(rt, endCf.Encode2()...) - if isTrainPcSim && len(rt) != 221 { - } else if len(rt) != 221 { - slog.Warn("len(rt)!=221") + //结束帧 + + end := createDataAtpEnd(sn, tkTimeB, statusRsp.CanData, msg, dtACf.CanData, dtBCf.CanData) + + endCf := end.Encode() + rt := make([]byte, 0) //17*12 + for _, dmCf := range dms { + rt = append(rt, dmCf.Encode().Encode()...) + } + rt = append(rt, dtACf.Encode()...) + rt = append(rt, dtBCf.Encode()...) + rt = append(rt, endCf.Encode()...) + if len(rt) != 192 { + slog.Warn(fmt.Sprintf("len(rt)!=192 实际数据长度:%v", len(rt))) return nil, false } - return rt, true } +func createDataAtpEnd(sn byte, time uint32, statusData, msg, dtAData, dtBData []byte) *BtmDataMessageAtpTimeAndEndFrame { + end := BtmDataMessageEndAtpFrame(sn) + end.Time = time + crc32cData := make([]byte, 0) + + crc32cData = append(crc32cData, statusData...) + crc32cData = append(crc32cData, msg...) + crc32cData = append(crc32cData, dtAData...) + crc32cData = append(crc32cData, dtBData...) + crc32cData = binary.BigEndian.AppendUint32(crc32cData, end.Time) + end.Crc32 = Can_Crc32(crc32cData) + return end +} + +func createTimeA(sn, offset byte, time uint32, msgPackError bool, msg []byte) *BtmDataMessageAtpTimeAndEndFrame { + tf := CreateBtmDataMessageTimeAtpFrame(sn, offset) + tf.Time = time + if !msgPackError { + var crcData []byte + crcData = append(crcData, msg...) + crcData = binary.BigEndian.AppendUint32(crcData, time) + if offset == DATA_TIME_A_OFFSET { + tf.Crc32 = Can_Crc32A(crcData) //CRC32A的校验范围是:报文+时间戳B + + } else { + tf.Crc32 = Can_Crc32B(crcData) //CRC32B的校验范围是:报文+时间戳B + } + + } else { //BTM解包发生错误,则数据帧及CRC32A/B全填“0xFF” + tf.Crc32 = 0xff_ff_ff_ff + } + return tf +} // CreateBtmRspFramesData BTM与ATP之间为双向通信,ATP(主)定时发送请求帧,BTM(从)在未接收到应答器报文时回复状态应答器帧和时间同步帧,在接收到应答器报文时回复所有帧 // @@ -104,7 +97,7 @@ func CreateBtmRspFramesData2(statusRsp *BtmStatusRspFrame, msg []byte, msgPackEr // 共17帧,17X12个字节,每个帧12字节 // msg - 应答器报文 // msgPackError - true BTM解包发生错误,则数据帧及CRC32A/B全填“0xFF” -func CreateBtmRspFramesData(statusRsp *BtmStatusRspFrame, msg []byte, msgPackError bool, msgTimeA uint32, msgTimeB uint32, tkTimeB uint32, isTrainPcSim bool) ([]byte, bool) { +func CreateBtmRspFramesData(statusRsp *BtmStatusRspFrame, msg []byte, msgPackError bool, msgTimeA uint32, msgTimeB uint32, tkTimeB uint32) ([]byte, bool) { /* if len(msg) > 104 { //数据帧最多存储13*8个字节 return nil, false }*/ @@ -114,7 +107,7 @@ func CreateBtmRspFramesData(statusRsp *BtmStatusRspFrame, msg []byte, msgPackErr //数据 dms := make([]*BtmDataMessageFrame, 13) for mr := 0x00; mr <= 0x0c; mr++ { - dms[mr] = NewBtmDataMessageFrame(sn, byte(mr), isTrainPcSim) + dms[mr] = NewBtmDataMessageFrame(sn, byte(mr)) dms[mr].Message = make([]byte, 8) //8字节数组,默认值0 // if !msgPackError { @@ -135,7 +128,7 @@ func CreateBtmRspFramesData(statusRsp *BtmStatusRspFrame, msg []byte, msgPackErr } } // - dtA := NewBtmDataMessageTimeAFrame(sn, isTrainPcSim) + dtA := NewBtmDataMessageTimeAFrame(sn) dtA.TimeA = msgTimeA if !msgPackError { var crc32AData []byte @@ -146,7 +139,7 @@ func CreateBtmRspFramesData(statusRsp *BtmStatusRspFrame, msg []byte, msgPackErr dtA.Crc32A = 0xff_ff_ff_ff } // - dtB := NewBtmDataMessageTimeBFrame(sn, isTrainPcSim) + dtB := NewBtmDataMessageTimeBFrame(sn) dtB.TimeB = msgTimeB if !msgPackError { var crc32BData []byte @@ -157,102 +150,7 @@ func CreateBtmRspFramesData(statusRsp *BtmStatusRspFrame, msg []byte, msgPackErr dtB.Crc32B = 0xff_ff_ff_ff } // - end := NewBtmDataMessageEndFrame(sn, isTrainPcSim) - end.TkB = tkTimeB - // - statusCf := statusRsp.Encode() - dmsCfs := make([]*CanetFrame, 0, 13) - for _, dm := range dms { - dmsCfs = append(dmsCfs, dm.Encode()) - } - dtACf := dtA.Encode() - dtBCf := dtB.Encode() - // - crc32cData := make([]byte, 0, 132) - crc32cData = append(crc32cData, statusCf.CanData...) - for _, dmCf := range dmsCfs { - crc32cData = append(crc32cData, dmCf.CanData...) - } - crc32cData = append(crc32cData, dtACf.CanData...) - crc32cData = append(crc32cData, dtBCf.CanData...) - crc32cData = append(crc32cData, canTimeToBytes(end.TkB)...) - // - end.Crc32C = Can_Crc32(crc32cData) - // - endCf := end.Encode() - // - rt := make([]byte, 0, 221) //17*13 - rt = append(rt, statusCf.Encode()...) - for _, dmCf := range dmsCfs { - rt = append(rt, dmCf.Encode()...) - } - rt = append(rt, dtACf.Encode()...) - rt = append(rt, dtBCf.Encode()...) - rt = append(rt, endCf.Encode()...) - if isTrainPcSim && len(rt) != 221 { - - } else if len(rt) != 221 { - slog.Warn("len(rt)!=221") - return nil, false - } - - return rt, true -} - -func CreateBtmRspFramesDataForPcSim(statusRsp *BtmStatusRspFrame, msg []byte, msgPackError bool, msgTimeA uint32, msgTimeB uint32, tkTimeB uint32, isTrainPcSim bool) ([]byte, bool) { - if len(msg) > 128 { //数据帧最多存储13*8个字节 - return nil, false - } - //最近一次ATP查询请求序列号 - sn := statusRsp.FId.ID4 - //13个BtmDataMessageFrame [0x00,0x0c] - //数据 - dms := make([]*BtmDataMessageFrame, 14) - for mr := 0x00; mr <= 0x0E; mr++ { - dms[mr] = NewBtmDataMessageFrame(sn, byte(mr), isTrainPcSim) - dms[mr].Message = make([]byte, 8) //8字节数组,默认值0 - // - if !msgPackError { - mi := mr * 8 - if mi < len(msg) { //数据帧中有<=8个字节数据 - if mi+7 < len(msg) { - dms[mr].Message = msg[mi : mi+8] - } else { - for i, d := range msg[mi:] { - dms[mr].Message[i] = d - } - } - } - } else { //BTM解包发生错误,则数据帧及CRC32A/B全填“0xFF” - for c := 0; c < 8; c++ { - dms[mr].Message[c] = 0xff - } - } - } - // - dtA := NewBtmDataMessageTimeAFrame(sn, isTrainPcSim) - //dtA.TimeA = msgTimeA - //if !msgPackError { - // var crc32AData []byte - // crc32AData = append(crc32AData, msg...) - // crc32AData = append(crc32AData, canTimeToBytes(dtA.TimeA)...) - // dtA.Crc32A = Can_Crc32(crc32AData) //CRC32A的校验范围是:报文+时间戳A - //} else { //BTM解包发生错误,则数据帧及CRC32A/B全填“0xFF” - // dtA.Crc32A = 0xff_ff_ff_ff - //} - // - dtB := NewBtmDataMessageTimeBFrame(sn, isTrainPcSim) - dtB.TimeB = msgTimeB - if !msgPackError { - var crc32BData []byte - crc32BData = append(crc32BData, msg...) - crc32BData = append(crc32BData, canTimeToBytes(dtB.TimeB)...) - dtB.Crc32B = Can_Crc32(crc32BData) //CRC32B的校验范围是:报文+时间戳B - } else { //BTM解包发生错误,则数据帧及CRC32A/B全填“0xFF” - dtB.Crc32B = 0xff_ff_ff_ff - } - // - end := NewBtmDataMessageEndFrame(sn, isTrainPcSim) + end := NewBtmDataMessageEndFrame(sn) end.TkB = tkTimeB // statusCf := statusRsp.Encode() @@ -288,5 +186,6 @@ func CreateBtmRspFramesDataForPcSim(statusRsp *BtmStatusRspFrame, msg []byte, ms slog.Warn("len(rt)!=221") return nil, false } + return rt, true } diff --git a/third_party/message/can_btm_status_rsp.go b/third_party/message/can_btm_status_rsp.go index 5ee94ad..9db0824 100644 --- a/third_party/message/can_btm_status_rsp.go +++ b/third_party/message/can_btm_status_rsp.go @@ -1,6 +1,7 @@ package message import ( + "encoding/binary" "fmt" "strings" ) @@ -26,15 +27,14 @@ type BtmStatusRspFrame struct { //BTM detailed code DetailedCode byte //有具体报文内容时TK A时刻填充为CD信号上升沿时刻,报文全零时TK A时刻填充为CD信号下降沿时刻。 - TkTimeA uint32 - IsTrainPcSim bool + TkTimeA uint32 } -func NewBtmStatusRspFrame(sn byte, isTrainPcSim bool) *BtmStatusRspFrame { +func NewBtmStatusRspFrame(sn byte) *BtmStatusRspFrame { return &BtmStatusRspFrame{ FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, CAN_FRAME_STATUS_RSP, sn), //FId: *NewCanFrameId(0x00, 0x00, 0x05, sn), - IsTrainPcSim: isTrainPcSim, + } } func (f *BtmStatusRspFrame) Decode(cf *CanetFrame) bool { @@ -114,9 +114,35 @@ func (f *BtmStatusRspFrame) Decode(cf *CanetFrame) bool { // return true } + +func (f *BtmStatusRspFrame) EncodeBtmAtp() *BtmHeadFrame { + cf := &BtmHeadFrame{} + cf.CanId = f.FId + cf.CanLen = 8 + data := make([]byte, 0) + data = append(data, f.Dsn) + data = append(data, f.BaliseCounter) + data = append(data, f.MessageCounter) + var state byte = 0 + if f.PowerAmplifierOn { + state = setBit(state, 7, 1) + } + if f.AtpReqCrcCheckWrong { + state = setBit(state, 6, 1) + } + if f.PowerAmplifierFailure { + state = setBit(state, 5, 1) + } + if f.AntennaFault { + state = setBit(state, 4, 1) + } + data = append(data, state) + data = binary.BigEndian.AppendUint32(data, f.TkTimeA) + cf.CanData = data + return cf +} func (f *BtmStatusRspFrame) Encode() *CanetFrame { cf := &CanetFrame{} - cf.IsTrainPcSim = f.IsTrainPcSim cf.CanId = f.FId cf.CanLen = 8 cf.FF = true @@ -126,6 +152,7 @@ func (f *BtmStatusRspFrame) Encode() *CanetFrame { writer.AddByte(f.Dsn) writer.AddByte(f.BaliseCounter) writer.AddByte(f.MessageCounter) + // if f.PowerAmplifierOn { writer.AddBits(1, 1) diff --git a/third_party/message/can_btm_time_sync_rsp.go b/third_party/message/can_btm_time_sync_rsp.go index f825a71..b908ef7 100644 --- a/third_party/message/can_btm_time_sync_rsp.go +++ b/third_party/message/can_btm_time_sync_rsp.go @@ -1,6 +1,7 @@ package message import ( + "encoding/binary" "fmt" "strings" ) @@ -14,15 +15,14 @@ type BtmTimeSyncCheckFrame struct { T2 uint32 //T3时刻 //BTM将在T3时刻发送回复帧给ATP,并保持流水号与ATP查询帧一致。 - T3 uint32 - IsTrainPcSim bool + T3 uint32 } -func NewBtmTimeSyncCheckFrame(sn byte, isTrainPcSim bool) *BtmTimeSyncCheckFrame { +func NewBtmTimeSyncCheckFrame(sn byte) *BtmTimeSyncCheckFrame { return &BtmTimeSyncCheckFrame{ FId: *NewCanFrameId(CAN_ADDR_RSP_ATP, CAN_ADDR_RSP_BTM, CAN_FRAME_TIME_SYNC_RSP, sn), //FId: *NewCanFrameId(0x00, 0x00, 0x35, sn), - IsTrainPcSim: isTrainPcSim, + } } @@ -77,9 +77,21 @@ func (f *BtmTimeSyncCheckFrame) Decode(cf *CanetFrame) bool { // return true } + +func (f *BtmTimeSyncCheckFrame) EncodeBtmAtp() *BtmHeadFrame { + cf := &BtmHeadFrame{} + cf.CanId = f.FId + cf.CanLen = 8 + data := make([]byte, 0) + data = binary.BigEndian.AppendUint32(data, f.T2) + data = binary.BigEndian.AppendUint32(data, f.T3) + cf.CanData = data + + return cf +} func (f *BtmTimeSyncCheckFrame) Encode() *CanetFrame { cf := &CanetFrame{} - cf.IsTrainPcSim = f.IsTrainPcSim + cf.CanId = f.FId cf.CanLen = 8 cf.FF = true diff --git a/third_party/message/can_bus.go b/third_party/message/can_bus.go index 8706623..6f463a1 100644 --- a/third_party/message/can_bus.go +++ b/third_party/message/can_bus.go @@ -1,6 +1,8 @@ package message -import "github.com/snksoft/crc" +import ( + "github.com/snksoft/crc" +) /////////////////////CAN串行总线 bit 流处理 //////////////////////// @@ -199,47 +201,53 @@ const ( CAN_BITS_LEN8 = byte(0b1111_1111) ) -///////////////////// CRC //////////////////////// - -// const ( -// CAN_CRC16_ATPREQ = 0x11021 -// CAN_CRC32 = 0x04C11DB7 -// ) - var ( CAN_CRC16 = crc.CCITT - CAN_CRC32 = &crc.Parameters{Width: 32, Polynomial: 0x4A503DF1, Init: 0x00FF0000, ReflectIn: true, ReflectOut: true, FinalXor: 0xFFFFFFFF} + CAN_CRC32 = &crc.Parameters{Width: 32, Polynomial: 0x4A503DF1, Init: 0x00FF0000, ReflectIn: false, ReflectOut: false, FinalXor: 0x000000} + ATP_TIMEA = crc.CRC32 + ATP_TIMEB = crc.Castagnoli + ATP_REQ = crc.XMODEM ) func Can_Crc16(data []byte) uint16 { return uint16(crc.CalculateCRC(CAN_CRC16, data)) } +func Can_Crc16BtmReq(data []byte) uint16 { + return uint16(crc.CalculateCRC(ATP_REQ, data)) +} func Can_Crc32(data []byte) uint32 { return uint32(crc.CalculateCRC(CAN_CRC32, data)) } +func Can_Crc32A(data []byte) uint32 { + return uint32(crc.CalculateCRC(ATP_TIMEA, data)) +} +func Can_Crc32B(data []byte) uint32 { + return uint32(crc.CalculateCRC(ATP_TIMEB, data)) +} -// var ( -// crc16AtpReqTable []uint32 = nil -// crc32CanTable []uint32 = nil -// ) +//var ( +// crc16AtpReqTable []uint32 = nil +// crc32CanTable []uint32 = nil +//) -// func CreateCanCrcTable() { -// if crc16AtpReqTable == nil { -// crc16AtpReqTable = CreateCrcTable(CAN_CRC16_ATPREQ, 16, false) -// } -// if crc32CanTable == nil { -// crc32CanTable = CreateCrcTable(CAN_CRC32, 32, false) -// } -// } -// func calculateAtpReqCrc16(data []byte) uint16 { -// crc := CrcTableBased(data, 16, 0, false, false, 0, crc16AtpReqTable) -// return uint16(crc) -// } -// func calculateCanCrc32(data []byte) uint32 { -// crc := CrcTableBased(data, 32, 0xFF_FF_FF_FF, false, false, 0, crc32CanTable) -// return crc -// } +// func CreateCanCrcTable() { +// if crc16AtpReqTable == nil { +// crc16AtpReqTable = CreateCrcTable(CAN_CRC16_ATPREQ, 16, false) +// } +// if crc32CanTable == nil { +// crc32CanTable = CreateCrcTable(CAN_CRC32, 32, false) +// } +// } +// +// func calculateAtpReqCrc16(data []byte) uint16 { +// crc := CrcTableBased(data, 16, 0, false, false, 0, crc16AtpReqTable) +// return uint16(crc) +// } +//func calculateCanCrc32(data []byte) uint32 { +// crc := CrcTableBased(data, 32, 0xFF_FF_FF_FF, false, false, 0, crc32CanTable) +// return crc +//} // // CRC32A的校验范围是:报文+时间戳A // func calculateDataRspCrc32A(data []byte) uint32 { diff --git a/third_party/message/can_net.go b/third_party/message/can_net.go index df13c34..09601dd 100644 --- a/third_party/message/can_net.go +++ b/third_party/message/can_net.go @@ -1,8 +1,6 @@ package message import ( - "bytes" - "encoding/binary" "fmt" "log/slog" "strings" @@ -10,62 +8,37 @@ import ( // CanetFrame USR-CANET200_V1.0.7 设备 以太网-CAN 透传协议帧(13字节) type CanetFrame struct { - FF bool //true-1扩展帧 - RTR bool //true-1远程帧 - CanLen byte //CAN帧数据长度[0,8],CanData中有效数据字节数 - CanId CanFrameId //CAN帧ID - CanData []byte //CAN帧数据,8字节 - IsTrainPcSim bool //是否列车pc仿真 + FF bool //true-1扩展帧 + RTR bool //true-1远程帧 + CanLen byte //CAN帧数据长度[0,8],CanData中有效数据字节数 + CanId CanFrameId //CAN帧ID + CanData []byte //CAN帧数据,8字节 + } -func NewCanetFrame(buf []byte, isTrainPcSim bool) *CanetFrame { - cf := &CanetFrame{IsTrainPcSim: isTrainPcSim} +func NewCanetFrame(buf []byte) *CanetFrame { + cf := &CanetFrame{} cf.Decode(buf) return cf } -func NewCanetFrame2(buf []byte, isTrainPcSim bool) *CanetFrame { - cf := &CanetFrame{IsTrainPcSim: isTrainPcSim} - cf.Decode2(buf) - return cf -} -func (p *CanetFrame) Encode2() []byte { - buf := make([]byte, 0) - //CAN 帧ID - frameId := uint32(p.CanId.ID1)<<21 | uint32(p.CanId.ID2)<<13 | uint32(p.CanId.ID3)<<5 | uint32(p.CanId.ID4) - - buf = binary.BigEndian.AppendUint32(buf, frameId) - //CAN 帧数据 - if len(p.CanData) != 8 { - panic("len(p.CanData)!=8") - } - buf = append(buf, p.CanData...) - return buf -} - func (p *CanetFrame) Encode() []byte { buf := make([]byte, 0) - if !p.IsTrainPcSim { - //canet200帧信息 - b1 := byte(0x00) - if p.FF { - b1 |= 0x80 //bit7 - } - if p.RTR { - b1 |= 0x40 //bit6 - } - b1 |= p.CanLen & 0x0f - buf = append(buf, b1) + //canet200帧信息 + b1 := byte(0x00) + if p.FF { + b1 |= 0x80 //bit7 } + if p.RTR { + b1 |= 0x40 //bit6 + } + b1 |= p.CanLen & 0x0f + buf = append(buf, b1) //CAN 帧ID buf = append(buf, p.CanId.ID1) buf = append(buf, p.CanId.ID2) buf = append(buf, p.CanId.ID3) - if p.IsTrainPcSim { - buf = append(buf, p.CanId.ID4) - } else { - buf = append(buf, p.CanId.ID4<<3) - } + buf = append(buf, p.CanId.ID4<<3) //CAN 帧数据 if len(p.CanData) != 8 { @@ -74,28 +47,7 @@ func (p *CanetFrame) Encode() []byte { buf = append(buf, p.CanData...) return buf } -func (p *CanetFrame) Decode2(buf []byte) { - bb := bytes.NewBuffer(buf) - var idSource uint32 - binary.Read(bb, binary.BigEndian, &idSource) - data := make([]byte, bb.Len()) - _, err := bb.Read(data) - if err != nil { - fmt.Println(err) - return - } - - b1 := byte(idSource >> 21) - b2 := byte((idSource << 7) >> 13) - b3 := byte((idSource << 15) >> 20) - b4 := byte(idSource & 0x1f) - p.CanId.ID1 = b1 - p.CanId.ID2 = b2 - p.CanId.ID3 = b3 - p.CanId.ID4 = b4 - p.CanData = data -} func (p *CanetFrame) Decode(buf []byte) { if len(buf) != 13 { panic("len(buf)!=13") @@ -113,8 +65,8 @@ func (p *CanetFrame) Decode(buf []byte) { } func (p *CanetFrame) String() string { sb := strings.Builder{} - sb.WriteString(fmt.Sprintf("CanetFrame FF = %t, RTR = %t, CanLen = %d, ID1 = 0x%0x, ID2 = 0x%0x, ID3 = 0x%0x, ID4 = 0x%0x, isTrainPcSim=%v", p.FF, p.RTR, p.CanLen, - p.CanId.ID1, p.CanId.ID2, p.CanId.ID3, p.CanId.ID4, p.IsTrainPcSim)) + sb.WriteString(fmt.Sprintf("CanetFrame FF = %t, RTR = %t, CanLen = %d, ID1 = 0x%0x, ID2 = 0x%0x, ID3 = 0x%0x, ID4 = 0x%0x", p.FF, p.RTR, p.CanLen, + p.CanId.ID1, p.CanId.ID2, p.CanId.ID3, p.CanId.ID4)) sb.WriteString("CanData = ") for _, d := range p.CanData { sb.WriteString(fmt.Sprintf(" 0x%0x ", d)) diff --git a/third_party/train_pc_sim/train_pc_sim.go b/third_party/train_pc_sim/train_pc_sim.go index cf90124..dd79f2b 100644 --- a/third_party/train_pc_sim/train_pc_sim.go +++ b/third_party/train_pc_sim/train_pc_sim.go @@ -50,6 +50,7 @@ type TrainPcSim interface { TrainPluseCount(sta *state_proto.TrainState, h1, h2, t1, t2 float32) ResetPluseCount(sta *state_proto.TrainState) //FindAllThirdPartState() []tpapi.ThirdPartyApiService + DsnAddAndReturn() byte } type TrainPcSimManage interface { @@ -75,9 +76,8 @@ type trainPcSimService struct { newPcSimclientMap map[string]*TrainPcReciverData cancleContext context.CancelFunc trainPcSimManage TrainPcSimManage - //speedPlace *message.TrainSpeedPlaceReportMsg - //trainSpeedPlace map[string]*message.TrainSpeedPlaceReportMsg - configs []config.VehiclePCSimConfig + configs []config.VehiclePCSimConfig + btmDsn uint8 } var ( @@ -111,6 +111,14 @@ func (d *trainPcSimService) TrueService() bool { func (d *trainPcSimService) ServiceDesc() string { return Name } +func (d *trainPcSimService) DsnAddAndReturn() byte { + defer initLock.Unlock() + initLock.Lock() + returnVal := d.btmDsn + d.btmDsn = returnVal + 1 + return returnVal +} + func FindTrainPcSimClientKey2(t *state_proto.TrainState) string { return t.ConnState.TypeName } @@ -196,40 +204,6 @@ func (d *trainPcSimService) findConfig(configName string) (*config.VehiclePCSimC return nil, fmt.Errorf("未找到对应的车载pc连接配置") } -/*func (d *trainPcSimService) connTrainPcSim(ctx context.Context) { - - go func() { - for { - select { - case <-ctx.Done(): - d.newCloseAllConn() - return - default: - } - trains := d.trainPcSimManage.GetConnTrain2() - if len(trains) > 0 { - for _, t := range trains { - clientKey := FindTrainPcSimClientKey(t) - if clientKey == "" { - slog.Error("未找到对应的pc仿真连接,trainId:", t.Id, "删除对应客户端") - d.newCloseConn(clientKey) - continue - } - rd := d.newPcSimclientMap[clientKey] - if rd == nil { - d.newPcSimclientMap[clientKey] = &TrainPcReciverData{pcSimManage: d.trainPcSimManage, clientKey: clientKey, tcpClient: &tcp.TcpClient{}} - } - if !rd.tcpClient.IsConning() { - d.newCloseConn(clientKey) - d.initConn(clientKey) - } - } - } - time.Sleep(time.Second) - } - }() -}*/ - func (d *trainPcSimService) initConn(clientKey string) error { rd := d.newPcSimclientMap[clientKey] @@ -239,11 +213,10 @@ func (d *trainPcSimService) initConn(clientKey string) error { rd.trainInit = false rd.tcpClient = nil } - cfg, cfgErr := d.findConfig(clientKey) if cfgErr != nil { errMsg := fmt.Sprintf("没找到对应的配置信息 key:%v", clientKey) - slog.Error(errMsg, cfgErr.Error()) + //slog.Error(errMsg, cfgErr.Error()) rd.updateState(tpapi.ThirdPartyState_Broken) return sys_error.New(errMsg, cfgErr) } @@ -251,7 +224,7 @@ func (d *trainPcSimService) initConn(clientKey string) error { client2, err := tcp.StartTcpClient(addr, rd.receiverDataHandle, rd.readError) if err != nil { connErrMsg := fmt.Sprintf("车载pc连接失败 clientKey:%v", clientKey) - slog.Error(connErrMsg, err.Error()) + //slog.Error(connErrMsg, err.Error()) rd.updateState(tpapi.ThirdPartyState_Broken) return sys_error.New(connErrMsg, err) } else { @@ -283,7 +256,7 @@ func (d *trainPcSimService) Start(pcSimManage TrainPcSimManage) { slog.Error("车载pc仿真配置未开启") return } - //third_party.AppendService(d.findAllThirdPartState()) + d.configs = configs ctx, ctxFun := context.WithCancel(context.Background()) d.cancleContext = ctxFun @@ -303,17 +276,6 @@ func (d *trainPcSimService) Stop() { d.newCloseAllConn() } -/* - func (d *trainPcSimService) CreateOrRemoveSpeedPLace(train *state_proto.TrainState) { - if train.ConnState.Conn && (train.ConnState.ConnType == state_proto.TrainConnState_PC_SIM_A || train.ConnState.ConnType == state_proto.TrainConnState_PC_SIM_B) { - train.PluseCount = &state_proto.SensorSpeedPulseCount{} - d.speedPlace = &message.TrainSpeedPlaceReportMsg{TrainId: train.Id} - } else { - train.PluseCount = nil - d.speedPlace = nil - } - } -*/ func (d *trainPcSimService) CreateOrRemoveTrain(train *state_proto.TrainState, isCreate bool) error { clientKey := FindTrainPcSimClientKey2(train) err := d.initConn(clientKey) @@ -402,13 +364,12 @@ func (d *trainPcSimService) sendTrainLocationAndSpeedTask(ctx context.Context) { bm := &message.TrainPcSimBaseMessage{Type: message.SENDER_TRAIN_LOCATION_INFO, Data: data} d.TrainPluseCountReset(train) dataCode := bm.Encode() - slog.Info(fmt.Sprintf("发送列车速度位置,列车:%v,s1: %v,s2: %v,c2: %v,c2: %v,发送数据:%v", train.Id, s1, s2, trainClient.speedPlace.PulseCount1, trainClient.speedPlace.PulseCount2, hex.EncodeToString(dataCode))) + //slog.Info(fmt.Sprintf("发送列车速度位置,列车:%v,s1: %v,s2: %v,c2: %v,c2: %v,发送数据:%v", train.Id, s1, s2, trainClient.speedPlace.PulseCount1, trainClient.speedPlace.PulseCount2, hex.EncodeToString(dataCode))) err := trainClient.tcpClient.Send(dataCode) if err != nil { slog.Error(fmt.Sprintf("发送列车速度位置失败,列车:%v,发送数据:%v", train.Id, hex.EncodeToString(dataCode))) } } - } time.Sleep(time.Millisecond * 80) @@ -450,7 +411,7 @@ func (d *trainPcSimService) SendDriverActive(train *state_proto.TrainState) { } msgs = append(msgs, msg.Encode()...) hexData := hex.EncodeToString(msgs) - slog.Info(fmt.Sprintf("发送驾驶激活列车id:%v,数据:%v", train.Id, hexData)) + //slog.Info(fmt.Sprintf("发送驾驶激活列车id:%v,数据:%v", train.Id, hexData)) err := trainClient.tcpClient.Send(msgs) if err != nil { @@ -493,7 +454,7 @@ func (d *trainPcSimService) SendHandleSwitch(oldTraction, oldBrakeForce int64, t msg.Type = message.RECIVE_TRAIN_HAND_KEY_BACKWARD } da := msg.Encode() - slog.Info("发送列车手柄消息", "msg", hex.EncodeToString(da)) + //slog.Info("发送列车手柄消息", "msg", hex.EncodeToString(da)) err := trainClient.tcpClient.Send(da) //err := client.Send(da) if err != nil { @@ -519,7 +480,7 @@ func (d *trainPcSimService) SendTrainDirection(train *state_proto.TrainState, tr for _, msg := range baseMsgs { da := msg.Encode() - slog.Info(fmt.Sprintf("发送列车方向列车:%v ,数据:%v", train.Id, hex.EncodeToString(da))) + //slog.Info(fmt.Sprintf("发送列车方向列车:%v ,数据:%v", train.Id, hex.EncodeToString(da))) err := trainClient.tcpClient.Send(da) if err != nil { @@ -539,7 +500,7 @@ func (d *trainPcSimService) SendBaliseData2(train *state_proto.TrainState, msgTy msg := &message.TrainPcSimBaseMessage{Type: msgType, Data: dd} da := msg.Encode() - //slog.Info(fmt.Sprintf("发送列车PC仿真应答器信息,数据类型:0x%X,数据:%v", msgType, hex.EncodeToString(da))) + slog.Info(fmt.Sprintf("发送列车PC仿真应答器信息,数据类型:0x%X,数据:%v", msgType, hex.EncodeToString(da))) err := trainClient.tcpClient.Send(da) if err != nil { slog.Info(fmt.Sprintf("发送列车PC仿真应答器信息失败,数据:%v", hex.EncodeToString(da))) @@ -558,37 +519,13 @@ func (d *trainPcSimService) SendBaliseData(train *state_proto.TrainState, msgTyp msg.Data = data da := msg.Encode() - //slog.Info(fmt.Sprintf("发送列车PC仿真应答器信息,无应答器:%v,数据:%v", msgType == message.RECIVE_TRAIN_BTM_NOT_DATA, hex.EncodeToString(da))) + slog.Info(fmt.Sprintf("发送列车PC仿真应答器信息,数据类型:0x%x,源数据长度:%v,数据:%v", msgType, len(data), hex.EncodeToString(da))) err := trainClient.tcpClient.Send(da) if err != nil { slog.Info(fmt.Sprintf("发送列车PC仿真应答器信息失败,数据:%v", hex.EncodeToString(da))) } } -/*func (d *trainPcSimService) PublishTrainControlEvent(train *state_proto.TrainState, events []TrainControlEvent) { - if len(events) <= 0 { - return - } - trainClient, trainDataErr := d.findTrainConn(train) - if trainDataErr != nil { - slog.Error("") - return - } - - msgs := make([]byte, 0) - for _, event := range events { - msg := &message.TrainPcSimBaseMessage{Type: event.Type, Data: event.Data} - code := msg.Encode() - msgs = append(msgs, code...) - } - hexCode := hex.EncodeToString(msgs) - slog.Info(fmt.Sprintf("列车数字量信息发送数据:%v", hexCode)) - err := trainClient.tcpClient.Send(msgs) - if err != nil { - slog.Error(fmt.Sprintf("列车数字量信息发送失败,数据:%v", hexCode)) - } -}*/ - func (d *trainPcSimService) SendTrainControlMsg(train *state_proto.TrainState, baseMessage []message.TrainPcSimBaseMessage) { if len(baseMessage) <= 0 { return @@ -601,7 +538,6 @@ func (d *trainPcSimService) SendTrainControlMsg(train *state_proto.TrainState, b for _, msg := range baseMessage { d.sendData(trainClient.tcpClient, msg.Encode()) - } } func (d *trainPcSimService) sendData(client *tcp.TcpClient, data []byte) { diff --git a/ts/simulation/wayside/memory/wayside_simulation_train_pc.go b/ts/simulation/wayside/memory/wayside_simulation_train_pc.go index 55875f2..d14b7ab 100644 --- a/ts/simulation/wayside/memory/wayside_simulation_train_pc.go +++ b/ts/simulation/wayside/memory/wayside_simulation_train_pc.go @@ -516,6 +516,7 @@ func (s *VerifySimulation) reportTrainMockInitMsg(train *state_proto.TrainState, if message.GetBit(data3, 3) == 0 { tce = append(tce, message.TrainPcSimBaseMessage{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.DRIVER_ACTIVE_REPORT, 1}}) } + tce = append(tce, message.TrainPcSimBaseMessage{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.TRAIN_INTEGRITY, 1}}) } train_pc_sim.Default().SendTrainControlMsg(train, tce) return initResult @@ -675,73 +676,67 @@ func (s *VerifySimulation) TrainPcSimMockInfo(train *state_proto.TrainState, dat // 4.4.4. 车载输出BTM查询同步帧报文内容(0x04) func (s *VerifySimulation) TrainBtmQuery(train *state_proto.TrainState, data []byte) { - //slog.Info(fmt.Sprintf("收到车载输出BTM查询同步帧报文内容:%v", hex.EncodeToString(data))) + //time.Sleep(time.Millisecond * 50) + slog.Info(fmt.Sprintf("收到车载输出BTM查询同步帧报文内容:%v", hex.EncodeToString(data))) if len(data) < 12 { slog.Error("列车btm查询报文长度错误:", len(data)) return } - //train := s.FindConnTrain(connType) - if train.BtmState == nil { - slog.Warn("列车暂时未获取到应答器信息") - return - } - /*if train == nil { - slog.Error("车载输出btm查询,未找到连接车载pc仿真的列车") - return - } - if !train.ConnState.Conn { - slog.Error("车载输出btm查询,列车未连接车载pc仿真") - return - }*/ - trainAtm := message.NewCanetFrame2(data, true) - atpReq := &message.AtpRequestFrame{IsTrainPcSim: true} - if !atpReq.Decode(trainAtm) { + if train.BtmState == nil { + slog.Warn(fmt.Sprintf("列车暂时未获取到应答器信息,无法进行btm查询列车id:%v", train.Id)) + return + } + trainAtm := message.NewBtmHeadFrame(data) + atpReq := &message.AtpRequestFrame{} + + if !atpReq.Decode2(trainAtm) { slog.Warn("列车pc驾驶模拟-CanetFrame解码成AtpRequestFrame失败", "CanetFrame", trainAtm.String()) return } + cl := clock(atpReq) - btmRepFrame := createBtmStatus(trainAtm.CanId.ID4, train.BtmState, atpReq, cl) + dsn := train_pc_sim.Default().DsnAddAndReturn() + btmRepFrame := createBtmStatus(trainAtm.CanId.ID4, train.BtmState, atpReq, cl, dsn) + //slog.Info(fmt.Sprintf("id1:%x,id2:%x,id3:%x,id4:%x,resendRequest:%v,reqTime:%v,dsn:%v", trainAtm.CanId.ID1, trainAtm.CanId.ID2, trainAtm.CanId.ID3, trainAtm.CanId.ID4, atpReq.ResendRequest, atpReq.Time, dsn)) if atpReq.ResendRequest == 2 { //重新发送 if len(train.BtmState.BaliseTelegramForPcSimResend) > 0 { dd, _ := hex.DecodeString(train.BtmState.BaliseTelegramForPcSimResend) train_pc_sim.Default().SendBaliseData(train, message.RECIVE_TRAIN_BTM_HAS_DATA, dd) + } else { + timeSyncF := message.NewBtmTimeSyncCheckFrame(trainAtm.CanId.ID4) + timeSyncF.T2 = cl.BtmTk + timeSyncF.T3 = cl.TkNow() + queryData := make([]byte, 0) + queryData = append(queryData, btmRepFrame.EncodeBtmAtp().Encode()...) + queryData = append(queryData, timeSyncF.Encode().Encode()...) + train_pc_sim.Default().SendBaliseData(train, message.RECIVE_TRAIN_BTM_NOT_DATA, queryData) } } else { - timeSyncF := message.NewBtmTimeSyncCheckFrame(trainAtm.CanId.ID4, true) + timeSyncF := message.NewBtmTimeSyncCheckFrame(trainAtm.CanId.ID4) timeSyncF.T2 = cl.BtmTk timeSyncF.T3 = cl.TkNow() telCount := strings.Count(train.BtmState.Telegram, "00") if telCount >= balise_const.UserTelegramByteLen { - //无数据 - queryDataStr := make([]string, 0) - queryDataStr = append(queryDataStr, hex.EncodeToString(btmRepFrame.Encode().Encode2())) - queryDataStr = append(queryDataStr, hex.EncodeToString(timeSyncF.Encode().Encode2())) - train_pc_sim.Default().SendBaliseData2(train, message.RECIVE_TRAIN_BTM_NOT_DATA, queryDataStr) - - /* queryData := make([]byte, 0) - queryData = append(queryData, btmRepFrame.Encode().Encode()...) - queryData = append(queryData, timeSyncF.Encode().Encode()...) - train_pc_sim.Default().SendBaliseData(train, message.RECIVE_TRAIN_BTM_NOT_DATA, queryData)*/ + queryData := make([]byte, 0) + queryData = append(queryData, btmRepFrame.EncodeBtmAtp().Encode()...) + queryData = append(queryData, timeSyncF.EncodeBtmAtp().Encode()...) + train_pc_sim.Default().SendBaliseData(train, message.RECIVE_TRAIN_BTM_NOT_DATA, queryData) } else { //有数据 aliseData, _ := hex.DecodeString(train.BtmState.Telegram) - statusDataCf, statusDataCfOk := message.CreateBtmRspFramesData2(btmRepFrame, aliseData, false, cl.TkNow(), cl.TkNow(), cl.TkNow(), true) + stateRepFrame := btmRepFrame.EncodeBtmAtp() + statusDataCf, statusDataCfOk := message.CreateBtmAtpDataRspFramesData(stateRepFrame, aliseData, false, cl.BtmTk, cl.BtmTk, cl.BtmTk) if statusDataCfOk { - /* queryData := make([]byte, 0) - queryData = append(queryData, btmRepFrame.Encode().Encode2()...) - queryData = append(queryData, timeSyncF.Encode().Encode2()...) - queryData = append(queryData, statusDataCf...) //数据帧包含结束帧 - train.BtmState.BaliseTelegramForPcSimResend = fmt.Sprintf("%X", statusDataCf) - train_pc_sim.Default().SendBaliseData(train, message.RECIVE_TRAIN_BTM_HAS_DATA, queryData)*/ - queryDataStr := make([]string, 0) - queryDataStr = append(queryDataStr, hex.EncodeToString(btmRepFrame.Encode().Encode2())) - queryDataStr = append(queryDataStr, hex.EncodeToString(timeSyncF.Encode().Encode2())) - queryDataStr = append(queryDataStr, hex.EncodeToString(statusDataCf)) //数据帧包含结束帧 + timeSyncF.T2 = cl.BtmTk + timeSyncF.T3 = cl.TkNow() + queryData := make([]byte, 0) + queryData = append(queryData, stateRepFrame.Encode()...) + queryData = append(queryData, timeSyncF.EncodeBtmAtp().Encode()...) + queryData = append(queryData, statusDataCf...) //数据帧包含结束帧 train.BtmState.BaliseTelegramForPcSimResend = fmt.Sprintf("%X", statusDataCf) - train_pc_sim.Default().SendBaliseData2(train, message.RECIVE_TRAIN_BTM_HAS_DATA, queryDataStr) - + train_pc_sim.Default().SendBaliseData(train, message.RECIVE_TRAIN_BTM_HAS_DATA, queryData) } else { slog.Error("列车pc仿真 BtmCanetClient应答帧、数据帧编码失败") } @@ -749,22 +744,21 @@ func (s *VerifySimulation) TrainBtmQuery(train *state_proto.TrainState, data []b } } -func createBtmStatus(canIdSn byte, btmState *state_proto.BTMState, atpReq *message.AtpRequestFrame, cl can_btm.BtmClock) *message.BtmStatusRspFrame { - statusF := message.NewBtmStatusRspFrame(canIdSn, atpReq.IsTrainPcSim) - //btmStatus := aa(train, atpReq) - +func createBtmStatus(canIdSn byte, btmState *state_proto.BTMState, atpReq *message.AtpRequestFrame, cl can_btm.BtmClock, dsn byte) *message.BtmStatusRspFrame { + statusF := message.NewBtmStatusRspFrame(canIdSn) statusF.PowerAmplifierOn = true statusF.PowerAmplifierFailure = false statusF.AtpReqCrcCheckWrong = !atpReq.Crc16CheckOk statusF.AntennaFault = false statusF.BaliseCounter = byte(btmState.BaliseCount) statusF.MessageCounter = byte(btmState.MessageCounter) - statusF.TkTimeA = cl.TkNow() + //statusF.TkTimeA = cl.TkNow() + statusF.TkTimeA = cl.BtmTk statusF.DetailedCode = 0 if btmState.AboveBalise { statusF.DetailedCode = 0x07 } - dsn := byte(btmState.DataSerialNumber) + 1 + btmState.DataSerialNumber = uint32(dsn) statusF.Dsn = dsn return statusF