-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Create interface for Services and replace static methods with i…
…nstance methods closes #110 Signed-off-by: Samir Romdhani <[email protected]>
- Loading branch information
1 parent
985b66e
commit 0cc11f0
Showing
23 changed files
with
1,651 additions
and
1,141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
sct-commons/src/main/java/org/lfenergy/compas/sct/commons/dto/PrivateLinkedToSTDs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-FileCopyrightText: 2023 RTE FRANCE | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.sct.commons.dto; | ||
|
||
import org.lfenergy.compas.scl2007b4.model.SCL; | ||
import org.lfenergy.compas.scl2007b4.model.TPrivate; | ||
|
||
import java.util.List; | ||
|
||
public record PrivateLinkedToSTDs(TPrivate tPrivate, List<SCL> stdList) { | ||
|
||
} |
80 changes: 80 additions & 0 deletions
80
sct-commons/src/main/java/org/lfenergy/compas/sct/commons/scl/IExtRefService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
// SPDX-FileCopyrightText: 2023 RTE FRANCE | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
|
||
package org.lfenergy.compas.sct.commons.scl; | ||
|
||
import org.lfenergy.compas.scl2007b4.model.SCL; | ||
import org.lfenergy.compas.scl2007b4.model.TExtRef; | ||
import org.lfenergy.compas.sct.commons.dto.ControlBlockNetworkSettings; | ||
import org.lfenergy.compas.sct.commons.dto.SclReportItem; | ||
import org.lfenergy.compas.sct.commons.util.ILDEPFSettings; | ||
import org.lfenergy.compas.sct.commons.util.Utils; | ||
|
||
import java.util.List; | ||
|
||
public interface IExtRefService { | ||
|
||
/** | ||
* Updates iedName attribute of all ExtRefs in the Scd. | ||
* | ||
* @return list of encountered errors | ||
*/ | ||
List<SclReportItem> updateAllExtRefIedNames(SCL scd); | ||
|
||
/** | ||
* Create All DataSet and ControlBlock in the SCL based on the ExtRef | ||
* | ||
* @param scd input SCD object. It could be modified by adding new DataSet and ControlBlocks | ||
* @return list of encountered errors | ||
*/ | ||
List<SclReportItem> createDataSetAndControlBlocks(SCL scd); | ||
|
||
/** | ||
* Create All DataSet and ControlBlock for the ExtRef in given IED | ||
* | ||
* @param scd input SCD object. The object will be modified with the new DataSet and ControlBlocks | ||
* @param targetIedName the name of the IED where the ExtRef are | ||
* @return list of encountered errors | ||
*/ | ||
List<SclReportItem> createDataSetAndControlBlocks(SCL scd, String targetIedName); | ||
|
||
/** | ||
* Create All DataSet and ControlBlock for the ExtRef in this LDevice | ||
* | ||
* @param scd input SCD object. The object will be modified with the new DataSet and ControlBlocks | ||
* @param targetIedName the name of the IED where the ExtRef are | ||
* @param targetLDeviceInst the name of the LDevice where the ExtRef are | ||
* @return list of encountered errors | ||
*/ | ||
List<SclReportItem> createDataSetAndControlBlocks(SCL scd, String targetIedName, String targetLDeviceInst); | ||
|
||
/** | ||
* Configure the network for all the ControlBlocks. | ||
* Create (or update if already existing) these elements | ||
* - the Communication/SubNetwork/ConnectedAP/GSE element, for the GSEControl blocks | ||
* - the Communication/SubNetwork/ConnectedAP/SMV element, for the SampledValueControl blocks | ||
* | ||
* @param scd input SCD object. The object will be modified with the new DataGSESet and SMV elements | ||
* @param controlBlockNetworkSettings a method tha gives the network configuration information for a given ControlBlock | ||
* @param rangesPerCbType provide NetworkRanges for GSEControl and SampledValueControl. NetworkRanges contains : | ||
* start-end app APPID range (long value), start-end MAC-Addresses (Mac-Addresses values: Ex: "01-0C-CD-01-01-FF") | ||
* @return list of encountered errors | ||
* @see Utils#macAddressToLong(String) for the expected MAC address format | ||
* @see ControlBlockNetworkSettings | ||
* @see ControlBlockNetworkSettings.RangesPerCbType | ||
* @see ControlBlockNetworkSettings.NetworkRanges | ||
*/ | ||
List<SclReportItem> configureNetworkForAllControlBlocks(SCL scd, ControlBlockNetworkSettings controlBlockNetworkSettings, | ||
ControlBlockNetworkSettings.RangesPerCbType rangesPerCbType); | ||
|
||
/** | ||
* ExtRef Binding For LDevice (inst=LDEPF) that matching LDEPF configuration | ||
* @param scd SCL | ||
* @param settings ILDEPFSettings | ||
* @return list of encountered errors | ||
*/ | ||
List<SclReportItem> manageBindingForLDEPF(SCL scd, ILDEPFSettings settings); | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
sct-commons/src/main/java/org/lfenergy/compas/sct/commons/scl/IHmiService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-FileCopyrightText: 2023 RTE FRANCE | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.sct.commons.scl; | ||
|
||
import org.lfenergy.compas.scl2007b4.model.SCL; | ||
import org.lfenergy.compas.scl2007b4.model.TFCDA; | ||
|
||
import java.util.List; | ||
|
||
public interface IHmiService { | ||
|
||
/** | ||
* Create the DataSet and ReportControl Blocks for the HMI with the given FCDAs. | ||
* | ||
* @param fcdas List of FCDA for which we must create the DataSet and ReportControl Blocks | ||
*/ | ||
void createAllHmiReportControlBlocks(SCL scd, List<TFCDA> fcdas); | ||
} |
Oops, something went wrong.