diff --git a/bj-rtss-message b/bj-rtss-message index 280219a..ce7d7d4 160000 --- a/bj-rtss-message +++ b/bj-rtss-message @@ -1 +1 @@ -Subproject commit 280219a91abaa9c58fd9979ad7340fe5d85caad1 +Subproject commit ce7d7d49dc8e87dc93256eda90c0994105537421 diff --git a/message_server/sfp_ms.go b/message_server/sfp_ms.go index 13c8346..a54b0d0 100644 --- a/message_server/sfp_ms.go +++ b/message_server/sfp_ms.go @@ -2,7 +2,6 @@ package message_server import ( "fmt" - "strconv" "time" "google.golang.org/protobuf/proto" @@ -113,7 +112,7 @@ func (ms *SfpMs) collectPsdStates() ([]*state.PsdState, error) { for i, asdEntry := range list { asdState := component.AsdStateType.Get(asdEntry) asdStates[i] = &state.AsdState{ - Code: strconv.Itoa(i + 1), + Code: int32(i + 1), Kmdw: asdState.Kmdw, Gmdw: asdState.Gmdw, Mgj: asdState.Mgj, diff --git a/rtss_simulation b/rtss_simulation index d080a2a..dfe96a9 160000 --- a/rtss_simulation +++ b/rtss_simulation @@ -1 +1 @@ -Subproject commit d080a2a1fc3224f1a9c1696d57dad95635523956 +Subproject commit dfe96a977ccb283510934a15dfa0f3303620c278 diff --git a/ts/simulation/wayside/memory/wayside_memory_psd.go b/ts/simulation/wayside/memory/wayside_memory_psd.go index 3de4e49..9e939fe 100644 --- a/ts/simulation/wayside/memory/wayside_memory_psd.go +++ b/ts/simulation/wayside/memory/wayside_memory_psd.go @@ -4,6 +4,7 @@ import ( "fmt" "joylink.club/bj-rtsts-server/dto/request_proto" "joylink.club/bj-rtsts-server/ts/protos/graphicData" + "joylink.club/rtsssimulation/component/component_proto" "joylink.club/rtsssimulation/fi" ) @@ -24,10 +25,17 @@ func HandlePsdOperation(simulation *VerifySimulation, req *request_proto.PsdOper case request_proto.Psd_CancelGm: return fi.CancelInterlockGm(simulation.World, uid) case request_proto.Psd_ForceKm4: - case request_proto.Psd_ForceKm8: - case request_proto.Psd_ForceGm: + case request_proto.Psd_CancelForce: + case request_proto.Psd_AsdCannotClose: + return fi.SetPsdFault(simulation.World, uid, component_proto.Psd_AsdCannotClose, req.AsdCodes) + case request_proto.Psd_CancelAsdCannotClose: + return fi.CancelPsdFault(simulation.World, uid, component_proto.Psd_AsdCannotClose, req.AsdCodes) + case request_proto.Psd_AsdCannotOpen: + return fi.SetPsdFault(simulation.World, uid, component_proto.Psd_AsdCannotOpen, req.AsdCodes) + case request_proto.Psd_CancelAsdCannotOpen: + return fi.CancelPsdFault(simulation.World, uid, component_proto.Psd_AsdCannotOpen, req.AsdCodes) default: panic(fmt.Sprintf("未知的道岔操作:%s", req.Operation)) }