日志调整及现场测试
This commit is contained in:
parent
ed4dc9a224
commit
650488e1c7
@ -94,11 +94,14 @@ func (s *semiPhysicalTrainImpl) Stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *semiPhysicalTrainImpl) SendTrainControlMessage(info *message.DynamicsTrainInfo) {
|
func (s *semiPhysicalTrainImpl) SendTrainControlMessage(info *message.DynamicsTrainInfo) {
|
||||||
|
if s.trainSpeedInfoUdpClient != nil {
|
||||||
sendMsg := &message.TrainSpeedMsg{}
|
sendMsg := &message.TrainSpeedMsg{}
|
||||||
sendMsg.DynamicsDecode(info)
|
sendMsg.DynamicsDecode(info)
|
||||||
s.trainSpeedInfoUdpClient.Send(sendMsg.Encode())
|
s.trainSpeedInfoUdpClient.Send(sendMsg.Encode())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func (s *semiPhysicalTrainImpl) initSemiPhysical() {
|
func (s *semiPhysicalTrainImpl) initSemiPhysical() {
|
||||||
s.trainSpeedInfoUdpClient = udp.NewClient(fmt.Sprintf("%v:%v", s.runConfig.Ip, s.runConfig.RemotePort))
|
s.trainSpeedInfoUdpClient = udp.NewClient(fmt.Sprintf("%v:%v", s.runConfig.Ip, s.runConfig.RemotePort))
|
||||||
s.trainControlUdpServer = udp.NewServer(fmt.Sprintf(":%d", s.runConfig.LocalPort), s.handleTrainControlMsg)
|
s.trainControlUdpServer = udp.NewServer(fmt.Sprintf(":%d", s.runConfig.LocalPort), s.handleTrainControlMsg)
|
||||||
|
Loading…
Reference in New Issue
Block a user