Class ControlBlockAdapter
java.lang.Object
org.lfenergy.compas.sct.commons.scl.SclElementAdapter<AbstractLNAdapter<? extends TAnyLN>,TControl>
org.lfenergy.compas.sct.commons.scl.ied.ControlBlockAdapter
public class ControlBlockAdapter
extends SclElementAdapter<AbstractLNAdapter<? extends TAnyLN>,TControl>
A representation of the model object
ControlBlockAdapter
.
The following features are supported:
-
Field Summary
Fields inherited from class org.lfenergy.compas.sct.commons.scl.SclElementAdapter
currentElem, parentAdapter
-
Constructor Summary
ConstructorDescriptionControlBlockAdapter
(AbstractLNAdapter<? extends TAnyLN> parentAdapter, TControl tControl) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTargetIfNotExists
(AbstractLNAdapter<?> targetLn) Add a ClientLN to ReportControl or IEDName to GSEControl/SampleValueControl, if it does not already exist.protected boolean
Check if node is child of the reference nodeconfigureNetwork
(long appId, String macAddress, Integer vlanId, Byte vlanPriority, TDurationInMilliSec minTime, TDurationInMilliSec maxTime) Configure the Communication section for this ControlBlock - Communication/SubNetwork/ConnectedAP/GSE for GSEControl block - Communication/SubNetwork/ConnectedAP/SMV for SampledValueControl blockprotected String
Returns local XPathgetName()
Get the name of this ControlBlockGet parent IEDMethods inherited from class org.lfenergy.compas.sct.commons.scl.SclElementAdapter
addPrivate, amRootElement, buildFatalReportItem, customInit, getXPath, setCurrentElem
-
Constructor Details
-
ControlBlockAdapter
-
-
Method Details
-
getControlBlockEnum
-
amChildElementRef
protected boolean amChildElementRef()Check if node is child of the reference node- Specified by:
amChildElementRef
in classSclElementAdapter<AbstractLNAdapter<? extends TAnyLN>,
TControl> - Returns:
- link parent child existence
-
elementXPath
Returns local XPath- Specified by:
elementXPath
in classSclElementAdapter<AbstractLNAdapter<? extends TAnyLN>,
TControl> - Returns:
- XPath for current element (not including parent XPath)
-
getName
Get the name of this ControlBlock- Returns:
- name of ControlBlock
-
addTargetIfNotExists
Add a ClientLN to ReportControl or IEDName to GSEControl/SampleValueControl, if it does not already exist.- Parameters:
targetLn
- target LN (where the target ExtRef is)
-
configureNetwork
public Optional<SclReportItem> configureNetwork(long appId, String macAddress, Integer vlanId, Byte vlanPriority, TDurationInMilliSec minTime, TDurationInMilliSec maxTime) Configure the Communication section for this ControlBlock - Communication/SubNetwork/ConnectedAP/GSE for GSEControl block - Communication/SubNetwork/ConnectedAP/SMV for SampledValueControl block- Parameters:
appId
- value for P type APPIDmacAddress
- value for P type MAC-AddressvlanId
- value for P type VLAN-IDvlanPriority
- value for P type VLAN-PRIORITYminTime
- MinTime ElementmaxTime
- MaxTime Element- Returns:
- An empty Optional if network have been configured, else a SclReportItem.
-
getParentIedAdapter
Get parent IED- Returns:
- ControlBlock's parent IEDAdapter
-