-
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.
Merge pull request #237 from com-pas/feat/232_RSR-630-add_macaddress_…
…of_controlblock feat(#232): RSR-630 configure network for GSE and SMV ControlBlocks
- Loading branch information
Showing
41 changed files
with
2,352 additions
and
359 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
...ommons/src/main/java/org/lfenergy/compas/sct/commons/dto/ControlBlockNetworkSettings.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,36 @@ | ||
// SPDX-FileCopyrightText: 2023 RTE FRANCE | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.sct.commons.dto; | ||
|
||
import org.lfenergy.compas.scl2007b4.model.TDurationInMilliSec; | ||
import org.lfenergy.compas.sct.commons.scl.ied.ControlBlockAdapter; | ||
|
||
/** | ||
* This interface has a single method which provides network settings for a ControlBlock. | ||
* These are used to create: | ||
* - the Communication/SubNetwork/ConnectedAP/GSE element, which is the network configuration of a GSEControl block | ||
* - the Communication/SubNetwork/ConnectedAP/SMV element, which is the network configuration of a SampledValueControl block | ||
* It is a FunctionalInterface, so it can be implemented with a lambda expression. | ||
*/ | ||
@FunctionalInterface | ||
public interface ControlBlockNetworkSettings { | ||
|
||
/** | ||
* This method provides a vlanId, vlanPriority, minTime, maxTime for this ControlBlock. | ||
* vlanPriority will be ignored when vlanId is null. | ||
* | ||
* @param controlBlockAdapter ControlBlock for which we want to configure the communication section | ||
* @return network settings : All fields are optional (meaning fields can be null). | ||
* When the return value itself is null, the communication section will not be configured for this ControlBlock. | ||
*/ | ||
Settings getNetworkSettings(ControlBlockAdapter controlBlockAdapter); | ||
|
||
record Settings( | ||
Integer vlanId, | ||
Byte vlanPriority, | ||
TDurationInMilliSec minTime, | ||
TDurationInMilliSec maxTime) { | ||
} | ||
} |
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
Oops, something went wrong.