列车pc仿真调整
All checks were successful
local-test分支打包构建docker并发布运行 / Docker-Build (push) Successful in 1m41s
All checks were successful
local-test分支打包构建docker并发布运行 / Docker-Build (push) Successful in 1m41s
This commit is contained in:
parent
7de95e55f2
commit
225279dbd2
@ -354,7 +354,7 @@ func controlTrain(c *gin.Context) {
|
||||
panic(sys_error.New("修改列车控制参数失败,请求参数异常", err))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(req.SimulationId)
|
||||
simulation.ControlTrainUpdate(req)
|
||||
memory.ControlTrainUpdate(simulation, req)
|
||||
c.JSON(http.StatusOK, "ok")
|
||||
}
|
||||
|
||||
|
@ -20,52 +20,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type DriverType int32
|
||||
|
||||
const (
|
||||
DriverType_ONE_END DriverType = 0
|
||||
DriverType_TWO_END DriverType = 1
|
||||
)
|
||||
|
||||
// Enum value maps for DriverType.
|
||||
var (
|
||||
DriverType_name = map[int32]string{
|
||||
0: "ONE_END",
|
||||
1: "TWO_END",
|
||||
}
|
||||
DriverType_value = map[string]int32{
|
||||
"ONE_END": 0,
|
||||
"TWO_END": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x DriverType) Enum() *DriverType {
|
||||
p := new(DriverType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x DriverType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (DriverType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (DriverType) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x DriverType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DriverType.Descriptor instead.
|
||||
func (DriverType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// 继电器操作
|
||||
type Relay_Operation int32
|
||||
|
||||
@ -103,11 +57,11 @@ func (x Relay_Operation) String() string {
|
||||
}
|
||||
|
||||
func (Relay_Operation) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[1].Descriptor()
|
||||
return file_request_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Relay_Operation) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[1]
|
||||
return &file_request_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x Relay_Operation) Number() protoreflect.EnumNumber {
|
||||
@ -150,11 +104,11 @@ func (x Points_Operation) String() string {
|
||||
}
|
||||
|
||||
func (Points_Operation) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[2].Descriptor()
|
||||
return file_request_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (Points_Operation) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[2]
|
||||
return &file_request_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x Points_Operation) Number() protoreflect.EnumNumber {
|
||||
@ -203,11 +157,11 @@ func (x Points_Force) String() string {
|
||||
}
|
||||
|
||||
func (Points_Force) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[3].Descriptor()
|
||||
return file_request_proto_enumTypes[2].Descriptor()
|
||||
}
|
||||
|
||||
func (Points_Force) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[3]
|
||||
return &file_request_proto_enumTypes[2]
|
||||
}
|
||||
|
||||
func (x Points_Force) Number() protoreflect.EnumNumber {
|
||||
@ -250,11 +204,11 @@ func (x Signal_Operation) String() string {
|
||||
}
|
||||
|
||||
func (Signal_Operation) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[4].Descriptor()
|
||||
return file_request_proto_enumTypes[3].Descriptor()
|
||||
}
|
||||
|
||||
func (Signal_Operation) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[4]
|
||||
return &file_request_proto_enumTypes[3]
|
||||
}
|
||||
|
||||
func (x Signal_Operation) Number() protoreflect.EnumNumber {
|
||||
@ -305,11 +259,11 @@ func (x Signal_DS) String() string {
|
||||
}
|
||||
|
||||
func (Signal_DS) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[5].Descriptor()
|
||||
return file_request_proto_enumTypes[4].Descriptor()
|
||||
}
|
||||
|
||||
func (Signal_DS) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[5]
|
||||
return &file_request_proto_enumTypes[4]
|
||||
}
|
||||
|
||||
func (x Signal_DS) Number() protoreflect.EnumNumber {
|
||||
@ -370,11 +324,11 @@ func (x Signal_Force) String() string {
|
||||
}
|
||||
|
||||
func (Signal_Force) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[6].Descriptor()
|
||||
return file_request_proto_enumTypes[5].Descriptor()
|
||||
}
|
||||
|
||||
func (Signal_Force) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[6]
|
||||
return &file_request_proto_enumTypes[5]
|
||||
}
|
||||
|
||||
func (x Signal_Force) Number() protoreflect.EnumNumber {
|
||||
@ -424,11 +378,11 @@ func (x Section_Operation) String() string {
|
||||
}
|
||||
|
||||
func (Section_Operation) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[7].Descriptor()
|
||||
return file_request_proto_enumTypes[6].Descriptor()
|
||||
}
|
||||
|
||||
func (Section_Operation) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[7]
|
||||
return &file_request_proto_enumTypes[6]
|
||||
}
|
||||
|
||||
func (x Section_Operation) Number() protoreflect.EnumNumber {
|
||||
@ -470,11 +424,11 @@ func (x Psd_Operation) String() string {
|
||||
}
|
||||
|
||||
func (Psd_Operation) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[8].Descriptor()
|
||||
return file_request_proto_enumTypes[7].Descriptor()
|
||||
}
|
||||
|
||||
func (Psd_Operation) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[8]
|
||||
return &file_request_proto_enumTypes[7]
|
||||
}
|
||||
|
||||
func (x Psd_Operation) Number() protoreflect.EnumNumber {
|
||||
@ -519,11 +473,11 @@ func (x Psd_Force) String() string {
|
||||
}
|
||||
|
||||
func (Psd_Force) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[9].Descriptor()
|
||||
return file_request_proto_enumTypes[8].Descriptor()
|
||||
}
|
||||
|
||||
func (Psd_Force) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[9]
|
||||
return &file_request_proto_enumTypes[8]
|
||||
}
|
||||
|
||||
func (x Psd_Force) Number() protoreflect.EnumNumber {
|
||||
@ -565,11 +519,11 @@ func (x Psd_Fault) String() string {
|
||||
}
|
||||
|
||||
func (Psd_Fault) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[10].Descriptor()
|
||||
return file_request_proto_enumTypes[9].Descriptor()
|
||||
}
|
||||
|
||||
func (Psd_Fault) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[10]
|
||||
return &file_request_proto_enumTypes[9]
|
||||
}
|
||||
|
||||
func (x Psd_Fault) Number() protoreflect.EnumNumber {
|
||||
@ -617,11 +571,11 @@ func (x TrainControl_TrainControlType) String() string {
|
||||
}
|
||||
|
||||
func (TrainControl_TrainControlType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[11].Descriptor()
|
||||
return file_request_proto_enumTypes[10].Descriptor()
|
||||
}
|
||||
|
||||
func (TrainControl_TrainControlType) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[11]
|
||||
return &file_request_proto_enumTypes[10]
|
||||
}
|
||||
|
||||
func (x TrainControl_TrainControlType) Number() protoreflect.EnumNumber {
|
||||
@ -663,11 +617,11 @@ func (x Ckm_Operation) String() string {
|
||||
}
|
||||
|
||||
func (Ckm_Operation) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[12].Descriptor()
|
||||
return file_request_proto_enumTypes[11].Descriptor()
|
||||
}
|
||||
|
||||
func (Ckm_Operation) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[12]
|
||||
return &file_request_proto_enumTypes[11]
|
||||
}
|
||||
|
||||
func (x Ckm_Operation) Number() protoreflect.EnumNumber {
|
||||
@ -712,11 +666,11 @@ func (x Ckm_Force) String() string {
|
||||
}
|
||||
|
||||
func (Ckm_Force) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[13].Descriptor()
|
||||
return file_request_proto_enumTypes[12].Descriptor()
|
||||
}
|
||||
|
||||
func (Ckm_Force) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[13]
|
||||
return &file_request_proto_enumTypes[12]
|
||||
}
|
||||
|
||||
func (x Ckm_Force) Number() protoreflect.EnumNumber {
|
||||
@ -758,11 +712,11 @@ func (x Ckm_Fault) String() string {
|
||||
}
|
||||
|
||||
func (Ckm_Fault) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[14].Descriptor()
|
||||
return file_request_proto_enumTypes[13].Descriptor()
|
||||
}
|
||||
|
||||
func (Ckm_Fault) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[14]
|
||||
return &file_request_proto_enumTypes[13]
|
||||
}
|
||||
|
||||
func (x Ckm_Fault) Number() protoreflect.EnumNumber {
|
||||
@ -804,11 +758,11 @@ func (x Xcj_Operation) String() string {
|
||||
}
|
||||
|
||||
func (Xcj_Operation) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[15].Descriptor()
|
||||
return file_request_proto_enumTypes[14].Descriptor()
|
||||
}
|
||||
|
||||
func (Xcj_Operation) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[15]
|
||||
return &file_request_proto_enumTypes[14]
|
||||
}
|
||||
|
||||
func (x Xcj_Operation) Number() protoreflect.EnumNumber {
|
||||
@ -850,11 +804,11 @@ func (x Xcj_Fault) String() string {
|
||||
}
|
||||
|
||||
func (Xcj_Fault) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[16].Descriptor()
|
||||
return file_request_proto_enumTypes[15].Descriptor()
|
||||
}
|
||||
|
||||
func (Xcj_Fault) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[16]
|
||||
return &file_request_proto_enumTypes[15]
|
||||
}
|
||||
|
||||
func (x Xcj_Fault) Number() protoreflect.EnumNumber {
|
||||
@ -2167,8 +2121,7 @@ type TrainControl_DriverKeySwitch struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Val bool `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"` //0=关,1=开
|
||||
Dt DriverType `protobuf:"varint,2,opt,name=dt,proto3,enum=request.DriverType" json:"dt,omitempty"`
|
||||
Val bool `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"` //0=关,1=开
|
||||
}
|
||||
|
||||
func (x *TrainControl_DriverKeySwitch) Reset() {
|
||||
@ -2210,13 +2163,6 @@ func (x *TrainControl_DriverKeySwitch) GetVal() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *TrainControl_DriverKeySwitch) GetDt() DriverType {
|
||||
if x != nil {
|
||||
return x.Dt
|
||||
}
|
||||
return DriverType_ONE_END
|
||||
}
|
||||
|
||||
type TrainControl_DirectionKeySwitch struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -2440,7 +2386,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, 0xd8, 0x05, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x74, 0x22, 0xb3, 0x05, 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,
|
||||
@ -2470,77 +2416,72 @@ var file_request_proto_rawDesc = []byte{
|
||||
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, 0x48, 0x0a, 0x0f, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x53,
|
||||
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, 0x12, 0x23, 0x0a, 0x02, 0x64, 0x74, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x72,
|
||||
0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x02, 0x64, 0x74, 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, 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, 0x2a,
|
||||
0x26, 0x0a, 0x0a, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a,
|
||||
0x07, 0x4f, 0x4e, 0x45, 0x5f, 0x45, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x57,
|
||||
0x4f, 0x5f, 0x45, 0x4e, 0x44, 0x10, 0x01, 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,
|
||||
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, 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 (
|
||||
@ -2555,85 +2496,83 @@ func file_request_proto_rawDescGZIP() []byte {
|
||||
return file_request_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_request_proto_enumTypes = make([]protoimpl.EnumInfo, 17)
|
||||
var file_request_proto_enumTypes = make([]protoimpl.EnumInfo, 16)
|
||||
var file_request_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
|
||||
var file_request_proto_goTypes = []interface{}{
|
||||
(DriverType)(0), // 0: request.DriverType
|
||||
(Relay_Operation)(0), // 1: request.Relay.Operation
|
||||
(Points_Operation)(0), // 2: request.Points.Operation
|
||||
(Points_Force)(0), // 3: request.Points.Force
|
||||
(Signal_Operation)(0), // 4: request.Signal.Operation
|
||||
(Signal_DS)(0), // 5: request.Signal.DS
|
||||
(Signal_Force)(0), // 6: request.Signal.Force
|
||||
(Section_Operation)(0), // 7: request.Section.Operation
|
||||
(Psd_Operation)(0), // 8: request.Psd.Operation
|
||||
(Psd_Force)(0), // 9: request.Psd.Force
|
||||
(Psd_Fault)(0), // 10: request.Psd.Fault
|
||||
(TrainControl_TrainControlType)(0), // 11: request.TrainControl.TrainControlType
|
||||
(Ckm_Operation)(0), // 12: request.Ckm.Operation
|
||||
(Ckm_Force)(0), // 13: request.Ckm.Force
|
||||
(Ckm_Fault)(0), // 14: request.Ckm.Fault
|
||||
(Xcj_Operation)(0), // 15: request.Xcj.Operation
|
||||
(Xcj_Fault)(0), // 16: request.Xcj.Fault
|
||||
(*Relay)(nil), // 17: request.Relay
|
||||
(*RelayOperationReq)(nil), // 18: request.RelayOperationReq
|
||||
(*Points)(nil), // 19: request.Points
|
||||
(*PointsOperationReq)(nil), // 20: request.PointsOperationReq
|
||||
(*PointsParam)(nil), // 21: request.PointsParam
|
||||
(*Signal)(nil), // 22: request.Signal
|
||||
(*SignalOperationReq)(nil), // 23: request.SignalOperationReq
|
||||
(*SignalParam)(nil), // 24: request.SignalParam
|
||||
(*Section)(nil), // 25: request.Section
|
||||
(*SectionOperationReq)(nil), // 26: request.SectionOperationReq
|
||||
(*SectionParam)(nil), // 27: request.SectionParam
|
||||
(*Psd)(nil), // 28: request.Psd
|
||||
(*PsdOperationReq)(nil), // 29: request.PsdOperationReq
|
||||
(*PsdParam)(nil), // 30: request.PsdParam
|
||||
(*TrainControl)(nil), // 31: request.TrainControl
|
||||
(*CkmOperationReq)(nil), // 32: request.CkmOperationReq
|
||||
(*Ckm)(nil), // 33: request.Ckm
|
||||
(*CkmParam)(nil), // 34: request.CkmParam
|
||||
(*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
|
||||
(Relay_Operation)(0), // 0: request.Relay.Operation
|
||||
(Points_Operation)(0), // 1: request.Points.Operation
|
||||
(Points_Force)(0), // 2: request.Points.Force
|
||||
(Signal_Operation)(0), // 3: request.Signal.Operation
|
||||
(Signal_DS)(0), // 4: request.Signal.DS
|
||||
(Signal_Force)(0), // 5: request.Signal.Force
|
||||
(Section_Operation)(0), // 6: request.Section.Operation
|
||||
(Psd_Operation)(0), // 7: request.Psd.Operation
|
||||
(Psd_Force)(0), // 8: request.Psd.Force
|
||||
(Psd_Fault)(0), // 9: request.Psd.Fault
|
||||
(TrainControl_TrainControlType)(0), // 10: request.TrainControl.TrainControlType
|
||||
(Ckm_Operation)(0), // 11: request.Ckm.Operation
|
||||
(Ckm_Force)(0), // 12: request.Ckm.Force
|
||||
(Ckm_Fault)(0), // 13: request.Ckm.Fault
|
||||
(Xcj_Operation)(0), // 14: request.Xcj.Operation
|
||||
(Xcj_Fault)(0), // 15: request.Xcj.Fault
|
||||
(*Relay)(nil), // 16: request.Relay
|
||||
(*RelayOperationReq)(nil), // 17: request.RelayOperationReq
|
||||
(*Points)(nil), // 18: request.Points
|
||||
(*PointsOperationReq)(nil), // 19: request.PointsOperationReq
|
||||
(*PointsParam)(nil), // 20: request.PointsParam
|
||||
(*Signal)(nil), // 21: request.Signal
|
||||
(*SignalOperationReq)(nil), // 22: request.SignalOperationReq
|
||||
(*SignalParam)(nil), // 23: request.SignalParam
|
||||
(*Section)(nil), // 24: request.Section
|
||||
(*SectionOperationReq)(nil), // 25: request.SectionOperationReq
|
||||
(*SectionParam)(nil), // 26: request.SectionParam
|
||||
(*Psd)(nil), // 27: request.Psd
|
||||
(*PsdOperationReq)(nil), // 28: request.PsdOperationReq
|
||||
(*PsdParam)(nil), // 29: request.PsdParam
|
||||
(*TrainControl)(nil), // 30: request.TrainControl
|
||||
(*CkmOperationReq)(nil), // 31: request.CkmOperationReq
|
||||
(*Ckm)(nil), // 32: request.Ckm
|
||||
(*CkmParam)(nil), // 33: request.CkmParam
|
||||
(*XcjOperationReq)(nil), // 34: request.XcjOperationReq
|
||||
(*Xcj)(nil), // 35: request.Xcj
|
||||
(*XcjParam)(nil), // 36: request.XcjParam
|
||||
(*TrainControl_EmergentButton)(nil), // 37: request.TrainControl.EmergentButton
|
||||
(*TrainControl_DriverKeySwitch)(nil), // 38: request.TrainControl.DriverKeySwitch
|
||||
(*TrainControl_DirectionKeySwitch)(nil), // 39: request.TrainControl.DirectionKeySwitch
|
||||
(*TrainControl_PushHandler)(nil), // 40: request.TrainControl.PushHandler
|
||||
}
|
||||
var file_request_proto_depIdxs = []int32{
|
||||
1, // 0: request.RelayOperationReq.operation:type_name -> request.Relay.Operation
|
||||
2, // 1: request.PointsOperationReq.operation:type_name -> request.Points.Operation
|
||||
21, // 2: request.PointsOperationReq.param:type_name -> request.PointsParam
|
||||
3, // 3: request.PointsParam.forcePosition:type_name -> request.Points.Force
|
||||
4, // 4: request.SignalOperationReq.operation:type_name -> request.Signal.Operation
|
||||
24, // 5: request.SignalOperationReq.param:type_name -> request.SignalParam
|
||||
6, // 6: request.SignalParam.force:type_name -> request.Signal.Force
|
||||
5, // 7: request.SignalParam.dsList:type_name -> request.Signal.DS
|
||||
7, // 8: request.SectionOperationReq.operation:type_name -> request.Section.Operation
|
||||
27, // 9: request.SectionOperationReq.param:type_name -> request.SectionParam
|
||||
8, // 10: request.PsdOperationReq.operation:type_name -> request.Psd.Operation
|
||||
30, // 11: request.PsdOperationReq.param:type_name -> request.PsdParam
|
||||
9, // 12: request.PsdParam.force:type_name -> request.Psd.Force
|
||||
10, // 13: request.PsdParam.fault:type_name -> request.Psd.Fault
|
||||
11, // 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
|
||||
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
|
||||
14, // 22: request.CkmParam.fault:type_name -> request.Ckm.Fault
|
||||
15, // 23: request.XcjOperationReq.operation:type_name -> request.Xcj.Operation
|
||||
37, // 24: request.XcjOperationReq.param:type_name -> request.XcjParam
|
||||
16, // 25: request.XcjParam.fault:type_name -> request.Xcj.Fault
|
||||
0, // 26: request.TrainControl.DriverKeySwitch.dt:type_name -> request.DriverType
|
||||
27, // [27:27] is the sub-list for method output_type
|
||||
27, // [27:27] is the sub-list for method input_type
|
||||
27, // [27:27] is the sub-list for extension type_name
|
||||
27, // [27:27] is the sub-list for extension extendee
|
||||
0, // [0:27] is the sub-list for field type_name
|
||||
0, // 0: request.RelayOperationReq.operation:type_name -> request.Relay.Operation
|
||||
1, // 1: request.PointsOperationReq.operation:type_name -> request.Points.Operation
|
||||
20, // 2: request.PointsOperationReq.param:type_name -> request.PointsParam
|
||||
2, // 3: request.PointsParam.forcePosition:type_name -> request.Points.Force
|
||||
3, // 4: request.SignalOperationReq.operation:type_name -> request.Signal.Operation
|
||||
23, // 5: request.SignalOperationReq.param:type_name -> request.SignalParam
|
||||
5, // 6: request.SignalParam.force:type_name -> request.Signal.Force
|
||||
4, // 7: request.SignalParam.dsList:type_name -> request.Signal.DS
|
||||
6, // 8: request.SectionOperationReq.operation:type_name -> request.Section.Operation
|
||||
26, // 9: request.SectionOperationReq.param:type_name -> request.SectionParam
|
||||
7, // 10: request.PsdOperationReq.operation:type_name -> request.Psd.Operation
|
||||
29, // 11: request.PsdOperationReq.param:type_name -> request.PsdParam
|
||||
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
|
||||
37, // 15: request.TrainControl.button:type_name -> request.TrainControl.EmergentButton
|
||||
38, // 16: request.TrainControl.driverKey:type_name -> request.TrainControl.DriverKeySwitch
|
||||
39, // 17: request.TrainControl.dirKey:type_name -> request.TrainControl.DirectionKeySwitch
|
||||
40, // 18: request.TrainControl.handler:type_name -> request.TrainControl.PushHandler
|
||||
11, // 19: request.CkmOperationReq.operation:type_name -> request.Ckm.Operation
|
||||
33, // 20: request.CkmOperationReq.param:type_name -> request.CkmParam
|
||||
12, // 21: request.CkmParam.force:type_name -> request.Ckm.Force
|
||||
13, // 22: request.CkmParam.fault:type_name -> request.Ckm.Fault
|
||||
14, // 23: request.XcjOperationReq.operation:type_name -> request.Xcj.Operation
|
||||
36, // 24: request.XcjOperationReq.param:type_name -> request.XcjParam
|
||||
15, // 25: request.XcjParam.fault:type_name -> request.Xcj.Fault
|
||||
26, // [26:26] is the sub-list for method output_type
|
||||
26, // [26:26] is the sub-list for method input_type
|
||||
26, // [26:26] is the sub-list for extension type_name
|
||||
26, // [26:26] is the sub-list for extension extendee
|
||||
0, // [0:26] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_request_proto_init() }
|
||||
@ -2948,7 +2887,7 @@ func file_request_proto_init() {
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_request_proto_rawDesc,
|
||||
NumEnums: 17,
|
||||
NumEnums: 16,
|
||||
NumMessages: 25,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
|
87
ts/simulation/wayside/memory/train_tcc_graphic.go
Normal file
87
ts/simulation/wayside/memory/train_tcc_graphic.go
Normal file
@ -0,0 +1,87 @@
|
||||
package memory
|
||||
|
||||
import (
|
||||
"joylink.club/bj-rtsts-server/dto/data_proto"
|
||||
"joylink.club/bj-rtsts-server/dto/state_proto"
|
||||
"joylink.club/bj-rtsts-server/third_party/message"
|
||||
)
|
||||
|
||||
// 获取列车控制图形数据
|
||||
func findTrainTccGraphicData(vs *VerifySimulation) *data_proto.TccGraphicStorage {
|
||||
var tccGI *data_proto.TccGraphicStorage
|
||||
for _, id := range vs.MapIds {
|
||||
if QueryGiType(id) == data_proto.PictureType_TrainControlCab {
|
||||
tccGI = QueryGiData[*data_proto.TccGraphicStorage](id)
|
||||
break
|
||||
}
|
||||
}
|
||||
return tccGI
|
||||
}
|
||||
func findTrainTccGraphicDataButtons(tccG *data_proto.TccGraphicStorage) []*data_proto.TccButton {
|
||||
return tccG.TccButtons
|
||||
}
|
||||
func findTrainTccGraphicDataKeys(tccG *data_proto.TccGraphicStorage) []*data_proto.TccKey {
|
||||
return tccG.TccKeys
|
||||
}
|
||||
func findTrainTccGraphicDataHandlers(tccG *data_proto.TccGraphicStorage) []*data_proto.TccHandle {
|
||||
return tccG.TccHandles
|
||||
}
|
||||
func findTrainTccGraphicDataButton(tccG *data_proto.TccGraphicStorage, id uint32) (*data_proto.TccButton, bool) {
|
||||
for _, d := range findTrainTccGraphicDataButtons(tccG) {
|
||||
if d.Common.Id == id {
|
||||
return d, true
|
||||
}
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
func findTrainTccGraphicDataKey(tccG *data_proto.TccGraphicStorage, id uint32) (*data_proto.TccKey, bool) {
|
||||
for _, d := range findTrainTccGraphicDataKeys(tccG) {
|
||||
if d.Common.Id == id {
|
||||
return d, true
|
||||
}
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
func findTrainTccGraphicDataHandler(tccG *data_proto.TccGraphicStorage, id uint32) (*data_proto.TccHandle, bool) {
|
||||
for _, d := range findTrainTccGraphicDataHandlers(tccG) {
|
||||
if d.Common.Id == id {
|
||||
return d, true
|
||||
}
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// 初始化列车控制数据
|
||||
func initTrainTcc(vs *VerifySimulation, runDir bool) *state_proto.TrainControlState {
|
||||
var tccGI *data_proto.TccGraphicStorage
|
||||
for _, id := range vs.MapIds {
|
||||
if QueryGiType(id) == data_proto.PictureType_TrainControlCab {
|
||||
tccGI = QueryGiData[*data_proto.TccGraphicStorage](id)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
tcc := &state_proto.TrainControlState{}
|
||||
if tccGI != nil {
|
||||
for _, b := range tccGI.TccButtons {
|
||||
if b.Code == "JJZD" {
|
||||
tcc.Ebutton = &state_proto.TrainControlState_EmergentButton{Id: b.Common.Id, Passed: false}
|
||||
}
|
||||
}
|
||||
for _, b := range tccGI.TccHandles {
|
||||
if b.Code == "QYSB" {
|
||||
tcc.PushHandler = &state_proto.TrainControlState_PushHandler{Id: b.Common.Id, Val: 0}
|
||||
}
|
||||
}
|
||||
ds := make([]*state_proto.TrainControlState_DriverKeySwitch, 0)
|
||||
for _, b := range tccGI.TccKeys {
|
||||
if b.GetType() == data_proto.TccKey_driverControllerActivationClint {
|
||||
ds = append(ds, &state_proto.TrainControlState_DriverKeySwitch{Id: b.Common.Id, Val: false})
|
||||
} else if b.GetType() == data_proto.TccKey_frontAndRearDirectionalControl {
|
||||
tcc.DirKey = &state_proto.TrainControlState_DirectionKeySwitch{Id: b.Common.Id, Val: uint32(message.IsTrue(runDir))}
|
||||
}
|
||||
}
|
||||
tcc.DriverKey = ds
|
||||
}
|
||||
return tcc
|
||||
}
|
@ -66,9 +66,9 @@ func PublishMapVerifyStructure(graphic *dto.PublishedDto) {
|
||||
case data_proto.PictureType_IBP:
|
||||
graphicStorage := message.(*data_proto.IBPGraphicStorage)
|
||||
giUidMap.Store(graphic.ID, initIBPUid(graphicStorage))
|
||||
case data_proto.PictureType_TrainControlCab:
|
||||
graphicStorage := message.(*data_proto.TccGraphicStorage)
|
||||
giUidMap.Store(graphic.ID, initTccUid(graphicStorage))
|
||||
/* case data_proto.PictureType_TrainControlCab:
|
||||
graphicStorage := message.(*data_proto.TccGraphicStorage)
|
||||
giUidMap.Store(graphic.ID, initTccUid(graphicStorage))*/
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,40 +33,6 @@ func CreateMsgTrainConfig(trainId int, trainLen int64, configTrainData dto.Confi
|
||||
StopSign: int(configTrainData.StopSign)}
|
||||
}
|
||||
|
||||
func initTrainTcc(vs *VerifySimulation, runDir bool) *state_proto.TrainControlState {
|
||||
var tccGI *data_proto.TccGraphicStorage
|
||||
for _, id := range vs.MapIds {
|
||||
if QueryGiType(id) == data_proto.PictureType_TrainControlCab {
|
||||
tccGI = QueryGiData[*data_proto.TccGraphicStorage](id)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
tcc := &state_proto.TrainControlState{}
|
||||
if tccGI != nil {
|
||||
for _, b := range tccGI.TccButtons {
|
||||
if b.Code == "JJZD" {
|
||||
tcc.Ebutton = &state_proto.TrainControlState_EmergentButton{Id: b.Common.Id, Passed: false}
|
||||
}
|
||||
}
|
||||
for _, b := range tccGI.TccHandles {
|
||||
if b.Code == "QYSB" {
|
||||
tcc.PushHandler = &state_proto.TrainControlState_PushHandler{Id: b.Common.Id, Val: 0}
|
||||
}
|
||||
}
|
||||
ds := make([]*state_proto.TrainControlState_DriverKeySwitch, 0)
|
||||
for _, b := range tccGI.TccKeys {
|
||||
if b.GetType() == data_proto.TccKey_driverControllerActivationClint {
|
||||
ds = append(ds, &state_proto.TrainControlState_DriverKeySwitch{Id: b.Common.Id, Val: false})
|
||||
} else if b.GetType() == data_proto.TccKey_frontAndRearDirectionalControl {
|
||||
tcc.DirKey = &state_proto.TrainControlState_DirectionKeySwitch{Id: b.Common.Id, Val: uint32(message.IsTrue(runDir))}
|
||||
}
|
||||
}
|
||||
tcc.DriverKey = ds
|
||||
}
|
||||
return tcc
|
||||
}
|
||||
|
||||
// 增加列车状态
|
||||
func AddTrainStateNew(vs *VerifySimulation, status *state_proto.TrainState, configTrainData dto.ConfigTrainData, trainEndsA dto.ConfigTrainEnds,
|
||||
trainEndsB dto.ConfigTrainEnds, mapId int32) *sys_error.BusinessError {
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"fmt"
|
||||
"joylink.club/bj-rtsts-server/config"
|
||||
"joylink.club/bj-rtsts-server/const/balise_const"
|
||||
"joylink.club/bj-rtsts-server/dto/data_proto"
|
||||
"joylink.club/bj-rtsts-server/dto/request_proto"
|
||||
"joylink.club/bj-rtsts-server/dto/state_proto"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
@ -24,41 +25,48 @@ func (s *VerifySimulation) GetTrainPcSimConfig() config.VehiclePCSimConfig {
|
||||
}
|
||||
|
||||
// 列车控制
|
||||
func (s *VerifySimulation) ControlTrainUpdate(ct *request_proto.TrainControl) {
|
||||
func ControlTrainUpdate(s *VerifySimulation, ct *request_proto.TrainControl) {
|
||||
allTrainMap := &s.Memory.Status.TrainStateMap
|
||||
data, ok := allTrainMap.Load(ct.TrainId)
|
||||
if !ok {
|
||||
panic(sys_error.New(fmt.Sprintf("列车【%s】不存在", ct.TrainId)))
|
||||
}
|
||||
tccGraphicData := findTrainTccGraphicData(s)
|
||||
if tccGraphicData == nil {
|
||||
slog.Error("列车控制未找到TCC图形数据")
|
||||
panic(sys_error.New("未找到TCC图形数据"))
|
||||
}
|
||||
sta := data.(*state_proto.TrainState)
|
||||
var tce []train_pc_sim.TrainControlEvent = nil
|
||||
if ct.ControlType == request_proto.TrainControl_EMERGENT_BUTTON {
|
||||
trainControlEB(sta, ct.Button, ct.DeviceId)
|
||||
trainControlEB(sta, ct.Button, ct.DeviceId, tccGraphicData)
|
||||
} else if ct.ControlType == request_proto.TrainControl_DRIVER_KEY_SWITCH {
|
||||
tce = trainControlDriverKey(sta, ct.DriverKey, ct.DeviceId)
|
||||
tce = trainControlDriverKey(sta, ct.DriverKey, ct.DeviceId, tccGraphicData)
|
||||
train_pc_sim.Default().SendDriverActive(sta.ConnState, sta.VobcState)
|
||||
|
||||
} else if ct.ControlType == request_proto.TrainControl_DIRECTION_KEY_SWITCH {
|
||||
trainControlDirKey(sta, ct.DirKey, ct.DeviceId)
|
||||
trainControlDirKey(sta, ct.DirKey, ct.DeviceId, tccGraphicData)
|
||||
} else if ct.ControlType == request_proto.TrainControl_HANDLER {
|
||||
oldTraction := sta.VobcState.TractionForce
|
||||
oldBrakeForce := sta.VobcState.BrakeForce
|
||||
tce = trainControlHandle(sta, ct.Handler, ct.DeviceId)
|
||||
tce = trainControlHandle(sta, ct.Handler, ct.DeviceId, tccGraphicData)
|
||||
train_pc_sim.Default().SendHandleSwitch(oldTraction, oldBrakeForce, sta.ConnState, sta.VobcState)
|
||||
}
|
||||
|
||||
/* if !sta.ConnState.Conn && sta.ConnState.ConnType != state_proto.TrainConnState_PC_SIM {
|
||||
slog.Error("当前列车未连接车载pc仿真,", sta.Id)
|
||||
return
|
||||
}*/
|
||||
if sta.ConnState.Conn && sta.ConnState.ConnType == state_proto.TrainConnState_PC_SIM {
|
||||
if sta.ConnState.Conn && sta.ConnState.ConnType == state_proto.TrainConnState_PC_SIM && tce != nil {
|
||||
train_pc_sim.Default().PublishTrainControlEvent(s.World, tce)
|
||||
}
|
||||
cm := &message.TrainControlMsg{TrainId: ct.TrainId, ControlInfo: sta.VobcState}
|
||||
dynamics.Default().SendTrainControl(cm)
|
||||
}
|
||||
|
||||
func trainControlEB(trainState *state_proto.TrainState, request *request_proto.TrainControl_EmergentButton, deviceId uint32) {
|
||||
func trainControlEB(trainState *state_proto.TrainState, request *request_proto.TrainControl_EmergentButton, deviceId uint32, tccGraphic *data_proto.TccGraphicStorage) {
|
||||
|
||||
_, find := findTrainTccGraphicDataButton(tccGraphic, deviceId)
|
||||
if !find {
|
||||
slog.Error("未找到对应的紧急停车摁钮,deviceId:", deviceId)
|
||||
return
|
||||
}
|
||||
trainState.VobcState.EmergencyBrakingStatus = request.Active
|
||||
if trainState.Tcc.Ebutton == nil {
|
||||
trainState.Tcc.Ebutton = &state_proto.TrainControlState_EmergentButton{Id: deviceId, Passed: request.Active}
|
||||
@ -68,7 +76,12 @@ func trainControlEB(trainState *state_proto.TrainState, request *request_proto.T
|
||||
}
|
||||
|
||||
// 列车方向
|
||||
func trainControlDirKey(trainState *state_proto.TrainState, request *request_proto.TrainControl_DirectionKeySwitch, deviceId uint32) {
|
||||
func trainControlDirKey(trainState *state_proto.TrainState, request *request_proto.TrainControl_DirectionKeySwitch, deviceId uint32, tccGraphic *data_proto.TccGraphicStorage) {
|
||||
_, find := findTrainTccGraphicDataKey(tccGraphic, deviceId)
|
||||
if !find {
|
||||
slog.Error("未找到对应的列车方向键deviceId:", deviceId)
|
||||
return
|
||||
}
|
||||
trainState.VobcState.DirectionForward = false
|
||||
trainState.VobcState.DirectionBackward = false
|
||||
trainState.RunDirection = false
|
||||
@ -90,10 +103,16 @@ func trainControlDirKey(trainState *state_proto.TrainState, request *request_pro
|
||||
}
|
||||
|
||||
// 列车驾驶端激活
|
||||
func trainControlDriverKey(trainState *state_proto.TrainState, request *request_proto.TrainControl_DriverKeySwitch, deviceId uint32) []train_pc_sim.TrainControlEvent {
|
||||
if request.Dt == request_proto.DriverType_ONE_END {
|
||||
func trainControlDriverKey(trainState *state_proto.TrainState, request *request_proto.TrainControl_DriverKeySwitch, deviceId uint32, tccGraphic *data_proto.TccGraphicStorage) []train_pc_sim.TrainControlEvent {
|
||||
obj, find := findTrainTccGraphicDataKey(tccGraphic, deviceId)
|
||||
if !find {
|
||||
slog.Error("未找到对应的驾驶端激活设备deviceId:", deviceId)
|
||||
return nil
|
||||
}
|
||||
|
||||
if obj.Code == "SKQYS1" {
|
||||
trainState.VobcState.Tc1Active = request.Val
|
||||
} else if request.Dt == request_proto.DriverType_TWO_END {
|
||||
} else if obj.Code == "SKQYS2" {
|
||||
trainState.VobcState.Tc2Active = request.Val
|
||||
}
|
||||
var addNew = true
|
||||
@ -113,7 +132,13 @@ func trainControlDriverKey(trainState *state_proto.TrainState, request *request_
|
||||
}
|
||||
|
||||
// 列车牵引控制
|
||||
func trainControlHandle(trainState *state_proto.TrainState, request *request_proto.TrainControl_PushHandler, deviceId uint32) []train_pc_sim.TrainControlEvent {
|
||||
func trainControlHandle(trainState *state_proto.TrainState, request *request_proto.TrainControl_PushHandler, deviceId uint32, tccGraphic *data_proto.TccGraphicStorage) []train_pc_sim.TrainControlEvent {
|
||||
_, find := findTrainTccGraphicDataHandler(tccGraphic, deviceId)
|
||||
if !find {
|
||||
slog.Error("未找到对应的牵引制动手柄设备deviceId:", deviceId)
|
||||
return nil
|
||||
}
|
||||
|
||||
trainState.VobcState.TractionStatus = false
|
||||
trainState.VobcState.TractionForce = 0
|
||||
trainState.VobcState.BrakingStatus = false
|
||||
@ -124,11 +149,11 @@ func trainControlHandle(trainState *state_proto.TrainState, request *request_pro
|
||||
tce = append(tce, train_pc_sim.TrainControlEvent{Command: message.HANDLE_TO_ZERO, Status: 0})
|
||||
if request.Val > 0 {
|
||||
trainState.VobcState.TractionStatus = true
|
||||
trainState.VobcState.TractionForce = int64(request.Val)
|
||||
trainState.VobcState.TractionForce = int64(request.Val * 18000)
|
||||
tce = append(tce, train_pc_sim.TrainControlEvent{Command: message.HANDLE_FORWORD, Status: 1})
|
||||
} else if request.Val < 0 {
|
||||
trainState.VobcState.BrakingStatus = true
|
||||
trainState.VobcState.BrakeForce = int64(request.Val)
|
||||
trainState.VobcState.BrakeForce = int64(request.Val * 18000)
|
||||
tce = append(tce, train_pc_sim.TrainControlEvent{Command: message.HANDLE_BACKWORD, Status: 1})
|
||||
} else {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user