172f65b14c
【调整消息服务代码】 【删除多余代码】 【调整方法、结构体名称】
26 lines
889 B
Go
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)
|
|
}
|
|
}
|