diff --git a/rts-sim-module b/rts-sim-module index 4371dad..8ccd46a 160000 --- a/rts-sim-module +++ b/rts-sim-module @@ -1 +1 @@ -Subproject commit 4371dad391e895abcbe7a13fdcd60f74bd5c5677 +Subproject commit 8ccd46aa6c97a933fd12c7b308da929115c9aa8e diff --git a/ts/simulation/wayside/memory/wayside_memory_ckm.go b/ts/simulation/wayside/memory/wayside_memory_ckm.go index f5738e6..19ba141 100644 --- a/ts/simulation/wayside/memory/wayside_memory_ckm.go +++ b/ts/simulation/wayside/memory/wayside_memory_ckm.go @@ -29,11 +29,24 @@ func setParam(simulation *VerifySimulation, req *request_proto.CkmOperationReq) entry, ok := wd.EntityMap[uid] if ok { entry.AddComponent(appcomponent.CkmParamType, unsafe.Pointer(req.Param)) + //故障 if req.Param.Fault == request_proto.Ckm_FA_State_Loss { setRelayStateLoss(entry) } else { clearRelayStateLoss(entry) } + //强制 + switch req.Param.Force { + case request_proto.Ckm_F_NONE: + entry.RemoveComponent(component.CkmForceCloseTag) + entry.RemoveComponent(component.CkmForceOpenTag) + case request_proto.Ckm_F_KM: + entry.AddComponent(component.CkmForceOpenTag) + entry.RemoveComponent(component.CkmForceCloseTag) + case request_proto.Ckm_F_GM: + entry.AddComponent(component.CkmForceCloseTag) + entry.RemoveComponent(component.CkmForceOpenTag) + } } else { return ecs.NewErrResult(fmt.Errorf("未找到id=%s的实体", uid)) }