列车pc仿真

This commit is contained in:
tiger_zhou 2024-04-02 18:29:00 +08:00
parent edf154afa3
commit b4b2fc9e72

View File

@ -6,7 +6,6 @@ import (
"joylink.club/bj-rtsts-server/config" "joylink.club/bj-rtsts-server/config"
"joylink.club/bj-rtsts-server/dto/state_proto" "joylink.club/bj-rtsts-server/dto/state_proto"
"joylink.club/bj-rtsts-server/third_party/tcp" "joylink.club/bj-rtsts-server/third_party/tcp"
"joylink.club/bj-rtsts-server/ts/simulation/wayside/memory"
"joylink.club/ecs" "joylink.club/ecs"
"log/slog" "log/slog"
"sync" "sync"
@ -73,8 +72,8 @@ func (pc *trainPcSimService) Start(pcSimManage TrainPcSimManage) {
ctx, ctxFun := context.WithCancel(context.Background()) ctx, ctxFun := context.WithCancel(context.Background())
pc.cancleContext = ctxFun pc.cancleContext = ctxFun
pc.trainPcSimManage = pcSimManage pc.trainPcSimManage = pcSimManage
vs := pcSimManage.(*memory.VerifySimulation) //vs := pcSimManage.(*memory.VerifySimulation)
FireTrainControlEventType.Subscribe(vs.World, pc.trainControlEventHandle) //FireTrainControlEventType.Subscribe(vs.World, pc.trainControlEventHandle)
go pc.sendTrainLocationAndSpeedTask(ctx) go pc.sendTrainLocationAndSpeedTask(ctx)
} }