diff --git a/message_server/sfp_ms.go b/message_server/sfp_ms.go index 84ad541..a80a371 100644 --- a/message_server/sfp_ms.go +++ b/message_server/sfp_ms.go @@ -63,11 +63,11 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask { if err != nil { return err } - xcjStates, err := collectXcjStates(vs.World, mapId) + fymStates, err := collectFymStates(vs.World, mapId) if err != nil { return err } - fymStates, err := collectFymStates(vs.World, mapId) + xcjStates, err := collectXcjStates(vs.World, mapId) if err != nil { return err } @@ -101,7 +101,7 @@ func collectXcjStates(world ecs.World, mapId int32) ([]*state_proto.XcjState, er for _, xcj := range uidStructure.XcjIds { entry, ok := entity.GetEntityByUid(world, xcj.Uid) if ok { - state := &state_proto.XcjState{} + state := &state_proto.XcjState{Id: xcj.CommonId} xcjStates = append(xcjStates, state) //设置参数 var xcjParam *request_proto.XcjParam diff --git a/rts-sim-testing-message b/rts-sim-testing-message index eaa9de8..78f0ddf 160000 --- a/rts-sim-testing-message +++ b/rts-sim-testing-message @@ -1 +1 @@ -Subproject commit eaa9de89c7a5028260e5efcadcd0a37999de0b80 +Subproject commit 78f0ddfd2413bdac81d33ea2b199edaa4de9e6fb diff --git a/ts/simulation/wayside/memory/wayside_memory_map_init.go b/ts/simulation/wayside/memory/wayside_memory_map_init.go index 1252f1f..6b31dc9 100644 --- a/ts/simulation/wayside/memory/wayside_memory_map_init.go +++ b/ts/simulation/wayside/memory/wayside_memory_map_init.go @@ -663,6 +663,8 @@ func getUidMapByType(uidData any, m interface{}) map[uint32]*elementIdStructure return (uidData.(*StationUidStructure)).IbpIds case *data_proto.GarageDoor: return (uidData.(*StationUidStructure)).CkmIds + case *data_proto.CarWashing: + return (uidData.(*StationUidStructure)).XcjIds default: panic(&dto.ErrorDto{Code: dto.ArgumentParseError, Message: "类型未映射字段"}) } diff --git a/ts/simulation/wayside/memory/wayside_memory_xcj.go b/ts/simulation/wayside/memory/wayside_memory_xcj.go index 3a11b98..4b34b01 100644 --- a/ts/simulation/wayside/memory/wayside_memory_xcj.go +++ b/ts/simulation/wayside/memory/wayside_memory_xcj.go @@ -23,7 +23,7 @@ func XcjOperation(simulation *VerifySimulation, req *request_proto.XcjOperationR } func setXcjParam(simulation *VerifySimulation, req *request_proto.XcjOperationReq) *sys_error.BusinessError { - uid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &data_proto.GarageDoor{}) + uid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &data_proto.CarWashing{}) result := <-ecs.Request[ecs.EmptyType](simulation.World, func() ecs.Result[ecs.EmptyType] { wd := entity.GetWorldData(simulation.World) entry, ok := wd.EntityMap[uid]