diff --git a/api/simulation.go b/api/simulation.go index 668c9d8..52be561 100644 --- a/api/simulation.go +++ b/api/simulation.go @@ -36,7 +36,10 @@ func InitSimulationRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddle authed.POST("/relay/operation", relayOperation) authed.POST("/signal/operation", signalOperation) authed.POST("/esbBtn/operation", esbBtnOperation) - authed.POST("/ibp/operation", ibpBtnOperation) + authed.POST("/ibp/btn/operation", ibpBtnOperation) + authed.POST("/ibp/key/operation", ibpKeyOperation) + authed.GET("/:id/getMapKilometerRange", getMapKilometerRange) + authed.POST("/psl/operation", pslBtnOperation) // 初始化地图信息 initPublishMapInfo() @@ -282,7 +285,7 @@ func signalOperation(c *gin.Context) { } simulation := checkDeviceDataAndReturn(req.SimulationId) slog.Info("传入状态参数", req) - memory.ChangeSignalState(simulation, req.MapId, req.DeviceId, req.Aspect) + memory.ChangeSignalState(simulation, req) c.JSON(http.StatusOK, "ok") } @@ -297,13 +300,13 @@ func signalOperation(c *gin.Context) { // @Accept json // @Produce json // @Param Authorization header string true "JWT Token" -// @Param ButtonOperationReqDto body dto.ButtonOperationReqDto true "ATS测试仿真-ESB按钮操作" +// @Param EsbButtonOperationReqDto body dto.EsbButtonOperationReqDto true "ATS测试仿真-ESB按钮操作" // // @Success 200 {object} string // @Failure 500 {object} dto.ErrorDto // @Router /api/v1/simulation/esbBtn/operation [post] func esbBtnOperation(c *gin.Context) { - req := &dto.ButtonOperationReqDto{} + req := &dto.EsbButtonOperationReqDto{} if err := c.ShouldBind(&req); err != nil { panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()}) } @@ -324,19 +327,73 @@ func esbBtnOperation(c *gin.Context) { // @Accept json // @Produce json // @Param Authorization header string true "JWT Token" -// @Param ButtonOperationReqDto body dto.ButtonOperationReqDto true "ATS测试仿真-IBP按钮操作" +// @Param IBPButtonOperationReqDto body dto.IBPButtonOperationReqDto true "ATS测试仿真-IBP按钮操作" // // @Success 200 {object} string // @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/simulation/ibp/operation [post] +// @Router /api/v1/simulation/ibp/btn/operation [post] func ibpBtnOperation(c *gin.Context) { - req := &dto.ButtonOperationReqDto{} + req := &dto.IBPButtonOperationReqDto{} if err := c.ShouldBind(&req); err != nil { panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()}) } simulation := checkDeviceDataAndReturn(req.SimulationId) slog.Info("传入状态参数", req) - memory.ChangeIBPButtonState(simulation, req.MapId, req.Station, req.Id, req.Down) + memory.ChangeIBPButtonState(simulation, req.MapId, req.StationId, req.ButtonCode, req.Down) + c.JSON(http.StatusOK, "ok") +} + +// ATS测试-IBP钥匙操作 +// +// @Summary ATS测试-IBP钥匙操作 +// +// @Security JwtAuth +// +// @Description ATS测试-IBP钥匙操作 +// @Tags ATS测试仿真Api +// @Accept json +// @Produce json +// @Param Authorization header string true "JWT Token" +// @Param KeyOperationReqDto body dto.KeyOperationReqDto true "ATS测试仿真-IBP钥匙操作" +// +// @Success 200 {object} string +// @Failure 500 {object} dto.ErrorDto +// @Router /api/v1/simulation/ibp/key/operation [post] +func ibpKeyOperation(c *gin.Context) { + req := &dto.KeyOperationReqDto{} + if err := c.ShouldBind(&req); err != nil { + panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()}) + } + simulation := checkDeviceDataAndReturn(req.SimulationId) + slog.Info("传入状态参数", req) + memory.ChangeIBPKeyState(simulation, req.MapId, req.StationId, req.KeyCode, req.Gear) + c.JSON(http.StatusOK, "ok") +} + +// PSL操作 +// +// @Summary PSL操作 +// +// @Security JwtAuth +// +// @Description PSL操作 +// @Tags ATS测试仿真Api +// @Accept json +// @Produce json +// @Param Authorization header string true "JWT Token" +// @Param PslOperationReqDto body dto.PslOperationReqDto true "PSL操作" +// +// @Success 200 {object} string +// @Failure 500 {object} dto.ErrorDto +// @Router /api/v1/simulation/ibp/operation [post] +func pslBtnOperation(c *gin.Context) { + req := &dto.PslOperationReqDto{} + if err := c.ShouldBind(&req); err != nil { + panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()}) + } + simulation := checkDeviceDataAndReturn(req.SimulationId) + slog.Info("传入状态参数", req) + memory.ChangePSLButtonState(simulation, req.MapId, req.GateBoxId, req.ButtonCode, req.Down) c.JSON(http.StatusOK, "ok") } @@ -359,6 +416,30 @@ func getDataChannelName(c *gin.Context) { c.JSON(http.StatusOK, config.SimulationId_prefix+apiproto.MemoryChangeServerSuffix) } +// 获取仿真地图的公里标范围 +// +// @Summary 获取仿真地图的公里标范围 +// +// @Security JwtAuth +// +// @Description 获取仿真地图的公里标范围 +// @Tags ATS测试仿真Api +// @Accept json +// @Produce json +// @Param Authorization header string true "JWT Token" +// +// @Success 200 {object} string +// @Failure 500 {object} dto.ErrorDto +// @Router /api/v1/simulation/:id/getMapKilometerRange [get] +func getMapKilometerRange(c *gin.Context) { + id, exist := c.Params.Get("id") + if !exist { + panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"}) + } + simulation := checkDeviceDataAndReturn(id) + c.JSON(http.StatusOK, simulation.Repo.GetCoordinateInfo()) +} + // 获取ATS测试-操作继电器 // // @Summary 获取ATS测试-操作继电器 diff --git a/ats/verify/protos/graphicData/stationLayoutGraphics.pb.go b/ats/verify/protos/graphicData/stationLayoutGraphics.pb.go index 52c3fd1..673b869 100644 --- a/ats/verify/protos/graphicData/stationLayoutGraphics.pb.go +++ b/ats/verify/protos/graphicData/stationLayoutGraphics.pb.go @@ -162,6 +162,66 @@ func (Turnout_SwitchMachineType) EnumDescriptor() ([]byte, []int) { return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{12, 0} } +// 信号机模型类型枚举 +// 从左向右,最左边为靠近灯座的灯 +type Signal_Model int32 + +const ( + Signal_HLU Signal_Model = 0 //红绿黄 + Signal_HL Signal_Model = 1 //红绿, + Signal_HLU_FU Signal_Model = 2 //红绿黄,封黄灯 + Signal_HLU_FL Signal_Model = 3 //红绿黄,封绿 + Signal_AB Signal_Model = 4 //蓝白 + Signal_HBU Signal_Model = 5 //红白黄 +) + +// Enum value maps for Signal_Model. +var ( + Signal_Model_name = map[int32]string{ + 0: "HLU", + 1: "HL", + 2: "HLU_FU", + 3: "HLU_FL", + 4: "AB", + 5: "HBU", + } + Signal_Model_value = map[string]int32{ + "HLU": 0, + "HL": 1, + "HLU_FU": 2, + "HLU_FL": 3, + "AB": 4, + "HBU": 5, + } +) + +func (x Signal_Model) Enum() *Signal_Model { + p := new(Signal_Model) + *p = x + return p +} + +func (x Signal_Model) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Signal_Model) Descriptor() protoreflect.EnumDescriptor { + return file_stationLayoutGraphics_proto_enumTypes[3].Descriptor() +} + +func (Signal_Model) Type() protoreflect.EnumType { + return &file_stationLayoutGraphics_proto_enumTypes[3] +} + +func (x Signal_Model) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Signal_Model.Descriptor instead. +func (Signal_Model) EnumDescriptor() ([]byte, []int) { + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{14, 0} +} + type Section_SectionType int32 const ( @@ -192,11 +252,11 @@ func (x Section_SectionType) String() string { } func (Section_SectionType) Descriptor() protoreflect.EnumDescriptor { - return file_stationLayoutGraphics_proto_enumTypes[3].Descriptor() + return file_stationLayoutGraphics_proto_enumTypes[4].Descriptor() } func (Section_SectionType) Type() protoreflect.EnumType { - return &file_stationLayoutGraphics_proto_enumTypes[3] + return &file_stationLayoutGraphics_proto_enumTypes[4] } func (x Section_SectionType) Number() protoreflect.EnumNumber { @@ -256,11 +316,11 @@ func (x RelatedRef_DeviceType) String() string { } func (RelatedRef_DeviceType) Descriptor() protoreflect.EnumDescriptor { - return file_stationLayoutGraphics_proto_enumTypes[4].Descriptor() + return file_stationLayoutGraphics_proto_enumTypes[5].Descriptor() } func (RelatedRef_DeviceType) Type() protoreflect.EnumType { - return &file_stationLayoutGraphics_proto_enumTypes[4] + return &file_stationLayoutGraphics_proto_enumTypes[5] } func (x RelatedRef_DeviceType) Number() protoreflect.EnumNumber { @@ -305,11 +365,11 @@ func (x RelatedRef_DevicePort) String() string { } func (RelatedRef_DevicePort) Descriptor() protoreflect.EnumDescriptor { - return file_stationLayoutGraphics_proto_enumTypes[5].Descriptor() + return file_stationLayoutGraphics_proto_enumTypes[6].Descriptor() } func (RelatedRef_DevicePort) Type() protoreflect.EnumType { - return &file_stationLayoutGraphics_proto_enumTypes[5] + return &file_stationLayoutGraphics_proto_enumTypes[6] } func (x RelatedRef_DevicePort) Number() protoreflect.EnumNumber { @@ -351,11 +411,11 @@ func (x SimpleRef_DeviceType) String() string { } func (SimpleRef_DeviceType) Descriptor() protoreflect.EnumDescriptor { - return file_stationLayoutGraphics_proto_enumTypes[6].Descriptor() + return file_stationLayoutGraphics_proto_enumTypes[7].Descriptor() } func (SimpleRef_DeviceType) Type() protoreflect.EnumType { - return &file_stationLayoutGraphics_proto_enumTypes[6] + return &file_stationLayoutGraphics_proto_enumTypes[7] } func (x SimpleRef_DeviceType) Number() protoreflect.EnumNumber { @@ -397,11 +457,11 @@ func (x TrackSection_TrackSectionType) String() string { } func (TrackSection_TrackSectionType) Descriptor() protoreflect.EnumDescriptor { - return file_stationLayoutGraphics_proto_enumTypes[7].Descriptor() + return file_stationLayoutGraphics_proto_enumTypes[8].Descriptor() } func (TrackSection_TrackSectionType) Type() protoreflect.EnumType { - return &file_stationLayoutGraphics_proto_enumTypes[7] + return &file_stationLayoutGraphics_proto_enumTypes[8] } func (x TrackSection_TrackSectionType) Number() protoreflect.EnumNumber { @@ -446,11 +506,11 @@ func (x StopPosition_CoachNum) String() string { } func (StopPosition_CoachNum) Descriptor() protoreflect.EnumDescriptor { - return file_stationLayoutGraphics_proto_enumTypes[8].Descriptor() + return file_stationLayoutGraphics_proto_enumTypes[9].Descriptor() } func (StopPosition_CoachNum) Type() protoreflect.EnumType { - return &file_stationLayoutGraphics_proto_enumTypes[8] + return &file_stationLayoutGraphics_proto_enumTypes[9] } func (x StopPosition_CoachNum) Number() protoreflect.EnumNumber { @@ -1081,7 +1141,9 @@ type Platform struct { Index int32 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` //索引 // int32 refStationIndex = 6; //关联车站索引 // repeated string centralizedStations = 7; // 集中站列表 - PlatformRef []*RelatedRef `protobuf:"bytes,8,rep,name=platformRef,proto3" json:"platformRef,omitempty"` //站台关联的车站和物理区段 + // repeated RelatedRef platformRef = 8; //站台关联的车站和物理区段 + RefStationId string `protobuf:"bytes,9,opt,name=refStationId,proto3" json:"refStationId,omitempty"` //关联的车站的id + RefSectionId string `protobuf:"bytes,10,opt,name=refSectionId,proto3" json:"refSectionId,omitempty"` //关联的物理区段id } func (x *Platform) Reset() { @@ -1137,11 +1199,18 @@ func (x *Platform) GetIndex() int32 { return 0 } -func (x *Platform) GetPlatformRef() []*RelatedRef { +func (x *Platform) GetRefStationId() string { if x != nil { - return x.PlatformRef + return x.RefStationId } - return nil + return "" +} + +func (x *Platform) GetRefSectionId() string { + if x != nil { + return x.RefSectionId + } + return "" } type ScreenDoor struct { @@ -1152,7 +1221,7 @@ type ScreenDoor struct { Common *CommonInfo `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` SonDoorAmount int32 `protobuf:"varint,3,opt,name=sonDoorAmount,proto3" json:"sonDoorAmount,omitempty"` //子屏蔽门的数量 - RefPlatform string `protobuf:"bytes,4,opt,name=refPlatform,proto3" json:"refPlatform,omitempty"` //关联的站台 + RefPlatformId string `protobuf:"bytes,4,opt,name=refPlatformId,proto3" json:"refPlatformId,omitempty"` //关联的站台 ScreenDoorGroupList []*ScreenDoorGroup `protobuf:"bytes,5,rep,name=screenDoorGroupList,proto3" json:"screenDoorGroupList,omitempty"` //编组列表 } @@ -1209,9 +1278,9 @@ func (x *ScreenDoor) GetSonDoorAmount() int32 { return 0 } -func (x *ScreenDoor) GetRefPlatform() string { +func (x *ScreenDoor) GetRefPlatformId() string { if x != nil { - return x.RefPlatform + return x.RefPlatformId } return "" } @@ -1292,13 +1361,14 @@ type Station struct { unknownFields protoimpl.UnknownFields Common *CommonInfo `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` //车站站名 // bool hasControl = 3; // 是否有控制 ConcentrationStations bool `protobuf:"varint,4,opt,name=concentrationStations,proto3" json:"concentrationStations,omitempty"` //是否集中站 // string kilometerCode = 5; //公里标 KilometerSystem *KilometerSystem `protobuf:"bytes,6,opt,name=kilometerSystem,proto3" json:"kilometerSystem,omitempty"` //公里标 Index int32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` RefIbpMapCode string `protobuf:"bytes,8,opt,name=refIbpMapCode,proto3" json:"refIbpMapCode,omitempty"` // 关联IBP地图Code + StationName string `protobuf:"bytes,9,opt,name=stationName,proto3" json:"stationName,omitempty"` //车站名 } func (x *Station) Reset() { @@ -1375,6 +1445,13 @@ func (x *Station) GetRefIbpMapCode() string { return "" } +func (x *Station) GetStationName() string { + if x != nil { + return x.StationName + } + return "" +} + type TrainWindow struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1771,6 +1848,8 @@ type Signal struct { Index int32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` //索引 RefDev *RelatedRef `protobuf:"bytes,8,opt,name=refDev,proto3" json:"refDev,omitempty"` //关联设备(区段/道岔) CentralizedStations []string `protobuf:"bytes,9,rep,name=centralizedStations,proto3" json:"centralizedStations,omitempty"` // 集中站列表 + // 信号机模型类型 + Mt Signal_Model `protobuf:"varint,10,opt,name=mt,proto3,enum=graphicData.Signal_Model" json:"mt,omitempty"` } func (x *Signal) Reset() { @@ -1854,6 +1933,13 @@ func (x *Signal) GetCentralizedStations() []string { return nil } +func (x *Signal) GetMt() Signal_Model { + if x != nil { + return x.Mt + } + return Signal_HLU +} + // * 物理区段(包含岔区和非岔区) type Section struct { state protoimpl.MessageState @@ -3521,8 +3607,9 @@ type UniqueIdOfStationLayout struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - City string `protobuf:"bytes,1,opt,name=city,proto3" json:"city,omitempty"` //城市 - LineId string `protobuf:"bytes,2,opt,name=lineId,proto3" json:"lineId,omitempty"` //线路号 + City string `protobuf:"bytes,1,opt,name=city,proto3" json:"city,omitempty"` //城市 + LineId string `protobuf:"bytes,2,opt,name=lineId,proto3" json:"lineId,omitempty"` //线路号 + MainCoordinateSystem string `protobuf:"bytes,3,opt,name=mainCoordinateSystem,proto3" json:"mainCoordinateSystem,omitempty"` //地图的公里标主坐标系 } func (x *UniqueIdOfStationLayout) Reset() { @@ -3571,6 +3658,13 @@ func (x *UniqueIdOfStationLayout) GetLineId() string { return "" } +func (x *UniqueIdOfStationLayout) GetMainCoordinateSystem() string { + if x != nil { + return x.MainCoordinateSystem + } + return "" +} + // 公里标转换 type KilometerConvert struct { state protoimpl.MessageState @@ -3975,522 +4069,536 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{ 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x0f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x39, - 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x66, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x66, 0x22, 0xe9, 0x01, 0x0a, 0x0a, 0x53, 0x63, - 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x22, + 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xed, 0x01, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65, 0x65, + 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x6f, + 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0d, 0x73, 0x6f, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x13, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, + 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x13, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0f, 0x53, 0x63, 0x72, 0x65, 0x65, + 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, + 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x22, + 0x0a, 0x0c, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, + 0x6f, 0x72, 0x22, 0xaa, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, + 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, + 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 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, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x49, 0x62, + 0x70, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x72, 0x65, 0x66, 0x49, 0x62, 0x70, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x70, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x2f, + 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x22, 0xa5, 0x03, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, + 0x6e, 0x67, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 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, 0x0f, + 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, + 0x41, 0x0a, 0x0f, 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x66, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, + 0x66, 0x52, 0x0f, 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x40, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, + 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, + 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3b, 0x0a, 0x12, + 0x54, 0x79, 0x70, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, + 0x6e, 0x67, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x10, 0x01, 0x22, 0x8d, 0x06, 0x0a, 0x07, 0x54, 0x75, + 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x41, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x42, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x12, 0x2d, + 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, + 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x05, + 0x70, 0x63, 0x52, 0x65, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x63, 0x52, 0x65, 0x66, 0x12, 0x46, 0x0a, 0x0f, 0x6b, + 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x0d, + 0x20, 0x03, 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, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x61, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x61, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x62, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x70, 0x62, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x63, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x63, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x54, 0x0a, + 0x11, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x2e, 0x53, + 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x11, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x42, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, + 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, 0x5f, + 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, + 0x5f, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x22, 0x91, 0x01, 0x0a, 0x0f, 0x4b, 0x69, + 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1c, 0x0a, + 0x09, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x63, + 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x34, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x03, + 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, - 0x0d, 0x73, 0x6f, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x6f, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x4e, 0x0a, 0x13, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, - 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x13, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0f, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, - 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x6d, - 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x22, 0x0a, - 0x0c, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, - 0x72, 0x22, 0x88, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, - 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 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, - 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x49, 0x62, 0x70, - 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, - 0x65, 0x66, 0x49, 0x62, 0x70, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x70, 0x0a, 0x0b, - 0x54, 0x72, 0x61, 0x69, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x2f, 0x0a, 0x06, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, + 0x69, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 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, 0x0f, 0x6b, 0x69, + 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x06, 0x72, 0x65, + 0x66, 0x44, 0x65, 0x76, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x02, 0x6d, 0x74, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x02, 0x6d, + 0x74, 0x22, 0x41, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x07, 0x0a, 0x03, 0x48, 0x4c, + 0x55, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x48, + 0x4c, 0x55, 0x5f, 0x46, 0x55, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x4c, 0x55, 0x5f, 0x46, + 0x4c, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x42, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x48, + 0x42, 0x55, 0x10, 0x05, 0x22, 0xa4, 0x04, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, + 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, + 0x42, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x26, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, + 0x76, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, + 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x30, 0x0a, 0x0b, 0x53, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x68, 0x79, 0x73, + 0x69, 0x63, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, + 0x74, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x10, 0x02, 0x22, 0xcd, 0x02, 0x0a, 0x0a, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x42, + 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, + 0x72, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, + 0x72, 0x61, 0x69, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, + 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x12, 0x0f, + 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x04, 0x12, + 0x0a, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65, + 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x10, 0x07, 0x22, 0x21, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, + 0x01, 0x42, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x0d, 0x54, + 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x09, 0x53, 0x65, 0x70, 0x61, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, + 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x22, 0xcd, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, + 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x6e, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x05, 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, 0x0f, 0x6b, 0x69, + 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x3f, 0x0a, + 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x12, 0x30, + 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, + 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x12, 0x41, + 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x2b, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0b, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, + 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x22, 0xe2, + 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f, + 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, + 0x0e, 0x0a, 0x02, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x75, 0x70, 0x12, + 0x30, 0x0a, 0x07, 0x61, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x07, 0x61, 0x53, 0x69, 0x6d, 0x52, 0x65, + 0x66, 0x12, 0x30, 0x0a, 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x07, 0x62, 0x53, 0x69, 0x6d, + 0x52, 0x65, 0x66, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x52, 0x65, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x61, 0x52, 0x65, 0x66, + 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x52, 0x65, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x62, 0x52, 0x65, 0x66, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x22, 0xb6, 0x02, 0x0a, 0x13, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xa5, - 0x03, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x12, - 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 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, 0x0f, 0x6b, 0x69, 0x6c, - 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x41, 0x0a, 0x0f, - 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0f, - 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, 0x12, - 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x40, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x54, - 0x79, 0x70, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3b, 0x0a, 0x12, 0x54, 0x79, 0x70, - 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, - 0x10, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, - 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x75, 0x6e, - 0x64, 0x61, 0x72, 0x79, 0x10, 0x01, 0x22, 0x8d, 0x06, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, - 0x75, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x41, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x41, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x12, - 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x12, 0x2d, 0x0a, 0x05, 0x70, - 0x61, 0x52, 0x65, 0x66, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, + 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x05, + 0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x05, 0x70, + 0x62, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x62, - 0x52, 0x65, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x63, 0x52, - 0x65, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x66, 0x52, 0x05, 0x70, 0x63, 0x52, 0x65, 0x66, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x0d, 0x20, 0x03, 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, - 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x61, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x70, 0x61, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x62, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x62, - 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, - 0x0a, 0x10, 0x70, 0x63, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x63, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x11, 0x73, 0x77, - 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x2e, 0x53, 0x77, 0x69, 0x74, - 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x11, 0x73, - 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, - 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x42, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, 0x5f, 0x53, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, 0x5f, 0x44, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x22, 0x91, 0x01, 0x0a, 0x0f, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x69, - 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6b, - 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6f, 0x72, - 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x12, 0x34, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x02, 0x0a, 0x06, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x69, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x69, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 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, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, - 0x76, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, - 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0xa4, 0x04, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x12, - 0x2d, 0x0a, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, 0x42, - 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, - 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, 0x65, - 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x30, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x68, 0x79, 0x73, 0x69, - 0x63, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, - 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x10, 0x02, 0x22, 0xcd, 0x02, 0x0a, 0x0a, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x42, 0x0a, - 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, - 0x74, 0x22, 0x83, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x0b, 0x0a, - 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x72, - 0x61, 0x69, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x41, - 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x12, 0x0f, 0x0a, - 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x04, 0x12, 0x0a, - 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65, 0x65, - 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x10, 0x07, 0x22, 0x21, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, - 0x42, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x0d, 0x54, 0x75, - 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x09, 0x53, 0x65, 0x70, 0x61, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x70, - 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, - 0xcd, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x12, - 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, - 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x05, 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, 0x0f, 0x6b, 0x69, 0x6c, - 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x3f, 0x0a, 0x0e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x12, 0x30, 0x0a, - 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, - 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x8b, 0x01, 0x0a, 0x09, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x12, 0x41, 0x0a, - 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x2b, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, - 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x22, 0xe2, 0x02, - 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, + 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x75, + 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x75, 0x72, + 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66, 0x52, 0x0a, 0x74, 0x75, 0x72, 0x6e, + 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xd9, 0x01, 0x0a, + 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x0e, - 0x0a, 0x02, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x75, 0x70, 0x12, 0x30, - 0x0a, 0x07, 0x61, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, - 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x07, 0x61, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, - 0x12, 0x30, 0x0a, 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52, - 0x65, 0x66, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x52, 0x65, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x61, 0x52, 0x65, 0x66, 0x12, - 0x2b, 0x0a, 0x04, 0x62, 0x52, 0x65, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x62, 0x52, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x22, 0xb6, 0x02, 0x0a, 0x13, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x69, 0x6e, 0x67, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x70, - 0x61, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x62, - 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x75, 0x72, - 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x75, 0x72, 0x6e, - 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66, 0x52, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, - 0x75, 0x74, 0x50, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xd9, 0x01, 0x0a, 0x0c, - 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x24, 0x0a, - 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x75, 0x72, - 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x75, - 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x22, 0x97, 0x03, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x24, + 0x0a, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x75, + 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, + 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x22, 0x97, 0x03, 0x0a, 0x0c, 0x54, 0x72, 0x61, + 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, + 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x72, + 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, + 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x43, 0x75, + 0x72, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, + 0x76, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x63, + 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, + 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x4f, 0x52, 0x4b, + 0x10, 0x01, 0x22, 0x9c, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, + 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x72, 0x61, - 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, - 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, - 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, - 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, - 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x4f, 0x52, 0x4b, 0x10, - 0x01, 0x22, 0x9c, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, - 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xe0, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x3e, 0x0a, 0x08, 0x63, 0x6f, - 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, - 0x52, 0x08, 0x63, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x18, 0x06, 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, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x44, - 0x65, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x66, 0x52, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x22, 0x28, 0x0a, 0x08, 0x43, 0x6f, 0x61, - 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x6f, 0x75, 0x72, 0x10, 0x00, 0x12, - 0x07, 0x0a, 0x03, 0x53, 0x69, 0x78, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x69, 0x67, 0x68, - 0x74, 0x10, 0x02, 0x22, 0xb9, 0x01, 0x0a, 0x0a, 0x53, 0x70, 0x6b, 0x73, 0x53, 0x77, 0x69, 0x74, - 0x63, 0x68, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x22, 0xe0, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, - 0x96, 0x01, 0x0a, 0x09, 0x45, 0x73, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, - 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, - 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x08, 0x47, 0x61, 0x74, - 0x65, 0x64, 0x42, 0x6f, 0x78, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, - 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x53, 0x63, 0x72, 0x65, 0x65, - 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x66, - 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, - 0x66, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x66, 0x47, 0x61, 0x74, 0x65, 0x64, - 0x42, 0x6f, 0x78, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0f, 0x53, - 0x6c, 0x6f, 0x70, 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x2f, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x3e, 0x0a, 0x08, 0x63, + 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, + 0x6d, 0x52, 0x08, 0x63, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 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, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x66, + 0x44, 0x65, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, + 0x65, 0x66, 0x52, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x22, 0x28, 0x0a, 0x08, 0x43, 0x6f, + 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x6f, 0x75, 0x72, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x53, 0x69, 0x78, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x69, 0x67, + 0x68, 0x74, 0x10, 0x02, 0x22, 0xb9, 0x01, 0x0a, 0x0a, 0x53, 0x70, 0x6b, 0x73, 0x53, 0x77, 0x69, + 0x74, 0x63, 0x68, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, + 0x22, 0x96, 0x01, 0x0a, 0x09, 0x45, 0x73, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x03, 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, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xa2, 0x01, 0x0a, 0x13, - 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x03, 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, - 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x22, 0xa8, 0x01, 0x0a, 0x05, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, + 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x08, 0x47, 0x61, + 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, + 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x53, 0x63, 0x72, 0x65, + 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, + 0x66, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x72, + 0x65, 0x66, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x66, 0x47, 0x61, 0x74, 0x65, + 0x64, 0x42, 0x6f, 0x78, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0f, + 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12, + 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x03, 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, 0x0f, 0x6b, 0x69, 0x6c, + 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xa2, 0x01, 0x0a, + 0x13, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, + 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x03, + 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, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x22, 0xa8, 0x01, 0x0a, 0x05, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6c, 0x6f, 0x70, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, + 0x6c, 0x6f, 0x70, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, + 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xb4, 0x01, 0x0a, + 0x09, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6c, 0x6f, 0x70, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, 0x6c, - 0x6f, 0x70, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, - 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xb4, 0x01, 0x0a, 0x09, - 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, - 0x0f, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x49, 0x64, 0x22, 0xcb, 0x03, 0x0a, 0x0d, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x61, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x66, 0x12, 0x39, 0x0a, 0x0b, 0x62, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x66, 0x52, 0x0b, 0x62, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, - 0x53, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6e, 0x6b, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x64, 0x0a, 0x0e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, - 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x45, 0x0a, 0x17, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x4f, 0x66, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x10, 0x4b, 0x69, 0x6c, 0x6f, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x03, - 0x6b, 0x6d, 0x41, 0x18, 0x01, 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, 0x03, 0x6b, 0x6d, 0x41, 0x12, 0x2e, 0x0a, 0x03, - 0x6b, 0x6d, 0x42, 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, 0x03, 0x6b, 0x6d, 0x42, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x22, 0xbd, 0x01, 0x0a, 0x13, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x74, 0x79, 0x70, 0x65, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, + 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x76, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, + 0x52, 0x0f, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x64, 0x22, 0xcb, 0x03, 0x0a, 0x0d, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x61, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x39, 0x0a, 0x0b, 0x62, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x15, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x66, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2a, 0x20, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x42, 0x5d, 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, 0x13, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x1f, 0x2e, 0x2f, 0x61, 0x74, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, + 0x12, 0x53, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x64, 0x0a, 0x0e, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x79, 0x0a, 0x17, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x4f, 0x66, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, + 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x14, 0x6d, 0x61, 0x69, 0x6e, + 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x90, 0x01, 0x0a, + 0x10, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x74, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x6d, 0x41, 0x18, 0x01, 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, 0x03, 0x6b, 0x6d, + 0x41, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x6d, 0x42, 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, 0x03, 0x6b, 0x6d, + 0x42, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x22, + 0xbd, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x63, + 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0a, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x4b, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0a, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2a, 0x20, 0x0a, 0x09, + 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, + 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x42, 0x5d, + 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, 0x13, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x1f, 0x2e, 0x2f, + 0x61, 0x74, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4505,173 +4613,174 @@ func file_stationLayoutGraphics_proto_rawDescGZIP() []byte { return file_stationLayoutGraphics_proto_rawDescData } -var file_stationLayoutGraphics_proto_enumTypes = make([]protoimpl.EnumInfo, 9) +var file_stationLayoutGraphics_proto_enumTypes = make([]protoimpl.EnumInfo, 10) var file_stationLayoutGraphics_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_stationLayoutGraphics_proto_goTypes = []interface{}{ (Direction)(0), // 0: graphicData.Direction (AxleCounting_TypeDetectionPoint)(0), // 1: graphicData.AxleCounting.TypeDetectionPoint (Turnout_SwitchMachineType)(0), // 2: graphicData.Turnout.SwitchMachineType - (Section_SectionType)(0), // 3: graphicData.Section.SectionType - (RelatedRef_DeviceType)(0), // 4: graphicData.RelatedRef.DeviceType - (RelatedRef_DevicePort)(0), // 5: graphicData.RelatedRef.DevicePort - (SimpleRef_DeviceType)(0), // 6: graphicData.SimpleRef.DeviceType - (TrackSection_TrackSectionType)(0), // 7: graphicData.TrackSection.TrackSectionType - (StopPosition_CoachNum)(0), // 8: graphicData.StopPosition.CoachNum - (*RtssGraphicStorage)(nil), // 9: graphicData.RtssGraphicStorage - (*Canvas)(nil), // 10: graphicData.Canvas - (*Point)(nil), // 11: graphicData.Point - (*Transform)(nil), // 12: graphicData.Transform - (*ChildTransform)(nil), // 13: graphicData.ChildTransform - (*CommonInfo)(nil), // 14: graphicData.CommonInfo - (*Platform)(nil), // 15: graphicData.Platform - (*ScreenDoor)(nil), // 16: graphicData.ScreenDoor - (*ScreenDoorGroup)(nil), // 17: graphicData.ScreenDoorGroup - (*Station)(nil), // 18: graphicData.Station - (*TrainWindow)(nil), // 19: graphicData.TrainWindow - (*AxleCounting)(nil), // 20: graphicData.AxleCounting - (*Turnout)(nil), // 21: graphicData.Turnout - (*KilometerSystem)(nil), // 22: graphicData.KilometerSystem - (*Signal)(nil), // 23: graphicData.Signal - (*Section)(nil), // 24: graphicData.Section - (*RelatedRef)(nil), // 25: graphicData.RelatedRef - (*TurnoutPosRef)(nil), // 26: graphicData.TurnoutPosRef - (*Separator)(nil), // 27: graphicData.Separator - (*Transponder)(nil), // 28: graphicData.Transponder - (*SimpleRef)(nil), // 29: graphicData.SimpleRef - (*SectionLink)(nil), // 30: graphicData.SectionLink - (*AxleCountingSection)(nil), // 31: graphicData.AxleCountingSection - (*LogicSection)(nil), // 32: graphicData.LogicSection - (*TrackSection)(nil), // 33: graphicData.TrackSection - (*TrackLogicSection)(nil), // 34: graphicData.TrackLogicSection - (*StopPosition)(nil), // 35: graphicData.StopPosition - (*SpksSwitch)(nil), // 36: graphicData.SpksSwitch - (*EsbButton)(nil), // 37: graphicData.EsbButton - (*GatedBox)(nil), // 38: graphicData.GatedBox - (*SlopeKiloMarker)(nil), // 39: graphicData.SlopeKiloMarker - (*CurvatureKiloMarker)(nil), // 40: graphicData.CurvatureKiloMarker - (*Slope)(nil), // 41: graphicData.Slope - (*Curvature)(nil), // 42: graphicData.Curvature - (*CalculateLink)(nil), // 43: graphicData.CalculateLink - (*UniqueIdOfStationLayout)(nil), // 44: graphicData.UniqueIdOfStationLayout - (*KilometerConvert)(nil), // 45: graphicData.KilometerConvert - (*StationRelateDevice)(nil), // 46: graphicData.StationRelateDevice - (*DeviceCombinationtype)(nil), // 47: graphicData.DeviceCombinationtype - (*CalculateLink_DevicePosition)(nil), // 48: graphicData.CalculateLink.DevicePosition + (Signal_Model)(0), // 3: graphicData.Signal.Model + (Section_SectionType)(0), // 4: graphicData.Section.SectionType + (RelatedRef_DeviceType)(0), // 5: graphicData.RelatedRef.DeviceType + (RelatedRef_DevicePort)(0), // 6: graphicData.RelatedRef.DevicePort + (SimpleRef_DeviceType)(0), // 7: graphicData.SimpleRef.DeviceType + (TrackSection_TrackSectionType)(0), // 8: graphicData.TrackSection.TrackSectionType + (StopPosition_CoachNum)(0), // 9: graphicData.StopPosition.CoachNum + (*RtssGraphicStorage)(nil), // 10: graphicData.RtssGraphicStorage + (*Canvas)(nil), // 11: graphicData.Canvas + (*Point)(nil), // 12: graphicData.Point + (*Transform)(nil), // 13: graphicData.Transform + (*ChildTransform)(nil), // 14: graphicData.ChildTransform + (*CommonInfo)(nil), // 15: graphicData.CommonInfo + (*Platform)(nil), // 16: graphicData.Platform + (*ScreenDoor)(nil), // 17: graphicData.ScreenDoor + (*ScreenDoorGroup)(nil), // 18: graphicData.ScreenDoorGroup + (*Station)(nil), // 19: graphicData.Station + (*TrainWindow)(nil), // 20: graphicData.TrainWindow + (*AxleCounting)(nil), // 21: graphicData.AxleCounting + (*Turnout)(nil), // 22: graphicData.Turnout + (*KilometerSystem)(nil), // 23: graphicData.KilometerSystem + (*Signal)(nil), // 24: graphicData.Signal + (*Section)(nil), // 25: graphicData.Section + (*RelatedRef)(nil), // 26: graphicData.RelatedRef + (*TurnoutPosRef)(nil), // 27: graphicData.TurnoutPosRef + (*Separator)(nil), // 28: graphicData.Separator + (*Transponder)(nil), // 29: graphicData.Transponder + (*SimpleRef)(nil), // 30: graphicData.SimpleRef + (*SectionLink)(nil), // 31: graphicData.SectionLink + (*AxleCountingSection)(nil), // 32: graphicData.AxleCountingSection + (*LogicSection)(nil), // 33: graphicData.LogicSection + (*TrackSection)(nil), // 34: graphicData.TrackSection + (*TrackLogicSection)(nil), // 35: graphicData.TrackLogicSection + (*StopPosition)(nil), // 36: graphicData.StopPosition + (*SpksSwitch)(nil), // 37: graphicData.SpksSwitch + (*EsbButton)(nil), // 38: graphicData.EsbButton + (*GatedBox)(nil), // 39: graphicData.GatedBox + (*SlopeKiloMarker)(nil), // 40: graphicData.SlopeKiloMarker + (*CurvatureKiloMarker)(nil), // 41: graphicData.CurvatureKiloMarker + (*Slope)(nil), // 42: graphicData.Slope + (*Curvature)(nil), // 43: graphicData.Curvature + (*CalculateLink)(nil), // 44: graphicData.CalculateLink + (*UniqueIdOfStationLayout)(nil), // 45: graphicData.UniqueIdOfStationLayout + (*KilometerConvert)(nil), // 46: graphicData.KilometerConvert + (*StationRelateDevice)(nil), // 47: graphicData.StationRelateDevice + (*DeviceCombinationtype)(nil), // 48: graphicData.DeviceCombinationtype + (*CalculateLink_DevicePosition)(nil), // 49: graphicData.CalculateLink.DevicePosition } var file_stationLayoutGraphics_proto_depIdxs = []int32{ - 10, // 0: graphicData.RtssGraphicStorage.canvas:type_name -> graphicData.Canvas - 15, // 1: graphicData.RtssGraphicStorage.Platforms:type_name -> graphicData.Platform - 18, // 2: graphicData.RtssGraphicStorage.stations:type_name -> graphicData.Station - 23, // 3: graphicData.RtssGraphicStorage.signals:type_name -> graphicData.Signal - 21, // 4: graphicData.RtssGraphicStorage.turnouts:type_name -> graphicData.Turnout - 24, // 5: graphicData.RtssGraphicStorage.section:type_name -> graphicData.Section - 19, // 6: graphicData.RtssGraphicStorage.trainWindows:type_name -> graphicData.TrainWindow - 20, // 7: graphicData.RtssGraphicStorage.axleCountings:type_name -> graphicData.AxleCounting - 27, // 8: graphicData.RtssGraphicStorage.separators:type_name -> graphicData.Separator - 30, // 9: graphicData.RtssGraphicStorage.sectionLinks:type_name -> graphicData.SectionLink - 31, // 10: graphicData.RtssGraphicStorage.axleCountingSections:type_name -> graphicData.AxleCountingSection - 32, // 11: graphicData.RtssGraphicStorage.logicSections:type_name -> graphicData.LogicSection - 35, // 12: graphicData.RtssGraphicStorage.stopPositions:type_name -> graphicData.StopPosition - 36, // 13: graphicData.RtssGraphicStorage.spksSwitchs:type_name -> graphicData.SpksSwitch - 37, // 14: graphicData.RtssGraphicStorage.esbButtons:type_name -> graphicData.EsbButton - 38, // 15: graphicData.RtssGraphicStorage.gateBoxs:type_name -> graphicData.GatedBox - 28, // 16: graphicData.RtssGraphicStorage.transponders:type_name -> graphicData.Transponder - 41, // 17: graphicData.RtssGraphicStorage.slopes:type_name -> graphicData.Slope - 43, // 18: graphicData.RtssGraphicStorage.CalculateLink:type_name -> graphicData.CalculateLink - 39, // 19: graphicData.RtssGraphicStorage.slopeKiloMarker:type_name -> graphicData.SlopeKiloMarker - 40, // 20: graphicData.RtssGraphicStorage.curvatureKiloMarker:type_name -> graphicData.CurvatureKiloMarker - 42, // 21: graphicData.RtssGraphicStorage.curvatures:type_name -> graphicData.Curvature - 33, // 22: graphicData.RtssGraphicStorage.trackSections:type_name -> graphicData.TrackSection - 34, // 23: graphicData.RtssGraphicStorage.trackLogicSections:type_name -> graphicData.TrackLogicSection - 44, // 24: graphicData.RtssGraphicStorage.UniqueIdPrefix:type_name -> graphicData.UniqueIdOfStationLayout - 45, // 25: graphicData.RtssGraphicStorage.kilometerConvertList:type_name -> graphicData.KilometerConvert - 16, // 26: graphicData.RtssGraphicStorage.screenDoors:type_name -> graphicData.ScreenDoor - 46, // 27: graphicData.RtssGraphicStorage.stationRelateDeviceList:type_name -> graphicData.StationRelateDevice - 12, // 28: graphicData.Canvas.viewportTransform:type_name -> graphicData.Transform - 11, // 29: graphicData.Transform.position:type_name -> graphicData.Point - 11, // 30: graphicData.Transform.scale:type_name -> graphicData.Point - 11, // 31: graphicData.Transform.skew:type_name -> graphicData.Point - 12, // 32: graphicData.ChildTransform.transform:type_name -> graphicData.Transform - 12, // 33: graphicData.CommonInfo.transform:type_name -> graphicData.Transform - 13, // 34: graphicData.CommonInfo.childTransforms:type_name -> graphicData.ChildTransform - 14, // 35: graphicData.Platform.common:type_name -> graphicData.CommonInfo - 25, // 36: graphicData.Platform.platformRef:type_name -> graphicData.RelatedRef - 14, // 37: graphicData.ScreenDoor.common:type_name -> graphicData.CommonInfo - 17, // 38: graphicData.ScreenDoor.screenDoorGroupList:type_name -> graphicData.ScreenDoorGroup - 14, // 39: graphicData.Station.common:type_name -> graphicData.CommonInfo - 22, // 40: graphicData.Station.kilometerSystem:type_name -> graphicData.KilometerSystem - 14, // 41: graphicData.TrainWindow.common:type_name -> graphicData.CommonInfo - 14, // 42: graphicData.AxleCounting.common:type_name -> graphicData.CommonInfo - 22, // 43: graphicData.AxleCounting.kilometerSystem:type_name -> graphicData.KilometerSystem - 25, // 44: graphicData.AxleCounting.axleCountingRef:type_name -> graphicData.RelatedRef - 1, // 45: graphicData.AxleCounting.type:type_name -> graphicData.AxleCounting.TypeDetectionPoint - 14, // 46: graphicData.Turnout.common:type_name -> graphicData.CommonInfo - 11, // 47: graphicData.Turnout.pointA:type_name -> graphicData.Point - 11, // 48: graphicData.Turnout.pointB:type_name -> graphicData.Point - 11, // 49: graphicData.Turnout.pointC:type_name -> graphicData.Point - 25, // 50: graphicData.Turnout.paRef:type_name -> graphicData.RelatedRef - 25, // 51: graphicData.Turnout.pbRef:type_name -> graphicData.RelatedRef - 25, // 52: graphicData.Turnout.pcRef:type_name -> graphicData.RelatedRef - 22, // 53: graphicData.Turnout.kilometerSystem:type_name -> graphicData.KilometerSystem - 2, // 54: graphicData.Turnout.switchMachineType:type_name -> graphicData.Turnout.SwitchMachineType - 0, // 55: graphicData.KilometerSystem.direction:type_name -> graphicData.Direction - 14, // 56: graphicData.Signal.common:type_name -> graphicData.CommonInfo - 22, // 57: graphicData.Signal.kilometerSystem:type_name -> graphicData.KilometerSystem - 25, // 58: graphicData.Signal.refDev:type_name -> graphicData.RelatedRef - 14, // 59: graphicData.Section.common:type_name -> graphicData.CommonInfo - 11, // 60: graphicData.Section.points:type_name -> graphicData.Point - 25, // 61: graphicData.Section.paRef:type_name -> graphicData.RelatedRef - 25, // 62: graphicData.Section.pbRef:type_name -> graphicData.RelatedRef - 3, // 63: graphicData.Section.sectionType:type_name -> graphicData.Section.SectionType - 4, // 64: graphicData.RelatedRef.deviceType:type_name -> graphicData.RelatedRef.DeviceType - 5, // 65: graphicData.RelatedRef.devicePort:type_name -> graphicData.RelatedRef.DevicePort - 14, // 66: graphicData.Separator.common:type_name -> graphicData.CommonInfo - 14, // 67: graphicData.Transponder.common:type_name -> graphicData.CommonInfo - 22, // 68: graphicData.Transponder.kilometerSystem:type_name -> graphicData.KilometerSystem - 25, // 69: graphicData.Transponder.TransponderRef:type_name -> graphicData.RelatedRef - 6, // 70: graphicData.SimpleRef.deviceType:type_name -> graphicData.SimpleRef.DeviceType - 14, // 71: graphicData.SectionLink.common:type_name -> graphicData.CommonInfo - 11, // 72: graphicData.SectionLink.points:type_name -> graphicData.Point - 29, // 73: graphicData.SectionLink.aSimRef:type_name -> graphicData.SimpleRef - 29, // 74: graphicData.SectionLink.bSimRef:type_name -> graphicData.SimpleRef - 25, // 75: graphicData.SectionLink.aRef:type_name -> graphicData.RelatedRef - 25, // 76: graphicData.SectionLink.bRef:type_name -> graphicData.RelatedRef - 14, // 77: graphicData.AxleCountingSection.common:type_name -> graphicData.CommonInfo - 11, // 78: graphicData.AxleCountingSection.points:type_name -> graphicData.Point - 25, // 79: graphicData.AxleCountingSection.paRef:type_name -> graphicData.RelatedRef - 25, // 80: graphicData.AxleCountingSection.pbRef:type_name -> graphicData.RelatedRef - 26, // 81: graphicData.AxleCountingSection.turnoutPos:type_name -> graphicData.TurnoutPosRef - 14, // 82: graphicData.LogicSection.common:type_name -> graphicData.CommonInfo - 11, // 83: graphicData.LogicSection.points:type_name -> graphicData.Point - 14, // 84: graphicData.TrackSection.common:type_name -> graphicData.CommonInfo - 11, // 85: graphicData.TrackSection.points:type_name -> graphicData.Point - 7, // 86: graphicData.TrackSection.type:type_name -> graphicData.TrackSection.TrackSectionType - 14, // 87: graphicData.TrackLogicSection.common:type_name -> graphicData.CommonInfo - 11, // 88: graphicData.TrackLogicSection.points:type_name -> graphicData.Point - 14, // 89: graphicData.StopPosition.common:type_name -> graphicData.CommonInfo - 8, // 90: graphicData.StopPosition.coachNum:type_name -> graphicData.StopPosition.CoachNum - 22, // 91: graphicData.StopPosition.kilometerSystem:type_name -> graphicData.KilometerSystem - 25, // 92: graphicData.StopPosition.refDev:type_name -> graphicData.RelatedRef - 14, // 93: graphicData.SpksSwitch.common:type_name -> graphicData.CommonInfo - 14, // 94: graphicData.EsbButton.common:type_name -> graphicData.CommonInfo - 14, // 95: graphicData.GatedBox.common:type_name -> graphicData.CommonInfo - 14, // 96: graphicData.SlopeKiloMarker.common:type_name -> graphicData.CommonInfo - 22, // 97: graphicData.SlopeKiloMarker.kilometerSystem:type_name -> graphicData.KilometerSystem - 14, // 98: graphicData.CurvatureKiloMarker.common:type_name -> graphicData.CommonInfo - 22, // 99: graphicData.CurvatureKiloMarker.kilometerSystem:type_name -> graphicData.KilometerSystem - 14, // 100: graphicData.Slope.common:type_name -> graphicData.CommonInfo - 11, // 101: graphicData.Slope.points:type_name -> graphicData.Point - 14, // 102: graphicData.Curvature.common:type_name -> graphicData.CommonInfo - 11, // 103: graphicData.Curvature.points:type_name -> graphicData.Point - 14, // 104: graphicData.CalculateLink.common:type_name -> graphicData.CommonInfo - 11, // 105: graphicData.CalculateLink.points:type_name -> graphicData.Point - 25, // 106: graphicData.CalculateLink.aRelatedRef:type_name -> graphicData.RelatedRef - 25, // 107: graphicData.CalculateLink.bRelatedRef:type_name -> graphicData.RelatedRef - 48, // 108: graphicData.CalculateLink.devicePositions:type_name -> graphicData.CalculateLink.DevicePosition - 22, // 109: graphicData.KilometerConvert.kmA:type_name -> graphicData.KilometerSystem - 22, // 110: graphicData.KilometerConvert.kmB:type_name -> graphicData.KilometerSystem - 47, // 111: graphicData.StationRelateDevice.combinationtypes:type_name -> graphicData.DeviceCombinationtype - 4, // 112: graphicData.StationRelateDevice.deviceType:type_name -> graphicData.RelatedRef.DeviceType + 11, // 0: graphicData.RtssGraphicStorage.canvas:type_name -> graphicData.Canvas + 16, // 1: graphicData.RtssGraphicStorage.Platforms:type_name -> graphicData.Platform + 19, // 2: graphicData.RtssGraphicStorage.stations:type_name -> graphicData.Station + 24, // 3: graphicData.RtssGraphicStorage.signals:type_name -> graphicData.Signal + 22, // 4: graphicData.RtssGraphicStorage.turnouts:type_name -> graphicData.Turnout + 25, // 5: graphicData.RtssGraphicStorage.section:type_name -> graphicData.Section + 20, // 6: graphicData.RtssGraphicStorage.trainWindows:type_name -> graphicData.TrainWindow + 21, // 7: graphicData.RtssGraphicStorage.axleCountings:type_name -> graphicData.AxleCounting + 28, // 8: graphicData.RtssGraphicStorage.separators:type_name -> graphicData.Separator + 31, // 9: graphicData.RtssGraphicStorage.sectionLinks:type_name -> graphicData.SectionLink + 32, // 10: graphicData.RtssGraphicStorage.axleCountingSections:type_name -> graphicData.AxleCountingSection + 33, // 11: graphicData.RtssGraphicStorage.logicSections:type_name -> graphicData.LogicSection + 36, // 12: graphicData.RtssGraphicStorage.stopPositions:type_name -> graphicData.StopPosition + 37, // 13: graphicData.RtssGraphicStorage.spksSwitchs:type_name -> graphicData.SpksSwitch + 38, // 14: graphicData.RtssGraphicStorage.esbButtons:type_name -> graphicData.EsbButton + 39, // 15: graphicData.RtssGraphicStorage.gateBoxs:type_name -> graphicData.GatedBox + 29, // 16: graphicData.RtssGraphicStorage.transponders:type_name -> graphicData.Transponder + 42, // 17: graphicData.RtssGraphicStorage.slopes:type_name -> graphicData.Slope + 44, // 18: graphicData.RtssGraphicStorage.CalculateLink:type_name -> graphicData.CalculateLink + 40, // 19: graphicData.RtssGraphicStorage.slopeKiloMarker:type_name -> graphicData.SlopeKiloMarker + 41, // 20: graphicData.RtssGraphicStorage.curvatureKiloMarker:type_name -> graphicData.CurvatureKiloMarker + 43, // 21: graphicData.RtssGraphicStorage.curvatures:type_name -> graphicData.Curvature + 34, // 22: graphicData.RtssGraphicStorage.trackSections:type_name -> graphicData.TrackSection + 35, // 23: graphicData.RtssGraphicStorage.trackLogicSections:type_name -> graphicData.TrackLogicSection + 45, // 24: graphicData.RtssGraphicStorage.UniqueIdPrefix:type_name -> graphicData.UniqueIdOfStationLayout + 46, // 25: graphicData.RtssGraphicStorage.kilometerConvertList:type_name -> graphicData.KilometerConvert + 17, // 26: graphicData.RtssGraphicStorage.screenDoors:type_name -> graphicData.ScreenDoor + 47, // 27: graphicData.RtssGraphicStorage.stationRelateDeviceList:type_name -> graphicData.StationRelateDevice + 13, // 28: graphicData.Canvas.viewportTransform:type_name -> graphicData.Transform + 12, // 29: graphicData.Transform.position:type_name -> graphicData.Point + 12, // 30: graphicData.Transform.scale:type_name -> graphicData.Point + 12, // 31: graphicData.Transform.skew:type_name -> graphicData.Point + 13, // 32: graphicData.ChildTransform.transform:type_name -> graphicData.Transform + 13, // 33: graphicData.CommonInfo.transform:type_name -> graphicData.Transform + 14, // 34: graphicData.CommonInfo.childTransforms:type_name -> graphicData.ChildTransform + 15, // 35: graphicData.Platform.common:type_name -> graphicData.CommonInfo + 15, // 36: graphicData.ScreenDoor.common:type_name -> graphicData.CommonInfo + 18, // 37: graphicData.ScreenDoor.screenDoorGroupList:type_name -> graphicData.ScreenDoorGroup + 15, // 38: graphicData.Station.common:type_name -> graphicData.CommonInfo + 23, // 39: graphicData.Station.kilometerSystem:type_name -> graphicData.KilometerSystem + 15, // 40: graphicData.TrainWindow.common:type_name -> graphicData.CommonInfo + 15, // 41: graphicData.AxleCounting.common:type_name -> graphicData.CommonInfo + 23, // 42: graphicData.AxleCounting.kilometerSystem:type_name -> graphicData.KilometerSystem + 26, // 43: graphicData.AxleCounting.axleCountingRef:type_name -> graphicData.RelatedRef + 1, // 44: graphicData.AxleCounting.type:type_name -> graphicData.AxleCounting.TypeDetectionPoint + 15, // 45: graphicData.Turnout.common:type_name -> graphicData.CommonInfo + 12, // 46: graphicData.Turnout.pointA:type_name -> graphicData.Point + 12, // 47: graphicData.Turnout.pointB:type_name -> graphicData.Point + 12, // 48: graphicData.Turnout.pointC:type_name -> graphicData.Point + 26, // 49: graphicData.Turnout.paRef:type_name -> graphicData.RelatedRef + 26, // 50: graphicData.Turnout.pbRef:type_name -> graphicData.RelatedRef + 26, // 51: graphicData.Turnout.pcRef:type_name -> graphicData.RelatedRef + 23, // 52: graphicData.Turnout.kilometerSystem:type_name -> graphicData.KilometerSystem + 2, // 53: graphicData.Turnout.switchMachineType:type_name -> graphicData.Turnout.SwitchMachineType + 0, // 54: graphicData.KilometerSystem.direction:type_name -> graphicData.Direction + 15, // 55: graphicData.Signal.common:type_name -> graphicData.CommonInfo + 23, // 56: graphicData.Signal.kilometerSystem:type_name -> graphicData.KilometerSystem + 26, // 57: graphicData.Signal.refDev:type_name -> graphicData.RelatedRef + 3, // 58: graphicData.Signal.mt:type_name -> graphicData.Signal.Model + 15, // 59: graphicData.Section.common:type_name -> graphicData.CommonInfo + 12, // 60: graphicData.Section.points:type_name -> graphicData.Point + 26, // 61: graphicData.Section.paRef:type_name -> graphicData.RelatedRef + 26, // 62: graphicData.Section.pbRef:type_name -> graphicData.RelatedRef + 4, // 63: graphicData.Section.sectionType:type_name -> graphicData.Section.SectionType + 5, // 64: graphicData.RelatedRef.deviceType:type_name -> graphicData.RelatedRef.DeviceType + 6, // 65: graphicData.RelatedRef.devicePort:type_name -> graphicData.RelatedRef.DevicePort + 15, // 66: graphicData.Separator.common:type_name -> graphicData.CommonInfo + 15, // 67: graphicData.Transponder.common:type_name -> graphicData.CommonInfo + 23, // 68: graphicData.Transponder.kilometerSystem:type_name -> graphicData.KilometerSystem + 26, // 69: graphicData.Transponder.TransponderRef:type_name -> graphicData.RelatedRef + 7, // 70: graphicData.SimpleRef.deviceType:type_name -> graphicData.SimpleRef.DeviceType + 15, // 71: graphicData.SectionLink.common:type_name -> graphicData.CommonInfo + 12, // 72: graphicData.SectionLink.points:type_name -> graphicData.Point + 30, // 73: graphicData.SectionLink.aSimRef:type_name -> graphicData.SimpleRef + 30, // 74: graphicData.SectionLink.bSimRef:type_name -> graphicData.SimpleRef + 26, // 75: graphicData.SectionLink.aRef:type_name -> graphicData.RelatedRef + 26, // 76: graphicData.SectionLink.bRef:type_name -> graphicData.RelatedRef + 15, // 77: graphicData.AxleCountingSection.common:type_name -> graphicData.CommonInfo + 12, // 78: graphicData.AxleCountingSection.points:type_name -> graphicData.Point + 26, // 79: graphicData.AxleCountingSection.paRef:type_name -> graphicData.RelatedRef + 26, // 80: graphicData.AxleCountingSection.pbRef:type_name -> graphicData.RelatedRef + 27, // 81: graphicData.AxleCountingSection.turnoutPos:type_name -> graphicData.TurnoutPosRef + 15, // 82: graphicData.LogicSection.common:type_name -> graphicData.CommonInfo + 12, // 83: graphicData.LogicSection.points:type_name -> graphicData.Point + 15, // 84: graphicData.TrackSection.common:type_name -> graphicData.CommonInfo + 12, // 85: graphicData.TrackSection.points:type_name -> graphicData.Point + 8, // 86: graphicData.TrackSection.type:type_name -> graphicData.TrackSection.TrackSectionType + 15, // 87: graphicData.TrackLogicSection.common:type_name -> graphicData.CommonInfo + 12, // 88: graphicData.TrackLogicSection.points:type_name -> graphicData.Point + 15, // 89: graphicData.StopPosition.common:type_name -> graphicData.CommonInfo + 9, // 90: graphicData.StopPosition.coachNum:type_name -> graphicData.StopPosition.CoachNum + 23, // 91: graphicData.StopPosition.kilometerSystem:type_name -> graphicData.KilometerSystem + 26, // 92: graphicData.StopPosition.refDev:type_name -> graphicData.RelatedRef + 15, // 93: graphicData.SpksSwitch.common:type_name -> graphicData.CommonInfo + 15, // 94: graphicData.EsbButton.common:type_name -> graphicData.CommonInfo + 15, // 95: graphicData.GatedBox.common:type_name -> graphicData.CommonInfo + 15, // 96: graphicData.SlopeKiloMarker.common:type_name -> graphicData.CommonInfo + 23, // 97: graphicData.SlopeKiloMarker.kilometerSystem:type_name -> graphicData.KilometerSystem + 15, // 98: graphicData.CurvatureKiloMarker.common:type_name -> graphicData.CommonInfo + 23, // 99: graphicData.CurvatureKiloMarker.kilometerSystem:type_name -> graphicData.KilometerSystem + 15, // 100: graphicData.Slope.common:type_name -> graphicData.CommonInfo + 12, // 101: graphicData.Slope.points:type_name -> graphicData.Point + 15, // 102: graphicData.Curvature.common:type_name -> graphicData.CommonInfo + 12, // 103: graphicData.Curvature.points:type_name -> graphicData.Point + 15, // 104: graphicData.CalculateLink.common:type_name -> graphicData.CommonInfo + 12, // 105: graphicData.CalculateLink.points:type_name -> graphicData.Point + 26, // 106: graphicData.CalculateLink.aRelatedRef:type_name -> graphicData.RelatedRef + 26, // 107: graphicData.CalculateLink.bRelatedRef:type_name -> graphicData.RelatedRef + 49, // 108: graphicData.CalculateLink.devicePositions:type_name -> graphicData.CalculateLink.DevicePosition + 23, // 109: graphicData.KilometerConvert.kmA:type_name -> graphicData.KilometerSystem + 23, // 110: graphicData.KilometerConvert.kmB:type_name -> graphicData.KilometerSystem + 48, // 111: graphicData.StationRelateDevice.combinationtypes:type_name -> graphicData.DeviceCombinationtype + 5, // 112: graphicData.StationRelateDevice.deviceType:type_name -> graphicData.RelatedRef.DeviceType 113, // [113:113] is the sub-list for method output_type 113, // [113:113] is the sub-list for method input_type 113, // [113:113] is the sub-list for extension type_name @@ -5171,7 +5280,7 @@ func file_stationLayoutGraphics_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_stationLayoutGraphics_proto_rawDesc, - NumEnums: 9, + NumEnums: 10, NumMessages: 40, NumExtensions: 0, NumServices: 0, diff --git a/ats/verify/protos/state/device_state.pb.go b/ats/verify/protos/state/device_state.pb.go index ad7777b..14da7d0 100644 --- a/ats/verify/protos/state/device_state.pb.go +++ b/ats/verify/protos/state/device_state.pb.go @@ -1307,9 +1307,9 @@ type ButtonState struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Down bool `protobuf:"varint,2,opt,name=down,proto3" json:"down,omitempty"` - Aspect Signal_Aspect `protobuf:"varint,3,opt,name=aspect,proto3,enum=state.Signal_Aspect" json:"aspect,omitempty"` // 带灯的按钮 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Down bool `protobuf:"varint,2,opt,name=down,proto3" json:"down,omitempty"` + Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` // 带灯的按钮 } func (x *ButtonState) Reset() { @@ -1358,11 +1358,11 @@ func (x *ButtonState) GetDown() bool { return false } -func (x *ButtonState) GetAspect() Signal_Aspect { +func (x *ButtonState) GetActive() bool { if x != nil { - return x.Aspect + return x.Active } - return Signal_Non + return false } // 警铃状态 @@ -1427,8 +1427,8 @@ type LightState struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Aspect Signal_Aspect `protobuf:"varint,2,opt,name=aspect,proto3,enum=state.Signal_Aspect" json:"aspect,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"` } func (x *LightState) Reset() { @@ -1470,11 +1470,123 @@ func (x *LightState) GetId() string { return "" } -func (x *LightState) GetAspect() Signal_Aspect { +func (x *LightState) GetActive() bool { if x != nil { - return x.Aspect + return x.Active } - return Signal_Non + return false +} + +// 屏蔽门状态 +type PsdState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //屏蔽门的id + OpenDoorCodes []int32 `protobuf:"varint,2,rep,packed,name=openDoorCodes,proto3" json:"openDoorCodes,omitempty"` //开启的小门的编号 +} + +func (x *PsdState) Reset() { + *x = PsdState{} + if protoimpl.UnsafeEnabled { + mi := &file_device_state_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PsdState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PsdState) ProtoMessage() {} + +func (x *PsdState) ProtoReflect() protoreflect.Message { + mi := &file_device_state_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PsdState.ProtoReflect.Descriptor instead. +func (*PsdState) Descriptor() ([]byte, []int) { + return file_device_state_proto_rawDescGZIP(), []int{14} +} + +func (x *PsdState) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PsdState) GetOpenDoorCodes() []int32 { + if x != nil { + return x.OpenDoorCodes + } + return nil +} + +// 钥匙状态 +type KeyState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Gear int32 `protobuf:"varint,2,opt,name=gear,proto3" json:"gear,omitempty"` +} + +func (x *KeyState) Reset() { + *x = KeyState{} + if protoimpl.UnsafeEnabled { + mi := &file_device_state_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyState) ProtoMessage() {} + +func (x *KeyState) ProtoReflect() protoreflect.Message { + mi := &file_device_state_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyState.ProtoReflect.Descriptor instead. +func (*KeyState) Descriptor() ([]byte, []int) { + return file_device_state_proto_rawDescGZIP(), []int{15} +} + +func (x *KeyState) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *KeyState) GetGear() int32 { + if x != nil { + return x.Gear + } + return 0 } // 仿真运行时状态变化量,当前时刻与上一时刻比较得到 @@ -1498,7 +1610,7 @@ type VariationStatus struct { func (x *VariationStatus) Reset() { *x = VariationStatus{} if protoimpl.UnsafeEnabled { - mi := &file_device_state_proto_msgTypes[14] + mi := &file_device_state_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1511,7 +1623,7 @@ func (x *VariationStatus) String() string { func (*VariationStatus) ProtoMessage() {} func (x *VariationStatus) ProtoReflect() protoreflect.Message { - mi := &file_device_state_proto_msgTypes[14] + mi := &file_device_state_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1524,7 +1636,7 @@ func (x *VariationStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use VariationStatus.ProtoReflect.Descriptor instead. func (*VariationStatus) Descriptor() ([]byte, []int) { - return file_device_state_proto_rawDescGZIP(), []int{14} + return file_device_state_proto_rawDescGZIP(), []int{16} } func (x *VariationStatus) GetUpdatedTrain() []*TrainState { @@ -1584,12 +1696,16 @@ type AllDevicesStatus struct { AlarmState []*AlarmState `protobuf:"bytes,7,rep,name=AlarmState,proto3" json:"AlarmState,omitempty"` // 灯状态 LightState []*LightState `protobuf:"bytes,8,rep,name=LightState,proto3" json:"LightState,omitempty"` + // 屏蔽门状态 + PsdState []*PsdState `protobuf:"bytes,9,rep,name=psdState,proto3" json:"psdState,omitempty"` + // 钥匙状态 + KeyState []*KeyState `protobuf:"bytes,10,rep,name=KeyState,proto3" json:"KeyState,omitempty"` } func (x *AllDevicesStatus) Reset() { *x = AllDevicesStatus{} if protoimpl.UnsafeEnabled { - mi := &file_device_state_proto_msgTypes[15] + mi := &file_device_state_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1602,7 +1718,7 @@ func (x *AllDevicesStatus) String() string { func (*AllDevicesStatus) ProtoMessage() {} func (x *AllDevicesStatus) ProtoReflect() protoreflect.Message { - mi := &file_device_state_proto_msgTypes[15] + mi := &file_device_state_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1615,7 +1731,7 @@ func (x *AllDevicesStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use AllDevicesStatus.ProtoReflect.Descriptor instead. func (*AllDevicesStatus) Descriptor() ([]byte, []int) { - return file_device_state_proto_rawDescGZIP(), []int{15} + return file_device_state_proto_rawDescGZIP(), []int{17} } func (x *AllDevicesStatus) GetTrainState() []*TrainState { @@ -1674,6 +1790,20 @@ func (x *AllDevicesStatus) GetLightState() []*LightState { return nil } +func (x *AllDevicesStatus) GetPsdState() []*PsdState { + if x != nil { + return x.PsdState + } + return nil +} + +func (x *AllDevicesStatus) GetKeyState() []*KeyState { + if x != nil { + return x.KeyState + } + return nil +} + // 服务器端向前端推送的设备状态信息 type PushedDevicesStatus struct { state protoimpl.MessageState @@ -1692,7 +1822,7 @@ type PushedDevicesStatus struct { func (x *PushedDevicesStatus) Reset() { *x = PushedDevicesStatus{} if protoimpl.UnsafeEnabled { - mi := &file_device_state_proto_msgTypes[16] + mi := &file_device_state_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1705,7 +1835,7 @@ func (x *PushedDevicesStatus) String() string { func (*PushedDevicesStatus) ProtoMessage() {} func (x *PushedDevicesStatus) ProtoReflect() protoreflect.Message { - mi := &file_device_state_proto_msgTypes[16] + mi := &file_device_state_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1718,7 +1848,7 @@ func (x *PushedDevicesStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use PushedDevicesStatus.ProtoReflect.Descriptor instead. func (*PushedDevicesStatus) Descriptor() ([]byte, []int) { - return file_device_state_proto_rawDescGZIP(), []int{16} + return file_device_state_proto_rawDescGZIP(), []int{18} } func (x *PushedDevicesStatus) GetAll() bool { @@ -1757,7 +1887,7 @@ type SimulationStatus struct { func (x *SimulationStatus) Reset() { *x = SimulationStatus{} if protoimpl.UnsafeEnabled { - mi := &file_device_state_proto_msgTypes[17] + mi := &file_device_state_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1770,7 +1900,7 @@ func (x *SimulationStatus) String() string { func (*SimulationStatus) ProtoMessage() {} func (x *SimulationStatus) ProtoReflect() protoreflect.Message { - mi := &file_device_state_proto_msgTypes[17] + mi := &file_device_state_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1783,7 +1913,7 @@ func (x *SimulationStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulationStatus.ProtoReflect.Descriptor instead. func (*SimulationStatus) Descriptor() ([]byte, []int) { - return file_device_state_proto_rawDescGZIP(), []int{17} + return file_device_state_proto_rawDescGZIP(), []int{19} } func (x *SimulationStatus) GetSimulationId() string { @@ -1828,7 +1958,7 @@ type MemoryDataStatus struct { func (x *MemoryDataStatus) Reset() { *x = MemoryDataStatus{} if protoimpl.UnsafeEnabled { - mi := &file_device_state_proto_msgTypes[18] + mi := &file_device_state_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1841,7 +1971,7 @@ func (x *MemoryDataStatus) String() string { func (*MemoryDataStatus) ProtoMessage() {} func (x *MemoryDataStatus) ProtoReflect() protoreflect.Message { - mi := &file_device_state_proto_msgTypes[18] + mi := &file_device_state_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1854,7 +1984,7 @@ func (x *MemoryDataStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use MemoryDataStatus.ProtoReflect.Descriptor instead. func (*MemoryDataStatus) Descriptor() ([]byte, []int) { - return file_device_state_proto_rawDescGZIP(), []int{18} + return file_device_state_proto_rawDescGZIP(), []int{20} } func (x *MemoryDataStatus) GetAllSimulations() []*SimulationStatus { @@ -2066,66 +2196,76 @@ var file_device_state_proto_rawDesc = []byte{ 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x2c, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x78, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x02, 0x78, 0x68, 0x22, 0x5f, 0x0a, 0x0b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, + 0x08, 0x52, 0x02, 0x78, 0x68, 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, 0x09, 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, 0x2c, 0x0a, 0x06, 0x61, 0x73, 0x70, 0x65, - 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x06, - 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x22, 0x34, 0x0a, 0x0a, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, + 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, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x34, 0x0a, 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x4a, 0x0a, 0x0a, - 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x73, - 0x70, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, - 0x52, 0x06, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x0f, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x0c, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, - 0x61, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x54, 0x72, - 0x61, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0d, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, - 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0xb9, 0x03, 0x0a, 0x10, 0x41, 0x6c, - 0x6c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, - 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, - 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x74, - 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x31, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x62, 0x75, 0x74, - 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0b, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x31, 0x0a, 0x0a, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x6c, 0x61, 0x72, - 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, - 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x40, 0x0a, 0x08, + 0x50, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, + 0x44, 0x6f, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, + 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x2e, + 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x65, + 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x65, 0x61, 0x72, 0x22, 0x9e, + 0x02, 0x0a, 0x0f, 0x56, 0x61, 0x72, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x35, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x49, + 0x64, 0x12, 0x38, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x77, 0x69, 0x74, + 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x0e, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x93, 0x04, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x77, 0x69, 0x74, 0x63, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x0b, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, + 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x72, + 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x34, 0x0a, 0x0b, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x42, 0x75, 0x74, + 0x74, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x2e, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x41, 0x6c, + 0x61, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x4c, 0x69, 0x67, 0x68, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x70, + 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, + 0x70, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 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, @@ -2183,7 +2323,7 @@ func file_device_state_proto_rawDescGZIP() []byte { } var file_device_state_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_device_state_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_device_state_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_device_state_proto_goTypes = []interface{}{ (SectionType)(0), // 0: state.SectionType (Signal_Aspect)(0), // 1: state.Signal.Aspect @@ -2201,36 +2341,38 @@ var file_device_state_proto_goTypes = []interface{}{ (*ButtonState)(nil), // 13: state.ButtonState (*AlarmState)(nil), // 14: state.AlarmState (*LightState)(nil), // 15: state.LightState - (*VariationStatus)(nil), // 16: state.VariationStatus - (*AllDevicesStatus)(nil), // 17: state.AllDevicesStatus - (*PushedDevicesStatus)(nil), // 18: state.PushedDevicesStatus - (*SimulationStatus)(nil), // 19: state.SimulationStatus - (*MemoryDataStatus)(nil), // 20: state.MemoryDataStatus + (*PsdState)(nil), // 16: state.PsdState + (*KeyState)(nil), // 17: state.KeyState + (*VariationStatus)(nil), // 18: state.VariationStatus + (*AllDevicesStatus)(nil), // 19: state.AllDevicesStatus + (*PushedDevicesStatus)(nil), // 20: state.PushedDevicesStatus + (*SimulationStatus)(nil), // 21: state.SimulationStatus + (*MemoryDataStatus)(nil), // 22: state.MemoryDataStatus } var file_device_state_proto_depIdxs = []int32{ 0, // 0: state.SectionState.type:type_name -> state.SectionType 1, // 1: state.SignalState.aspect:type_name -> state.Signal.Aspect 10, // 2: state.TrainState.dynamicState:type_name -> state.TrainDynamicState 11, // 3: state.TrainState.vobcState:type_name -> state.TrainVobcState - 1, // 4: state.ButtonState.aspect:type_name -> state.Signal.Aspect - 1, // 5: state.LightState.aspect:type_name -> state.Signal.Aspect - 9, // 6: state.VariationStatus.updatedTrain:type_name -> state.TrainState - 4, // 7: state.VariationStatus.updatedSwitch:type_name -> state.SwitchState - 3, // 8: state.VariationStatus.updatedSection:type_name -> state.SectionState - 12, // 9: state.VariationStatus.updatedReply:type_name -> state.ReplyState - 9, // 10: state.AllDevicesStatus.trainState:type_name -> state.TrainState - 4, // 11: state.AllDevicesStatus.switchState:type_name -> state.SwitchState - 3, // 12: state.AllDevicesStatus.sectionState:type_name -> state.SectionState - 12, // 13: state.AllDevicesStatus.replyState:type_name -> state.ReplyState - 5, // 14: state.AllDevicesStatus.signalState:type_name -> state.SignalState - 13, // 15: state.AllDevicesStatus.buttonState:type_name -> state.ButtonState - 14, // 16: state.AllDevicesStatus.AlarmState:type_name -> state.AlarmState - 15, // 17: state.AllDevicesStatus.LightState:type_name -> state.LightState - 16, // 18: state.PushedDevicesStatus.varStatus:type_name -> state.VariationStatus - 17, // 19: state.PushedDevicesStatus.allStatus:type_name -> state.AllDevicesStatus - 19, // 20: state.MemoryDataStatus.allSimulations:type_name -> state.SimulationStatus - 19, // 21: state.MemoryDataStatus.addSimulations:type_name -> state.SimulationStatus - 19, // 22: state.MemoryDataStatus.removeSimulations:type_name -> state.SimulationStatus + 9, // 4: state.VariationStatus.updatedTrain:type_name -> state.TrainState + 4, // 5: state.VariationStatus.updatedSwitch:type_name -> state.SwitchState + 3, // 6: state.VariationStatus.updatedSection:type_name -> state.SectionState + 12, // 7: state.VariationStatus.updatedReply:type_name -> state.ReplyState + 9, // 8: state.AllDevicesStatus.trainState:type_name -> state.TrainState + 4, // 9: state.AllDevicesStatus.switchState:type_name -> state.SwitchState + 3, // 10: state.AllDevicesStatus.sectionState:type_name -> state.SectionState + 12, // 11: state.AllDevicesStatus.replyState:type_name -> state.ReplyState + 5, // 12: state.AllDevicesStatus.signalState:type_name -> state.SignalState + 13, // 13: state.AllDevicesStatus.buttonState:type_name -> state.ButtonState + 14, // 14: state.AllDevicesStatus.AlarmState:type_name -> state.AlarmState + 15, // 15: state.AllDevicesStatus.LightState:type_name -> state.LightState + 16, // 16: state.AllDevicesStatus.psdState:type_name -> state.PsdState + 17, // 17: state.AllDevicesStatus.KeyState:type_name -> state.KeyState + 18, // 18: state.PushedDevicesStatus.varStatus:type_name -> state.VariationStatus + 19, // 19: state.PushedDevicesStatus.allStatus:type_name -> state.AllDevicesStatus + 21, // 20: state.MemoryDataStatus.allSimulations:type_name -> state.SimulationStatus + 21, // 21: state.MemoryDataStatus.addSimulations:type_name -> state.SimulationStatus + 21, // 22: state.MemoryDataStatus.removeSimulations:type_name -> state.SimulationStatus 23, // [23:23] is the sub-list for method output_type 23, // [23:23] is the sub-list for method input_type 23, // [23:23] is the sub-list for extension type_name @@ -2413,7 +2555,7 @@ func file_device_state_proto_init() { } } file_device_state_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VariationStatus); i { + switch v := v.(*PsdState); i { case 0: return &v.state case 1: @@ -2425,7 +2567,7 @@ func file_device_state_proto_init() { } } file_device_state_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AllDevicesStatus); i { + switch v := v.(*KeyState); i { case 0: return &v.state case 1: @@ -2437,7 +2579,7 @@ func file_device_state_proto_init() { } } file_device_state_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushedDevicesStatus); i { + switch v := v.(*VariationStatus); i { case 0: return &v.state case 1: @@ -2449,7 +2591,7 @@ func file_device_state_proto_init() { } } file_device_state_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimulationStatus); i { + switch v := v.(*AllDevicesStatus); i { case 0: return &v.state case 1: @@ -2461,6 +2603,30 @@ func file_device_state_proto_init() { } } file_device_state_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushedDevicesStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_device_state_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SimulationStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_device_state_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemoryDataStatus); i { case 0: return &v.state @@ -2479,7 +2645,7 @@ func file_device_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_device_state_proto_rawDesc, NumEnums: 2, - NumMessages: 19, + NumMessages: 21, NumExtensions: 0, NumServices: 0, }, diff --git a/ats/verify/simulation/simulation_manage.go b/ats/verify/simulation/simulation_manage.go index 46ddee7..c1153fd 100644 --- a/ats/verify/simulation/simulation_manage.go +++ b/ats/verify/simulation/simulation_manage.go @@ -1,12 +1,9 @@ package simulation import ( - "encoding/binary" "strconv" "sync" - "time" - "joylink.club/bj-rtsts-server/ats/verify/protos/state" "joylink.club/bj-rtsts-server/ats/verify/simulation/wayside/memory" "joylink.club/bj-rtsts-server/config" "joylink.club/bj-rtsts-server/sys_error" @@ -16,45 +13,6 @@ import ( "joylink.club/bj-rtsts-server/dto" ) -// func init() { -// // vobc 发来的列车信息 -// vobc.RegisterTrainInfoHandler(func(info []byte) { -// for _, simulation := range GetSimulationArr() { -// simulation.Memory.Status.TrainStateMap.Range(func(_, value any) bool { -// train := value.(*state.TrainState) -// if !train.Show { // 下线列车 -// return false -// } -// // 拼接列车ID -// trainId, err := strconv.Atoi(train.Id) -// if err != nil { -// panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()}) -// } -// trainInfo := decoderVobcTrainState(info) -// d := append(info, uint8(trainId)) -// // 发送给动力学 -// dynamics.SendDynamicsTrainMsg(d) -// // 存放至列车中 -// train.VobcState = trainInfo -// return true -// }) -// } -// }) -// dynamics.RegisterTrainInfoHandler(func(info *dynamics.TrainInfo) { -// for _, simulation := range GetSimulationArr() { -// sta, ok := simulation.Memory.Status.TrainStateMap.Load(strconv.Itoa(int(info.Number))) -// if !ok { -// continue -// } -// trainState := sta.(*state.TrainState) -// // 给半实物仿真发送速度 -// vobc.SendTrainSpeedTask(convertVobc(info)) -// // 更新列车状态 -// memory.UpdateTrainState(simulation, convert(info, trainState, simulation)) -// } -// }) -// } - // 仿真存储集合 var simulationMap sync.Map @@ -97,12 +55,6 @@ func CreateSimulation(projectId int32, mapIds []int32) (string, error) { // 半实物系统接口功能启动 semi_physical_train.Default().Start(verifySimulation) } - // httpCode, _, err := dynamics.SendSimulationStartReq(lineBaseInfo) - // if httpCode != http.StatusOK || err != nil { - // panic(dto.ErrorDto{Code: dto.DynamicsError, Message: fmt.Sprintf("动力学接口调用失败:[%d][%s]", httpCode, err)}) - // } - // dynamicsRun(verifySimulation) - simulationMap.Store(simulationId, verifySimulation) // 全部成功,启动仿真 verifySimulation.World.StartUp() @@ -120,19 +72,11 @@ func DestroySimulation(simulationId string) { simulationMap.Delete(simulationId) // 停止ecs world simulationInfo.World.Close() - //ecsSimulation.DestroySimulation(simulationInfo.WorldId) if config.Config.Dynamics.Open { // 停止动力学接口功能 dynamics.Default().Stop() dynamics.Default().RequestStopSimulation() } - // //移除道岔状态发送 - // dynamics.Stop() - // //通知动力学 - // httpCode, _, err := dynamics.SendSimulationEndReq() - // if httpCode != http.StatusOK { - // panic(dto.ErrorDto{Code: dto.DynamicsError, Message: fmt.Sprintf("动力学接口调用失败:[%d][%s]", httpCode, err)}) - // } } func createSimulationId(projectId int32) string { @@ -174,326 +118,3 @@ func GetSimulationArr() []*memory.VerifySimulation { }) return result } - -/* -func convert(info *dynamics.TrainInfo, sta *state.TrainState, simulation *memory.VerifySimulation) *state.TrainState { - delayTime := time.Now().UnixMilli() - sta.VobcState.UpdateTime - sta.ControlDelayTime = (int64(sta.VobcState.LifeSignal)-int64(info.VobcLifeSignal))*20 + delayTime - slog.Debug("收到动力学原始消息", "Number", info.Number, "Link", info.Link, "LinkOffset", info.LinkOffset) - id, port, offset, runDirection, pointTo, kilometer := memory.QueryDeviceByCalcLink(simulation.Repo, strconv.Itoa(int(info.Link)), int64(info.LinkOffset), info.Up) - slog.Debug("处理动力学转换后的消息", "number", info.Number, - "车头位置", id, "偏移", offset, "是否上行", runDirection, "是否ab", pointTo) - sta.HeadDeviceId = simulation.GetComIdByUid(id) - sta.DevicePort = port - sta.HeadOffset = offset - sta.PointTo = pointTo - sta.TrainKilometer = kilometer - sta.RunDirection = runDirection - //判定车头方向 - sta.HeadDirection = runDirection - if sta.VobcState != nil { - if sta.VobcState.DirectionForward { - sta.HeadDirection = runDirection - } else if sta.VobcState.DirectionBackward { - sta.HeadDirection = !runDirection - } - } - if info.Speed < 0 { - sta.RunDirection = !sta.RunDirection - } - // 赋值动力学信息 - sta.DynamicState.Heartbeat = int32(info.LifeSignal) - sta.DynamicState.HeadLinkId = strconv.Itoa(int(info.Link)) - sta.DynamicState.HeadLinkOffset = int64(info.LinkOffset) - sta.DynamicState.Slope = int32(info.Slope) - sta.DynamicState.Upslope = info.UpSlope - sta.DynamicState.RunningUp = info.Up - sta.DynamicState.RunningResistanceSum = float32(info.TotalResistance) / 1000 - sta.DynamicState.AirResistance = float32(info.AirResistance) / 1000 - sta.DynamicState.RampResistance = float32(info.SlopeResistance) / 1000 - sta.DynamicState.CurveResistance = float32(info.CurveResistance) / 1000 - sta.DynamicState.Speed = speedParse(info.Speed) - sta.DynamicState.HeadSensorSpeed1 = speedParse(info.HeadSpeed1) - sta.DynamicState.HeadSensorSpeed2 = speedParse(info.HeadSpeed2) - sta.DynamicState.TailSensorSpeed1 = speedParse(info.TailSpeed1) - sta.DynamicState.TailSensorSpeed2 = speedParse(info.TailSpeed2) - sta.DynamicState.HeadRadarSpeed = speedParse(info.HeadRadarSpeed) - sta.DynamicState.TailRadarSpeed = speedParse(info.TailRadarSpeed) - sta.DynamicState.Acceleration = info.Acceleration - return sta -}*/ - -// func convert(info *dynamics.TrainInfo, sta *state.TrainState, simulation *memory.VerifySimulation) *state.TrainState { -// if sta.VobcState.LifeSignal == int32(info.VobcLifeSignal) { -// sta.ControlDelayTime = time.Now().UnixMilli() - sta.VobcState.UpdateTime -// if sta.ControlDelayTime > memory.DelayMaxTime { -// sta.ControlDelayTime = memory.DelayMaxTime -// } -// } else { -// sta.ControlDelayTime = memory.DelayMaxTime -// } -// slog.Debug("收到动力学原始消息", "Number", info.Number, "Link", info.Link, "LinkOffset", info.LinkOffset) -// id, port, offset, runDirection, pointTo, kilometer := memory.QueryDeviceByCalcLink(simulation.Repo, strconv.Itoa(int(info.Link)), int64(info.LinkOffset), info.Up) -// slog.Debug("处理动力学转换后的消息", "number", info.Number, -// "车头位置", id, "偏移", offset, "是否上行", runDirection, "是否ab", pointTo) -// sta.HeadDeviceId = simulation.GetComIdByUid(id) -// sta.DevicePort = port -// sta.HeadOffset = offset -// sta.PointTo = pointTo -// sta.TrainKilometer = kilometer -// sta.RunDirection = runDirection -// //判定车头方向 -// sta.HeadDirection = runDirection -// if sta.VobcState != nil { -// if sta.VobcState.DirectionForward { -// sta.HeadDirection = runDirection -// } else if sta.VobcState.DirectionBackward { -// sta.HeadDirection = !runDirection -// } -// } -// if info.Speed < 0 { -// sta.RunDirection = !sta.RunDirection -// } -// // 赋值动力学信息 -// sta.DynamicState.Heartbeat = int32(info.LifeSignal) -// sta.DynamicState.HeadLinkId = strconv.Itoa(int(info.Link)) -// sta.DynamicState.HeadLinkOffset = int64(info.LinkOffset) -// sta.DynamicState.Slope = int32(info.Slope) -// sta.DynamicState.Upslope = info.UpSlope -// sta.DynamicState.RunningUp = info.Up -// sta.DynamicState.RunningResistanceSum = float32(info.TotalResistance) / 1000 -// sta.DynamicState.AirResistance = float32(info.AirResistance) / 1000 -// sta.DynamicState.RampResistance = float32(info.SlopeResistance) / 1000 -// sta.DynamicState.CurveResistance = float32(info.CurveResistance) / 1000 -// sta.DynamicState.Speed = speedParse(info.Speed) -// sta.DynamicState.HeadSensorSpeed1 = speedParse(info.HeadSpeed1) -// sta.DynamicState.HeadSensorSpeed2 = speedParse(info.HeadSpeed2) -// sta.DynamicState.TailSensorSpeed1 = speedParse(info.TailSpeed1) -// sta.DynamicState.TailSensorSpeed2 = speedParse(info.TailSpeed2) -// sta.DynamicState.HeadRadarSpeed = speedParse(info.HeadRadarSpeed) -// sta.DynamicState.TailRadarSpeed = speedParse(info.TailRadarSpeed) -// sta.DynamicState.Acceleration = info.Acceleration -// return sta -// } - -// // 转换成Vobc发送参数 -// func convertVobc(info *dynamics.TrainInfo) *vobc.SendTrainInfo { -// param := &vobc.SendTrainInfo{ -// Speed: uint16(math.Abs(float64(info.Speed * 36))), -// Upslope: info.UpSlope, -// Slope: uint16(info.Slope), -// TotalResistance: uint32(math.Abs(float64(info.TotalResistance / 10))), -// AirResistance: uint32(info.AirResistance / 10), -// SlopeResistance: uint32(math.Abs(float64(info.SlopeResistance / 10))), -// CurveResistance: uint32(info.CurveResistance / 10), -// } -// d := math.Abs(float64(info.Acceleration * 100)) -// if info.Acceleration > 0 { -// param.Acceleration = uint8(d) -// } else { -// param.Deceleration = uint8(d) -// } -// return param -// } - -// func convert(info *dynamics.TrainInfo, sta *state.TrainState, simulation *memory.VerifySimulation) *state.TrainState { -// slog.Debug("收到动力学原始消息", "Number", info.Number, "Link", info.Link, "LinkOffset", info.LinkOffset) -// id, port, offset, runDirection, pointTo, kilometer := memory.QueryDeviceByCalcLink(simulation.Repo, strconv.Itoa(int(info.Link)), int64(info.LinkOffset), info.Up) -// slog.Debug("处理动力学转换后的消息", "number", info.Number, -// "车头位置", id, "偏移", offset, "是否上行", runDirection, "是否ab", pointTo) -// sta.HeadDeviceId = simulation.GetComIdByUid(id) -// sta.DevicePort = port -// sta.HeadOffset = offset -// sta.PointTo = pointTo -// sta.TrainKilometer = kilometer -// sta.RunDirection = runDirection -// //判定车头方向 -// sta.HeadDirection = runDirection -// if sta.VobcState != nil { -// if sta.VobcState.DirectionForward { -// sta.HeadDirection = runDirection -// } else if sta.VobcState.DirectionBackward { -// sta.HeadDirection = !runDirection -// } -// } -// if info.Speed < 0 { -// sta.RunDirection = !sta.RunDirection -// } -// // 赋值动力学信息 -// sta.DynamicState.Heartbeat = int32(info.LifeSignal) -// sta.DynamicState.HeadLinkId = strconv.Itoa(int(info.Link)) -// sta.DynamicState.HeadLinkOffset = int64(info.LinkOffset) -// sta.DynamicState.Slope = int32(info.Slope) -// sta.DynamicState.Upslope = info.UpSlope -// sta.DynamicState.RunningUp = info.Up -// sta.DynamicState.RunningResistanceSum = float32(info.TotalResistance) / 1000 -// sta.DynamicState.AirResistance = float32(info.AirResistance) / 1000 -// sta.DynamicState.RampResistance = float32(info.SlopeResistance) / 1000 -// sta.DynamicState.CurveResistance = float32(info.CurveResistance) / 1000 -// sta.DynamicState.Speed = speedParse(info.Speed) -// sta.DynamicState.HeadSensorSpeed1 = speedParse(info.HeadSpeed1) -// sta.DynamicState.HeadSensorSpeed2 = speedParse(info.HeadSpeed2) -// sta.DynamicState.TailSensorSpeed1 = speedParse(info.TailSpeed1) -// sta.DynamicState.TailSensorSpeed2 = speedParse(info.TailSpeed2) -// sta.DynamicState.HeadRadarSpeed = speedParse(info.HeadRadarSpeed) -// sta.DynamicState.TailRadarSpeed = speedParse(info.TailRadarSpeed) -// sta.DynamicState.Acceleration = info.Acceleration -// return sta -// } - -// func dynamicsRun(verifySimulation *memory.VerifySimulation) { -// _ = dynamics.Run(func() []*dynamics.TurnoutInfo { -// stateSlice := memory.GetAllTurnoutState(verifySimulation) -// var turnoutInfoSlice []*dynamics.TurnoutInfo -// for _, sta := range stateSlice { -// code64, err := strconv.ParseUint(sta.Id, 10, 16) -// if err != nil { -// slog.Error("id转uint16报错", err) -// } -// info := dynamics.TurnoutInfo{ -// Code: uint16(code64), -// NPosition: sta.Dw, -// RPosition: sta.Fw, -// } -// turnoutInfoSlice = append(turnoutInfoSlice, &info) -// } -// return turnoutInfoSlice -// }) -// } - -// func buildLineBaseInfo(sim *memory.VerifySimulation) *dynamics.LineBaseInfo { -// info := &dynamics.LineBaseInfo{} -// for _, model := range sim.Repo.LinkList() { -// id, _ := strconv.Atoi(model.Id()) -// link := &dynamics.Link{ -// ID: int32(id), -// Len: int32(model.Length()), -// } -// info.LinkList = append(info.LinkList, link) -// if model.ARelation() != nil { -// turnoutId, _ := strconv.Atoi(sim.GetComIdByUid(model.ARelation().Device().Id())) -// link.ARelTurnoutId = int32(turnoutId) -// switch model.ARelation().Port() { -// case proto.Port_A: -// link.ARelTurnoutPoint = "A" -// case proto.Port_B: -// link.ARelTurnoutPoint = "B" -// case proto.Port_C: -// link.ARelTurnoutPoint = "C" -// } -// } -// if model.BRelation() != nil { -// turnoutId, _ := strconv.Atoi(sim.GetComIdByUid(model.BRelation().Device().Id())) -// link.BRelTurnoutId = int32(turnoutId) -// switch model.BRelation().Port() { -// case proto.Port_A: -// link.BRelTurnoutPoint = "A" -// case proto.Port_B: -// link.BRelTurnoutPoint = "B" -// case proto.Port_C: -// link.BRelTurnoutPoint = "C" -// } -// } -// } -// for _, model := range sim.Repo.SlopeList() { -// id, _ := strconv.Atoi(sim.GetComIdByUid(model.Id())) -// slope := &dynamics.Slope{ -// ID: int32(id), -// StartLinkOffset: int32(model.StartLinkPosition().Offset()), -// EndLinkOffset: int32(model.EndLinkPosition().Offset()), -// DegreeTrig: model.Degree(), -// } -// info.SlopeList = append(info.SlopeList, slope) -// startLinkId, _ := strconv.Atoi(model.StartLinkPosition().Link().Id()) -// slope.StartLinkId = int32(startLinkId) -// endLinkId, _ := strconv.Atoi(model.EndLinkPosition().Link().Id()) -// slope.EndLinkId = int32(endLinkId) -// } -// for _, model := range sim.Repo.SectionalCurvatureList() { -// id, _ := strconv.Atoi(sim.GetComIdByUid(model.Id())) -// curve := &dynamics.Curve{ -// ID: int32(id), -// StartLinkOffset: int32(model.StartLinkPosition().Offset()), -// EndLinkOffset: int32(model.EndLinkPosition().Offset()), -// Curvature: model.Radius(), -// } -// info.CurveList = append(info.CurveList, curve) -// startLinkId, _ := strconv.Atoi(model.StartLinkPosition().Link().Id()) -// curve.StartLinkId = int32(startLinkId) -// endLinkId, _ := strconv.Atoi(model.EndLinkPosition().Link().Id()) -// curve.EndLinkId = int32(endLinkId) -// } -// return info -// } - -// 解析VOBC列车信息 -func decoderVobcTrainState(buf []byte) *state.TrainVobcState { - trainVobcInfo := &state.TrainVobcState{} - trainVobcInfo.LifeSignal = int32(binary.BigEndian.Uint16(buf[0:2])) - b2 := buf[2] - trainVobcInfo.Tc1Active = (b2 & 1) != 0 - trainVobcInfo.Tc2Active = (b2 & (1 << 1)) != 0 - trainVobcInfo.DirectionForward = (b2 & (1 << 2)) != 0 - trainVobcInfo.DirectionBackward = (b2 & (1 << 3)) != 0 - trainVobcInfo.TractionStatus = (b2 & (1 << 4)) != 0 - trainVobcInfo.BrakingStatus = (b2 & (1 << 5)) != 0 - trainVobcInfo.EmergencyBrakingStatus = (b2 & (1 << 6)) != 0 - trainVobcInfo.TurnbackStatus = (b2 & 7) != 0 - b3 := buf[3] - trainVobcInfo.JumpStatus = (b3 & 1) != 0 - trainVobcInfo.Ato = (b3 & (1 << 1)) != 0 - trainVobcInfo.Fam = (b3 & (1 << 2)) != 0 - trainVobcInfo.Cam = (b3 & (1 << 3)) != 0 - trainVobcInfo.TractionSafetyCircuit = (b3 & (1 << 4)) != 0 - trainVobcInfo.ParkingBrakeStatus = (b3 & (1 << 5)) != 0 - trainVobcInfo.MaintainBrakeStatus = (b3 & (1 << 6)) != 0 - trainVobcInfo.TractionForce = int64(binary.BigEndian.Uint16(buf[4:6])) - trainVobcInfo.BrakeForce = int64(binary.BigEndian.Uint16(buf[6:8])) - trainVobcInfo.TrainLoad = int64(binary.BigEndian.Uint16(buf[8:10])) - b4 := buf[15] - trainVobcInfo.LeftDoorOpenCommand = (b4 & 1) != 0 - trainVobcInfo.RightDoorOpenCommand = (b4 & (1 << 1)) != 0 - trainVobcInfo.LeftDoorCloseCommand = (b4 & (1 << 2)) != 0 - trainVobcInfo.RightDoorCloseCommand = (b4 & (1 << 3)) != 0 - trainVobcInfo.AllDoorClose = (b4 & (1 << 4)) != 0 - trainVobcInfo.UpdateTime = time.Now().UnixMilli() - return trainVobcInfo -} - -// // 解析VOBC列车信息 -// func decoderVobcTrainState(buf []byte) *state.TrainVobcState { -// trainVobcInfo := &state.TrainVobcState{} -// trainVobcInfo.LifeSignal = int32(binary.BigEndian.Uint16(buf[0:2])) -// b2 := buf[2] -// trainVobcInfo.Tc1Active = (b2 & 1) != 0 -// trainVobcInfo.Tc2Active = (b2 & (1 << 1)) != 0 -// trainVobcInfo.DirectionForward = (b2 & (1 << 2)) != 0 -// trainVobcInfo.DirectionBackward = (b2 & (1 << 3)) != 0 -// trainVobcInfo.TractionStatus = (b2 & (1 << 4)) != 0 -// trainVobcInfo.BrakingStatus = (b2 & (1 << 5)) != 0 -// trainVobcInfo.EmergencyBrakingStatus = (b2 & (1 << 6)) != 0 -// trainVobcInfo.TurnbackStatus = (b2 & 7) != 0 -// b3 := buf[3] -// trainVobcInfo.JumpStatus = (b3 & 1) != 0 -// trainVobcInfo.Ato = (b3 & (1 << 1)) != 0 -// trainVobcInfo.Fam = (b3 & (1 << 2)) != 0 -// trainVobcInfo.Cam = (b3 & (1 << 3)) != 0 -// trainVobcInfo.TractionSafetyCircuit = (b3 & (1 << 4)) != 0 -// trainVobcInfo.ParkingBrakeStatus = (b3 & (1 << 5)) != 0 -// trainVobcInfo.MaintainBrakeStatus = (b3 & (1 << 6)) != 0 -// trainVobcInfo.TractionForce = int64(binary.BigEndian.Uint16(buf[4:6])) -// trainVobcInfo.BrakeForce = int64(binary.BigEndian.Uint16(buf[6:8])) -// trainVobcInfo.TrainLoad = int64(binary.BigEndian.Uint16(buf[8:10])) -// b4 := buf[15] -// trainVobcInfo.LeftDoorOpenCommand = (b4 & 1) != 0 -// trainVobcInfo.RightDoorOpenCommand = (b4 & (1 << 1)) != 0 -// trainVobcInfo.LeftDoorCloseCommand = (b4 & (1 << 2)) != 0 -// trainVobcInfo.RightDoorCloseCommand = (b4 & (1 << 3)) != 0 -// trainVobcInfo.AllDoorClose = (b4 & (1 << 4)) != 0 -// return trainVobcInfo -// } - -// // 发送给前端的速度格式化 -// func speedParse(speed float32) int32 { -// return int32(math.Abs(float64(speed * 3.6 * 100))) -// } diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_ibp.go b/ats/verify/simulation/wayside/memory/wayside_memory_ibp.go index c16c988..8f64ee1 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_ibp.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_ibp.go @@ -1,6 +1,7 @@ package memory import ( + "joylink.club/bj-rtsts-server/ats/verify/protos/graphicData" "joylink.club/bj-rtsts-server/ats/verify/protos/state" "joylink.club/ecs" "joylink.club/rtsssimulation/component" @@ -9,36 +10,73 @@ import ( ) // 操作IBP按钮 -func ChangeIBPButtonState(sim *VerifySimulation, mapId int32, stationCode, btnId string, pressDown bool) { - uid := QueryIBPUidByMidAndComId(mapId, btnId, stationCode) +func ChangeIBPButtonState(sim *VerifySimulation, mapId int32, stationId, btnCode string, pressDown bool) { + stationUid := QueryUidByMidAndComId(mapId, stationId, &graphicData.Station{}) if pressDown { - fi.PressDownButton(sim.World, uid) + fi.PressDownButton(sim.World, stationUid+"_"+btnCode) } else { - fi.PressUpButton(sim.World, uid) + fi.PressUpButton(sim.World, stationUid+"_"+btnCode) } } +// 操作IBP按钮 +func ChangeIBPKeyState(sim *VerifySimulation, mapId int32, stationId, keyCode string, gear int32) { + stationUid := QueryUidByMidAndComId(mapId, stationId, &graphicData.Station{}) + fi.SwitchKeyGear(sim.World, stationUid+"_"+keyCode, gear) +} + // 获取仿真车站按钮状态,前端推送 -func GetMapAllIBPState(sim *VerifySimulation, mapId int32, stationCode string) *state.AllDevicesStatus { +func GetMapAllIBPState(sim *VerifySimulation, mapId int32, stationId, ibpMapCode string) *state.AllDevicesStatus { status := &state.AllDevicesStatus{ ButtonState: []*state.ButtonState{}, LightState: []*state.LightState{}, AlarmState: []*state.AlarmState{}, + KeyState: []*state.KeyState{}, } - uidMap := QueryIBPUidMapByType(mapId, stationCode) - for _, u := range uidMap { - entry, ok := entity.GetEntityByUid(sim.World, u.Uid) + stationUid := QueryUidByMidAndComId(mapId, stationId, &graphicData.Station{}) + ibpStorage := getStorageIBPMapData(ibpMapCode) + for _, data := range ibpStorage.IbpButtons { // 按钮 + entry, ok := entity.GetEntityByUid(sim.World, stationUid+"_"+data.Code) if !ok { continue } - if entry.HasComponent(component.ButtonTag) { // 按钮 - status.ButtonState = append(status.ButtonState, getIBPButtonState(u.CommonId, entry)) - } else if entry.HasComponent(component.AlarmTag) { // 报警器 - status.AlarmState = append(status.AlarmState, getIBPAlarmState(u.CommonId, entry)) - } else if entry.HasComponent(component.LightTag) { // 指示灯 + if entry.HasComponent(component.ButtonTag) { + status.ButtonState = append(status.ButtonState, getIBPButtonState(data.Common.Id, entry)) + } + } + for _, data := range ibpStorage.IbpAlarms { // 报警器 + entry, ok := entity.GetEntityByUid(sim.World, stationUid+"_"+data.Code) + if !ok { + continue + } + if entry.HasComponent(component.AlarmTag) { + status.AlarmState = append(status.AlarmState, &state.AlarmState{ + Id: data.Common.Id, + Active: component.BitStateType.Get(entry).Val, + }) + } + } + for _, data := range ibpStorage.IbpLights { // 指示灯 + entry, ok := entity.GetEntityByUid(sim.World, stationUid+"_"+data.Code) + if !ok { + continue + } + if entry.HasComponent(component.LightTag) { status.LightState = append(status.LightState, &state.LightState{ - Id: u.CommonId, - Aspect: getIBPLightAspect(entry), + Id: data.Common.Id, + Active: component.BitStateType.Get(entry).Val, + }) + } + } + for _, data := range ibpStorage.IbpKeys { // 钥匙 + entry, ok := entity.GetEntityByUid(sim.World, stationUid+"_"+data.Code) + if !ok { + continue + } + if entry.HasComponent(component.KeyTag) { + status.KeyState = append(status.KeyState, &state.KeyState{ + Id: data.Common.Id, + Gear: component.GearStateType.Get(entry).Val, }) } } @@ -47,44 +85,13 @@ func GetMapAllIBPState(sim *VerifySimulation, mapId int32, stationCode string) * // 获取IBP盘按钮状态 func getIBPButtonState(id string, entry *ecs.Entry) *state.ButtonState { - status := &state.ButtonState{Id: id, Aspect: state.Signal_Non} + status := &state.ButtonState{Id: id} bit := component.BitStateType.Get(entry) status.Down = bit.Val // 如果按钮包含灯 if entry.HasComponent(component.SingleLightType) { lightComponent := component.SingleLightType.Get(entry) - status.Aspect = getIBPLightAspect(lightComponent.Light) + status.Active = component.BitStateType.Get(lightComponent.Light).Val } return status } - -// 获取灯的颜色 -func getIBPLightAspect(light *ecs.Entry) state.Signal_Aspect { - isActive := component.BitStateType.Get(light).Val - if isActive { - switch { - case light.HasComponent(component.LdTag): - return state.Signal_L - case light.HasComponent(component.HdTag): - return state.Signal_H - case light.HasComponent(component.UdTag): - return state.Signal_U - case light.HasComponent(component.BdTag): - return state.Signal_B - case light.HasComponent(component.AdTag): - return state.Signal_A - default: - return state.Signal_Non - } - } else { - return state.Signal_OFF - } -} - -// 获取警铃状态 -func getIBPAlarmState(id string, entry *ecs.Entry) *state.AlarmState { - status := &state.AlarmState{Id: id} - bit := component.BitStateType.Get(entry) - status.Active = bit.Val - return status -} diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_map.go b/ats/verify/simulation/wayside/memory/wayside_memory_map.go index 4986cc8..890c123 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_map.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_map.go @@ -89,6 +89,11 @@ func QueryGiData[T proto.Message](mapId int32) T { return value.(T) } +func QueryGiId(name string) int32 { + value, _ := giNameMap.Load(name) + return value.(int32) +} + // 根据区段,道岔偏移量返回linkID和link相对偏移量 func QueryEcsLinkByDeviceInfo(repo *repository.Repository, mapId int32, id string, devicePort string, offset int64, runDirection bool) (int32, int64, bool, bool, int64) { if devicePort == "" { @@ -123,19 +128,20 @@ func sectionMapToEcsLink(repo *repository.Repository, id string, offset int64, r panic(&dto.ErrorDto{Code: dto.DataNotExist, Message: fmt.Sprintf("地图不存在uid:%s缓存", id)}) } ao, bo := section.ALinkPosition().Offset(), section.BLinkPosition().Offset() - // 是否从A到B - ak, bk := section.AKilometer().Value, section.BKilometer().Value + // 是否从A到B,统一坐标 + ak, bk := convertRepoBaseKm(repo, section.AKilometer()), convertRepoBaseKm(repo, section.BKilometer()) + akv, bkv := ak.Value, bk.Value // 上行 var up, abDirection bool if runDirection { - abDirection = ak < bk + abDirection = akv < bkv if abDirection { up = ao < bo } else { up = ao > bo } } else { - abDirection = ak > bk + abDirection = akv > bkv if abDirection { up = ao < bo } else { @@ -143,7 +149,7 @@ func sectionMapToEcsLink(repo *repository.Repository, id string, offset int64, r } } linkId, _ := strconv.Atoi(section.ALinkPosition().Link().Identity.Id()) - trainKilometer := concertTrainKilometer(ak, offset, up) + trainKilometer := concertTrainKilometer(akv, offset, up) if ao < bo { return int32(linkId), ao + offset, up, abDirection, trainKilometer } else { @@ -213,7 +219,7 @@ func QueryDeviceByCalcLink(repo *repository.Repository, id string, offset int64, if onTurnout { return ecsLinkMapToTurnout(repo, isA, offset, up, link) } else { - return ecsLinkMapToSection(offset, up, link) + return ecsLinkMapToSection(repo, offset, up, link) } } @@ -284,12 +290,12 @@ func ecsLinkMapToTurnout(repo *repository.Repository, isA bool, offset int64, up } // 处理在道岔上link映射 -func ecsLinkMapToSection(offset int64, up bool, link *repository.Link) ( +func ecsLinkMapToSection(repo *repository.Repository, offset int64, up bool, link *repository.Link) ( deviceId, port string, deviceOffset int64, runDirection, pointTo bool, km int64) { var section *repository.PhysicalSection for _, s := range link.PhysicalSections() { ao, bo := s.ALinkPosition().Offset(), s.BLinkPosition().Offset() - if (ao <= offset && offset < bo) || (bo <= offset && offset < ao) { + if (ao < offset && offset <= bo) || (bo < offset && offset <= ao) { section = s break } @@ -301,21 +307,22 @@ func ecsLinkMapToSection(offset int64, up bool, link *repository.Link) ( deviceId = section.Id() // link偏移变大方向 ao, bo := section.ALinkPosition().Offset(), section.BLinkPosition().Offset() - ak, bk := section.AKilometer().Value, section.BKilometer().Value + ak, bk := convertRepoBaseKm(repo, section.AKilometer()), convertRepoBaseKm(repo, section.BKilometer()) + akv, bkv := ak.Value, bk.Value if up { if ao < bo { - runDirection = ak < bk + runDirection = akv < bkv } else { - runDirection = ak > bk + runDirection = akv > bkv } } else { if ao > bo { - runDirection = ak < bk + runDirection = akv < bkv } else { - runDirection = ak > bk + runDirection = akv > bkv } } - pointTo = runDirection == (ak < bk) + pointTo = runDirection == (akv < bkv) // a点偏移 大于 b点偏移 if ao > bo { deviceOffset = ao - offset @@ -323,10 +330,10 @@ func ecsLinkMapToSection(offset int64, up bool, link *repository.Link) ( deviceOffset = offset - ao } // a点公里标 大于 b点公里标 - if ak > bk { - km = ak - deviceOffset + if akv > bkv { + km = akv - deviceOffset } else { - km = ak + deviceOffset + km = akv + deviceOffset } return } @@ -339,3 +346,12 @@ func concertTrainKilometer(kilometer, offset int64, tendTo bool) int64 { return kilometer + offset } } + +// 转换成统一坐标公里标 +func convertRepoBaseKm(r *repository.Repository, km *proto2.Kilometer) *proto2.Kilometer { + k, err := r.ConvertKilometer(km, r.GetCoordinateInfo().Coordinate) + if err != nil { + panic(err) + } + return k +} diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_map_init.go b/ats/verify/simulation/wayside/memory/wayside_memory_map_init.go index eeb9abc..2f3a6d2 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_map_init.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_map_init.go @@ -18,7 +18,7 @@ type elementIdStructure struct { Uid string } -// 数组为Index为 common.Id, index, uid +// 数组为Index为 common.ButtonCode, index, uid type stationUidStructure struct { AxlePointIds map[string]*elementIdStructure TurnoutIds map[string]*elementIdStructure @@ -29,7 +29,9 @@ type stationUidStructure struct { CurvatureIds map[string]*elementIdStructure ButtonIds map[string]*elementIdStructure StationIds map[string]*elementIdStructure - IBPIds map[string]map[string]*elementIdStructure + PlatformIds map[string]*elementIdStructure + PsdIds map[string]*elementIdStructure + GateBoxIds map[string]*elementIdStructure } type relayUidStructure struct { @@ -74,7 +76,9 @@ func initStationUid(data *graphicData.RtssGraphicStorage) *stationUidStructure { CurvatureIds: make(map[string]*elementIdStructure, len(data.Curvatures)), ButtonIds: make(map[string]*elementIdStructure, len(data.EsbButtons)), StationIds: make(map[string]*elementIdStructure, len(data.Stations)), - IBPIds: make(map[string]map[string]*elementIdStructure, len(data.Stations)), + PlatformIds: make(map[string]*elementIdStructure, len(data.Platforms)), + PsdIds: make(map[string]*elementIdStructure, len(data.ScreenDoors)), + GateBoxIds: make(map[string]*elementIdStructure, len(data.GateBoxs)), } city, lineId, _ := getUIdPrefix(data.UniqueIdPrefix) // 初始化计轴信息 @@ -155,70 +159,44 @@ func initStationUid(data *graphicData.RtssGraphicStorage) *stationUidStructure { } } // 处理车站信息 + stationMap := make(map[string]*graphicData.Station) for _, s := range data.Stations { + stationMap[s.Common.Id] = s gus.StationIds[s.Common.Id] = &elementIdStructure{ CommonId: s.Common.Id, - Uid: GenerateElementUid(city, lineId, nil, s.Code), + Uid: GenerateElementUid(city, lineId, nil, s.StationName), + } + } + // 站台 + platformMap := make(map[string]*graphicData.Platform) + for _, platform := range data.Platforms { + platformMap[platform.Common.Id] = platform + gus.PlatformIds[platform.Common.Id] = &elementIdStructure{ + CommonId: platform.Common.Id, + Uid: GenerateElementUid(city, lineId, nil, platform.Code), + } + } + // 屏蔽门 + for _, door := range data.ScreenDoors { + station := stationMap[platformMap[door.RefPlatformId].GetRefStationId()] + if station == nil { //线路数据有问题 + continue + } + gus.PsdIds[door.Common.Id] = &elementIdStructure{ + CommonId: door.Common.Id, + Uid: GenerateElementUid(city, lineId, []string{station.GetCommon().GetId()}, door.Code), + } + } + // 门控箱 + for _, box := range data.GateBoxs { + gus.GateBoxIds[box.Common.Id] = &elementIdStructure{ + CommonId: box.Common.Id, + Uid: GenerateElementUid(city, lineId, nil, box.Code), } - // 处理关联的IBP盘信息 - initIBPUid(gus, city, lineId, s, getStorageIBPMapData(s.RefIbpMapCode)) } return gus } -// 处理IBP盘信息 -func initIBPUid(gus *stationUidStructure, city, lineId string, station *graphicData.Station, data *graphicData.IBPGraphicStorage) { - if data == nil { - return - } - // 设备所属组合 - refMap := make(map[string]string) - for _, r := range data.IbpRelatedDevices { - for _, c := range r.Combinationtypes { - for _, i := range c.RefDevices { - refMap[i] = c.Code - } - } - } - getCode := func(id, code string) string { - p := refMap[id] - if p == "" { - return code - } - return p + "_" + code - } - uidMap := make(map[string]*elementIdStructure, len(data.IbpButtons)+len(data.IbpKeys)+len(data.IbpAlarms)+len(data.IbpLights)) - for _, d := range data.IbpButtons { // ibp按钮 - uidMap[d.Common.Id] = &elementIdStructure{ - CommonId: d.Common.Id, - Code: d.Code, - Uid: GenerateElementUid(city, lineId, []string{station.Code}, getCode(d.Common.Id, d.Code)), - } - } - for _, d := range data.IbpKeys { // ibp钥匙 - uidMap[d.Common.Id] = &elementIdStructure{ - CommonId: d.Common.Id, - Code: d.Code, - Uid: GenerateElementUid(city, lineId, []string{station.Code}, getCode(d.Common.Id, d.Code)), - } - } - for _, d := range data.IbpAlarms { // ibp报警器 - uidMap[d.Common.Id] = &elementIdStructure{ - CommonId: d.Common.Id, - Code: d.Code, - Uid: GenerateElementUid(city, lineId, []string{station.Code}, getCode(d.Common.Id, d.Code)), - } - } - for _, d := range data.IbpLights { // ibp指示灯 - uidMap[d.Common.Id] = &elementIdStructure{ - CommonId: d.Common.Id, - Code: d.Code, - Uid: GenerateElementUid(city, lineId, []string{station.Code}, getCode(d.Common.Id, d.Code)), - } - } - gus.IBPIds[station.Code] = uidMap -} - // 初始化继电器柜 UID func initRelayCabinetUid(data *graphicData.RelayCabinetGraphicStorage) *relayUidStructure { rus := &relayUidStructure{ @@ -344,6 +322,8 @@ func getUidMapByType(uidData any, m interface{}) map[string]*elementIdStructure return (uidData.(*relayUidStructure)).RelayIds case *graphicData.EsbButton: return (uidData.(*stationUidStructure)).ButtonIds + case *graphicData.Station: + return (uidData.(*stationUidStructure)).StationIds default: panic(&dto.ErrorDto{Code: dto.ArgumentParseError, Message: "类型未映射字段"}) } @@ -366,21 +346,3 @@ func QueryUidByMidAndComId(mapId int32, comId string, m interface{}) string { } panic(&dto.ErrorDto{Code: dto.DataNotExist, Message: fmt.Sprintf("地图【id:%d】不存在【comId:%s】缓存", mapId, comId)}) } - -// 根据地图、车站CODE、设备类型获取UID集合 -func QueryIBPUidMapByType(mapId int32, station string) map[string]*elementIdStructure { - uidData, ok := giUidMap.Load(mapId) - if !ok { - panic(&dto.ErrorDto{Code: dto.DataNotExist, Message: fmt.Sprintf("地图【id:%d】不存在uid缓存", mapId)}) - } - return (uidData.(*stationUidStructure)).IBPIds[station] -} - -// 根据地图的comId获取UID -func QueryIBPUidByMidAndComId(mapId int32, comId, station string) string { - uidMap := QueryIBPUidMapByType(mapId, station) - if uidMap[comId] != nil { - return uidMap[comId].Uid - } - panic(&dto.ErrorDto{Code: dto.DataNotExist, Message: fmt.Sprintf("地图【id:%d】不存在【comId:%s】缓存", mapId, comId)}) -} diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_psd.go b/ats/verify/simulation/wayside/memory/wayside_memory_psd.go new file mode 100644 index 0000000..7f5215a --- /dev/null +++ b/ats/verify/simulation/wayside/memory/wayside_memory_psd.go @@ -0,0 +1,50 @@ +package memory + +import ( + "joylink.club/bj-rtsts-server/ats/verify/protos/graphicData" + "joylink.club/bj-rtsts-server/ats/verify/protos/state" + "joylink.club/rtsssimulation/component" + "joylink.club/rtsssimulation/entity" +) + +// 获取所有的列车信息 +func GetMapAllPsdState(vs *VerifySimulation, mapId int32) []*state.PsdState { + world := vs.GetSimulationWorld() + uidStructure := queryUidStructure[*stationUidStructure](mapId) + data := QueryGiData[*graphicData.RtssGraphicStorage](mapId) + var psdStateArr []*state.PsdState + for _, door := range data.ScreenDoors { + uid := uidStructure.PsdIds[door.Common.Id].Uid + psdEntry, ok := entity.GetEntityByUid(world, uid) + if ok { + var amount int32 + psdState := component.PsdStateType.Get(psdEntry) + if psdState.Km8 { + amount = 8 + } else if psdState.Km4 { + amount = 4 + } else { + amount = 0 + } + start, end := getStartEndCodeByGroup(door, amount) + var openSubDoor []int32 + for i := start; i <= end; i++ { + openSubDoor = append(openSubDoor, i) + } + psdStateArr = append(psdStateArr, &state.PsdState{ + Id: door.Common.Id, + OpenDoorCodes: openSubDoor, + }) + } + } + return psdStateArr +} + +func getStartEndCodeByGroup(door *graphicData.ScreenDoor, groupAmount int32) (int32, int32) { + for _, group := range door.ScreenDoorGroupList { + if group.TrainGroupAmount == groupAmount { + return group.StartSmallDoor, group.EndSmallDoor + } + } + return 0, -1 +} diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_psl.go b/ats/verify/simulation/wayside/memory/wayside_memory_psl.go new file mode 100644 index 0000000..66c2fc8 --- /dev/null +++ b/ats/verify/simulation/wayside/memory/wayside_memory_psl.go @@ -0,0 +1,16 @@ +package memory + +import ( + "joylink.club/rtsssimulation/fi" +) + +// 操作IBP按钮 +func ChangePSLButtonState(sim *VerifySimulation, mapId int32, gateBoxId, btnCode string, pressDown bool) { + uid := queryUidStructure[*stationUidStructure](mapId) + gateBoxUid := uid.GateBoxIds[gateBoxId].Uid + if pressDown { + fi.PressDownButton(sim.World, gateBoxUid+"_"+btnCode) + } else { + fi.PressUpButton(sim.World, gateBoxUid+"_"+btnCode) + } +} diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_signal.go b/ats/verify/simulation/wayside/memory/wayside_memory_signal.go index 7fbca57..e359c16 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_signal.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_signal.go @@ -5,8 +5,10 @@ import ( "joylink.club/bj-rtsts-server/ats/verify/protos/graphicData" "joylink.club/bj-rtsts-server/ats/verify/protos/state" "joylink.club/bj-rtsts-server/dto" + "joylink.club/bj-rtsts-server/dto/request_proto" "joylink.club/ecs" "joylink.club/rtsssimulation/component" + "joylink.club/rtsssimulation/component/component_proto" "joylink.club/rtsssimulation/consts" "joylink.club/rtsssimulation/entity" "joylink.club/rtsssimulation/fi" @@ -15,32 +17,108 @@ import ( "log/slog" ) -func ChangeSignalState(simulation *VerifySimulation, mapId int32, signalDeviceId string, toAspect state.Signal_Aspect) { - signalUid := QueryUidByMidAndComId(mapId, signalDeviceId, &graphicData.Signal{}) +func ChangeSignalState(simulation *VerifySimulation, req *dto.SignalOperationReqDto) { + signalUid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &graphicData.Signal{}) signalModel, err := simulation.Repo.FindModel(signalUid, proto.DeviceType_DeviceType_Signal) if err != nil { panic(fmt.Sprintf("信号机[%s]模型不存在", signalUid)) } signalGroupCode := signalModel.(*repository.Signal).Code() slog.Info("信号机操作", "uid", signalUid, "组合类型码", signalGroupCode) - switch signalGroupCode { - case consts.SIGNAL_2XH1: - changeSignal2XH1State(simulation.World, signalUid, toAspect) - case consts.SIGNAL_3XH1: - changeSignal3XH1State(simulation.World, signalUid, toAspect) - case consts.SIGNAL_3XH2: - changeSignal3XH2State(simulation.World, signalUid, toAspect) - case consts.SIGNAL_3XH3: - changeSignal3XH3State(simulation.World, signalUid, toAspect) - case consts.SIGNAL_3XH4: - changeSignal3XH4State(simulation.World, signalUid, toAspect) - case consts.SIGNAL_DCXH: - changeSignalDCXHState(simulation.World, signalUid, toAspect) - case consts.SIGNAL_JCKXH: - changeSignalJCKXHState(simulation.World, signalUid, toAspect) - default: - panic(dto.ErrorDto{Code: dto.OperationOfSignalNotSupported, Message: fmt.Sprintf("操作[%s]的信号机,无法识别组合类型[%s]", signalUid, signalGroupCode)}) + switch req.Operation { + case request_proto.Signal_Display: //信号机显示信号设置 + { + switch signalGroupCode { + case consts.SIGNAL_2XH1: + changeSignal2XH1State(simulation.World, signalUid, req.Aspect) + case consts.SIGNAL_3XH1: + changeSignal3XH1State(simulation.World, signalUid, req.Aspect) + case consts.SIGNAL_3XH2: + changeSignal3XH2State(simulation.World, signalUid, req.Aspect) + case consts.SIGNAL_3XH3: + changeSignal3XH3State(simulation.World, signalUid, req.Aspect) + case consts.SIGNAL_3XH4: + changeSignal3XH4State(simulation.World, signalUid, req.Aspect) + case consts.SIGNAL_DCXH: + changeSignalDCXHState(simulation.World, signalUid, req.Aspect) + case consts.SIGNAL_JCKXH: + changeSignalJCKXHState(simulation.World, signalUid, req.Aspect) + default: + panic(dto.ErrorDto{Code: dto.OperationOfSignalNotSupported, Message: fmt.Sprintf("操作[%s]的信号机,无法识别组合类型[%s]", signalUid, signalGroupCode)}) + } + } + case request_proto.Signal_LightHFaultDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_H, component_proto.Signal_DS, true) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } + case request_proto.Signal_LightHCancelDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_H, component_proto.Signal_DS, false) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } + case request_proto.Signal_LightLFaultDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_L, component_proto.Signal_DS, true) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } + case request_proto.Signal_LightLCancelDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_L, component_proto.Signal_DS, false) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } + case request_proto.Signal_LightUFaultDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_U, component_proto.Signal_DS, true) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } + case request_proto.Signal_LightUCancelDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_U, component_proto.Signal_DS, false) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } + case request_proto.Signal_LightAFaultDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_A, component_proto.Signal_DS, true) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } + case request_proto.Signal_LightACancelDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_A, component_proto.Signal_DS, false) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } + case request_proto.Signal_LightBFaultDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_B, component_proto.Signal_DS, true) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } + case request_proto.Signal_LightBCancelDs: + { + e := fi.UpdateSignalLightFault(simulation.World, signalUid, component_proto.Light_B, component_proto.Signal_DS, false) + if e != nil { + panic(dto.ErrorDto{Code: dto.OperationOfSignalError, Message: dto.ErrorTipMap[dto.OperationOfSignalError]}) + } + } } + } func changeSignalJCKXHState(w ecs.World, signalUid string, toAspect state.Signal_Aspect) { switch toAspect { diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_train.go b/ats/verify/simulation/wayside/memory/wayside_memory_train.go index feedd8c..38178c3 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_train.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_train.go @@ -38,14 +38,6 @@ func AddTrainState(vs *VerifySimulation, status *state.TrainState, mapId int32) Up: status.Up, TrainLength: uint16(status.TrainLength), }) - // httpCode, _, err := dynamics.SendInitTrainReq(&dynamics.InitTrainInfo{ - // TrainIndex: uint16(trainIndex), - // LinkIndex: uint16(linkId), - // LinkOffset: uint32(loffset), - // Speed: uint16(math.Round(float64(status.Speed * 10))), - // Up: status.Up, - // TrainLength: uint16(status.TrainLength), - // }) slog.Debug("添加列车", "trainIndex", trainIndex, "HeadDeviceId", status.HeadDeviceId, "HeadOffset", status.HeadOffset) slog.Debug("列车初始化", "trainIndex", trainIndex, "linkId", linkId, "loffset", loffset) if err != nil { diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_turnout.go b/ats/verify/simulation/wayside/memory/wayside_memory_turnout.go index 0170a80..77c99ba 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_turnout.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_turnout.go @@ -14,16 +14,6 @@ import ( "joylink.club/bj-rtsts-server/dto/request_proto" ) -// 道岔相关道岔操作方法 -func ChangeTurnoutState(simulation *VerifySimulation, status *state.SwitchState, mapId int32) { - uid := QueryUidByMidAndComId(mapId, status.Id, &graphicData.Turnout{}) - if status.Normal { - fi.DriveTurnoutDCOn(simulation.World, uid) - } else if status.Reverse { - fi.DriveTurnoutFCOn(simulation.World, uid) - } -} - // 处理道岔操作 func HandleTurnoutOperation(simulation *VerifySimulation, req *request_proto.TurnoutOperationReq) { uid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &graphicData.Turnout{}) diff --git a/ats/verify/simulation/wayside/memory/wayside_simulation.go b/ats/verify/simulation/wayside/memory/wayside_simulation.go index f8a6be4..afb7f9d 100644 --- a/ats/verify/simulation/wayside/memory/wayside_simulation.go +++ b/ats/verify/simulation/wayside/memory/wayside_simulation.go @@ -9,6 +9,10 @@ import ( "strconv" "strings" "sync" + "time" + + "joylink.club/rtsssimulation/component" + "joylink.club/rtsssimulation/entity" rtss_simulation "joylink.club/rtsssimulation" @@ -16,8 +20,9 @@ import ( "joylink.club/bj-rtsts-server/ats/verify/protos/state" "joylink.club/bj-rtsts-server/dto" "joylink.club/bj-rtsts-server/sys_error" - "joylink.club/bj-rtsts-server/third_party/deprecated/vobc" + "joylink.club/bj-rtsts-server/third_party/dynamics" "joylink.club/bj-rtsts-server/third_party/message" + "joylink.club/bj-rtsts-server/third_party/semi_physical_train" "joylink.club/ecs" "joylink.club/rtsssimulation/repository" "joylink.club/rtsssimulation/repository/model/proto" @@ -149,6 +154,7 @@ func (s *VerifySimulation) GetAllState(mapId int32) *state.PushedDevicesStatus { TrainState: GetAllTrainState(s), SignalState: GetMapAllSignalState(s, mapId), ButtonState: GetMapAllStationButtonState(s, mapId), + PsdState: GetMapAllPsdState(s, mapId), }, } case graphicData.PictureType_RelayCabinetLayout: @@ -164,19 +170,40 @@ func (s *VerifySimulation) GetAllState(mapId int32) *state.PushedDevicesStatus { // 获取门控箱状态 func (s *VerifySimulation) GetAllPSLState(mapId int32, boxId string) *state.PushedDevicesStatus { + world := s.GetSimulationWorld() + uidStructure := queryUidStructure[*stationUidStructure](mapId) + boxUid := uidStructure.GateBoxIds[boxId].Uid + mkxEntry, ok := entity.GetEntityByUid(world, boxUid) + var buttonStateArr []*state.ButtonState + if ok { + mkxCircuit := component.MkxCircuitType.Get(mkxEntry) + var boxArr []*ecs.Entry + boxArr = append(boxArr, mkxCircuit.PcbList...) + boxArr = append(boxArr, mkxCircuit.PobList...) + boxArr = append(boxArr, mkxCircuit.PabList...) + for _, mkxBoxEntry := range boxArr { + mkxBox := component.MkxBoxType.Get(mkxBoxEntry) + uid := component.UidType.Get(mkxBox.Btn).Id + down := component.BitStateType.Get(mkxBox.Btn).Val + buttonStateArr = append(buttonStateArr, &state.ButtonState{ + Id: uid, + Down: down, + }) + } + } return &state.PushedDevicesStatus{ All: true, AllStatus: &state.AllDevicesStatus{ - ButtonState: []*state.ButtonState{}, + ButtonState: buttonStateArr, }, } } // 获取车站IBP状态 -func (s *VerifySimulation) GetAllIBPState(mapId int32, stationCode string) *state.PushedDevicesStatus { +func (s *VerifySimulation) GetAllIBPState(mapId int32, stationId string, ibpMapCode string) *state.PushedDevicesStatus { return &state.PushedDevicesStatus{ All: true, - AllStatus: GetMapAllIBPState(s, mapId, stationCode), + AllStatus: GetMapAllIBPState(s, mapId, stationId, ibpMapCode), } } @@ -287,18 +314,18 @@ func (s *VerifySimulation) HandleDynamicsTrainInfo(info *message.DynamicsTrainIn if !ok { return } - trainState := sta.(*state.TrainState) // 给半实物仿真发送速度 - vobc.SendTrainSpeedTask(math.Abs(float64(info.Speed * 36))) + semi_physical_train.Default().SendTrainControlMessage(info) // 更新列车状态 - UpdateTrainState(s, convert(info, trainState, s)) + UpdateTrainState(s, convert(info, sta.(*state.TrainState), s)) } func convert(info *message.DynamicsTrainInfo, sta *state.TrainState, simulation *VerifySimulation) *state.TrainState { + delayTime := time.Now().UnixMilli() - sta.VobcState.UpdateTime + sta.ControlDelayTime = (int64(sta.VobcState.LifeSignal)-int64(info.VobcLifeSignal))*20 + delayTime slog.Debug("收到动力学原始消息", "Number", info.Number, "Link", info.Link, "LinkOffset", info.LinkOffset) id, port, offset, runDirection, pointTo, kilometer := QueryDeviceByCalcLink(simulation.Repo, strconv.Itoa(int(info.Link)), int64(info.LinkOffset), info.Up) - slog.Debug("处理动力学转换后的消息", "number", info.Number, - "车头位置", id, "偏移", offset, "是否上行", runDirection, "是否ab", pointTo) + slog.Debug("处理动力学转换后的消息", "number", info.Number, "车头位置", id, "偏移", offset, "是否上行", runDirection, "是否ab", pointTo) sta.HeadDeviceId = simulation.GetComIdByUid(id) sta.DevicePort = port sta.HeadOffset = offset @@ -345,8 +372,25 @@ func speedParse(speed float32) int32 { } // 处理半实物仿真列车控制消息 -func (s *VerifySimulation) HandleSemiPhysicalTrainControlMsg(msg *message.TrainControlMsg) { - +func (s *VerifySimulation) HandleSemiPhysicalTrainControlMsg(b []byte) { + s.Memory.Status.TrainStateMap.Range(func(_, value any) bool { + train := value.(*state.TrainState) + if !train.Show { // 下线列车 + return false + } + trainId, err := strconv.Atoi(train.Id) + if err != nil { + panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()}) + } + d := append(b, uint8(trainId)) + // 发送给动力学 + dynamics.Default().SendTrainControlMessage(d) + // 存放至列车中 + controlMessage := &message.TrainControlMsg{} + controlMessage.Decode(b) + train.VobcState = controlMessage.ControlInfo + return true + }) } func buildProtoRepository(mapIds []int32) (*proto.Repository, error) { @@ -378,12 +422,15 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD city := relayGi.UniqueIdPrefix.City lineId := relayGi.UniqueIdPrefix.LineId station := relayGi.UniqueIdPrefix.BelongsConcentrationStation + relayMap := make(map[string]*proto.Relay) for _, relay := range relayGi.Relays { - repo.Relays = append(repo.Relays, &proto.Relay{ + repoRelay := &proto.Relay{ Id: uidsMap.RelayIds[relay.Common.Id].Uid, Code: relay.Code, Model: convertRelayModel(relay.NewModel), - }) + } + repo.Relays = append(repo.Relays, repoRelay) + relayMap[repoRelay.Id] = repoRelay } for _, pfp := range relayGi.PhaseFailureProtectors { repo.PhaseFailureProtectors = append(repo.PhaseFailureProtectors, &proto.PhaseFailureProtector{ @@ -403,6 +450,14 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD for _, station := range repo.Stations { stationMap[station.Id] = station } + psdMap := make(map[string]*proto.Psd) + for _, psd := range repo.Psds { + psdMap[psd.Id] = psd + } + platformMap := make(map[string]*proto.Platform) + for _, platform := range repo.Platforms { + platformMap[platform.Id] = platform + } for _, relationship := range relayGi.DeviceRelateRelayList { switch relationship.DeviceType { case graphicData.RelatedRef_Turnout: @@ -465,6 +520,53 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD } station.ElectronicGroup = append(station.ElectronicGroup, d) } + case graphicData.RelatedRef_ScreenDoor: + psd, ok := psdMap[GenerateElementUid(city, lineId, nil, relationship.Code)] + if !ok { + continue + } + for _, group := range relationship.Combinationtypes { + var componentIds []string + for _, relayId := range group.RefRelays { + if uidsMap.RelayIds[relayId] == nil { + continue + } + componentIds = append(componentIds, uidsMap.RelayIds[relayId].Uid) + } + psd.ElectronicComponentGroups = append(psd.ElectronicComponentGroups, + &proto.ElectronicComponentGroup{ + Code: group.Code, + ComponentIds: componentIds, + }) + } + } + } + //门控箱 + for _, mkx := range repo.Mkxs { + platform := platformMap[psdMap[mkx.PsdId].GetPlatformId()] + station := stationMap[platform.GetStationId()] + var s string + if strings.Contains(platform.GetCode(), "上行") { + s = "S" + } else if strings.Contains(platform.GetCode(), "下行") { + s = "X" + } else { + continue + } + for _, group := range station.ElectronicGroup { + if group.Code == "MKX" { + var componentIds []string + for _, component := range group.Components { + relay := relayMap[component.Id] + if strings.Contains(relay.GetCode(), s) { + componentIds = append(componentIds, relay.Id) + } + } + mkx.ElectronicComponentGroups = append(mkx.ElectronicComponentGroups, &proto.ElectronicComponentGroup{ + Code: group.Code, + ComponentIds: componentIds, + }) + } } } } @@ -495,6 +597,7 @@ func convertRelayModel(modelType graphicData.Relay_ModelType) proto.Relay_Model } func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphicStorage, mapId int32) { + repo.MainCoordinateSystem = storage.UniqueIdPrefix.MainCoordinateSystem axleCountingMap := make(map[string]*graphicData.AxleCounting) uidsMap := queryUidStructure[*stationUidStructure](mapId) for _, data := range storage.AxleCountings { @@ -563,6 +666,7 @@ func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphi Km: convertKm(data.KilometerSystem), SectionId: sectionId, TurnoutPort: turnoutPort, + Model: convertToProtoSignalModel(data.Mt), } repo.Signals = append(repo.Signals, converSignalUid(signal, uidsMap)) } @@ -639,7 +743,7 @@ func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphi for _, data := range storage.Stations { station := &proto.Station{ Id: uidsMap.StationIds[data.Common.Id].Uid, - Code: data.Code, + Code: data.StationName, } // 关联车站的设备 refs, ok := relateMap[data.Code] @@ -662,58 +766,115 @@ func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphi } } // 处理车站关联IBP的设备 - handlerIBPDeviceToStation(uidsMap, station, repo, data.RefIbpMapCode) + handlerIBPDeviceToStation(station, repo, data.RefIbpMapCode) repo.Stations = append(repo.Stations, station) } - + //门控箱 + for _, data := range storage.GateBoxs { + mkx := &proto.Mkx{ + Id: uidsMap.GateBoxIds[data.Common.Id].Uid, + PsdId: uidsMap.PsdIds[data.RefScreenDoor].Uid, + } + repo.Mkxs = append(repo.Mkxs, mkx) + pslMapId := QueryGiId(data.RefGatedBoxMapCode) + pslStorage := QueryGiData[*graphicData.PslGraphicStorage](pslMapId) + for _, button := range pslStorage.PslButtons { + repoButton := &proto.Button{ + Id: mkx.Id + "_" + button.Code, + Code: button.Code, + ButtonType: proto.Button_Reset_Press, + HasLight: true, + } + repo.Buttons = append(repo.Buttons, repoButton) + switch button.Code { + case "PCB": + mkx.PcbButtonIds = append(mkx.PcbButtonIds, repoButton.Id) + case "POB": + mkx.PobButtonIds = append(mkx.PobButtonIds, repoButton.Id) + case "PAB": + mkx.PabButtonIds = append(mkx.PabButtonIds, repoButton.Id) + } + } + } + //站台 + platformMap := make(map[string]*graphicData.Platform) + for _, data := range storage.Platforms { + platformMap[data.Common.Id] = data + platform := &proto.Platform{ + Id: uidsMap.PlatformIds[data.Common.Id].Uid, + Code: data.Code, + } + repo.Platforms = append(repo.Platforms, platform) + platform.StationId = uidsMap.StationIds[data.RefStationId].Uid + platform.PhysicalSectionId = uidsMap.PhysicalSectionIds[data.RefSectionId].Uid + } + //屏蔽门 + for _, data := range storage.ScreenDoors { + psd := &proto.Psd{ + Id: uidsMap.PsdIds[data.Common.Id].Uid, + PlatformId: uidsMap.PlatformIds[data.RefPlatformId].Uid, + } + repo.Psds = append(repo.Psds, psd) + } } // 将IBP的设备关联到车站中 -func handlerIBPDeviceToStation(uidsMap *stationUidStructure, station *proto.Station, repo *proto.Repository, ibpMap string) { +func handlerIBPDeviceToStation(station *proto.Station, repo *proto.Repository, ibpMap string) { storage := getStorageIBPMapData(ibpMap) if storage == nil { return } - ibpIdMap := uidsMap.IBPIds[station.Code] // 车站对应的UID集合 - typeMap := make(map[string]proto.DeviceType) // 对应的设备类型 - for _, data := range storage.IbpButtons { // 处理按钮 + deviceMap := make(map[string]*proto.ElectronicComponent) // 对应的设备类型 + for _, data := range storage.IbpButtons { // 处理按钮 buttonType := proto.Button_NO_Reset_Press if data.IsSelfReset { buttonType = proto.Button_Reset_Press } b := &proto.Button{ - Id: ibpIdMap[data.Common.Id].Uid, + Id: station.Id + "_" + data.Code, Code: data.Code, ButtonType: buttonType, HasLight: data.HasLight, } - typeMap[data.Common.Id] = proto.DeviceType_DeviceType_Button + deviceMap[data.Common.Id] = &proto.ElectronicComponent{ + Id: b.Id, + DeviceType: proto.DeviceType_DeviceType_Button, + } repo.Buttons = append(repo.Buttons, b) } for _, data := range storage.IbpKeys { // 钥匙 - b := &proto.Button{ - Id: ibpIdMap[data.Common.Id].Uid, - Code: data.Code, - ButtonType: proto.Button_Key_Knob, + b := &proto.Key{ + Id: station.Id + "_" + data.Code, + Code: data.Code, + Gear: 2, } - typeMap[data.Common.Id] = proto.DeviceType_DeviceType_Button - repo.Buttons = append(repo.Buttons, b) + deviceMap[data.Common.Id] = &proto.ElectronicComponent{ + Id: b.Id, + DeviceType: proto.DeviceType_DeviceType_Key, + } + repo.Keys = append(repo.Keys, b) } for _, data := range storage.IbpAlarms { // 报警器 b := &proto.Alarm{ - Id: ibpIdMap[data.Common.Id].Uid, + Id: station.Id + "_" + data.Code, Code: data.Code, } - typeMap[data.Common.Id] = proto.DeviceType_DeviceType_Alarm + deviceMap[data.Common.Id] = &proto.ElectronicComponent{ + Id: b.Id, + DeviceType: proto.DeviceType_DeviceType_Alarm, + } repo.Alarms = append(repo.Alarms, b) } for _, data := range storage.IbpLights { // 指示灯 b := &proto.Light{ - Id: ibpIdMap[data.Common.Id].Uid, + Id: station.Id + "_" + data.Code, Code: data.Code, Aspect: converIbpLightAspect(data.Color), } - typeMap[data.Common.Id] = proto.DeviceType_DeviceType_Light + deviceMap[data.Common.Id] = &proto.ElectronicComponent{ + Id: b.Id, + DeviceType: proto.DeviceType_DeviceType_Light, + } repo.Lights = append(repo.Lights, b) } // 组信息 @@ -721,15 +882,12 @@ func handlerIBPDeviceToStation(uidsMap *stationUidStructure, station *proto.Stat for _, c := range data.Combinationtypes { group := &proto.ElectronicGroup{Code: c.Code} for _, d := range c.RefDevices { - deviceType, ok := typeMap[d] + deviceType, ok := deviceMap[d] if !ok { slog.Debug("IBP组合类型类型不确定id:%s", d) continue } - group.Components = append(group.Components, &proto.ElectronicComponent{ - Id: ibpIdMap[d].Uid, - DeviceType: deviceType, - }) + group.Components = append(group.Components, deviceType) } station.ElectronicGroup = append(station.ElectronicGroup, group) } @@ -924,8 +1082,8 @@ func findTurnoutIds(axleCountingMap map[string]*graphicData.AxleCounting, axleId } func initWorldDeviceState(status *VerifyStatus, repo *repository.Repository) { - initWorldTurnoutState(status, repo) - initWorldPhysicalSectionState(status, repo) + // initWorldTurnoutState(status, repo) + // initWorldPhysicalSectionState(status, repo) } // 初始化道岔状态 @@ -943,3 +1101,22 @@ func initWorldPhysicalSectionState(status *VerifyStatus, repo *repository.Reposi status.PhysicalSectionStateMap.Store(id, &state.SectionState{Id: id, Occupied: false, Type: state.SectionType_Physic}) } } + +func convertToProtoSignalModel(gSmt graphicData.Signal_Model) proto.Signal_Model { + switch gSmt { + case graphicData.Signal_HLU: + return proto.Signal_HLU + case graphicData.Signal_HL: + return proto.Signal_HL + case graphicData.Signal_HLU_FU: + return proto.Signal_HLU_FU + case graphicData.Signal_HLU_FL: + return proto.Signal_HLU_FL + case graphicData.Signal_AB: + return proto.Signal_AB + case graphicData.Signal_HBU: + return proto.Signal_HBU + default: + panic(fmt.Sprintf("graphicData.Signal_Model[%d]无法映射到proto.Signal_Model", gSmt)) + } +} diff --git a/docs/docs.go b/docs/docs.go index 24f358c..e83bb02 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -2736,6 +2736,49 @@ const docTemplate = `{ } } }, + "/api/v1/simulation/:id/getMapKilometerRange": { + "get": { + "security": [ + { + "JwtAuth": [] + } + ], + "description": "获取仿真地图的公里标范围", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ATS测试仿真Api" + ], + "summary": "获取仿真地图的公里标范围", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/dto.ErrorDto" + } + } + } + } + }, "/api/v1/simulation/check/data": { "post": { "security": [ @@ -2918,11 +2961,11 @@ const docTemplate = `{ }, { "description": "ATS测试仿真-ESB按钮操作", - "name": "ButtonOperationReqDto", + "name": "EsbButtonOperationReqDto", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/dto.ButtonOperationReqDto" + "$ref": "#/definitions/dto.EsbButtonOperationReqDto" } } ], @@ -2985,7 +3028,7 @@ const docTemplate = `{ } } }, - "/api/v1/simulation/ibp/operation": { + "/api/v1/simulation/ibp/btn/operation": { "post": { "security": [ { @@ -3013,11 +3056,115 @@ const docTemplate = `{ }, { "description": "ATS测试仿真-IBP按钮操作", - "name": "ButtonOperationReqDto", + "name": "IBPButtonOperationReqDto", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/dto.ButtonOperationReqDto" + "$ref": "#/definitions/dto.IBPButtonOperationReqDto" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/dto.ErrorDto" + } + } + } + } + }, + "/api/v1/simulation/ibp/key/operation": { + "post": { + "security": [ + { + "JwtAuth": [] + } + ], + "description": "ATS测试-IBP钥匙操作", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ATS测试仿真Api" + ], + "summary": "ATS测试-IBP钥匙操作", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "ATS测试仿真-IBP钥匙操作", + "name": "KeyOperationReqDto", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.KeyOperationReqDto" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/dto.ErrorDto" + } + } + } + } + }, + "/api/v1/simulation/ibp/operation": { + "post": { + "security": [ + { + "JwtAuth": [] + } + ], + "description": "PSL操作", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ATS测试仿真Api" + ], + "summary": "PSL操作", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "PSL操作", + "name": "PslOperationReqDto", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PslOperationReqDto" } } ], @@ -4731,32 +4878,6 @@ const docTemplate = `{ } } }, - "dto.ButtonOperationReqDto": { - "type": "object", - "required": [ - "down", - "id", - "mapId", - "simulationId" - ], - "properties": { - "down": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "mapId": { - "type": "integer" - }, - "simulationId": { - "type": "string" - }, - "stationCode": { - "type": "string" - } - } - }, "dto.CheckMapDataReqDto": { "type": "object", "required": [ @@ -4799,6 +4920,79 @@ const docTemplate = `{ } } }, + "dto.EsbButtonOperationReqDto": { + "type": "object", + "required": [ + "id", + "mapId", + "simulationId" + ], + "properties": { + "down": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "mapId": { + "type": "integer" + }, + "simulationId": { + "type": "string" + } + } + }, + "dto.IBPButtonOperationReqDto": { + "type": "object", + "required": [ + "buttonCode", + "mapId", + "simulationId", + "stationId" + ], + "properties": { + "buttonCode": { + "type": "string" + }, + "down": { + "type": "boolean" + }, + "mapId": { + "type": "integer" + }, + "simulationId": { + "type": "string" + }, + "stationId": { + "type": "string" + } + } + }, + "dto.KeyOperationReqDto": { + "type": "object", + "required": [ + "mapId", + "simulationId", + "stationId" + ], + "properties": { + "gear": { + "type": "integer" + }, + "keyCode": { + "type": "string" + }, + "mapId": { + "type": "integer" + }, + "simulationId": { + "type": "string" + }, + "stationId": { + "type": "string" + } + } + }, "dto.LoginDto": { "type": "object", "required": [ @@ -4885,6 +5079,31 @@ const docTemplate = `{ } } }, + "dto.PslOperationReqDto": { + "type": "object", + "required": [ + "buttonCode", + "mapId", + "simulationId" + ], + "properties": { + "buttonCode": { + "type": "string" + }, + "down": { + "type": "boolean" + }, + "gateBoxId": { + "type": "string" + }, + "mapId": { + "type": "integer" + }, + "simulationId": { + "type": "string" + } + } + }, "dto.PublishedGiLinkDto": { "type": "object", "properties": { @@ -4971,11 +5190,17 @@ const docTemplate = `{ "aspect", "id", "mapId", + "operation", "simulationId" ], "properties": { "aspect": { - "$ref": "#/definitions/state.Signal_Aspect" + "description": "当操作为Operation.Display时有效,表示显示的信号", + "allOf": [ + { + "$ref": "#/definitions/state.Signal_Aspect" + } + ] }, "id": { "type": "string" @@ -4983,6 +5208,14 @@ const docTemplate = `{ "mapId": { "type": "integer" }, + "operation": { + "description": "信号机操作类型", + "allOf": [ + { + "$ref": "#/definitions/request_proto.Signal_Operation" + } + ] + }, "simulationId": { "type": "string" } @@ -5364,6 +5597,51 @@ const docTemplate = `{ } } }, + "request_proto.Signal_Operation": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "x-enum-comments": { + "Signal_Display": "显示操作,如设置绿色、设置红黄色", + "Signal_LightACancelDs": "取消蓝灯断丝故障", + "Signal_LightAFaultDs": "设置蓝灯断丝故障", + "Signal_LightBCancelDs": "取消白灯断丝故障", + "Signal_LightBFaultDs": "设置白灯断丝故障", + "Signal_LightHCancelDs": "取消红灯断丝故障", + "Signal_LightHFaultDs": "设置红灯断丝故障", + "Signal_LightLCancelDs": "取消绿灯断丝故障", + "Signal_LightLFaultDs": "设置绿灯断丝故障", + "Signal_LightUCancelDs": "取消黄灯断丝故障", + "Signal_LightUFaultDs": "设置黄灯断丝故障", + "Signal_Undefined": "未定义" + }, + "x-enum-varnames": [ + "Signal_Undefined", + "Signal_Display", + "Signal_LightHFaultDs", + "Signal_LightUFaultDs", + "Signal_LightLFaultDs", + "Signal_LightAFaultDs", + "Signal_LightBFaultDs", + "Signal_LightHCancelDs", + "Signal_LightUCancelDs", + "Signal_LightLCancelDs", + "Signal_LightACancelDs", + "Signal_LightBCancelDs" + ] + }, "request_proto.TurnoutOperationReq": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 17e0645..8c270b3 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -2729,6 +2729,49 @@ } } }, + "/api/v1/simulation/:id/getMapKilometerRange": { + "get": { + "security": [ + { + "JwtAuth": [] + } + ], + "description": "获取仿真地图的公里标范围", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ATS测试仿真Api" + ], + "summary": "获取仿真地图的公里标范围", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/dto.ErrorDto" + } + } + } + } + }, "/api/v1/simulation/check/data": { "post": { "security": [ @@ -2911,11 +2954,11 @@ }, { "description": "ATS测试仿真-ESB按钮操作", - "name": "ButtonOperationReqDto", + "name": "EsbButtonOperationReqDto", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/dto.ButtonOperationReqDto" + "$ref": "#/definitions/dto.EsbButtonOperationReqDto" } } ], @@ -2978,7 +3021,7 @@ } } }, - "/api/v1/simulation/ibp/operation": { + "/api/v1/simulation/ibp/btn/operation": { "post": { "security": [ { @@ -3006,11 +3049,115 @@ }, { "description": "ATS测试仿真-IBP按钮操作", - "name": "ButtonOperationReqDto", + "name": "IBPButtonOperationReqDto", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/dto.ButtonOperationReqDto" + "$ref": "#/definitions/dto.IBPButtonOperationReqDto" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/dto.ErrorDto" + } + } + } + } + }, + "/api/v1/simulation/ibp/key/operation": { + "post": { + "security": [ + { + "JwtAuth": [] + } + ], + "description": "ATS测试-IBP钥匙操作", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ATS测试仿真Api" + ], + "summary": "ATS测试-IBP钥匙操作", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "ATS测试仿真-IBP钥匙操作", + "name": "KeyOperationReqDto", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.KeyOperationReqDto" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/dto.ErrorDto" + } + } + } + } + }, + "/api/v1/simulation/ibp/operation": { + "post": { + "security": [ + { + "JwtAuth": [] + } + ], + "description": "PSL操作", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ATS测试仿真Api" + ], + "summary": "PSL操作", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "PSL操作", + "name": "PslOperationReqDto", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PslOperationReqDto" } } ], @@ -4724,32 +4871,6 @@ } } }, - "dto.ButtonOperationReqDto": { - "type": "object", - "required": [ - "down", - "id", - "mapId", - "simulationId" - ], - "properties": { - "down": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "mapId": { - "type": "integer" - }, - "simulationId": { - "type": "string" - }, - "stationCode": { - "type": "string" - } - } - }, "dto.CheckMapDataReqDto": { "type": "object", "required": [ @@ -4792,6 +4913,79 @@ } } }, + "dto.EsbButtonOperationReqDto": { + "type": "object", + "required": [ + "id", + "mapId", + "simulationId" + ], + "properties": { + "down": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "mapId": { + "type": "integer" + }, + "simulationId": { + "type": "string" + } + } + }, + "dto.IBPButtonOperationReqDto": { + "type": "object", + "required": [ + "buttonCode", + "mapId", + "simulationId", + "stationId" + ], + "properties": { + "buttonCode": { + "type": "string" + }, + "down": { + "type": "boolean" + }, + "mapId": { + "type": "integer" + }, + "simulationId": { + "type": "string" + }, + "stationId": { + "type": "string" + } + } + }, + "dto.KeyOperationReqDto": { + "type": "object", + "required": [ + "mapId", + "simulationId", + "stationId" + ], + "properties": { + "gear": { + "type": "integer" + }, + "keyCode": { + "type": "string" + }, + "mapId": { + "type": "integer" + }, + "simulationId": { + "type": "string" + }, + "stationId": { + "type": "string" + } + } + }, "dto.LoginDto": { "type": "object", "required": [ @@ -4878,6 +5072,31 @@ } } }, + "dto.PslOperationReqDto": { + "type": "object", + "required": [ + "buttonCode", + "mapId", + "simulationId" + ], + "properties": { + "buttonCode": { + "type": "string" + }, + "down": { + "type": "boolean" + }, + "gateBoxId": { + "type": "string" + }, + "mapId": { + "type": "integer" + }, + "simulationId": { + "type": "string" + } + } + }, "dto.PublishedGiLinkDto": { "type": "object", "properties": { @@ -4964,11 +5183,17 @@ "aspect", "id", "mapId", + "operation", "simulationId" ], "properties": { "aspect": { - "$ref": "#/definitions/state.Signal_Aspect" + "description": "当操作为Operation.Display时有效,表示显示的信号", + "allOf": [ + { + "$ref": "#/definitions/state.Signal_Aspect" + } + ] }, "id": { "type": "string" @@ -4976,6 +5201,14 @@ "mapId": { "type": "integer" }, + "operation": { + "description": "信号机操作类型", + "allOf": [ + { + "$ref": "#/definitions/request_proto.Signal_Operation" + } + ] + }, "simulationId": { "type": "string" } @@ -5357,6 +5590,51 @@ } } }, + "request_proto.Signal_Operation": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "x-enum-comments": { + "Signal_Display": "显示操作,如设置绿色、设置红黄色", + "Signal_LightACancelDs": "取消蓝灯断丝故障", + "Signal_LightAFaultDs": "设置蓝灯断丝故障", + "Signal_LightBCancelDs": "取消白灯断丝故障", + "Signal_LightBFaultDs": "设置白灯断丝故障", + "Signal_LightHCancelDs": "取消红灯断丝故障", + "Signal_LightHFaultDs": "设置红灯断丝故障", + "Signal_LightLCancelDs": "取消绿灯断丝故障", + "Signal_LightLFaultDs": "设置绿灯断丝故障", + "Signal_LightUCancelDs": "取消黄灯断丝故障", + "Signal_LightUFaultDs": "设置黄灯断丝故障", + "Signal_Undefined": "未定义" + }, + "x-enum-varnames": [ + "Signal_Undefined", + "Signal_Display", + "Signal_LightHFaultDs", + "Signal_LightUFaultDs", + "Signal_LightLFaultDs", + "Signal_LightAFaultDs", + "Signal_LightBFaultDs", + "Signal_LightHCancelDs", + "Signal_LightUCancelDs", + "Signal_LightLCancelDs", + "Signal_LightACancelDs", + "Signal_LightBCancelDs" + ] + }, "request_proto.TurnoutOperationReq": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index d635f2d..96a3ce2 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -60,24 +60,6 @@ definitions: name: type: string type: object - dto.ButtonOperationReqDto: - properties: - down: - type: boolean - id: - type: string - mapId: - type: integer - simulationId: - type: string - stationCode: - type: string - required: - - down - - id - - mapId - - simulationId - type: object dto.CheckMapDataReqDto: properties: data: @@ -105,6 +87,56 @@ definitions: title: type: string type: object + dto.EsbButtonOperationReqDto: + properties: + down: + type: boolean + id: + type: string + mapId: + type: integer + simulationId: + type: string + required: + - id + - mapId + - simulationId + type: object + dto.IBPButtonOperationReqDto: + properties: + buttonCode: + type: string + down: + type: boolean + mapId: + type: integer + simulationId: + type: string + stationId: + type: string + required: + - buttonCode + - mapId + - simulationId + - stationId + type: object + dto.KeyOperationReqDto: + properties: + gear: + type: integer + keyCode: + type: string + mapId: + type: integer + simulationId: + type: string + stationId: + type: string + required: + - mapId + - simulationId + - stationId + type: object dto.LoginDto: properties: account: @@ -165,6 +197,23 @@ definitions: $ref: '#/definitions/dto.TrainSizeDto' type: array type: object + dto.PslOperationReqDto: + properties: + buttonCode: + type: string + down: + type: boolean + gateBoxId: + type: string + mapId: + type: integer + simulationId: + type: string + required: + - buttonCode + - mapId + - simulationId + type: object dto.PublishedGiLinkDto: properties: category: @@ -223,17 +272,24 @@ definitions: dto.SignalOperationReqDto: properties: aspect: - $ref: '#/definitions/state.Signal_Aspect' + allOf: + - $ref: '#/definitions/state.Signal_Aspect' + description: 当操作为Operation.Display时有效,表示显示的信号 id: type: string mapId: type: integer + operation: + allOf: + - $ref: '#/definitions/request_proto.Signal_Operation' + description: 信号机操作类型 simulationId: type: string required: - aspect - id - mapId + - operation - simulationId type: object dto.SimulationCreateReqDto: @@ -503,6 +559,47 @@ definitions: description: 名称 type: string type: object + request_proto.Signal_Operation: + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + type: integer + x-enum-comments: + Signal_Display: 显示操作,如设置绿色、设置红黄色 + Signal_LightACancelDs: 取消蓝灯断丝故障 + Signal_LightAFaultDs: 设置蓝灯断丝故障 + Signal_LightBCancelDs: 取消白灯断丝故障 + Signal_LightBFaultDs: 设置白灯断丝故障 + Signal_LightHCancelDs: 取消红灯断丝故障 + Signal_LightHFaultDs: 设置红灯断丝故障 + Signal_LightLCancelDs: 取消绿灯断丝故障 + Signal_LightLFaultDs: 设置绿灯断丝故障 + Signal_LightUCancelDs: 取消黄灯断丝故障 + Signal_LightUFaultDs: 设置黄灯断丝故障 + Signal_Undefined: 未定义 + x-enum-varnames: + - Signal_Undefined + - Signal_Display + - Signal_LightHFaultDs + - Signal_LightUFaultDs + - Signal_LightLFaultDs + - Signal_LightAFaultDs + - Signal_LightBFaultDs + - Signal_LightHCancelDs + - Signal_LightUCancelDs + - Signal_LightLCancelDs + - Signal_LightACancelDs + - Signal_LightBCancelDs request_proto.Turnout_Operation: enum: - 0 @@ -2309,6 +2406,33 @@ paths: summary: 从发布数据拉取信息到草稿 tags: - 发布的图形数据Api + /api/v1/simulation/:id/getMapKilometerRange: + get: + consumes: + - application/json + description: 获取仿真地图的公里标范围 + parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + type: string + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/dto.ErrorDto' + security: + - JwtAuth: [] + summary: 获取仿真地图的公里标范围 + tags: + - ATS测试仿真Api /api/v1/simulation/check/data: post: consumes: @@ -2420,10 +2544,10 @@ paths: type: string - description: ATS测试仿真-ESB按钮操作 in: body - name: ButtonOperationReqDto + name: EsbButtonOperationReqDto required: true schema: - $ref: '#/definitions/dto.ButtonOperationReqDto' + $ref: '#/definitions/dto.EsbButtonOperationReqDto' produces: - application/json responses: @@ -2467,7 +2591,7 @@ paths: summary: 获取仿真信息更新通道名称 tags: - ATS测试仿真Api - /api/v1/simulation/ibp/operation: + /api/v1/simulation/ibp/btn/operation: post: consumes: - application/json @@ -2480,10 +2604,10 @@ paths: type: string - description: ATS测试仿真-IBP按钮操作 in: body - name: ButtonOperationReqDto + name: IBPButtonOperationReqDto required: true schema: - $ref: '#/definitions/dto.ButtonOperationReqDto' + $ref: '#/definitions/dto.IBPButtonOperationReqDto' produces: - application/json responses: @@ -2500,6 +2624,72 @@ paths: summary: ATS测试-IBP按钮操作 tags: - ATS测试仿真Api + /api/v1/simulation/ibp/key/operation: + post: + consumes: + - application/json + description: ATS测试-IBP钥匙操作 + parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string + - description: ATS测试仿真-IBP钥匙操作 + in: body + name: KeyOperationReqDto + required: true + schema: + $ref: '#/definitions/dto.KeyOperationReqDto' + produces: + - application/json + responses: + "200": + description: OK + schema: + type: string + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/dto.ErrorDto' + security: + - JwtAuth: [] + summary: ATS测试-IBP钥匙操作 + tags: + - ATS测试仿真Api + /api/v1/simulation/ibp/operation: + post: + consumes: + - application/json + description: PSL操作 + parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string + - description: PSL操作 + in: body + name: PslOperationReqDto + required: true + schema: + $ref: '#/definitions/dto.PslOperationReqDto' + produces: + - application/json + responses: + "200": + description: OK + schema: + type: string + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/dto.ErrorDto' + security: + - JwtAuth: [] + summary: PSL操作 + tags: + - ATS测试仿真Api /api/v1/simulation/list: get: consumes: diff --git a/dto/error.go b/dto/error.go index 3a164f0..9e8674e 100644 --- a/dto/error.go +++ b/dto/error.go @@ -19,6 +19,7 @@ const ( QueryDBError = 5000 OperationOfSignalNotSupported = 6000 + OperationOfSignalError = 6001 ) var ErrorTipMap = map[int]string{ @@ -31,4 +32,5 @@ var ErrorTipMap = map[int]string{ NoAuthOperationError: "无权限操作", QueryDBError: "数据库操作错误", OperationOfSignalNotSupported: "信号机不支持该操作", + OperationOfSignalError: "信号机操作异常", } diff --git a/dto/request_proto/request.pb.go b/dto/request_proto/request.pb.go index a82a603..d70da5a 100644 --- a/dto/request_proto/request.pb.go +++ b/dto/request_proto/request.pb.go @@ -88,6 +88,83 @@ func (Turnout_Operation) EnumDescriptor() ([]byte, []int) { return file_request_proto_rawDescGZIP(), []int{0, 0} } +// 信号机操作 +type Signal_Operation int32 + +const ( + Signal_Undefined Signal_Operation = 0 // 未定义 + Signal_Display Signal_Operation = 1 //显示操作,如设置绿色、设置红黄色 + Signal_LightHFaultDs Signal_Operation = 2 //设置红灯断丝故障 + Signal_LightUFaultDs Signal_Operation = 3 //设置黄灯断丝故障 + Signal_LightLFaultDs Signal_Operation = 4 //设置绿灯断丝故障 + Signal_LightAFaultDs Signal_Operation = 5 //设置蓝灯断丝故障 + Signal_LightBFaultDs Signal_Operation = 6 //设置白灯断丝故障 + Signal_LightHCancelDs Signal_Operation = 7 //取消红灯断丝故障 + Signal_LightUCancelDs Signal_Operation = 8 //取消黄灯断丝故障 + Signal_LightLCancelDs Signal_Operation = 9 //取消绿灯断丝故障 + Signal_LightACancelDs Signal_Operation = 10 //取消蓝灯断丝故障 + Signal_LightBCancelDs Signal_Operation = 11 //取消白灯断丝故障 +) + +// Enum value maps for Signal_Operation. +var ( + Signal_Operation_name = map[int32]string{ + 0: "Undefined", + 1: "Display", + 2: "LightHFaultDs", + 3: "LightUFaultDs", + 4: "LightLFaultDs", + 5: "LightAFaultDs", + 6: "LightBFaultDs", + 7: "LightHCancelDs", + 8: "LightUCancelDs", + 9: "LightLCancelDs", + 10: "LightACancelDs", + 11: "LightBCancelDs", + } + Signal_Operation_value = map[string]int32{ + "Undefined": 0, + "Display": 1, + "LightHFaultDs": 2, + "LightUFaultDs": 3, + "LightLFaultDs": 4, + "LightAFaultDs": 5, + "LightBFaultDs": 6, + "LightHCancelDs": 7, + "LightUCancelDs": 8, + "LightLCancelDs": 9, + "LightACancelDs": 10, + "LightBCancelDs": 11, + } +) + +func (x Signal_Operation) Enum() *Signal_Operation { + p := new(Signal_Operation) + *p = x + return p +} + +func (x Signal_Operation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Signal_Operation) Descriptor() protoreflect.EnumDescriptor { + return file_request_proto_enumTypes[1].Descriptor() +} + +func (Signal_Operation) Type() protoreflect.EnumType { + return &file_request_proto_enumTypes[1] +} + +func (x Signal_Operation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Signal_Operation.Descriptor instead. +func (Signal_Operation) EnumDescriptor() ([]byte, []int) { + return file_request_proto_rawDescGZIP(), []int{2, 0} +} + // 道岔 type Turnout struct { state protoimpl.MessageState @@ -199,6 +276,45 @@ func (x *TurnoutOperationReq) GetOperation() Turnout_Operation { return Turnout_Undefined } +// 信号机 +type Signal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Signal) Reset() { + *x = Signal{} + if protoimpl.UnsafeEnabled { + mi := &file_request_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Signal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signal) ProtoMessage() {} + +func (x *Signal) ProtoReflect() protoreflect.Message { + mi := &file_request_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Signal.ProtoReflect.Descriptor instead. +func (*Signal) Descriptor() ([]byte, []int) { + return file_request_proto_rawDescGZIP(), []int{2} +} + var File_request_proto protoreflect.FileDescriptor var file_request_proto_rawDesc = []byte{ @@ -222,9 +338,24 @@ var file_request_proto_rawDesc = []byte{ 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x15, 0x5a, 0x13, 0x2e, 0x2f, 0x64, 0x74, 0x6f, 0x2f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf5, 0x01, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x22, 0xea, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x0d, 0x0a, 0x09, 0x55, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4c, + 0x69, 0x67, 0x68, 0x74, 0x48, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x73, 0x10, 0x02, 0x12, 0x11, + 0x0a, 0x0d, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x55, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x73, 0x10, + 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4c, 0x46, 0x61, 0x75, 0x6c, 0x74, + 0x44, 0x73, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x41, 0x46, 0x61, + 0x75, 0x6c, 0x74, 0x44, 0x73, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x42, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x73, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x69, + 0x67, 0x68, 0x74, 0x48, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x73, 0x10, 0x07, 0x12, 0x12, + 0x0a, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x55, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x73, + 0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4c, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x44, 0x73, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x41, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x73, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x69, + 0x67, 0x68, 0x74, 0x42, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x73, 0x10, 0x0b, 0x42, 0x15, + 0x5a, 0x13, 0x2e, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -239,12 +370,14 @@ func file_request_proto_rawDescGZIP() []byte { return file_request_proto_rawDescData } -var file_request_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_request_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_request_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_request_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_request_proto_goTypes = []interface{}{ (Turnout_Operation)(0), // 0: request.Turnout.Operation - (*Turnout)(nil), // 1: request.Turnout - (*TurnoutOperationReq)(nil), // 2: request.TurnoutOperationReq + (Signal_Operation)(0), // 1: request.Signal.Operation + (*Turnout)(nil), // 2: request.Turnout + (*TurnoutOperationReq)(nil), // 3: request.TurnoutOperationReq + (*Signal)(nil), // 4: request.Signal } var file_request_proto_depIdxs = []int32{ 0, // 0: request.TurnoutOperationReq.operation:type_name -> request.Turnout.Operation @@ -285,14 +418,26 @@ func file_request_proto_init() { return nil } } + file_request_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Signal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_request_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, + NumEnums: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/dto/simulation.go b/dto/simulation.go index 152a917..01d63b9 100644 --- a/dto/simulation.go +++ b/dto/simulation.go @@ -1,6 +1,9 @@ package dto -import "joylink.club/bj-rtsts-server/ats/verify/protos/state" +import ( + "joylink.club/bj-rtsts-server/ats/verify/protos/state" + "joylink.club/bj-rtsts-server/dto/request_proto" +) // 创建仿真请求 type SimulationCreateReqDto struct { @@ -71,18 +74,42 @@ type SwitchOperationReqDto struct { TurnReverse bool `form:"turnReverse" json:"turnReverse"` } type SignalOperationReqDto struct { - SimulationId string `form:"simulationId" json:"simulationId" binding:"required"` - MapId int32 `json:"mapId" from:"mapId" binding:"required"` - DeviceId string `form:"id" json:"id" binding:"required"` - Aspect state.Signal_Aspect `form:"aspect" json:"aspect" binding:"required"` + SimulationId string `form:"simulationId" json:"simulationId" binding:"required"` + MapId int32 `json:"mapId" from:"mapId" binding:"required"` + DeviceId string `form:"id" json:"id" binding:"required"` + Operation request_proto.Signal_Operation `form:"operation" json:"operation" binding:"required"` //信号机操作类型 + Aspect state.Signal_Aspect `form:"aspect" json:"aspect" binding:"required"` // 当操作为Operation.Display时有效,表示显示的信号 } -type ButtonOperationReqDto struct { +type EsbButtonOperationReqDto struct { SimulationId string `form:"simulationId" json:"simulationId" binding:"required"` MapId int32 `json:"mapId" from:"mapId" binding:"required"` - Station string `form:"stationCode" json:"stationCode"` Id string `form:"id" json:"id" binding:"required"` - Down bool `form:"down" json:"down" binding:"required"` + Down bool `form:"down" json:"down"` +} + +type IBPButtonOperationReqDto struct { + SimulationId string `form:"simulationId" json:"simulationId" binding:"required"` + MapId int32 `json:"mapId" from:"mapId" binding:"required"` + StationId string `form:"stationId" json:"stationId" binding:"required"` + ButtonCode string `form:"buttonCode" json:"buttonCode" binding:"required"` + Down bool `form:"down" json:"down"` +} + +type PslOperationReqDto struct { + SimulationId string `form:"simulationId" json:"simulationId" binding:"required"` + MapId int32 `json:"mapId" from:"mapId" binding:"required"` + GateBoxId string `form:"gateBoxId" json:"gateBoxId"` + ButtonCode string `form:"buttonCode" json:"buttonCode" binding:"required"` + Down bool `form:"down" json:"down"` +} + +type KeyOperationReqDto struct { + SimulationId string `form:"simulationId" json:"simulationId" binding:"required"` + MapId int32 `json:"mapId" from:"mapId" binding:"required"` + StationId string `form:"stationId" json:"stationId" binding:"required"` + KeyCode string `form:"keyCode" json:"keyCode"` + Gear int32 `form:"gear" json:"gear"` } ///////////////////////////////////////////////////////////////////////////////// diff --git a/grpcproto/simulation_ibp_server.go b/grpcproto/simulation_ibp_server.go index 47aee0d..c1d59c0 100644 --- a/grpcproto/simulation_ibp_server.go +++ b/grpcproto/simulation_ibp_server.go @@ -38,7 +38,7 @@ func (t *SimulationIBPServer) onTick() []TopicMsg { idStr := strconv.Itoa(int(mapId)) for _, station := range mapData.Stations { channelName := handlerIBPChannelName(v.SimulationId, idStr, station.Common.Id, t.getChannelName()) - b, err := proto.Marshal(v.GetAllIBPState(mapId, station.Code)) + b, err := proto.Marshal(v.GetAllIBPState(mapId, station.Common.Id, station.RefIbpMapCode)) if err != nil { panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()}) } @@ -50,10 +50,10 @@ func (t *SimulationIBPServer) onTick() []TopicMsg { } // 处理订阅通道名称 -func handlerIBPChannelName(sid, mapId, psl string, format string) string { +func handlerIBPChannelName(sid, mapId, station string, format string) string { var channelName string channelName = strings.Replace(format, "{sid}", sid, 1) channelName = strings.Replace(channelName, "{mid}", mapId, 1) - channelName = strings.Replace(channelName, "{psl}", psl, 1) + channelName = strings.Replace(channelName, "{station}", station, 1) return channelName } diff --git a/service/publishedGi.go b/service/publishedGi.go index ef08656..389a63a 100644 --- a/service/publishedGi.go +++ b/service/publishedGi.go @@ -2,6 +2,7 @@ package service import ( "fmt" + "sync" "time" "joylink.club/bj-rtsts-server/ats/verify/simulation/wayside/memory" @@ -11,6 +12,8 @@ import ( "joylink.club/bj-rtsts-server/dto/publishedGi" ) +var publishMapMutex sync.Mutex + func PageQueryPublishedGi(req *publishedGi.PublishedGiReqDto) *dto.PageDto { dp := dbquery.PublishedGi where := dp.Where(dp.Status.Eq(1)) @@ -55,6 +58,8 @@ func GetPublishedGiById(id int) (*model.PublishedGi, error) { } func PublishFormDraft(req *publishedGi.PublishReqDto, user *model.User) { + publishMapMutex.Lock() + defer publishMapMutex.Unlock() draft := QueryDrafting(req.DraftId) if draft.Proto == nil || len(draft.Proto) == 0 { panic(fmt.Sprintf("草稿[%v]绘图数据信息为空", req.DraftId)) diff --git a/third_party/message/dynamics.go b/third_party/message/dynamics.go index ddf18e0..870145d 100644 --- a/third_party/message/dynamics.go +++ b/third_party/message/dynamics.go @@ -68,6 +68,8 @@ type DynamicsTrainInfo struct { TailRadarSpeed float32 //加速度(m/s^2) Acceleration float32 + // 对应动力学生命周期值 + VobcLifeSignal uint16 } // 解析动力学的列车信息 @@ -93,5 +95,6 @@ func (t *DynamicsTrainInfo) Decode(buf []byte) error { t.HeadRadarSpeed = math.Float32frombits(binary.BigEndian.Uint32(buf[50:54])) t.TailRadarSpeed = math.Float32frombits(binary.BigEndian.Uint32(buf[54:58])) t.Acceleration = math.Float32frombits(binary.BigEndian.Uint32(buf[58:62])) + t.VobcLifeSignal = binary.BigEndian.Uint16(buf[62:64]) return nil } diff --git a/third_party/message/train_control.go b/third_party/message/train_control.go index f429e6c..0956ec4 100644 --- a/third_party/message/train_control.go +++ b/third_party/message/train_control.go @@ -1,99 +1,111 @@ package message -import "encoding/binary" +import ( + "encoding/binary" + "math" + "time" + + "joylink.club/bj-rtsts-server/ats/verify/protos/state" +) // 接收到的列车控制信息 type TrainControlMsg struct { - //【0 1】两个字节 - // 生命信号 每个周期+1 - LifeSignal uint16 - //【2】 一个字节 - // TC1激活状态 1=激活 - Tc1Active bool - // TC2激活状态 1=激活 - Tc2Active bool - // 列车方向向前 1=方向向前 - DirectionForward bool - // 列车方向向后 1=方向向后 - DirectionBackward bool - // 列车牵引状态 1=牵引 - TractionStatus bool - // 列车制动状态 1=制动 - BrakingStatus bool - // 列车紧急制动状态 1=紧急制动 - EmergencyBrakingStatus bool - // 列车折返状态(AR) 1=折返 - TurnbackStatus bool - //【3】 一个字节 - // 跳跃状态 1=跳跃 - JumpStatus bool - // ATO模式 1=ATO模式 - ATO bool - // FAM模式 1=FAM模式 - FAM bool - // CAM模式 1=CAM模式 - CAM bool - // 牵引安全回路 1=牵引安全切除 - TractionSafetyCircuit bool - // 停放制动状态 1=停放施加 - ParkingBrakeStatus bool - // 保持制动状态 1=保持制动施加 - MaintainBrakeStatus bool - //【4 5】 两个字节 列车牵引力 100=1KN - TractionForce uint16 - //【6 7】 列车制动力 100=1KN - BrakeForce uint16 - //【8 9】 列车载荷 100=1ton - TrainLoad uint16 - // 【15】 一个字节 - // 列车开左门指令 1=开门 - LeftDoorOpenCommand bool - // 列车开右门指令 1=开门 - RightDoorOpenCommand bool - // 列车关左门指令 1=关门 - LeftDoorCloseCommand bool - // 列车关右门指令 1=关门 - RightDoorCloseCommand bool - // 整列车门关好 1=门关好 - AllDoorClose bool + ControlInfo *state.TrainVobcState } // 解析VOBC列车信息 -func (r *TrainControlMsg) DecoderVobcTrainInfo(buf []byte) *TrainControlMsg { - r.LifeSignal = binary.BigEndian.Uint16(buf[0:2]) +func (r *TrainControlMsg) Decode(buf []byte) error { + t := &state.TrainVobcState{} + t.LifeSignal = int32(binary.BigEndian.Uint16(buf[0:2])) b2 := buf[2] - r.Tc1Active = (b2 & (1 << 7)) != 0 - r.Tc2Active = (b2 & (1 << 6)) != 0 - r.DirectionForward = (b2 & (1 << 5)) != 0 - r.DirectionBackward = (b2 & (1 << 4)) != 0 - r.TractionStatus = (b2 & (1 << 3)) != 0 - r.BrakingStatus = (b2 & (1 << 2)) != 0 - r.EmergencyBrakingStatus = (b2 & (1 << 1)) != 0 - r.TurnbackStatus = (b2 & 1) != 0 + t.Tc1Active = (b2 & 1) != 0 + t.Tc2Active = (b2 & (1 << 1)) != 0 + t.DirectionForward = (b2 & (1 << 2)) != 0 + t.DirectionBackward = (b2 & (1 << 3)) != 0 + t.TractionStatus = (b2 & (1 << 4)) != 0 + t.BrakingStatus = (b2 & (1 << 5)) != 0 + t.EmergencyBrakingStatus = (b2 & (1 << 6)) != 0 + t.TurnbackStatus = (b2 & 7) != 0 b3 := buf[3] - r.JumpStatus = (b3 & (1 << 7)) != 0 - r.ATO = (b3 & (1 << 6)) != 0 - r.FAM = (b3 & (1 << 5)) != 0 - r.CAM = (b3 & (1 << 4)) != 0 - r.TractionSafetyCircuit = (b3 & (1 << 3)) != 0 - r.ParkingBrakeStatus = (b3 & (1 << 2)) != 0 - r.MaintainBrakeStatus = (b3 & (1 << 1)) != 0 - r.TractionForce = binary.BigEndian.Uint16(buf[4:6]) - r.BrakeForce = binary.BigEndian.Uint16(buf[6:8]) - r.TrainLoad = binary.BigEndian.Uint16(buf[8:10]) + t.JumpStatus = (b3 & 1) != 0 + t.Ato = (b3 & (1 << 1)) != 0 + t.Fam = (b3 & (1 << 2)) != 0 + t.Cam = (b3 & (1 << 3)) != 0 + t.TractionSafetyCircuit = (b3 & (1 << 4)) != 0 + t.ParkingBrakeStatus = (b3 & (1 << 5)) != 0 + t.MaintainBrakeStatus = (b3 & (1 << 6)) != 0 + t.TractionForce = int64(binary.BigEndian.Uint16(buf[4:6])) + t.BrakeForce = int64(binary.BigEndian.Uint16(buf[6:8])) + t.TrainLoad = int64(binary.BigEndian.Uint16(buf[8:10])) b4 := buf[15] - r.LeftDoorOpenCommand = (b4 & (1 << 7)) != 0 - r.RightDoorOpenCommand = (b4 & (1 << 6)) != 0 - r.LeftDoorCloseCommand = (b4 & (1 << 5)) != 0 - r.RightDoorCloseCommand = (b4 & (1 << 4)) != 0 - r.AllDoorClose = (b4 & (1 << 3)) != 0 - return r + t.LeftDoorOpenCommand = (b4 & 1) != 0 + t.RightDoorOpenCommand = (b4 & (1 << 1)) != 0 + t.LeftDoorCloseCommand = (b4 & (1 << 2)) != 0 + t.RightDoorCloseCommand = (b4 & (1 << 3)) != 0 + t.AllDoorClose = (b4 & (1 << 4)) != 0 + t.UpdateTime = time.Now().UnixMilli() + r.ControlInfo = t + return nil } // 发送列车信息 type TrainSpeedMsg struct { // 生命信号 每个周期+1 - LifeSignal uint16 + lifeSignal uint16 // 列车速度 10=1km/h - Speed uint16 + speed uint16 + // 上坡 + upslope bool + // 坡度值 1= 1‰ + slope uint16 + // 加速度 100 = 1 m/s*s + acceleration uint8 + // 减速度 100 = 1 m/s*s + deceleration uint8 + // 实际运行阻力 100 = 1KN + totalResistance uint32 + // 空气阻力 100 = 1KN + airResistance uint32 + // 坡道阻力 100 = 1KN + slopeResistance uint32 + // 曲线阻力 100 = 1KN + curveResistance uint32 +} + +func (t *TrainSpeedMsg) DynamicsDecode(info *DynamicsTrainInfo) { + t.lifeSignal = info.LifeSignal + t.speed = uint16(math.Abs(float64(info.Speed * 36))) + t.upslope = info.UpSlope + t.slope = uint16(info.Slope) + t.totalResistance = uint32(math.Abs(float64(info.TotalResistance / 10))) + t.airResistance = uint32(info.AirResistance / 10) + t.slopeResistance = uint32(math.Abs(float64(info.SlopeResistance / 10))) + t.curveResistance = uint32(info.CurveResistance / 10) + d := math.Abs(float64(info.Acceleration * 100)) + if info.Acceleration > 0 { + t.acceleration = uint8(d) + } else { + t.deceleration = uint8(d) + } +} + +func (t *TrainSpeedMsg) Encode() []byte { + var data []byte + data = binary.BigEndian.AppendUint16(data, t.lifeSignal) + data = binary.BigEndian.AppendUint16(data, t.speed) + if t.upslope { + data = append(data, 1) + } else { + data = append(data, 0) + } + // 中间预留一位 + data = append(data, 0) + data = append(data, t.acceleration) // 加速度 100 = 1 m/s*s + data = append(data, t.deceleration) // 减速度 100 = 1 m/s*s + data = binary.BigEndian.AppendUint32(data, t.totalResistance) // 实际运行阻力 100 = 1KN + data = binary.BigEndian.AppendUint32(data, t.airResistance) // 空气阻力 100 = 1KN + data = binary.BigEndian.AppendUint32(data, t.slopeResistance) // 坡道阻力 100 = 1KN + data = binary.BigEndian.AppendUint32(data, t.curveResistance) // 曲线阻力 100 = 1KN + data = binary.BigEndian.AppendUint16(data, t.slope) // 坡度值 1= 1‰ + return data } diff --git a/third_party/semi_physical_train/semi_physical_train.go b/third_party/semi_physical_train/semi_physical_train.go index 606ecfd..480efc7 100644 --- a/third_party/semi_physical_train/semi_physical_train.go +++ b/third_party/semi_physical_train/semi_physical_train.go @@ -14,11 +14,13 @@ type SemiPhysicalTrain interface { Start(manager SemiPhysicalMessageManager) // 停止半实物仿真消息处理 Stop() + // 发送列车控制消息 + SendTrainControlMessage(info *message.DynamicsTrainInfo) } type SemiPhysicalMessageManager interface { // 处理半实物仿真列车控制消息 - HandleSemiPhysicalTrainControlMsg(msg *message.TrainControlMsg) + HandleSemiPhysicalTrainControlMsg(b []byte) } type semiPhysicalTrainImpl struct { @@ -28,6 +30,36 @@ type semiPhysicalTrainImpl struct { manager SemiPhysicalMessageManager } +func (s *semiPhysicalTrainImpl) handleTrainControlMsg(b []byte) { + handler := s.manager + if handler != nil { + handler.HandleSemiPhysicalTrainControlMsg(b) + } +} + +func (s *semiPhysicalTrainImpl) Start(manager SemiPhysicalMessageManager) { + s.manager = manager +} + +func (s *semiPhysicalTrainImpl) Stop() { + s.manager = nil +} + +func (s *semiPhysicalTrainImpl) SendTrainControlMessage(info *message.DynamicsTrainInfo) { + sendMsg := &message.TrainSpeedMsg{} + sendMsg.DynamicsDecode(info) + s.trainSpeedInfoUdpClient.Send(sendMsg.Encode()) +} + +func newSemiPhysicalTrain() SemiPhysicalTrain { + s := &semiPhysicalTrainImpl{ + trainSpeedInfoUdpClient: udp.NewClient(fmt.Sprintf("%v:%v", config.Config.Vobc.Ip, config.Config.Vobc.RemotePort)), + } + s.trainControlUdpServer = udp.NewServer(fmt.Sprintf(":%d", config.Config.Vobc.LocalPort), s.handleTrainControlMsg) + s.trainControlUdpServer.Listen() + return s +} + var _default SemiPhysicalTrain func Default() SemiPhysicalTrain { @@ -43,24 +75,3 @@ func Init() { } _default = newSemiPhysicalTrain() } - -func newSemiPhysicalTrain() SemiPhysicalTrain { - s := &semiPhysicalTrainImpl{ - trainSpeedInfoUdpClient: udp.NewClient("127.0.0.1:7777"), - } - s.trainControlUdpServer = udp.NewServer(fmt.Sprintf(":%d", config.Config.Dynamics.UdpLocalPort), s.handleTrainControlMsg) - s.trainControlUdpServer.Listen() - return s -} - -func (s *semiPhysicalTrainImpl) handleTrainControlMsg(b []byte) { - -} - -func (s *semiPhysicalTrainImpl) Start(manager SemiPhysicalMessageManager) { - s.manager = manager -} - -func (s *semiPhysicalTrainImpl) Stop() { - s.manager = nil -}