列车驾驶ato牵引,制动初始版,添加列车紧急制动属性,添加ato开关门指示灯
Some checks failed
local-test分支打包构建docker并发布运行 / Docker-Build (push) Failing after 3m4s
Some checks failed
local-test分支打包构建docker并发布运行 / Docker-Build (push) Failing after 3m4s
This commit is contained in:
parent
13baeda0a0
commit
cf3d38a2f5
@ -243,13 +243,14 @@ func addTrain(c *gin.Context) {
|
|||||||
panic(sys_error.New("列车编号不能小于0,大于255"))
|
panic(sys_error.New("列车编号不能小于0,大于255"))
|
||||||
}
|
}
|
||||||
rsp := &state_proto.TrainState{
|
rsp := &state_proto.TrainState{
|
||||||
Id: fmt.Sprintf("%v", req.TrainId),
|
Id: fmt.Sprintf("%v", req.TrainId),
|
||||||
HeadDeviceId: req.Id,
|
HeadDeviceId: req.Id,
|
||||||
HeadOffset: req.HeadOffset,
|
HeadOffset: req.HeadOffset,
|
||||||
TrainLoad: req.TrainLoad,
|
TrainLoad: req.TrainLoad,
|
||||||
TrainMaxSpeed: req.TrainMaxSpeed,
|
TrainMaxSpeed: req.TrainMaxSpeed,
|
||||||
TrainMaxAcc: req.TrainMaxAcc,
|
TrainMaxAcc: req.TrainMaxAcc,
|
||||||
TrainMaxBrake: req.TrainMaxBrake,
|
TrainMaxBrake: req.TrainMaxBrake,
|
||||||
|
TrainEmergencyBrake: req.TrainEmergencyBrake,
|
||||||
//HeadOffset: 93211,
|
//HeadOffset: 93211,
|
||||||
DevicePort: req.DevicePort,
|
DevicePort: req.DevicePort,
|
||||||
TrainRunUp: req.RunDirection,
|
TrainRunUp: req.RunDirection,
|
||||||
|
@ -5293,11 +5293,12 @@ type Train struct {
|
|||||||
TrainSets string `protobuf:"bytes,6,opt,name=trainSets,proto3" json:"trainSets,omitempty"` // 编组
|
TrainSets string `protobuf:"bytes,6,opt,name=trainSets,proto3" json:"trainSets,omitempty"` // 编组
|
||||||
DynamicConfig *common_proto.TrainDynamicConfig `protobuf:"bytes,7,opt,name=dynamicConfig,proto3" json:"dynamicConfig,omitempty"` //动力学参数
|
DynamicConfig *common_proto.TrainDynamicConfig `protobuf:"bytes,7,opt,name=dynamicConfig,proto3" json:"dynamicConfig,omitempty"` //动力学参数
|
||||||
// string trainControlMapCode = 8;
|
// string trainControlMapCode = 8;
|
||||||
TrainControlMapId int32 `protobuf:"varint,9,opt,name=trainControlMapId,proto3" json:"trainControlMapId,omitempty"`
|
TrainControlMapId int32 `protobuf:"varint,9,opt,name=trainControlMapId,proto3" json:"trainControlMapId,omitempty"`
|
||||||
TrainLoad int32 `protobuf:"varint,10,opt,name=trainLoad,proto3" json:"trainLoad,omitempty"` //列车载荷(吨)
|
TrainLoad int32 `protobuf:"varint,10,opt,name=trainLoad,proto3" json:"trainLoad,omitempty"` //列车载荷(吨)
|
||||||
TrainMaxSpeed float32 `protobuf:"fixed32,11,opt,name=trainMaxSpeed,proto3" json:"trainMaxSpeed,omitempty"` //列车最大速度(km/h)
|
TrainMaxSpeed float32 `protobuf:"fixed32,11,opt,name=trainMaxSpeed,proto3" json:"trainMaxSpeed,omitempty"` //列车最大速度(km/h)
|
||||||
TrainMaxAcc float32 `protobuf:"fixed32,12,opt,name=trainMaxAcc,proto3" json:"trainMaxAcc,omitempty"` //列车最大加速度(m/s^2)
|
TrainMaxAcc float32 `protobuf:"fixed32,12,opt,name=trainMaxAcc,proto3" json:"trainMaxAcc,omitempty"` //列车最大加速度(m/s^2)
|
||||||
TrainMaxBrake float32 `protobuf:"fixed32,13,opt,name=trainMaxBrake,proto3" json:"trainMaxBrake,omitempty"` //列车最大减速度(m/s^2)
|
TrainMaxBrake float32 `protobuf:"fixed32,13,opt,name=trainMaxBrake,proto3" json:"trainMaxBrake,omitempty"` //列车常用最大减速度(m/s^2)
|
||||||
|
TrainEmergencyBrake float32 `protobuf:"fixed32,14,opt,name=TrainEmergencyBrake,proto3" json:"TrainEmergencyBrake,omitempty"` //列车紧急减速度(m/s^2)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Train) Reset() {
|
func (x *Train) Reset() {
|
||||||
@ -5402,6 +5403,13 @@ func (x *Train) GetTrainMaxBrake() float32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Train) GetTrainEmergencyBrake() float32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.TrainEmergencyBrake
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
// 其他线
|
// 其他线
|
||||||
type OtherLine struct {
|
type OtherLine struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -6766,7 +6774,7 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{
|
|||||||
0x49, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a,
|
0x49, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a,
|
||||||
0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||||
0x12, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74,
|
0x12, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x22, 0xd4, 0x03, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x3d, 0x0a,
|
0x69, 0x6f, 0x6e, 0x22, 0x86, 0x04, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x3d, 0x0a,
|
||||||
0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e,
|
0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e,
|
||||||
0x54, 0x72, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
|
0x54, 0x72, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
|
||||||
@ -6793,100 +6801,103 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{
|
|||||||
0x72, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x41, 0x63, 0x63, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x72,
|
0x72, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x41, 0x63, 0x63, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x72,
|
||||||
0x61, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x42, 0x72, 0x61, 0x6b, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
0x61, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x42, 0x72, 0x61, 0x6b, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
||||||
0x02, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x42, 0x72, 0x61, 0x6b, 0x65,
|
0x02, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x42, 0x72, 0x61, 0x6b, 0x65,
|
||||||
0x22, 0x28, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x05,
|
0x12, 0x30, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e,
|
||||||
0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01,
|
0x63, 0x79, 0x42, 0x72, 0x61, 0x6b, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x54,
|
||||||
0x43, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x44, 0x10, 0x03, 0x22, 0x31, 0x0a, 0x09, 0x4f, 0x74,
|
0x72, 0x61, 0x69, 0x6e, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x72, 0x61,
|
||||||
0x68, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
0x6b, 0x65, 0x22, 0x28, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69,
|
0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01, 0x12, 0x05,
|
||||||
0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x38, 0x0a,
|
0x0a, 0x01, 0x43, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x44, 0x10, 0x03, 0x22, 0x31, 0x0a, 0x09,
|
||||||
0x10, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74,
|
0x4f, 0x74, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||||
0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69,
|
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a,
|
||||||
0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d,
|
0x03, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22,
|
||||||
0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x87, 0x06, 0x0a, 0x0b, 0x4c, 0x69, 0x61, 0x6e,
|
0x38, 0x0a, 0x10, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44,
|
||||||
0x53, 0x75, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69,
|
0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||||
0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49,
|
0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x87, 0x06, 0x0a, 0x0b, 0x4c, 0x69,
|
||||||
0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
|
0x61, 0x6e, 0x53, 0x75, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x08, 0x73, 0x74, 0x61,
|
||||||
0x6e, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x73, 0x18, 0x02, 0x20,
|
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74,
|
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75,
|
||||||
0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61,
|
0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74,
|
||||||
0x74, 0x61, 0x52, 0x07, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x73,
|
0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x73, 0x18,
|
||||||
0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
|
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||||
0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c,
|
0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78,
|
||||||
0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52,
|
0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x73, 0x12, 0x3f, 0x0a,
|
||||||
0x0b, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x07,
|
0x0b, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03,
|
||||||
0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e,
|
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||||
0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e,
|
0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74,
|
||||||
0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x73, 0x69,
|
0x61, 0x52, 0x0b, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x12, 0x37,
|
||||||
0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x6f, 0x64, 0x47, 0x61,
|
0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||||
0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69,
|
||||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49,
|
0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07,
|
||||||
0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x6f, 0x64, 0x47,
|
0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x6f, 0x64,
|
||||||
0x61, 0x74, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x70, 0x6b, 0x73, 0x53, 0x77, 0x69, 0x74,
|
0x47, 0x61, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72,
|
||||||
0x63, 0x68, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75,
|
||||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49,
|
0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x6f,
|
||||||
0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x73, 0x70, 0x6b, 0x73, 0x53, 0x77,
|
0x64, 0x47, 0x61, 0x74, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x70, 0x6b, 0x73, 0x53, 0x77,
|
||||||
0x69, 0x74, 0x63, 0x68, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x67, 0x61, 0x72, 0x61, 0x67, 0x65, 0x44,
|
0x69, 0x74, 0x63, 0x68, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72,
|
||||||
0x6f, 0x6f, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61,
|
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75,
|
||||||
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f,
|
0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x73, 0x70, 0x6b, 0x73,
|
||||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x67, 0x61, 0x72, 0x61, 0x67,
|
0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x67, 0x61, 0x72, 0x61, 0x67,
|
||||||
0x65, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x61, 0x72, 0x57, 0x61, 0x73,
|
0x65, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67,
|
||||||
0x68, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61,
|
0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53,
|
||||||
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f,
|
0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x67, 0x61, 0x72,
|
||||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x63, 0x61, 0x72, 0x57, 0x61,
|
0x61, 0x67, 0x65, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x61, 0x72, 0x57,
|
||||||
0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x3d, 0x0a, 0x0a, 0x65, 0x73, 0x62, 0x42, 0x75, 0x74, 0x74,
|
0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67,
|
||||||
0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53,
|
||||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49,
|
0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x63, 0x61, 0x72,
|
||||||
0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x65, 0x73, 0x62, 0x42, 0x75, 0x74,
|
0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x3d, 0x0a, 0x0a, 0x65, 0x73, 0x62, 0x42, 0x75,
|
||||||
0x74, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x75, 0x74, 0x74,
|
0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72,
|
||||||
0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75,
|
||||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49,
|
0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x65, 0x73, 0x62, 0x42,
|
||||||
0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x75,
|
0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x75,
|
||||||
0x74, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e,
|
0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72,
|
||||||
0x67, 0x65, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b,
|
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75,
|
||||||
0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c,
|
0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x68, 0x6f, 0x6c, 0x64,
|
||||||
0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52,
|
0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x61, 0x74, 0x74,
|
||||||
0x11, 0x75, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x67, 0x65, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f,
|
0x65, 0x6e, 0x67, 0x65, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03,
|
||||||
0x6e, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||||
0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74,
|
||||||
0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65,
|
0x61, 0x52, 0x11, 0x75, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x67, 0x65, 0x64, 0x42, 0x75, 0x74,
|
||||||
0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x61, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
0x74, 0x6f, 0x6e, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||||
0x73, 0x22, 0x87, 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x67, 0x65, 0x64,
|
0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
|
||||||
0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x61, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69,
|
||||||
0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
0x6f, 0x6e, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x67,
|
||||||
0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
|
0x65, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66,
|
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
|
||||||
0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12,
|
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
||||||
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
|
0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
||||||
0x0d, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x0a,
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a,
|
||||||
0x48, 0x6f, 0x6c, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f,
|
0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69,
|
||||||
0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61,
|
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20,
|
||||||
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49,
|
0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0x81, 0x01,
|
||||||
0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63,
|
0x0a, 0x0a, 0x48, 0x6f, 0x6c, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06,
|
||||||
0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
|
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
|
||||||
0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66,
|
0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||||
0x6c, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18,
|
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
|
||||||
0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22,
|
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
|
||||||
0x8e, 0x01, 0x0a, 0x18, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x72,
|
0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||||
0x6b, 0x43, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x08,
|
0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e,
|
||||||
0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x4b, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c,
|
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e,
|
||||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c,
|
0x64, 0x22, 0x8e, 0x01, 0x0a, 0x18, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d,
|
||||||
0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x61, 0x63,
|
0x61, 0x72, 0x6b, 0x43, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38,
|
||||||
0x74, 0x75, 0x61, 0x6c, 0x4b, 0x6d, 0x12, 0x38, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e,
|
0x0a, 0x08, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x4b, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x4b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
|
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b,
|
||||||
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72,
|
0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x08,
|
||||||
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x6d,
|
0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x4b, 0x6d, 0x12, 0x38, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x69,
|
||||||
0x2a, 0x1d, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a,
|
0x67, 0x6e, 0x4b, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61,
|
||||||
0x02, 0x55, 0x50, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x42,
|
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74,
|
||||||
0x69, 0x0a, 0x25, 0x63, 0x6c, 0x75, 0x62, 0x2e, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e,
|
0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e,
|
||||||
0x62, 0x6a, 0x72, 0x74, 0x73, 0x73, 0x2e, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66,
|
0x4b, 0x6d, 0x2a, 0x1d, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x13, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74,
|
0x06, 0x0a, 0x02, 0x55, 0x50, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x57, 0x4e, 0x10,
|
||||||
0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x2b, 0x6a,
|
0x01, 0x42, 0x69, 0x0a, 0x25, 0x63, 0x6c, 0x75, 0x62, 0x2e, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e,
|
||||||
0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x6c, 0x75, 0x62, 0x2f, 0x62, 0x6a, 0x2d, 0x72,
|
0x6b, 0x2e, 0x62, 0x6a, 0x72, 0x74, 0x73, 0x73, 0x2e, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x65, 0x72,
|
||||||
0x74, 0x73, 0x74, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x64, 0x74, 0x6f, 0x2f,
|
0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x13, 0x4c, 0x61, 0x79, 0x6f,
|
||||||
0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x75, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a,
|
||||||
0x6f, 0x33,
|
0x2b, 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, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -71,11 +71,12 @@ type AddTrainReqDtoNew struct {
|
|||||||
//车头所在link内的偏移量,单位为mm
|
//车头所在link内的偏移量,单位为mm
|
||||||
HeadOffset int64 `json:"headOffset" form:"headOffset"`
|
HeadOffset int64 `json:"headOffset" form:"headOffset"`
|
||||||
//列车长度
|
//列车长度
|
||||||
TrainLength int64 `json:"trainLength" from:"trainLength"`
|
TrainLength int64 `json:"trainLength" from:"trainLength"`
|
||||||
TrainLoad int32 `json:"trainLoad" from:"trainLoad"`
|
TrainLoad int32 `json:"trainLoad" from:"trainLoad"`
|
||||||
TrainMaxSpeed float32 `json:"trainMaxSpeed" from:"trainMaxSpeed"`
|
TrainMaxSpeed float32 `json:"trainMaxSpeed" from:"trainMaxSpeed"`
|
||||||
TrainMaxAcc float32 `json:"trainMaxAcc" from:"trainMaxAcc"`
|
TrainMaxAcc float32 `json:"trainMaxAcc" from:"trainMaxAcc"`
|
||||||
TrainMaxBrake float32 `json:"trainMaxBrake" from:"trainMaxBrake"`
|
TrainMaxBrake float32 `json:"trainMaxBrake" from:"trainMaxBrake"`
|
||||||
|
TrainEmergencyBrake float32 `json:"trainEmergencyBrake" from:"trainEmergencyBrake"`
|
||||||
// 场景ID
|
// 场景ID
|
||||||
MapId int32 `json:"mapId" from:"mapId"`
|
MapId int32 `json:"mapId" from:"mapId"`
|
||||||
WheelDiameter int32 `json:"wheelDiameter" from:"wheelDiameter"`
|
WheelDiameter int32 `json:"wheelDiameter" from:"wheelDiameter"`
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -17,15 +17,16 @@ type TrainInfoReqDto struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type TrainInfoDto struct {
|
type TrainInfoDto struct {
|
||||||
Id int32 `json:"id" form:"id"`
|
Id int32 `json:"id" form:"id"`
|
||||||
Name string `json:"name" form:"name"`
|
Name string `json:"name" form:"name"`
|
||||||
TrainModel int32 `json:"train_model" form:"train_model"`
|
TrainModel int32 `json:"train_model" form:"train_model"`
|
||||||
CarriageLength int32 `json:"carriage_length" form:"carriage_length"`
|
CarriageLength int32 `json:"carriage_length" form:"carriage_length"`
|
||||||
TotalLength int32 `json:"total_length" form:"total_length"`
|
TotalLength int32 `json:"total_length" form:"total_length"`
|
||||||
TrainLoad int32 `json:"train_load" form:"train_load"`
|
TrainLoad int32 `json:"train_load" form:"train_load"`
|
||||||
TrainMaxSpeed float32 `json:"train_max_speed" form:"train_max_speed"`
|
TrainMaxSpeed float32 `json:"train_max_speed" form:"train_max_speed"`
|
||||||
TrainMaxAcc float32 `json:"train_max_acc" form:"train_max_acc"`
|
TrainMaxAcc float32 `json:"train_max_acc" form:"train_max_acc"`
|
||||||
TrainMaxBrake float32 `json:"train_max_brake" form:"train_max_brake"`
|
TrainMaxBrake float32 `json:"train_max_brake" form:"train_max_brake"`
|
||||||
|
TrainEmergencyBrake float32 `json:"train_emergency_brake" form:"train_emergency_brake"`
|
||||||
//MinDiameter int32 `json:"min_diameter" form:"min_diameter"`
|
//MinDiameter int32 `json:"min_diameter" form:"min_diameter"`
|
||||||
//MaxDiameter int32 `json:"max_diameter" form:"max_diameter"`
|
//MaxDiameter int32 `json:"max_diameter" form:"max_diameter"`
|
||||||
TrainSets string `json:"train_sets" form:"train_sets"`
|
TrainSets string `json:"train_sets" form:"train_sets"`
|
||||||
@ -57,17 +58,18 @@ func ConvertDtoFromTrain(t *PublishedDto) *TrainInfoDto {
|
|||||||
message := &data_proto.Train{}
|
message := &data_proto.Train{}
|
||||||
proto.Unmarshal(t.Proto, message)
|
proto.Unmarshal(t.Proto, message)
|
||||||
return &TrainInfoDto{
|
return &TrainInfoDto{
|
||||||
Id: t.ID,
|
Id: t.ID,
|
||||||
Name: t.Name,
|
Name: t.Name,
|
||||||
Description: t.Note,
|
Description: t.Note,
|
||||||
TrainModel: int32(message.TrainModel),
|
TrainModel: int32(message.TrainModel),
|
||||||
CarriageLength: message.CarriageLength,
|
CarriageLength: message.CarriageLength,
|
||||||
TotalLength: message.TotalLength,
|
TotalLength: message.TotalLength,
|
||||||
TrainControlMapId: message.TrainControlMapId,
|
TrainControlMapId: message.TrainControlMapId,
|
||||||
TrainLoad: message.TrainLoad,
|
TrainLoad: message.TrainLoad,
|
||||||
TrainMaxSpeed: message.TrainMaxSpeed,
|
TrainMaxSpeed: message.TrainMaxSpeed,
|
||||||
TrainMaxAcc: message.TrainMaxAcc,
|
TrainMaxAcc: message.TrainMaxAcc,
|
||||||
TrainMaxBrake: message.TrainMaxBrake,
|
TrainMaxBrake: message.TrainMaxBrake,
|
||||||
|
TrainEmergencyBrake: message.TrainEmergencyBrake,
|
||||||
//TrainControlMapCode: message.TrainControlMapCode,
|
//TrainControlMapCode: message.TrainControlMapCode,
|
||||||
//MinDiameter: message.MinDiameter,
|
//MinDiameter: message.MinDiameter,
|
||||||
//MaxDiameter: message.MaxDiameter,
|
//MaxDiameter: message.MaxDiameter,
|
||||||
|
@ -63,6 +63,14 @@ func NewTrainControlMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask
|
|||||||
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: vobc.LocalAtpControl})
|
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: vobc.LocalAtpControl})
|
||||||
case memory.LIGHT_ATOFCZSD:
|
case memory.LIGHT_ATOFCZSD:
|
||||||
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: vobc.LightAtoSend})
|
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: vobc.LightAtoSend})
|
||||||
|
case memory.LIGHT_ATO_OPEN_LEFT_DOOR:
|
||||||
|
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: vobc.AtoOpenLeftDoor})
|
||||||
|
case memory.LIGHT_ATO_OPEN_RIGHT_DOOR:
|
||||||
|
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: vobc.AtoOpenRightDoor})
|
||||||
|
case memory.LIGHT_ATO_CLOSE_LEFT_DOOR:
|
||||||
|
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: vobc.AtoCloseLeftDoor})
|
||||||
|
case memory.LIGHT_ATO_CLOSE_RIGHT_DOOR:
|
||||||
|
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: vobc.AtoCloseRightDoor})
|
||||||
default:
|
default:
|
||||||
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: light.Val})
|
lights = append(lights, &state_proto.TrainControlState_ControlLight{Id: light.Id, Val: light.Val})
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 67d7d79c5a50880b61be05d98184209422f15f1b
|
Subproject commit 7629f290ea612d4ce368c40d4cf793dffc4b21ec
|
@ -79,14 +79,15 @@ func TrainConfigToProtoConvert(t *dto.ConfigTrainData) *common_proto.TrainDynami
|
|||||||
// 转成列车proto
|
// 转成列车proto
|
||||||
func convertTrainDtoToProto(t *dto.TrainInfoDto) []byte {
|
func convertTrainDtoToProto(t *dto.TrainInfoDto) []byte {
|
||||||
message := &data_proto.Train{
|
message := &data_proto.Train{
|
||||||
TrainModel: data_proto.Train_TrainModel(t.TrainModel),
|
TrainModel: data_proto.Train_TrainModel(t.TrainModel),
|
||||||
CarriageLength: t.CarriageLength,
|
CarriageLength: t.CarriageLength,
|
||||||
TotalLength: t.TotalLength,
|
TotalLength: t.TotalLength,
|
||||||
TrainControlMapId: t.TrainControlMapId,
|
TrainControlMapId: t.TrainControlMapId,
|
||||||
TrainMaxSpeed: t.TrainMaxSpeed,
|
TrainMaxSpeed: t.TrainMaxSpeed,
|
||||||
TrainLoad: t.TrainLoad,
|
TrainLoad: t.TrainLoad,
|
||||||
TrainMaxAcc: t.TrainMaxAcc,
|
TrainMaxAcc: t.TrainMaxAcc,
|
||||||
TrainMaxBrake: t.TrainMaxBrake,
|
TrainMaxBrake: t.TrainMaxBrake,
|
||||||
|
TrainEmergencyBrake: t.TrainEmergencyBrake,
|
||||||
//TrainControlMapCode: t.TrainControlMapCode,
|
//TrainControlMapCode: t.TrainControlMapCode,
|
||||||
//MinDiameter: t.MinDiameter,
|
//MinDiameter: t.MinDiameter,
|
||||||
//MaxDiameter: t.MaxDiameter,
|
//MaxDiameter: t.MaxDiameter,
|
||||||
|
4
third_party/train_pc_sim/train_pc_sim.go
vendored
4
third_party/train_pc_sim/train_pc_sim.go
vendored
@ -381,7 +381,7 @@ func (d *trainPcSimService) sendTrainLocationAndSpeedTask(ctx context.Context) {
|
|||||||
connState = tpapi.ThirdPartyState_Broken
|
connState = tpapi.ThirdPartyState_Broken
|
||||||
}
|
}
|
||||||
trainClient.updateState(connState)
|
trainClient.updateState(connState)
|
||||||
s1, _ := d.pluseSpeed(train)
|
s1, speed := d.pluseSpeed(train)
|
||||||
runDir := uint16(2)
|
runDir := uint16(2)
|
||||||
if train.VobcState.DirectionForward {
|
if train.VobcState.DirectionForward {
|
||||||
runDir = 1
|
runDir = 1
|
||||||
@ -390,7 +390,7 @@ func (d *trainPcSimService) sendTrainLocationAndSpeedTask(ctx context.Context) {
|
|||||||
data := trainClient.speedPlace.Encode(runDir, s1, disPluse)
|
data := trainClient.speedPlace.Encode(runDir, s1, disPluse)
|
||||||
bm := &message.TrainPcSimBaseMessage{Type: message.SENDER_TRAIN_LOCATION_INFO, Data: data}
|
bm := &message.TrainPcSimBaseMessage{Type: message.SENDER_TRAIN_LOCATION_INFO, Data: data}
|
||||||
dataCode := bm.Encode()
|
dataCode := bm.Encode()
|
||||||
//slog.Info(fmt.Sprintf("发送列车速度位置,列车:%v,列车速度:%v,计数脉冲: %v,累计里程: %v ,发送数据:%v", train.Id, speed, s1, trainClient.speedPlace.PulseCount1, hex.EncodeToString(dataCode)))
|
slog.Info(fmt.Sprintf("发送列车速度位置,列车:%v,列车速度:%v,计数脉冲: %v,累计里程: %v ,发送数据:%v", train.Id, speed, s1, trainClient.speedPlace.PulseCount1, hex.EncodeToString(dataCode)))
|
||||||
err := trainClient.tcpClient.Send(dataCode)
|
err := trainClient.tcpClient.Send(dataCode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error(fmt.Sprintf("发送列车速度位置失败,列车:%v,发送数据:%v", train.Id, hex.EncodeToString(dataCode)))
|
slog.Error(fmt.Sprintf("发送列车速度位置失败,列车:%v,发送数据:%v", train.Id, hex.EncodeToString(dataCode)))
|
||||||
|
@ -32,21 +32,25 @@ const (
|
|||||||
JX = "JX" //检修按钮
|
JX = "JX" //检修按钮
|
||||||
XM = "XM" //休眠按钮
|
XM = "XM" //休眠按钮
|
||||||
|
|
||||||
LIGHT_JJZD = JJZD
|
LIGHT_JJZD = JJZD
|
||||||
LIGHT_QQY = "QQY" //切牵引指示灯
|
LIGHT_QQY = "QQY" //切牵引指示灯
|
||||||
LIGHT_JSSJH = "JSSJH" // 驾驶室激活
|
LIGHT_JSSJH = "JSSJH" // 驾驶室激活
|
||||||
LIGHT_TFZDHJ = "TFZDHJ" //停放制动缓解
|
LIGHT_TFZDHJ = "TFZDHJ" //停放制动缓解
|
||||||
LIGHT_QYYX = "QYYX" // 牵引有效
|
LIGHT_QYYX = "QYYX" // 牵引有效
|
||||||
LIGHT_ZDYX = "ZDYX" //制动有效
|
LIGHT_ZDYX = "ZDYX" //制动有效
|
||||||
LIGHT_TFZDSJ = "TFZDSJ" //停放制动施加
|
LIGHT_TFZDSJ = "TFZDSJ" //停放制动施加
|
||||||
LIGHT_CYZD = "CYZD" //常用制动
|
LIGHT_CYZD = "CYZD" //常用制动
|
||||||
LIGHT_ZDGL = "ZDGL" //制动隔离
|
LIGHT_ZDGL = "ZDGL" //制动隔离
|
||||||
LIGHT_LSXH = "LSXH" //零速信号
|
LIGHT_LSXH = "LSXH" //零速信号
|
||||||
LIGHT_ZMYX = "ZMYX" //左门允许
|
LIGHT_ZMYX = "ZMYX" //左门允许
|
||||||
LIGHT_YMYX = "YMYX" //右门允许
|
LIGHT_YMYX = "YMYX" //右门允许
|
||||||
LIGHT_ZFZSD = "ZFZSD" //折返指示灯
|
LIGHT_ZFZSD = "ZFZSD" //折返指示灯
|
||||||
LIGHT_BDATPKC = "BDATPKC" //本段atp控车
|
LIGHT_BDATPKC = "BDATPKC" //本段atp控车
|
||||||
LIGHT_ATOFCZSD = "ATOFCZSD" //ato发车指示灯
|
LIGHT_ATOFCZSD = "ATOFCZSD" //ato发车指示灯
|
||||||
|
LIGHT_ATO_OPEN_LEFT_DOOR = "ATOKZM" //ato 开左门
|
||||||
|
LIGHT_ATO_OPEN_RIGHT_DOOR = "ATOKYM" //ato 开右门
|
||||||
|
LIGHT_ATO_CLOSE_LEFT_DOOR = "ATOGZM" //ato 关左门
|
||||||
|
LIGHT_ATO_CLOSE_RIGHT_DOOR = "ATOGYM" //ato 关右门
|
||||||
)
|
)
|
||||||
|
|
||||||
// 获取列车控制图形数据
|
// 获取列车控制图形数据
|
||||||
@ -102,8 +106,9 @@ func findTrainTccGraphicDataHandler(tccG *data_proto.TccGraphicStorage, id uint3
|
|||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
func initTrainVobc(trainLoad int64, trainIsUp bool) (*state_proto.TrainVobcState, uint32) {
|
func initTrainVobc(trainLoad int64, trainIsUp bool, maxBrake float32) (*state_proto.TrainVobcState, uint32) {
|
||||||
vobc := &state_proto.TrainVobcState{TrainLoad: trainLoad, BrakingStatus: true, BrakeForce: DEFAULT_BRAKE_FORCE * 100, DirectionForward: true,
|
brake := trainBraking(int32(trainLoad), 100, maxBrake) / 1000 * 10
|
||||||
|
vobc := &state_proto.TrainVobcState{TrainLoad: trainLoad, BrakingStatus: true, BrakeForce: brake, DirectionForward: true,
|
||||||
AllDoorClose: true, ObstacleCheckBtn: true, RightDoorCloseCommand: true, LeftDoorCloseCommand: true, BrakeHeavyFault: true, AtpCutSwitch: true,
|
AllDoorClose: true, ObstacleCheckBtn: true, RightDoorCloseCommand: true, LeftDoorCloseCommand: true, BrakeHeavyFault: true, AtpCutSwitch: true,
|
||||||
ConfirmBtn: true, AtpPowerOnBtn: true, DoorModeMM: true,
|
ConfirmBtn: true, AtpPowerOnBtn: true, DoorModeMM: true,
|
||||||
}
|
}
|
||||||
|
@ -25,11 +25,11 @@ const (
|
|||||||
//列车总质量(吨)
|
//列车总质量(吨)
|
||||||
DEFULAT_TRAIN_LOAD = 160
|
DEFULAT_TRAIN_LOAD = 160
|
||||||
//通号最大制动力是-1.21
|
//通号最大制动力是-1.21
|
||||||
DEFAULT_BRAKE_FORCE = 1.21
|
//DEFAULT_BRAKE_FORCE = 1.21
|
||||||
//通号最大加速度是0.97
|
//通号最大加速度是0.97
|
||||||
DEFAULT_TRAIN_TRACTION_ACC = 0.97 //加速度
|
//DEFAULT_TRAIN_TRACTION_ACC = 0.97 //加速度
|
||||||
|
|
||||||
DEFAULT_TRAIN_STARTED_SPEED float64 = 80 / 3.6 //列车起步速度单位 米/秒
|
//DEFAULT_TRAIN_STARTED_SPEED float64 = 80 / 3.6 //列车起步速度单位 米/秒
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ func AddTrainStateNew(vs *VerifySimulation, status *state_proto.TrainState, conf
|
|||||||
tl = DEFULAT_TRAIN_LOAD * 100
|
tl = DEFULAT_TRAIN_LOAD * 100
|
||||||
}
|
}
|
||||||
|
|
||||||
vobc, _ := initTrainVobc(int64(tl), status.TrainRunUp)
|
vobc, _ := initTrainVobc(int64(tl), status.TrainRunUp, status.TrainMaxBrake)
|
||||||
status.VobcState = vobc
|
status.VobcState = vobc
|
||||||
|
|
||||||
status.Tcc = initTrainTcc(vs)
|
status.Tcc = initTrainTcc(vs)
|
||||||
@ -481,7 +481,7 @@ func removeTrain(vs *VerifySimulation, trainId string, train *state_proto.TrainS
|
|||||||
vobc.TractionStatus = false
|
vobc.TractionStatus = false
|
||||||
vobc.BrakingStatus = true
|
vobc.BrakingStatus = true
|
||||||
vobc.TractionForce = 0
|
vobc.TractionForce = 0
|
||||||
vobc.BrakeForce = int64(DEFAULT_BRAKE_FORCE * 100)
|
vobc.BrakeForce = trainBraking(train.TrainLoad, 100, train.TrainMaxBrake) / 1000 * 100
|
||||||
}
|
}
|
||||||
train.Show = false
|
train.Show = false
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ import (
|
|||||||
"joylink.club/bj-rtsts-server/third_party/message"
|
"joylink.club/bj-rtsts-server/third_party/message"
|
||||||
"joylink.club/bj-rtsts-server/third_party/radar"
|
"joylink.club/bj-rtsts-server/third_party/radar"
|
||||||
"joylink.club/bj-rtsts-server/third_party/semi_physical_train"
|
"joylink.club/bj-rtsts-server/third_party/semi_physical_train"
|
||||||
|
"joylink.club/bj-rtsts-server/third_party/train_pc_sim"
|
||||||
"joylink.club/ecs"
|
"joylink.club/ecs"
|
||||||
"joylink.club/rtsssimulation/component"
|
"joylink.club/rtsssimulation/component"
|
||||||
"joylink.club/rtsssimulation/entity"
|
"joylink.club/rtsssimulation/entity"
|
||||||
@ -263,9 +264,25 @@ func (s *VerifySimulation) HandleDynamicsTrainInfo(info *message.DynamicsTrainIn
|
|||||||
trainState := UpdateTrainStateByDynamics(s, trainId, info)
|
trainState := UpdateTrainStateByDynamics(s, trainId, info)
|
||||||
vs := train.VobcState
|
vs := train.VobcState
|
||||||
if vs.Ato {
|
if vs.Ato {
|
||||||
|
trainAtoControlTractionAndBrake(train)
|
||||||
|
var msgs []message.TrainPcSimBaseMessage
|
||||||
|
if vs.AtoOpenRightDoor || vs.AtoOpenLeftDoor {
|
||||||
|
btn := train.Tcc.Buttons[KZM]
|
||||||
|
if vs.AtoOpenRightDoor {
|
||||||
|
btn = train.Tcc.Buttons[KYM]
|
||||||
|
}
|
||||||
|
msgs = controlDoorOpenBtn(train.VobcState, true, btn, vs.AtoOpenLeftDoor, false)
|
||||||
|
} else if vs.AtoCloseRightDoor || vs.AtoCloseLeftDoor {
|
||||||
|
btn := train.Tcc.Buttons[GZM]
|
||||||
|
if vs.AtoCloseRightDoor {
|
||||||
|
btn = train.Tcc.Buttons[GYM]
|
||||||
|
}
|
||||||
|
msgs = controlDoorCloseBtn(train.VobcState, true, btn, vs.AtoOpenLeftDoor, false)
|
||||||
|
}
|
||||||
|
train_pc_sim.Default().SendTrainControlMsg(train, msgs)
|
||||||
|
|
||||||
} else if vs.TractionStatus {
|
} else if vs.TractionStatus {
|
||||||
f := trainTractionPower(vs.TrainLoad, train.Tcc.PushHandler.Val, trainState.DynamicState.Speed)
|
f := trainTractionPower(train.TrainLoad, train.Tcc.PushHandler.Val, trainState.DynamicState.Speed, train.TrainMaxAcc, train.TrainMaxSpeed)
|
||||||
vs.TractionForce = f / 1000 * 100
|
vs.TractionForce = f / 1000 * 100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ import (
|
|||||||
train_pc_sim "joylink.club/bj-rtsts-server/third_party/train_pc_sim"
|
train_pc_sim "joylink.club/bj-rtsts-server/third_party/train_pc_sim"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"math"
|
"math"
|
||||||
"strings"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -41,7 +40,7 @@ func ControlTrainUpdate(s *VerifySimulation, ct *request_proto.TrainControl) {
|
|||||||
|
|
||||||
var baseMsg []message.TrainPcSimBaseMessage = nil
|
var baseMsg []message.TrainPcSimBaseMessage = nil
|
||||||
if ct.ControlType == request_proto.TrainControl_EMERGENT_BUTTON {
|
if ct.ControlType == request_proto.TrainControl_EMERGENT_BUTTON {
|
||||||
baseMsg = trainControlButton(vobc, tcc.Buttons, ct.DeviceId, ct.ControlButton.Active, tccGraphicData)
|
baseMsg = trainControlButton(sta, ct.DeviceId, ct.ControlButton.Active, tccGraphicData)
|
||||||
} else if ct.ControlType == request_proto.TrainControl_DRIVER_KEY_SWITCH {
|
} else if ct.ControlType == request_proto.TrainControl_DRIVER_KEY_SWITCH {
|
||||||
baseMsg = trainControlDriverKey(sta, ct.DriverKey, ct.DeviceId, tccGraphicData)
|
baseMsg = trainControlDriverKey(sta, ct.DriverKey, ct.DeviceId, tccGraphicData)
|
||||||
train_pc_sim.Default().SendDriverActive(sta)
|
train_pc_sim.Default().SendDriverActive(sta)
|
||||||
@ -56,11 +55,11 @@ func ControlTrainUpdate(s *VerifySimulation, ct *request_proto.TrainControl) {
|
|||||||
if vobc.TractionSafetyCircuit {
|
if vobc.TractionSafetyCircuit {
|
||||||
panic(sys_error.New("牵引切除,不能进行列车控制"))
|
panic(sys_error.New("牵引切除,不能进行列车控制"))
|
||||||
}
|
}
|
||||||
oldTraction := sta.VobcState.TractionForce
|
//oldTraction := sta.VobcState.TractionForce
|
||||||
oldBrakeForce := sta.VobcState.BrakeForce
|
//oldBrakeForce := sta.VobcState.BrakeForce
|
||||||
isTraction := ct.Handler.Val > 0 //是否制动
|
//isTraction := ct.Handler.Val > 0 //是否制动
|
||||||
baseMsg = trainControlHandle(sta.DynamicState.Speed, vobc, tcc, ct.Handler, ct.DeviceId, tccGraphicData)
|
baseMsg = trainControlHandle(sta, ct.Handler, ct.DeviceId, tccGraphicData)
|
||||||
train_pc_sim.Default().SendHandleSwitch(oldTraction, oldBrakeForce, isTraction, sta)
|
//train_pc_sim.Default().SendHandleSwitch(oldTraction, oldBrakeForce, isTraction, sta)
|
||||||
} else if ct.ControlType == request_proto.TrainControl_TRAIN_DOOR_MODE_CHANGE {
|
} else if ct.ControlType == request_proto.TrainControl_TRAIN_DOOR_MODE_CHANGE {
|
||||||
baseMsg = trainDoorModeChangeHandle(vobc, tcc, ct.SwitchKey, ct.DeviceId, tccGraphicData)
|
baseMsg = trainDoorModeChangeHandle(vobc, tcc, ct.SwitchKey, ct.DeviceId, tccGraphicData)
|
||||||
}
|
}
|
||||||
@ -81,25 +80,25 @@ func ControlTrainUpdate(s *VerifySimulation, ct *request_proto.TrainControl) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func trainControlButton(vobc *state_proto.TrainVobcState, buttonMap map[string]*state_proto.TrainControlState_ControlButton, deviceId uint32, active bool, tccGraphic *data_proto.TccGraphicStorage) []message.TrainPcSimBaseMessage {
|
func trainControlButton(train *state_proto.TrainState, deviceId uint32, active bool, tccGraphic *data_proto.TccGraphicStorage) []message.TrainPcSimBaseMessage {
|
||||||
|
|
||||||
if graphicBtn, ok := findTrainTccGraphicDataButton(tccGraphic, deviceId); ok {
|
if graphicBtn, ok := findTrainTccGraphicDataButton(tccGraphic, deviceId); ok {
|
||||||
btn := buttonMap[graphicBtn.Code]
|
btn := train.Tcc.Buttons[graphicBtn.Code]
|
||||||
if btn == nil {
|
if btn == nil {
|
||||||
slog.Error("未找到对应的车载摁钮code:", graphicBtn.Code, "设备id:", deviceId)
|
slog.Error("未找到对应的车载摁钮code:", graphicBtn.Code, "设备id:", deviceId)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
vobc := train.VobcState
|
||||||
switch graphicBtn.Code {
|
switch graphicBtn.Code {
|
||||||
case JJZD: // 紧急制动
|
case JJZD: // 紧急制动
|
||||||
return controlEBBtn(vobc, active, btn)
|
return controlEBBtn(train, active, btn)
|
||||||
case ATPQCKG: //atp切除
|
case ATPQCKG: //atp切除
|
||||||
return controlAtpBtn(vobc, active, btn)
|
return controlAtpBtn(vobc, active, btn)
|
||||||
case KZM, KYM: //开左门按钮
|
case KZM, KYM: //开左门按钮
|
||||||
return controlDoorOpenBtn(vobc, active, btn, graphicBtn.Code == KZM)
|
return controlDoorOpenBtn(vobc, active, btn, graphicBtn.Code == KZM, true)
|
||||||
|
|
||||||
case GZM, GYM: //关左门按钮
|
case GZM, GYM: //关左门按钮
|
||||||
return controlDoorCloseBtn(vobc, active, btn, graphicBtn.Code == GZM)
|
return controlDoorCloseBtn(vobc, active, btn, graphicBtn.Code == GZM, true)
|
||||||
|
|
||||||
case ZF: //折返按钮
|
case ZF: //折返按钮
|
||||||
return controlReverseBtn(vobc, active, btn)
|
return controlReverseBtn(vobc, active, btn)
|
||||||
@ -134,16 +133,17 @@ func trainControlButton(vobc *state_proto.TrainVobcState, buttonMap map[string]*
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 应急摁钮
|
// 应急摁钮
|
||||||
func controlEBBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []message.TrainPcSimBaseMessage {
|
func controlEBBtn(train *state_proto.TrainState, active bool, tccBtn *state_proto.TrainControlState_ControlButton) []message.TrainPcSimBaseMessage {
|
||||||
if !active {
|
if !active {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
tccBtn.Passed = active
|
tccBtn.Passed = active
|
||||||
|
vobc := train.VobcState
|
||||||
vobc.TractionStatus = false
|
vobc.TractionStatus = false
|
||||||
vobc.EmergencyBrakingStatus = true
|
vobc.EmergencyBrakingStatus = true
|
||||||
vobc.TractionForce = 0
|
vobc.TractionForce = 0
|
||||||
|
|
||||||
vobc.BrakeForce = trainBraking(vobc.TrainLoad, 100) / 1000 * 100
|
vobc.BrakeForce = trainBraking(train.TrainLoad, 100, train.TrainEmergencyBrake) / 1000 * 100
|
||||||
vobc.BrakingStatus = true
|
vobc.BrakingStatus = true
|
||||||
return []message.TrainPcSimBaseMessage{
|
return []message.TrainPcSimBaseMessage{
|
||||||
{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.OUTER_EMERGENCY_BRAKE, 0}},
|
{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.OUTER_EMERGENCY_BRAKE, 0}},
|
||||||
@ -161,9 +161,12 @@ func controlAtpBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_
|
|||||||
tccBtn.Passed = active
|
tccBtn.Passed = active
|
||||||
return []message.TrainPcSimBaseMessage{{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.ATP_CUT, status}}}
|
return []message.TrainPcSimBaseMessage{{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.ATP_CUT, status}}}
|
||||||
}
|
}
|
||||||
func controlDoorCloseBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton, isLeft bool) []message.TrainPcSimBaseMessage {
|
func controlDoorCloseBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton, isLeft bool, onbtn bool) []message.TrainPcSimBaseMessage {
|
||||||
status := message.IsTrue(active)
|
status := message.IsTrue(active)
|
||||||
tccBtn.Passed = active
|
if onbtn {
|
||||||
|
tccBtn.Passed = active
|
||||||
|
|
||||||
|
}
|
||||||
var doorAct byte = message.CLOSE_LEFT_DOOR
|
var doorAct byte = message.CLOSE_LEFT_DOOR
|
||||||
var doorState byte = message.LEFT_DOOR_STATE
|
var doorState byte = message.LEFT_DOOR_STATE
|
||||||
msg := make([]message.TrainPcSimBaseMessage, 0)
|
msg := make([]message.TrainPcSimBaseMessage, 0)
|
||||||
@ -184,18 +187,21 @@ func controlDoorCloseBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 开车门
|
// 开车门
|
||||||
func controlDoorOpenBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton, isLeft bool) []message.TrainPcSimBaseMessage {
|
func controlDoorOpenBtn(vobc *state_proto.TrainVobcState, active bool, tccBtn *state_proto.TrainControlState_ControlButton, isLeft bool, onbtn bool) []message.TrainPcSimBaseMessage {
|
||||||
status := message.IsTrue(active)
|
status := message.IsTrue(active)
|
||||||
msg := make([]message.TrainPcSimBaseMessage, 0)
|
msg := make([]message.TrainPcSimBaseMessage, 0)
|
||||||
tccBtn.Passed = active
|
if onbtn {
|
||||||
|
tccBtn.Passed = active
|
||||||
|
|
||||||
|
}
|
||||||
var doorAct byte = message.LEFT_OPEN_DOOR
|
var doorAct byte = message.LEFT_OPEN_DOOR
|
||||||
var doorState byte = message.LEFT_DOOR_STATE
|
var doorState byte = message.LEFT_DOOR_STATE
|
||||||
if isLeft {
|
if isLeft {
|
||||||
vobc.LeftDoorOpenCommand = active
|
vobc.LeftDoorOpenCommand = active
|
||||||
vobc.LeftDoorCloseCommand = false
|
//vobc.LeftDoorCloseCommand = false
|
||||||
} else {
|
} else {
|
||||||
vobc.RightDoorOpenCommand = active
|
vobc.RightDoorOpenCommand = active
|
||||||
vobc.RightDoorCloseCommand = false
|
//vobc.RightDoorCloseCommand = false
|
||||||
doorAct = message.OPEN_RIGHT_DOOR
|
doorAct = message.OPEN_RIGHT_DOOR
|
||||||
doorState = message.RIGHT_DOOR_STATE
|
doorState = message.RIGHT_DOOR_STATE
|
||||||
}
|
}
|
||||||
@ -433,55 +439,110 @@ func trainDoorModeChangeHandle(vobc *state_proto.TrainVobcState, tcc *state_prot
|
|||||||
return msg
|
return msg
|
||||||
}
|
}
|
||||||
|
|
||||||
func trainBraking(trainLoad int64, handleVal int32) int64 {
|
func trainBraking(trainLoad int32, handleVal int32, brakePower float32) int64 {
|
||||||
tl := trainLoad * 10 //列车初始化已经 * 100,再*10 就是对应的kg
|
tl := trainLoad * 1000 //列车初始化已经 * 100,再*10 就是对应的kg
|
||||||
//F=ma 单位 F单位:牛顿,m单位:千克,a单位:米/秒²
|
//F=ma 单位 F单位:牛顿,m单位:千克,a单位:米/秒²
|
||||||
totalPower := float64(tl) * DEFAULT_BRAKE_FORCE
|
totalPower := float64(tl) * float64(brakePower)
|
||||||
n := int64(math.Abs(float64(handleVal)) / 100 * totalPower)
|
n := int64(math.Abs(float64(handleVal)) / 100 * totalPower)
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func trainTractionPower(trainLoad int64, handleVal int32, speedKM int32) int64 {
|
func trainTractionPower(trainLoad int32, handleVal int32, speedKM int32, trainMaxAcc, trainMaxSpeed float32) int64 {
|
||||||
//f(牛) = m(质量) * (加速度* 牵引杆%* (1 - 速度(米/秒)/(最大速度(米/秒) * 牵引杆%)))
|
//f(牛) = m(质量) * (加速度* 牵引杆%* (1 - 速度(米/秒)/(最大速度(米/秒) * 牵引杆%)))
|
||||||
//
|
//
|
||||||
m := trainLoad * 10
|
m := trainLoad * 1000
|
||||||
speedM := float64(speedKM) / 3.6 / 100
|
speedM := float64(speedKM) / 3.6 / 100
|
||||||
acc := math.Abs(float64(handleVal)) / 100 * DEFAULT_TRAIN_TRACTION_ACC
|
acc := math.Abs(float64(handleVal)) / 100 * float64(trainMaxAcc)
|
||||||
sp := math.Abs(float64(handleVal)) / 100 * DEFAULT_TRAIN_STARTED_SPEED
|
sp := math.Abs(float64(handleVal)) / 100 * float64(trainMaxSpeed/3.6)
|
||||||
if speedM > sp {
|
if speedM > sp {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
f := float64(m) * (acc * (1 - speedM/sp))
|
f := float64(m) * (acc * (1 - speedM/sp))
|
||||||
return int64(f)
|
return int64(f)
|
||||||
}
|
}
|
||||||
|
func trainBrakeAtoStepLevel(trainLoad int32, stepLevel int32, brakePower float32) int64 {
|
||||||
|
tl := trainLoad * 1000 //列车初始化已经 * 100,再*10 就是对应的kg
|
||||||
|
//F=ma 单位 F单位:牛顿,m单位:千克,a单位:米/秒²
|
||||||
|
totalPower := float64(tl) * float64(brakePower)
|
||||||
|
n := totalPower / 7 * float64(stepLevel)
|
||||||
|
return int64(n)
|
||||||
|
}
|
||||||
|
func trainTractionPowerAtoStepLevel(trainLoad int32, speedKM int32, stepLevel int32, trainMaxAcc, trainMaxSpeed float32) int64 {
|
||||||
|
//f(牛) = m(质量) * (加速度* 牵引杆%* (1 - 速度(米/秒)/(最大速度(米/秒) * 牵引杆%)))
|
||||||
|
//
|
||||||
|
m := trainLoad * 1000
|
||||||
|
sl := float64(stepLevel)
|
||||||
|
speedM := float64(speedKM) / 3.6 / 100
|
||||||
|
acc := float64(trainMaxAcc) / 7 * sl
|
||||||
|
sp := float64(trainMaxSpeed/3.6) / 7 * sl
|
||||||
|
if speedM > sp {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
f := float64(m) * (acc * (1 - speedM/sp))
|
||||||
|
return int64(f)
|
||||||
|
}
|
||||||
|
func trainAtoControlTractionAndBrake(train *state_proto.TrainState) {
|
||||||
|
vs := train.VobcState
|
||||||
|
vs.TractionStatus = false
|
||||||
|
vs.TractionForce = 0
|
||||||
|
vs.BrakingStatus = false
|
||||||
|
vs.BrakeForce = 0
|
||||||
|
vs.MaintainBrakeStatus = false
|
||||||
|
var brakeState byte = 0
|
||||||
|
var notBreak byte = 0
|
||||||
|
if vs.AtoTractionCommandOut && vs.AtoBrakeCommand {
|
||||||
|
f := trainBrakeAtoStepLevel(train.TrainLoad, int32(vs.AtoStepLevel.Number()), train.TrainMaxBrake)
|
||||||
|
vs.BrakeForce = f / 1000 * 100
|
||||||
|
vs.BrakingStatus = true
|
||||||
|
brakeState = 1
|
||||||
|
} else if vs.AtoTractionCommandOut {
|
||||||
|
f := trainTractionPowerAtoStepLevel(train.TrainLoad, train.DynamicState.Speed, int32(vs.AtoStepLevel.Number()), train.TrainMaxAcc, train.TrainMaxSpeed)
|
||||||
|
vs.TractionForce = f / 1000 * 100
|
||||||
|
vs.TractionStatus = true
|
||||||
|
notBreak = 1
|
||||||
|
} else if vs.AtoBrakeCommand {
|
||||||
|
f := trainBrakeAtoStepLevel(train.TrainLoad, int32(vs.AtoStepLevel.Number()), train.TrainMaxBrake)
|
||||||
|
vs.BrakeForce = f / 1000 * 100
|
||||||
|
vs.BrakingStatus = true
|
||||||
|
brakeState = 1
|
||||||
|
}
|
||||||
|
msg := []message.TrainPcSimBaseMessage{
|
||||||
|
{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.TRAIN_BRAKE_STATE, brakeState}},
|
||||||
|
|
||||||
|
{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.NOT_BREAK, notBreak}},
|
||||||
|
}
|
||||||
|
slog.Info(fmt.Sprintf("列车 id:%v,ato:%v,AtoLevle:%v,牵引:%v,制动:%v,牵引力:%v,制动力%v", train.Id, vs.Ato, vs.AtoStepLevel, vs.AtoTractionCommandOut, vs.AtoBrakeCommand, vs.TractionForce, vs.BrakeForce))
|
||||||
|
train_pc_sim.Default().SendTrainControlMsg(train, msg)
|
||||||
|
}
|
||||||
|
|
||||||
// 列车牵引控制
|
// 列车牵引控制
|
||||||
func trainControlHandle(speed int32, vobc *state_proto.TrainVobcState, tcc *state_proto.TrainControlState, request *request_proto.TrainControl_PushHandler, deviceId uint32, tccGraphic *data_proto.TccGraphicStorage) []message.TrainPcSimBaseMessage {
|
func trainControlHandle(train *state_proto.TrainState, request *request_proto.TrainControl_PushHandler, deviceId uint32, tccGraphic *data_proto.TccGraphicStorage) []message.TrainPcSimBaseMessage {
|
||||||
_, find := findTrainTccGraphicDataHandler(tccGraphic, deviceId)
|
_, find := findTrainTccGraphicDataHandler(tccGraphic, deviceId)
|
||||||
if !find {
|
if !find {
|
||||||
slog.Error("未找到对应的牵引制动手柄设备deviceId:", deviceId)
|
slog.Error("未找到对应的牵引制动手柄设备deviceId:", deviceId)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
tcc := train.Tcc
|
||||||
|
vobc := train.VobcState
|
||||||
jjzdBtn := tcc.Buttons[JJZD]
|
jjzdBtn := tcc.Buttons[JJZD]
|
||||||
vobc.TractionStatus = false
|
vobc.TractionStatus = false
|
||||||
vobc.TractionForce = 0
|
vobc.TractionForce = 0
|
||||||
vobc.BrakingStatus = false
|
vobc.BrakingStatus = false
|
||||||
vobc.BrakeForce = 0
|
vobc.BrakeForce = 0
|
||||||
vobc.MaintainBrakeStatus = false
|
vobc.MaintainBrakeStatus = false
|
||||||
notBreak := byte(0)
|
var notBreak byte = 0
|
||||||
var zeroState byte = 0
|
var zeroState byte = 0
|
||||||
var brakeState byte = 0
|
var brakeState byte = 0
|
||||||
//var traction byte = 0
|
//var traction byte = 0
|
||||||
|
|
||||||
if request.Val > 0 {
|
if request.Val > 0 {
|
||||||
vobc.TractionStatus = true
|
vobc.TractionStatus = true
|
||||||
vobc.TractionForce = trainTractionPower(vobc.TrainLoad, request.Val, speed) / 1000 * 100
|
vobc.TractionForce = trainTractionPower(train.TrainLoad, request.Val, train.DynamicState.Speed, train.TrainMaxAcc, train.TrainMaxSpeed) / 1000 * 100
|
||||||
notBreak = 1
|
notBreak = 1
|
||||||
//traction = 1
|
//traction = 1
|
||||||
} else if request.Val < 0 {
|
} else if request.Val < 0 {
|
||||||
vobc.BrakingStatus = true
|
vobc.BrakingStatus = true
|
||||||
vobc.BrakeForce = trainBraking(vobc.TrainLoad, request.Val) / 1000 * 100
|
vobc.BrakeForce = trainBraking(train.TrainLoad, request.Val, train.TrainMaxBrake) / 1000 * 100
|
||||||
vobc.EmergencyBrakingStatus = false
|
vobc.EmergencyBrakingStatus = false
|
||||||
jjzdBtn.Passed = false
|
jjzdBtn.Passed = false
|
||||||
brakeState = 1
|
brakeState = 1
|
||||||
@ -561,11 +622,11 @@ func (s *VerifySimulation) reportTrainMockInitMsg(train *state_proto.TrainState,
|
|||||||
}
|
}
|
||||||
if state == 0 {
|
if state == 0 {
|
||||||
jjzdBtn := tcc.Buttons[JJZD]
|
jjzdBtn := tcc.Buttons[JJZD]
|
||||||
ebTce := controlEBBtn(vobc, true, jjzdBtn)
|
ebTce := controlEBBtn(train, true, jjzdBtn)
|
||||||
tce = append(tce, ebTce...)
|
tce = append(tce, ebTce...)
|
||||||
} else if message.GetBit(data1, 0) == 0 {
|
} else if message.GetBit(data1, 0) == 0 {
|
||||||
jjzdBtn := tcc.Buttons[JJZD]
|
jjzdBtn := tcc.Buttons[JJZD]
|
||||||
ebTce := controlEBBtn(vobc, true, jjzdBtn)
|
ebTce := controlEBBtn(train, true, jjzdBtn)
|
||||||
tce = append(tce, ebTce...)
|
tce = append(tce, ebTce...)
|
||||||
tce = append(tce, message.TrainPcSimBaseMessage{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.OUTER_EMERGENCY_BRAKE, state}})
|
tce = append(tce, message.TrainPcSimBaseMessage{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.OUTER_EMERGENCY_BRAKE, state}})
|
||||||
tce = append(tce, message.TrainPcSimBaseMessage{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.TRAIN_TRACTION_CUTED, 1}})
|
tce = append(tce, message.TrainPcSimBaseMessage{Type: message.SENDER_TRAIN_OUTR_INFO, Data: []byte{message.TRAIN_TRACTION_CUTED, 1}})
|
||||||
@ -594,52 +655,41 @@ func (s *VerifySimulation) reportTrainMockInitMsg(train *state_proto.TrainState,
|
|||||||
train_pc_sim.Default().SendTrainControlMsg(train, tce)
|
train_pc_sim.Default().SendTrainControlMsg(train, tce)
|
||||||
//return initResult
|
//return initResult
|
||||||
}
|
}
|
||||||
|
func trainAtoLevel(at3, at2, at1 bool) state_proto.TrainVobcState_AtoStepLevel {
|
||||||
const (
|
|
||||||
ATO_LEVEL_NONE = iota
|
|
||||||
ATO_LEVEL_1
|
|
||||||
ATO_LEVEL_2
|
|
||||||
ATO_LEVEL_3
|
|
||||||
ATO_LEVEL_4
|
|
||||||
ATO_LEVEL_5
|
|
||||||
ATO_LEVEL_6
|
|
||||||
ATO_LEVEL_7
|
|
||||||
)
|
|
||||||
|
|
||||||
func trainAtoLevel(ato3, ato2, ato1 byte) int32 {
|
|
||||||
switch {
|
switch {
|
||||||
case ato3 == 0 && ato2 == 0 && ato1 == 1:
|
case at3 == false && at2 == false && at1 == true:
|
||||||
return ATO_LEVEL_1
|
return state_proto.TrainVobcState_ATO_STEP_LEVEL_1
|
||||||
case ato3 == 0 && ato2 == 1 && ato1 == 1:
|
|
||||||
return ATO_LEVEL_2
|
case at3 == false && at2 == true && at1 == true:
|
||||||
case ato3 == 0 && ato2 == 1 && ato1 == 0:
|
return state_proto.TrainVobcState_ATO_STEP_LEVEL_2
|
||||||
return ATO_LEVEL_3
|
case at3 == false && at2 == true && at1 == false:
|
||||||
case ato3 == 1 && ato2 == 1 && ato1 == 0:
|
return state_proto.TrainVobcState_ATO_STEP_LEVEL_3
|
||||||
return ATO_LEVEL_4
|
case at3 == true && at2 == true && at1 == false:
|
||||||
case ato3 == 1 && ato2 == 0 && ato1 == 0:
|
return state_proto.TrainVobcState_ATO_STEP_LEVEL_4
|
||||||
return ATO_LEVEL_5
|
case at3 == true && at2 == false && at1 == false:
|
||||||
case ato3 == 1 && ato2 == 0 && ato1 == 1:
|
return state_proto.TrainVobcState_ATO_STEP_LEVEL_5
|
||||||
return ATO_LEVEL_6
|
case at3 == true && at2 == false && at1 == true:
|
||||||
case ato3 == 1 && ato2 == 1 && ato1 == 1:
|
return state_proto.TrainVobcState_ATO_STEP_LEVEL_6
|
||||||
return ATO_LEVEL_7
|
case at3 == true && at2 == true && at1 == true:
|
||||||
|
return state_proto.TrainVobcState_ATO_STEP_LEVEL_7
|
||||||
default:
|
default:
|
||||||
return ATO_LEVEL_NONE
|
return state_proto.TrainVobcState_ATO_STEP_LEVEL_NONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4.4.1. 车载输出数字量信息报文内容
|
// 4.4.1. 车载输出数字量信息报文内容
|
||||||
func (s *VerifySimulation) TrainPcSimDigitalOutInfoHandle(train *state_proto.TrainState, data []byte) {
|
func (s *VerifySimulation) TrainPcSimDigitalOutInfoHandle(train *state_proto.TrainState, data []byte) {
|
||||||
slog.Info("开始接受atp输出模拟量==============")
|
/* slog.Info("开始接受atp输出模拟量==============")
|
||||||
for i, d := range data {
|
for i, d := range data {
|
||||||
|
|
||||||
|
dd := &strings.Builder{}
|
||||||
|
for j := 0; j < 8; j++ {
|
||||||
|
dd.WriteString(fmt.Sprintf(" bit%v val:%v , ", j, message.GetBit(d, uint(j))))
|
||||||
|
}
|
||||||
|
slog.Info(fmt.Sprintf("接受atp模拟量id:%v,data:%b,bits:%v", i, d, dd.String()))
|
||||||
|
|
||||||
dd := &strings.Builder{}
|
|
||||||
for j := 0; j < 8; j++ {
|
|
||||||
dd.WriteString(fmt.Sprintf(" bit%v val:%v , ", j, message.GetBit(d, uint(j))))
|
|
||||||
}
|
}
|
||||||
slog.Info(fmt.Sprintf("接受atp模拟量id:%v,data:%b,bits:%v", i, d, dd.String()))
|
slog.Info("结束接受atp输出模拟量eeeeeeeeeeeeeeeeee")*/
|
||||||
|
|
||||||
}
|
|
||||||
slog.Info("结束接受atp输出模拟量eeeeeeeeeeeeeeeeee")
|
|
||||||
s.reportTrainMockInitMsg(train, data[4], data[1])
|
s.reportTrainMockInitMsg(train, data[4], data[1])
|
||||||
vobc := train.VobcState
|
vobc := train.VobcState
|
||||||
trainPcSimDigitalOutInfoHandleCode7_0(data[4], vobc)
|
trainPcSimDigitalOutInfoHandleCode7_0(data[4], vobc)
|
||||||
@ -647,7 +697,9 @@ func (s *VerifySimulation) TrainPcSimDigitalOutInfoHandle(train *state_proto.Tra
|
|||||||
trainPcSimDigitalOutInfoHandleCode23_16(data[2], vobc)
|
trainPcSimDigitalOutInfoHandleCode23_16(data[2], vobc)
|
||||||
trainPcSimDigitalOutInfoHandleCode31_24(data[1], vobc)
|
trainPcSimDigitalOutInfoHandleCode31_24(data[1], vobc)
|
||||||
trainPcSimDigitalOutInfoHandleCode39_32(data[0], vobc)
|
trainPcSimDigitalOutInfoHandleCode39_32(data[0], vobc)
|
||||||
|
if vobc.Ato {
|
||||||
|
vobc.AtoStepLevel = trainAtoLevel(vobc.AtoTractionCommand3, vobc.AtoTractionCommand2, vobc.AtoTractionCommand1)
|
||||||
|
}
|
||||||
//return initResult
|
//return initResult
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user