列车控制btn调整
This commit is contained in:
parent
731aea8c8d
commit
0947fd9b73
@ -1686,7 +1686,7 @@ type TrainControl struct {
|
||||
TrainId string `protobuf:"bytes,2,opt,name=trainId,proto3" json:"trainId,omitempty"`
|
||||
DeviceId uint32 `protobuf:"varint,3,opt,name=deviceId,proto3" json:"deviceId,omitempty"` //设备id
|
||||
ControlType TrainControl_TrainControlType `protobuf:"varint,4,opt,name=controlType,proto3,enum=request.TrainControl_TrainControlType" json:"controlType,omitempty"`
|
||||
Button *TrainControl_EmergentButton `protobuf:"bytes,5,opt,name=button,proto3" json:"button,omitempty"` // 紧急制动
|
||||
ControlButton *TrainControl_ControlButton `protobuf:"bytes,5,opt,name=controlButton,proto3" json:"controlButton,omitempty"` // 控制按钮
|
||||
DriverKey *TrainControl_DriverKeySwitch `protobuf:"bytes,6,opt,name=driverKey,proto3" json:"driverKey,omitempty"`
|
||||
DirKey *TrainControl_DirectionKeySwitch `protobuf:"bytes,7,opt,name=dirKey,proto3" json:"dirKey,omitempty"` //方向
|
||||
Handler *TrainControl_PushHandler `protobuf:"bytes,8,opt,name=handler,proto3" json:"handler,omitempty"` //手柄
|
||||
@ -1752,9 +1752,9 @@ func (x *TrainControl) GetControlType() TrainControl_TrainControlType {
|
||||
return TrainControl_EMERGENT_BUTTON
|
||||
}
|
||||
|
||||
func (x *TrainControl) GetButton() *TrainControl_EmergentButton {
|
||||
func (x *TrainControl) GetControlButton() *TrainControl_ControlButton {
|
||||
if x != nil {
|
||||
return x.Button
|
||||
return x.ControlButton
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -2116,6 +2116,53 @@ func (x *XcjParam) GetFault() Xcj_Fault {
|
||||
return Xcj_FA_NONE
|
||||
}
|
||||
|
||||
type TrainControl_ControlButton struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TrainControl_ControlButton) Reset() {
|
||||
*x = TrainControl_ControlButton{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_request_proto_msgTypes[21]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TrainControl_ControlButton) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TrainControl_ControlButton) ProtoMessage() {}
|
||||
|
||||
func (x *TrainControl_ControlButton) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_request_proto_msgTypes[21]
|
||||
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 TrainControl_ControlButton.ProtoReflect.Descriptor instead.
|
||||
func (*TrainControl_ControlButton) Descriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{14, 0}
|
||||
}
|
||||
|
||||
func (x *TrainControl_ControlButton) GetActive() bool {
|
||||
if x != nil {
|
||||
return x.Active
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 紧急制动
|
||||
type TrainControl_EmergentButton struct {
|
||||
state protoimpl.MessageState
|
||||
@ -2128,7 +2175,7 @@ type TrainControl_EmergentButton struct {
|
||||
func (x *TrainControl_EmergentButton) Reset() {
|
||||
*x = TrainControl_EmergentButton{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_request_proto_msgTypes[21]
|
||||
mi := &file_request_proto_msgTypes[22]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2141,7 +2188,7 @@ func (x *TrainControl_EmergentButton) String() string {
|
||||
func (*TrainControl_EmergentButton) ProtoMessage() {}
|
||||
|
||||
func (x *TrainControl_EmergentButton) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_request_proto_msgTypes[21]
|
||||
mi := &file_request_proto_msgTypes[22]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2154,7 +2201,7 @@ func (x *TrainControl_EmergentButton) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use TrainControl_EmergentButton.ProtoReflect.Descriptor instead.
|
||||
func (*TrainControl_EmergentButton) Descriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{14, 0}
|
||||
return file_request_proto_rawDescGZIP(), []int{14, 1}
|
||||
}
|
||||
|
||||
func (x *TrainControl_EmergentButton) GetActive() bool {
|
||||
@ -2176,7 +2223,7 @@ type TrainControl_DriverKeySwitch struct {
|
||||
func (x *TrainControl_DriverKeySwitch) Reset() {
|
||||
*x = TrainControl_DriverKeySwitch{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_request_proto_msgTypes[22]
|
||||
mi := &file_request_proto_msgTypes[23]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2189,7 +2236,7 @@ func (x *TrainControl_DriverKeySwitch) String() string {
|
||||
func (*TrainControl_DriverKeySwitch) ProtoMessage() {}
|
||||
|
||||
func (x *TrainControl_DriverKeySwitch) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_request_proto_msgTypes[22]
|
||||
mi := &file_request_proto_msgTypes[23]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2202,7 +2249,7 @@ func (x *TrainControl_DriverKeySwitch) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use TrainControl_DriverKeySwitch.ProtoReflect.Descriptor instead.
|
||||
func (*TrainControl_DriverKeySwitch) Descriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{14, 1}
|
||||
return file_request_proto_rawDescGZIP(), []int{14, 2}
|
||||
}
|
||||
|
||||
func (x *TrainControl_DriverKeySwitch) GetVal() bool {
|
||||
@ -2223,7 +2270,7 @@ type TrainControl_DirectionKeySwitch struct {
|
||||
func (x *TrainControl_DirectionKeySwitch) Reset() {
|
||||
*x = TrainControl_DirectionKeySwitch{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_request_proto_msgTypes[23]
|
||||
mi := &file_request_proto_msgTypes[24]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2236,7 +2283,7 @@ func (x *TrainControl_DirectionKeySwitch) String() string {
|
||||
func (*TrainControl_DirectionKeySwitch) ProtoMessage() {}
|
||||
|
||||
func (x *TrainControl_DirectionKeySwitch) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_request_proto_msgTypes[23]
|
||||
mi := &file_request_proto_msgTypes[24]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2249,7 +2296,7 @@ func (x *TrainControl_DirectionKeySwitch) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use TrainControl_DirectionKeySwitch.ProtoReflect.Descriptor instead.
|
||||
func (*TrainControl_DirectionKeySwitch) Descriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{14, 2}
|
||||
return file_request_proto_rawDescGZIP(), []int{14, 3}
|
||||
}
|
||||
|
||||
func (x *TrainControl_DirectionKeySwitch) GetVal() uint32 {
|
||||
@ -2271,7 +2318,7 @@ type TrainControl_PushHandler struct {
|
||||
func (x *TrainControl_PushHandler) Reset() {
|
||||
*x = TrainControl_PushHandler{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_request_proto_msgTypes[24]
|
||||
mi := &file_request_proto_msgTypes[25]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2284,7 +2331,7 @@ func (x *TrainControl_PushHandler) String() string {
|
||||
func (*TrainControl_PushHandler) ProtoMessage() {}
|
||||
|
||||
func (x *TrainControl_PushHandler) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_request_proto_msgTypes[24]
|
||||
mi := &file_request_proto_msgTypes[25]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2297,7 +2344,7 @@ func (x *TrainControl_PushHandler) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use TrainControl_PushHandler.ProtoReflect.Descriptor instead.
|
||||
func (*TrainControl_PushHandler) Descriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{14, 3}
|
||||
return file_request_proto_rawDescGZIP(), []int{14, 4}
|
||||
}
|
||||
|
||||
func (x *TrainControl_PushHandler) GetVal() int32 {
|
||||
@ -2435,7 +2482,7 @@ var file_request_proto_rawDesc = []byte{
|
||||
0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x66, 0x61, 0x75, 0x6c, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x2e, 0x50, 0x73, 0x64, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x66, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x22, 0xec, 0x05, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x74, 0x22, 0xa2, 0x06, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x49,
|
||||
@ -2446,94 +2493,98 @@ var file_request_proto_rawDesc = []byte{
|
||||
0x0e, 0x32, 0x26, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x69,
|
||||
0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x45, 0x6d,
|
||||
0x65, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x75,
|
||||
0x74, 0x74, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65,
|
||||
0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44,
|
||||
0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x09,
|
||||
0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x06, 0x64, 0x69, 0x72,
|
||||
0x4b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x65, 0x71, 0x75,
|
||||
0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e,
|
||||
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x75, 0x74, 0x74,
|
||||
0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x75, 0x74, 0x74, 0x6f,
|
||||
0x6e, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54,
|
||||
0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x72, 0x69, 0x76,
|
||||
0x65, 0x72, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x09, 0x64, 0x72, 0x69,
|
||||
0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x69,
|
||||
0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68,
|
||||
0x52, 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x07, 0x68, 0x61, 0x6e, 0x64,
|
||||
0x6c, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69,
|
||||
0x74, 0x63, 0x68, 0x52, 0x06, 0x64, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x07, 0x68,
|
||||
0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52,
|
||||
0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x1a, 0x28, 0x0a, 0x0e, 0x45, 0x6d, 0x65, 0x72,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63,
|
||||
0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69,
|
||||
0x76, 0x65, 0x1a, 0x23, 0x0a, 0x0f, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x53,
|
||||
0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x26, 0x0a, 0x12, 0x44, 0x69, 0x72, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a,
|
||||
0x1f, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c,
|
||||
0x22, 0x65, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x4e, 0x54,
|
||||
0x5f, 0x42, 0x55, 0x54, 0x54, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x52, 0x49,
|
||||
0x56, 0x45, 0x52, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x10, 0x01,
|
||||
0x12, 0x18, 0x0a, 0x14, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4b, 0x45,
|
||||
0x59, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x41,
|
||||
0x4e, 0x44, 0x4c, 0x45, 0x52, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x41, 0x43, 0x4b, 0x57, 0x41, 0x52, 0x44,
|
||||
0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12,
|
||||
0x0f, 0x0a, 0x0b, 0x4e, 0x45, 0x55, 0x54, 0x52, 0x41, 0x4c, 0x57, 0x41, 0x52, 0x44, 0x10, 0x02,
|
||||
0x22, 0xc6, 0x01, 0x0a, 0x0f, 0x43, 0x6b, 0x6d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x69, 0x6d, 0x75,
|
||||
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x70, 0x49,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x70, 0x49, 0x64, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x09, 0x6f, 0x70,
|
||||
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e,
|
||||
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6b, 0x6d, 0x2e, 0x4f, 0x70, 0x65, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x11, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6b, 0x6d, 0x50, 0x61, 0x72,
|
||||
0x61, 0x6d, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x82, 0x01, 0x0a, 0x03, 0x43, 0x6b,
|
||||
0x6d, 0x22, 0x29, 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, 0x0d, 0x0a,
|
||||
0x09, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x10, 0x01, 0x22, 0x27, 0x0a, 0x05,
|
||||
0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10,
|
||||
0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x5f, 0x4b, 0x4d, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46,
|
||||
0x5f, 0x47, 0x4d, 0x10, 0x02, 0x22, 0x27, 0x0a, 0x05, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x0b,
|
||||
0x0a, 0x07, 0x46, 0x41, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46,
|
||||
0x41, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x4c, 0x6f, 0x73, 0x73, 0x10, 0x01, 0x22, 0x5e,
|
||||
0x0a, 0x08, 0x43, 0x6b, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x28, 0x0a, 0x05, 0x66, 0x6f,
|
||||
0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x2e, 0x43, 0x6b, 0x6d, 0x2e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x05, 0x66,
|
||||
0x6f, 0x72, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6b,
|
||||
0x6d, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0xc6,
|
||||
0x01, 0x0a, 0x0f, 0x58, 0x63, 0x6a, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x70, 0x49, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
|
||||
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x72, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x58, 0x63, 0x6a, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27,
|
||||
0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
|
||||
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x58, 0x63, 0x6a, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x54, 0x0a, 0x03, 0x58, 0x63, 0x6a, 0x22, 0x29,
|
||||
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, 0x0d, 0x0a, 0x09, 0x53, 0x65,
|
||||
0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x10, 0x01, 0x22, 0x22, 0x0a, 0x05, 0x46, 0x61, 0x75,
|
||||
0x6c, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12,
|
||||
0x0c, 0x0a, 0x08, 0x46, 0x41, 0x5f, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x01, 0x22, 0x34, 0x0a,
|
||||
0x08, 0x58, 0x63, 0x6a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x28, 0x0a, 0x05, 0x66, 0x61, 0x75,
|
||||
0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x2e, 0x58, 0x63, 0x6a, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x66, 0x61,
|
||||
0x75, 0x6c, 0x74, 0x42, 0x30, 0x5a, 0x2e, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63,
|
||||
0x6c, 0x75, 0x62, 0x2f, 0x62, 0x6a, 0x2d, 0x72, 0x74, 0x73, 0x74, 0x73, 0x2d, 0x73, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x2e, 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x07, 0x68, 0x61,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x72, 0x1a, 0x27, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x1a, 0x28,
|
||||
0x0a, 0x0e, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x1a, 0x23, 0x0a, 0x0f, 0x44, 0x72, 0x69, 0x76,
|
||||
0x65, 0x72, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x76,
|
||||
0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x26, 0x0a,
|
||||
0x12, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69,
|
||||
0x74, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x1f, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x48, 0x61, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x65, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x4d,
|
||||
0x45, 0x52, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x55, 0x54, 0x54, 0x4f, 0x4e, 0x10, 0x00, 0x12,
|
||||
0x15, 0x0a, 0x11, 0x44, 0x52, 0x49, 0x56, 0x45, 0x52, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x53, 0x57,
|
||||
0x49, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54,
|
||||
0x49, 0x4f, 0x4e, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x10, 0x02,
|
||||
0x12, 0x0b, 0x0a, 0x07, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x52, 0x10, 0x03, 0x22, 0x37, 0x0a,
|
||||
0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x41,
|
||||
0x43, 0x4b, 0x57, 0x41, 0x52, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4f, 0x52, 0x57,
|
||||
0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x45, 0x55, 0x54, 0x52, 0x41, 0x4c,
|
||||
0x57, 0x41, 0x52, 0x44, 0x10, 0x02, 0x22, 0xc6, 0x01, 0x0a, 0x0f, 0x43, 0x6b, 0x6d, 0x4f, 0x70,
|
||||
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69,
|
||||
0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x6d, 0x61, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d,
|
||||
0x61, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64,
|
||||
0x12, 0x34, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6b,
|
||||
0x6d, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
|
||||
0x43, 0x6b, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22,
|
||||
0x82, 0x01, 0x0a, 0x03, 0x43, 0x6b, 0x6d, 0x22, 0x29, 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, 0x0d, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x10, 0x01, 0x22, 0x27, 0x0a, 0x05, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x46,
|
||||
0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x5f, 0x4b, 0x4d, 0x10,
|
||||
0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x5f, 0x47, 0x4d, 0x10, 0x02, 0x22, 0x27, 0x0a, 0x05, 0x46,
|
||||
0x61, 0x75, 0x6c, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10,
|
||||
0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x41, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x4c, 0x6f,
|
||||
0x73, 0x73, 0x10, 0x01, 0x22, 0x5e, 0x0a, 0x08, 0x43, 0x6b, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x12, 0x28, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x12, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6b, 0x6d, 0x2e, 0x46, 0x6f,
|
||||
0x72, 0x63, 0x65, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x66, 0x61,
|
||||
0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x2e, 0x43, 0x6b, 0x6d, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x66,
|
||||
0x61, 0x75, 0x6c, 0x74, 0x22, 0xc6, 0x01, 0x0a, 0x0f, 0x58, 0x63, 0x6a, 0x4f, 0x70, 0x65, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x6d, 0x75,
|
||||
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
|
||||
0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x6d, 0x61, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x70,
|
||||
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34,
|
||||
0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x16, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x58, 0x63, 0x6a, 0x2e,
|
||||
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x58, 0x63,
|
||||
0x6a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x54, 0x0a,
|
||||
0x03, 0x58, 0x63, 0x6a, 0x22, 0x29, 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, 0x0d, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x10, 0x01, 0x22,
|
||||
0x22, 0x0a, 0x05, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x5f, 0x4e,
|
||||
0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x41, 0x5f, 0x46, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x10, 0x01, 0x22, 0x34, 0x0a, 0x08, 0x58, 0x63, 0x6a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12,
|
||||
0x28, 0x0a, 0x05, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12,
|
||||
0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x58, 0x63, 0x6a, 0x2e, 0x46, 0x61, 0x75,
|
||||
0x6c, 0x74, 0x52, 0x05, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x30, 0x5a, 0x2e, 0x6a, 0x6f, 0x79,
|
||||
0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x6c, 0x75, 0x62, 0x2f, 0x62, 0x6a, 0x2d, 0x72, 0x74, 0x73,
|
||||
0x74, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x72, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -2549,7 +2600,7 @@ func file_request_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_request_proto_enumTypes = make([]protoimpl.EnumInfo, 17)
|
||||
var file_request_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
|
||||
var file_request_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
|
||||
var file_request_proto_goTypes = []interface{}{
|
||||
(Relay_Operation)(0), // 0: request.Relay.Operation
|
||||
(Points_Operation)(0), // 1: request.Points.Operation
|
||||
@ -2589,10 +2640,11 @@ var file_request_proto_goTypes = []interface{}{
|
||||
(*XcjOperationReq)(nil), // 35: request.XcjOperationReq
|
||||
(*Xcj)(nil), // 36: request.Xcj
|
||||
(*XcjParam)(nil), // 37: request.XcjParam
|
||||
(*TrainControl_EmergentButton)(nil), // 38: request.TrainControl.EmergentButton
|
||||
(*TrainControl_DriverKeySwitch)(nil), // 39: request.TrainControl.DriverKeySwitch
|
||||
(*TrainControl_DirectionKeySwitch)(nil), // 40: request.TrainControl.DirectionKeySwitch
|
||||
(*TrainControl_PushHandler)(nil), // 41: request.TrainControl.PushHandler
|
||||
(*TrainControl_ControlButton)(nil), // 38: request.TrainControl.ControlButton
|
||||
(*TrainControl_EmergentButton)(nil), // 39: request.TrainControl.EmergentButton
|
||||
(*TrainControl_DriverKeySwitch)(nil), // 40: request.TrainControl.DriverKeySwitch
|
||||
(*TrainControl_DirectionKeySwitch)(nil), // 41: request.TrainControl.DirectionKeySwitch
|
||||
(*TrainControl_PushHandler)(nil), // 42: request.TrainControl.PushHandler
|
||||
}
|
||||
var file_request_proto_depIdxs = []int32{
|
||||
0, // 0: request.RelayOperationReq.operation:type_name -> request.Relay.Operation
|
||||
@ -2610,10 +2662,10 @@ var file_request_proto_depIdxs = []int32{
|
||||
8, // 12: request.PsdParam.force:type_name -> request.Psd.Force
|
||||
9, // 13: request.PsdParam.fault:type_name -> request.Psd.Fault
|
||||
10, // 14: request.TrainControl.controlType:type_name -> request.TrainControl.TrainControlType
|
||||
38, // 15: request.TrainControl.button:type_name -> request.TrainControl.EmergentButton
|
||||
39, // 16: request.TrainControl.driverKey:type_name -> request.TrainControl.DriverKeySwitch
|
||||
40, // 17: request.TrainControl.dirKey:type_name -> request.TrainControl.DirectionKeySwitch
|
||||
41, // 18: request.TrainControl.handler:type_name -> request.TrainControl.PushHandler
|
||||
38, // 15: request.TrainControl.controlButton:type_name -> request.TrainControl.ControlButton
|
||||
40, // 16: request.TrainControl.driverKey:type_name -> request.TrainControl.DriverKeySwitch
|
||||
41, // 17: request.TrainControl.dirKey:type_name -> request.TrainControl.DirectionKeySwitch
|
||||
42, // 18: request.TrainControl.handler:type_name -> request.TrainControl.PushHandler
|
||||
12, // 19: request.CkmOperationReq.operation:type_name -> request.Ckm.Operation
|
||||
34, // 20: request.CkmOperationReq.param:type_name -> request.CkmParam
|
||||
13, // 21: request.CkmParam.force:type_name -> request.Ckm.Force
|
||||
@ -2887,7 +2939,7 @@ func file_request_proto_init() {
|
||||
}
|
||||
}
|
||||
file_request_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrainControl_EmergentButton); i {
|
||||
switch v := v.(*TrainControl_ControlButton); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -2899,7 +2951,7 @@ func file_request_proto_init() {
|
||||
}
|
||||
}
|
||||
file_request_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrainControl_DriverKeySwitch); i {
|
||||
switch v := v.(*TrainControl_EmergentButton); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -2911,7 +2963,7 @@ func file_request_proto_init() {
|
||||
}
|
||||
}
|
||||
file_request_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrainControl_DirectionKeySwitch); i {
|
||||
switch v := v.(*TrainControl_DriverKeySwitch); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -2923,6 +2975,18 @@ func file_request_proto_init() {
|
||||
}
|
||||
}
|
||||
file_request_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrainControl_DirectionKeySwitch); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_request_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrainControl_PushHandler); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -2941,7 +3005,7 @@ func file_request_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_request_proto_rawDesc,
|
||||
NumEnums: 17,
|
||||
NumMessages: 25,
|
||||
NumMessages: 26,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
Subproject commit c0aa3ab5b7e5e4819d4ce0147ef3ae6947b72daf
|
||||
Subproject commit 2ac805b05486bf569c0aa00233f485be1d85848e
|
@ -34,6 +34,14 @@ func findTrainTccGraphicDataKeys(tccG *data_proto.TccGraphicStorage) []*data_pro
|
||||
func findTrainTccGraphicDataHandlers(tccG *data_proto.TccGraphicStorage) []*data_proto.TccHandle {
|
||||
return tccG.TccHandles
|
||||
}
|
||||
func findTrainTccGraphicDataButtonByCode(tccG *data_proto.TccGraphicStorage, deviceCode string) (*data_proto.TccButton, bool) {
|
||||
for _, d := range findTrainTccGraphicDataButtons(tccG) {
|
||||
if d.Code == deviceCode {
|
||||
return d, true
|
||||
}
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
func findTrainTccGraphicDataButton(tccG *data_proto.TccGraphicStorage, id uint32) (*data_proto.TccButton, bool) {
|
||||
for _, d := range findTrainTccGraphicDataButtons(tccG) {
|
||||
if d.Common.Id == id {
|
||||
@ -85,11 +93,15 @@ func initTrainTcc(vs *VerifySimulation, runDir bool, breaking int32) *state_prot
|
||||
|
||||
tcc := &state_proto.TrainControlState{}
|
||||
if tccGI != nil {
|
||||
btns := make([]*state_proto.TrainControlState_ControlButton, 0)
|
||||
for _, b := range tccGI.TccButtons {
|
||||
btn := &state_proto.TrainControlState_ControlButton{Id: b.Common.Id, Passed: false}
|
||||
if b.Code == JJZD {
|
||||
tcc.Ebutton = &state_proto.TrainControlState_EmergentButton{Id: b.Common.Id, Passed: false}
|
||||
btn.Passed = false
|
||||
}
|
||||
btns = append(btns, btn)
|
||||
}
|
||||
tcc.Buttons = btns
|
||||
for _, b := range tccGI.TccHandles {
|
||||
if b.Code == QYSB {
|
||||
tcc.PushHandler = &state_proto.TrainControlState_PushHandler{Id: b.Common.Id, Val: -100}
|
||||
|
@ -40,7 +40,8 @@ func ControlTrainUpdate(s *VerifySimulation, ct *request_proto.TrainControl) {
|
||||
tcc := sta.Tcc
|
||||
var tce []train_pc_sim.TrainControlEvent = nil
|
||||
if ct.ControlType == request_proto.TrainControl_EMERGENT_BUTTON {
|
||||
tce = trainControlEB(vobc, tcc, ct.Button, ct.DeviceId, tccGraphicData)
|
||||
//tce = trainControlEB(vobc, tcc, ct.Button, ct.DeviceId, tccGraphicData)
|
||||
tce = trainControlButton(vobc, tcc.Buttons, ct.DeviceId, ct.ControlButton.Active, tccGraphicData)
|
||||
} else if ct.ControlType == request_proto.TrainControl_DRIVER_KEY_SWITCH {
|
||||
tce = trainControlDriverKey(sta, ct.DriverKey, ct.DeviceId, tccGraphicData)
|
||||
//train_pc_sim.Default().SendDriverActive(sta)
|
||||
@ -68,27 +69,263 @@ func ControlTrainUpdate(s *VerifySimulation, ct *request_proto.TrainControl) {
|
||||
}
|
||||
}
|
||||
|
||||
func trainControlEB(vobc *state_proto.TrainVobcState, tcc *state_proto.TrainControlState, request *request_proto.TrainControl_EmergentButton, deviceId uint32, tccGraphic *data_proto.TccGraphicStorage) []train_pc_sim.TrainControlEvent {
|
||||
if !request.Active {
|
||||
func findBtnFromTccByDeviceId(tcc []*state_proto.TrainControlState_ControlButton, deviceId uint32) (*state_proto.TrainControlState_ControlButton, bool) {
|
||||
for _, tccBtn := range tcc {
|
||||
if tccBtn.Id == deviceId {
|
||||
return tccBtn, true
|
||||
}
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
func trainControlButton(vobc *state_proto.TrainVobcState, tcc []*state_proto.TrainControlState_ControlButton, deviceId uint32, active bool, tccGraphic *data_proto.TccGraphicStorage) []train_pc_sim.TrainControlEvent {
|
||||
if graphicBtn, ok := findTrainTccGraphicDataButton(tccGraphic, deviceId); ok {
|
||||
btn, btnOk := findBtnFromTccByDeviceId(tcc, deviceId)
|
||||
if btnOk == false {
|
||||
slog.Error("未找到对应的车载摁钮code:", graphicBtn.Code, "设备id:", deviceId)
|
||||
return nil
|
||||
}
|
||||
if tcc.Ebutton != nil && tcc.Ebutton.Passed {
|
||||
switch graphicBtn.Code {
|
||||
case "JJZD": // 紧急制动
|
||||
return controlEBBtn(vobc, active, btn)
|
||||
case "ATPQCKG": //atp切除
|
||||
return controlAtpBtn(vobc, active, btn)
|
||||
case "WBJJZDFK": //外部紧急制动反馈
|
||||
return controlOutEbReportBtn(vobc, active, btn)
|
||||
case "KZM": //开左门按钮
|
||||
return controlLeftDoorBtn(vobc, active, btn)
|
||||
case "GZM": //关左门按钮
|
||||
return controlLeftDoorCloseBtn(vobc, active, btn)
|
||||
case "KYM": //开右门按钮
|
||||
return controlRightDoorBtn(vobc, active, btn)
|
||||
case "GYM": //关右门按钮
|
||||
return controlRightDoorCloseBtn(vobc, active, btn)
|
||||
case "ZF": //折返按钮
|
||||
return controlReverseBtn(vobc, active, btn)
|
||||
case "QZMYX": //强制门允许
|
||||
return controlDoorAllowBtn(vobc, active, btn)
|
||||
case "MSJJ": //模式降级按钮
|
||||
return controlModeDownBtn(vobc, active, btn)
|
||||
case "MSSJ": //模式升级按钮
|
||||
return controlModeUpBtn(vobc, active, btn)
|
||||
case "MSQR": //模式确认按钮
|
||||
return controlModeConfirmBtn(vobc, active, btn)
|
||||
case "ZAWTGJC": //障碍物/脱轨检测
|
||||
return controlObstacleDetectionBtn(vobc, active, btn)
|
||||
case "ZDZGZ": //制动重故障
|
||||
return controlBrakeHeavyBtn(vobc, active, btn)
|
||||
case "ATPSD": //ATP上电按钮
|
||||
return controlAtpPowerBtn(vobc, active, btn)
|
||||
case "HX": //唤醒按钮
|
||||
return controlWakeUpBtn(vobc, active, btn)
|
||||
case "JX": //检修按钮
|
||||
return controlOverhaulBtn(vobc, active, btn)
|
||||
case "XM": //休眠按钮
|
||||
return controlSleepBtn(vobc, active, btn)
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
_, find := findTrainTccGraphicDataButton(tccGraphic, deviceId)
|
||||
if !find {
|
||||
slog.Error("未找到对应的紧急停车摁钮,deviceId:", deviceId)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
if tcc.Ebutton == nil {
|
||||
tcc.Ebutton = &state_proto.TrainControlState_EmergentButton{Id: deviceId}
|
||||
}
|
||||
tcc.Ebutton.Passed = request.Active
|
||||
|
||||
// 应急摁钮
|
||||
func controlEBBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
if !active {
|
||||
return nil
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.EmergencyBrakingStatus = true
|
||||
vobc.TractionForce = 0
|
||||
vobc.BrakeForce = DEFAULT_BRAKE_FORCE
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.OUTER_EMERGENCY_BRAKE, Status: 1}, {Command: message.TRAIN_BRAKE_STATE, Status: 1}} //紧急制动
|
||||
//return []train_pc_sim.TrainControlEvent{{Command: message.CONFIRM, Status: 1}} //紧急制动
|
||||
}
|
||||
|
||||
// atp 切除
|
||||
func controlAtpBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
vobc.AtpCutSwitch = active
|
||||
tccBtn.Passed = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.ATP_CUT, Status: status}} //紧急制动
|
||||
}
|
||||
|
||||
// 外部紧急制动反馈
|
||||
func controlOutEbReportBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
vobc.OuterEmergentBrakeReport = active
|
||||
tccBtn.Passed = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.OUTER_EMERGENCY_BRAKE, Status: status}} //紧急制动
|
||||
}
|
||||
|
||||
// 开左门按钮
|
||||
func controlLeftDoorBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
vobc.LeftDoorOpenCommand = active
|
||||
tccBtn.Passed = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.LEFT_OPEN_DOOR, Status: status}}
|
||||
}
|
||||
|
||||
// 关左门按钮
|
||||
func controlLeftDoorCloseBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
vobc.LeftDoorCloseCommand = active
|
||||
tccBtn.Passed = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.CLOSE_LEFT_DOOR, Status: status}}
|
||||
}
|
||||
|
||||
// 开右门
|
||||
func controlRightDoorBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
vobc.RightDoorOpenCommand = active
|
||||
tccBtn.Passed = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.OPEN_RIGHT_DOOR, Status: status}}
|
||||
}
|
||||
|
||||
// 关右门按钮
|
||||
func controlRightDoorCloseBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
vobc.RightDoorCloseCommand = active
|
||||
tccBtn.Passed = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.CLOSE_RIGHT_DOOR, Status: status}}
|
||||
}
|
||||
|
||||
// 折返
|
||||
func controlReverseBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
//vobc.RightDoorCloseCommand = active
|
||||
tccBtn.Passed = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.TURN_BACK, Status: status}}
|
||||
}
|
||||
|
||||
// 强制门允许
|
||||
func controlDoorAllowBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.ForceDoorAllow = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.FORCE_DOOR_ALLOW, Status: status}}
|
||||
}
|
||||
|
||||
// 模式降级按钮
|
||||
func controlModeDownBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.ModeLevelDownBtn = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.TRAIN_MODE_DOWN, Status: status}}
|
||||
}
|
||||
|
||||
// 模式升级按钮
|
||||
func controlModeUpBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.ModeLevelUpBtn = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.TRAIN_MODE_UP, Status: status}}
|
||||
}
|
||||
|
||||
// 模式确认按钮
|
||||
func controlModeConfirmBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.ConfirmBtn = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.CONFIRM, Status: status}}
|
||||
}
|
||||
|
||||
// 障碍物/脱轨检测
|
||||
func controlObstacleDetectionBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.ObstacleCheckBtn = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.OBSTACLE_CHECK, Status: status}}
|
||||
}
|
||||
|
||||
// 制动重故障
|
||||
func controlBrakeHeavyBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.BrakeHeavyFault = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.BRAKE_HEAVY_FAULT, Status: status}}
|
||||
}
|
||||
|
||||
// ATP上电按钮
|
||||
func controlAtpPowerBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.AtpPowerOnBtn = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.ATP_POWER_ON, Status: status}}
|
||||
}
|
||||
|
||||
// 唤醒按钮
|
||||
func controlWakeUpBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.WakeUpBtn = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.WAKE_UP, Status: status}}
|
||||
}
|
||||
|
||||
// 检修按钮
|
||||
func controlOverhaulBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.OverhaulBtn = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.OVERHAUL, Status: status}}
|
||||
}
|
||||
|
||||
// 休眠按钮
|
||||
func controlSleepBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []train_pc_sim.TrainControlEvent {
|
||||
var status byte = 0
|
||||
if active {
|
||||
status = 1
|
||||
}
|
||||
tccBtn.Passed = active
|
||||
vobc.SleepBtn = active
|
||||
return []train_pc_sim.TrainControlEvent{{Command: message.SLEEP, Status: status}}
|
||||
}
|
||||
|
||||
// 列车方向
|
||||
@ -174,6 +411,16 @@ func trainControlHandle(vobc *state_proto.TrainVobcState, tcc *state_proto.Train
|
||||
slog.Error("未找到对应的牵引制动手柄设备deviceId:", deviceId)
|
||||
return nil
|
||||
}
|
||||
jjzdBtnGraphic, jjzdOk := findTrainTccGraphicDataButtonByCode(tccGraphic, JJZD)
|
||||
if !jjzdOk {
|
||||
slog.Error("未找到紧急停车摁钮 code:", JJZD)
|
||||
return nil
|
||||
}
|
||||
jjzdBtn, finder := findBtnFromTccByDeviceId(tcc.Buttons, jjzdBtnGraphic.Common.Id)
|
||||
if !finder {
|
||||
slog.Error("从列车控制数据中未找到紧急停车摁钮 code:", JJZD, "deviceId:", jjzdBtn.Id)
|
||||
return nil
|
||||
}
|
||||
vobc.TractionStatus = false
|
||||
vobc.TractionForce = 0
|
||||
vobc.BrakingStatus = false
|
||||
@ -186,12 +433,12 @@ func trainControlHandle(vobc *state_proto.TrainVobcState, tcc *state_proto.Train
|
||||
vobc.TractionForce = int64(request.Val * 180)
|
||||
tce = append(tce, train_pc_sim.TrainControlEvent{Command: message.TRAIN_BRAKE_STATE, Status: 0})
|
||||
} else if request.Val < 0 {
|
||||
|
||||
vobc.BrakingStatus = true
|
||||
vobc.BrakeForce = int64(-request.Val * 180)
|
||||
vobc.EmergencyBrakingStatus = false
|
||||
if tcc.Ebutton != nil {
|
||||
tcc.Ebutton.Passed = false
|
||||
}
|
||||
jjzdBtn.Passed = false
|
||||
|
||||
tce = append(tce, train_pc_sim.TrainControlEvent{Command: message.TRAIN_BRAKE_STATE, Status: 1})
|
||||
tce = append(tce, train_pc_sim.TrainControlEvent{Command: message.OUTER_EMERGENCY_BRAKE, Status: 0})
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user