Skip to content

Commit

Permalink
feat(400-rsr-1034): Add a private LNodeStatus to the SSD file
Browse files Browse the repository at this point in the history
- create Utils for the new private COMPAS-LNodeStatus

Signed-off-by: JAFFRE Guillaume <guillaume.jaffre@rte-france.com>
  • Loading branch information
GuillaumeJAFFRE committed Jul 2, 2024
1 parent 5e68693 commit cdf8d1d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public enum PrivateEnum {
COMPAS_SCL_FILE_TYPE("COMPAS-SclFileType", TCompasSclFileType.class),
COMPAS_SYSTEM_VERSION("COMPAS-SystemVersion", TCompasSystemVersion.class),
COMPAS_TOPO("COMPAS-Topo", TCompasTopo.class),
COMPAS_IED_TYPE("COMPAS-IEDType", TCompasIEDType.class);
COMPAS_IED_TYPE("COMPAS-IEDType", TCompasIEDType.class),
COMPAS_LNODE_STATUS("COMPAS-LNodeStatus", TCompasLNodeStatus.class);

private static final Map<Class<?>, PrivateEnum> classToEnum = Arrays.stream(PrivateEnum.values()).collect(Collectors.toMap(
compasPrivateEnum -> compasPrivateEnum.compasClass,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ private static TPrivate createPrivate(JAXBElement<?> jaxbElement) {
return tPrivate;
}

/**
* Create Private of given type as parameter
* @param compasLNodeStatus type of Private to create
* @return created Private
*/
public static TPrivate createPrivate(TCompasLNodeStatus compasLNodeStatus) {
return createPrivate(objectFactory.createLNodeStatus(compasLNodeStatus));
}

/**
* Sorts in map of ICD_SYSTEM_VERSION_UUID and related Private coupled with all corresponding STD for all given STD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ public static Stream<Object> createPrivateTestSources() {
return Stream.of(new TCompasBay(),
new TCompasICDHeader(),
TCompasSclFileType.SCD,
new TCompasSystemVersion());
new TCompasSystemVersion(),
TCompasLNodeStatus.ON);
}

@Test
Expand Down

0 comments on commit cdf8d1d

Please sign in to comment.