Package org.lfenergy.compas.sct.commons
Class SclService
java.lang.Object
org.lfenergy.compas.sct.commons.SclService
- All Implemented Interfaces:
SclEditor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addHistoryItem
(SCL scd, String who, String what, String why) Adds new HistoryItem in SCL filevoid
Adds IED in SCL file (Related DataTypeTemplate of SCL is updated also)void
addSubnetworks
(SCL scd, List<SubNetworkDTO> subNetworks, SCL icd) Adds new SubNetworks in SCL file from ICD filevoid
importSTDElementsInSCD
(SCL scd, List<SCL> stds, List<SubNetworkTypeDTO> subNetworkTypes) Imports IEDs, DataTypeTemplates and Communication nodes of STD files into SCL (SCD) file STD : System Template Definition To import STD into SCD, this step are realized Check SCD and STD compatibilities by checking if there is at least one ICD_SYSTEM_VERSION_UUID in LNode/Private CompasICDHeader of SCL/Substation/..Initialise SCD file with Header and Private SCLFileTypemanageMonitoringLns
(SCL scd) Update and/or create Monitoring LNs (LSVS and LGOS) for bound GOOSE and SMV Control Blocksvoid
updateDAI
(SCL scd, String iedName, String ldInst, DataAttributeRef dataAttributeRef) Updates DAI based on given data in dataAttributeRefupdateDoInRef
(SCL scd) Update DAIs of DO InRef in all LN0 of the SCD using matching ExtRef information.void
updateHeader
(@NonNull SCL scd, @NonNull HeaderDTO headerDTO) Updates Header of SCL fileupdateLDeviceStatus
(SCL scd) Activate used LDevice and Deactivate unused LDevice inTLNode
-
Constructor Details
-
SclService
public SclService()
-
-
Method Details
-
initScl
Description copied from interface:SclEditor
Initialise SCD file with Header and Private SCLFileType- Specified by:
initScl
in interfaceSclEditor
- Parameters:
hId
- SCL Header IDhVersion
- SCL Header VersionhRevision
- SCL Header Revision- Returns:
- SCL SCD object
- Throws:
ScdException
- throws when inconsistance in SCL file
-
addHistoryItem
Description copied from interface:SclEditor
Adds new HistoryItem in SCL file- Specified by:
addHistoryItem
in interfaceSclEditor
- Parameters:
scd
- SCL file in which new History should be addedwho
- Who realize the actionwhat
- What kind of action is realizedwhy
- Why this action is done
-
updateHeader
Description copied from interface:SclEditor
Updates Header of SCL file- Specified by:
updateHeader
in interfaceSclEditor
- Parameters:
scd
- SCL file in which Header should be updatedheaderDTO
- Header new values
-
addIED
Description copied from interface:SclEditor
Adds IED in SCL file (Related DataTypeTemplate of SCL is updated also)- Specified by:
addIED
in interfaceSclEditor
- Parameters:
scd
- SCL file in which IED should be addediedName
- name of IED to add in SCLicd
- ICD containing IED to add and related DataTypeTemplate- Throws:
ScdException
- throws when inconsistency between IED to add and SCL file content
-
addSubnetworks
Description copied from interface:SclEditor
Adds new SubNetworks in SCL file from ICD file- Specified by:
addSubnetworks
in interfaceSclEditor
- Parameters:
scd
- SCL file in which SubNetworks should be addedsubNetworks
- List of SubNetworks DTO contenting SubNetwork and ConnectedAp parameter namesicd
- ICD file from which SubNetworks functional data are copied from- Throws:
ScdException
- throws when no Communication in SCL and createIfNotExists == false
-
updateDAI
public void updateDAI(SCL scd, String iedName, String ldInst, DataAttributeRef dataAttributeRef) throws ScdException Description copied from interface:SclEditor
Updates DAI based on given data in dataAttributeRef- Specified by:
updateDAI
in interfaceSclEditor
- Parameters:
scd
- SCL file in which DataTypeTemplate of DAI should be foundiedName
- name of IED in which DAI is localizedldInst
- ldInst of LDevice in which DAI is localizeddataAttributeRef
- reference summarized DataTypeTemplate related to DAI to update- Throws:
ScdException
- when inconsistency are found in th SCL's DataTypeTemplate. Which should normally not happens.
-
importSTDElementsInSCD
public void importSTDElementsInSCD(SCL scd, List<SCL> stds, List<SubNetworkTypeDTO> subNetworkTypes) throws ScdException Description copied from interface:SclEditor
Imports IEDs, DataTypeTemplates and Communication nodes of STD files into SCL (SCD) file STD : System Template Definition To import STD into SCD, this step are realized- Check SCD and STD compatibilities by checking if there is at least one ICD_SYSTEM_VERSION_UUID in LNode/Private CompasICDHeader of SCL/Substation/.. not present in IED/Private CompasICDHeader of STD
- List all LNode/Private COMPAS-ICDHeader of SCL/Substation/.. and remove duplicated one with same iedName in order to ovoid repetition in actions
- For each Private.ICDSystemVersionUUID and Private.iedName in Substation/ of SCL find corresponding STD File
- import /IED /DataTypeTemplate from that STD file and update IEDName of /IED in SCD file
- import connectedAP and rename ConnectedAP/@iedName in Communication node in SCD file
- Specified by:
importSTDElementsInSCD
in interfaceSclEditor
- Parameters:
scd
- SCL object in which content of STD files are importedstds
- list of STD files contenting datas to import into SCDsubNetworkTypes
- couple of Subnetwork name and possible corresponding ConnectedAP names- Throws:
ScdException
- throws when inconsistency between Substation of SCL content and gien STD files as :- ICD_SYSTEM_VERSION_UUID in IED/Private of STD is not present in COMPAS-ICDHeader in Substation/../LNode of SCL
- There are several STD files corresponding to ICD_SYSTEM_VERSION_UUID of COMPAS-ICDHeader in Substation/../LNode of SCL
- There is no STD file found corresponding to COMPAS-ICDHeader in Substation/../LNode of SCL
- COMPAS-ICDHeader is not the same in Substation/../LNode of SCL and in IED/Private of STD
- COMPAS_ICDHEADER in Substation/../LNode of SCL not found in IED/Private of STD
-
updateLDeviceStatus
Description copied from interface:SclEditor
Activate used LDevice and Deactivate unused LDevice inTLNode
- Specified by:
updateLDeviceStatus
in interfaceSclEditor
- Parameters:
scd
- SCL file for which LDevice should be activated or deactivated- Returns:
- list of encountered errors
-
updateDoInRef
Description copied from interface:SclEditor
Update DAIs of DO InRef in all LN0 of the SCD using matching ExtRef information.- Specified by:
updateDoInRef
in interfaceSclEditor
- Parameters:
scd
- SCL file for which DOs InRef should be updated with matching ExtRef information- Returns:
- list of encountered errors
-
manageMonitoringLns
Description copied from interface:SclEditor
Update and/or create Monitoring LNs (LSVS and LGOS) for bound GOOSE and SMV Control Blocks- Specified by:
manageMonitoringLns
in interfaceSclEditor
- Parameters:
scd
- SCL file for which LNs (LSVS and LGOS) should be updated and/or created in each LDevice LDSUIED with matching ExtRef information- Returns:
- list of encountered errors
-