rts-sim-testing-service/ts/simulation/wayside/memory/wayside_memory_section.go

29 lines
908 B
Go
Raw Normal View History

2023-10-23 18:01:48 +08:00
package memory
import (
2023-10-26 17:16:07 +08:00
"log/slog"
2023-10-24 10:19:51 +08:00
"joylink.club/bj-rtsts-server/dto"
"joylink.club/bj-rtsts-server/dto/request_proto"
2023-10-26 17:16:07 +08:00
"joylink.club/bj-rtsts-server/ts/protos/graphicData"
2023-10-24 10:19:51 +08:00
"joylink.club/rtsssimulation/fi"
2023-10-23 18:01:48 +08:00
)
2023-10-24 10:19:51 +08:00
func ChangeAxleSectionState(simulation *VerifySimulation, req *dto.AxleSectionOperationReqDto) {
sectionUid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &graphicData.Section{})
2023-10-24 13:20:36 +08:00
slog.Debug("操作计轴区段", "axleSectionUid", sectionUid)
2023-10-24 10:19:51 +08:00
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)
2023-10-31 11:30:18 +08:00
/*
case request_proto.Section_TrainIn:
fi.DriveAxleSectionTrainIn(simulation.World, sectionUid)
case request_proto.Section_TrainOut:
fi.DriveAxleSectionTrainOut(simulation.World, sectionUid)
*/
2023-10-24 10:19:51 +08:00
}
}