Class TrdpTopologyUtils
java.lang.Object
com.trdp.util.TrdpTopologyUtils
Shared topology validation logic per IEC 61375-2-3.
A zero value in either local or remote counter acts as a wildcard (always matches).
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValidTopology(int localEtb, int localOpTrn, int remoteEtb, int remoteOpTrn) Validates that local and remote topology counters are compatible.
-
Method Details
-
isValidTopology
public static boolean isValidTopology(int localEtb, int localOpTrn, int remoteEtb, int remoteOpTrn) Validates that local and remote topology counters are compatible.- Parameters:
localEtb- local ETB topology counter (0 = wildcard)localOpTrn- local operational train topology counter (0 = wildcard)remoteEtb- remote ETB topology counter (0 = wildcard)remoteOpTrn- remote operational train topology counter (0 = wildcard)- Returns:
- true if the topology is valid (counters match or either side is wildcard)
-