Skip to content

Make IEC61850 client port configurable #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.opensmartgridplatform.shared.infra.networking.DisposableNioEventLoopGroup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
Expand Down Expand Up @@ -72,14 +71,6 @@ public class Iec61850Config extends AbstractConfig {
private static final String PROPERTY_NAME_OSLP_DEFAULT_LATITUDE = "iec61850.default.latitude";
private static final String PROPERTY_NAME_OSLP_DEFAULT_LONGITUDE = "iec61850.default.longitude";

@Value("${iec61850.default.port:102}")
private int defaultPort;

@Bean
public int iec61850DefaultPort() {
return this.defaultPort;
}

@Bean
public int connectionTimeout() {
return Integer.parseInt(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

@Component
@DependsOn({
"iec61850PortClient",
"iec61850SsldPortServer",
"iec61850RtuPortServer",
"responseTimeout",
Expand All @@ -67,7 +68,7 @@ public class Iec61850DeviceConnectionService {

@Autowired private Iec61850Client iec61850Client;

@Autowired private int iec61850DefaultPort;
@Autowired private int iec61850PortClient;

@Autowired private int iec61850SsldPortServer;

Expand Down Expand Up @@ -220,7 +221,7 @@ private int determinePortForIec61850Device(final IED ied, final Iec61850Device i
} else if (IED.ZOWN_RTU.equals(ied) || IED.DA_RTU.equals(ied)) {
port = this.iec61850RtuPortServer;
} else {
port = this.iec61850DefaultPort;
port = this.iec61850PortClient;
}
return port;
}
Expand Down