rts-sim-testing-service/ts/simulation/wayside/memory/wayside_memory_section.go
weizhihong 172f65b14c 【删除废弃文件夹中代码】
【调整消息服务代码】
【删除多余代码】
【调整方法、结构体名称】
2023-10-27 14:57:37 +08:00

26 lines
889 B
Go

package memory
import (
"log/slog"
"joylink.club/bj-rtsts-server/dto"
"joylink.club/bj-rtsts-server/dto/request_proto"
"joylink.club/bj-rtsts-server/ts/protos/graphicData"
"joylink.club/rtsssimulation/fi"
)
func ChangeAxleSectionState(simulation *VerifySimulation, req *dto.AxleSectionOperationReqDto) {
sectionUid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &graphicData.Section{})
slog.Debug("操作计轴区段", "axleSectionUid", sectionUid)
switch req.Operation {
case request_proto.Section_Drst:
fi.DriveAxleSectionDrst(simulation.World, sectionUid, req.Reset)
case request_proto.Section_Pdrst:
fi.DriveAxleSectionPdrst(simulation.World, sectionUid, req.Reset)
case request_proto.Section_TrainIn:
fi.DriveAxleSectionTrainIn(simulation.World, sectionUid)
case request_proto.Section_TrainOut:
fi.DriveAxleSectionTrainOut(simulation.World, sectionUid)
}
}