Compare commits

..

No commits in common. 'master' and 'v1.9.0' have entirely different histories.

@ -1,7 +1,6 @@
::BATCH file to windows
@echo off
::BATCH file for windows
set BATDIR=%~dp0
set LIBDIR="%BATDIR%..\build\libs-all\*"
set LIBDIR="%BATDIR%..\build\libs-all"
java -cp %LIBDIR% com.beanit.iec61850bean.app.ConsoleClient %*
java -Djava.ext.dirs=%LIBDIR% com.beanit.iec61850bean.app.ConsoleClient %*

@ -1,8 +1,6 @@
::BATCH file to windows
@echo off
set BATDIR=%~dp0
set LIBDIR="%BATDIR%..\build\libs-all\*"
java -Dlogback.configurationFile=logback.xml -cp %LIBDIR% com.beanit.iec61850bean.app.ConsoleServer %*
set LIBDIR="%BATDIR%..\build\libs-all"
java -Dlogback.configurationFile=logback.xml -Djava.ext.dirs=%LIBDIR% com.beanit.iec61850bean.app.ConsoleServer %*

@ -1,7 +1,6 @@
::BATCH file to windows
@echo off
set BATDIR=%~dp0
set LIBDIR="%BATDIR%..\build\libs-all\*"
set LIBDIR="%BATDIR%..\build\libs-all"
java -cp %LIBDIR% com.beanit.iec61850bean.clientgui.ClientGui %*
java -Djava.ext.dirs=%LIBDIR% com.beanit.iec61850bean.clientgui.ClientGui %*

@ -6,9 +6,9 @@ plugins {
signing
eclipse
id("biz.aQute.bnd.builder") version "5.1.1"
id("com.diffplug.spotless") version "5.9.0"
id("io.codearte.nexus-staging") version "0.22.0"
id("net.ltgt.errorprone") version "1.3.0"
id("com.diffplug.gradle.spotless") version "4.4.0"
id("io.codearte.nexus-staging") version "0.21.2"
id("net.ltgt.errorprone") version "1.2.1"
}
var cfgJavaVersion = JavaVersion.VERSION_1_8
@ -21,7 +21,7 @@ val sonatypeStagingProfileId: String? by project
//----------- project specific configuration start --------------------
val cfgVersion = "1.9.1-SNAPSHOT"
val cfgVersion = "1.9.0"
val cfgGroup = "com.beanit"
val cfgCopyToRoot = false
val cfgSignPom = true
@ -40,6 +40,8 @@ tasks.register<Tar>("tar") {
into(project.name) {
from("./") {
include("build.gradle.kts")
include("configuration.gradle.kts")
include("settings.gradle.kts")
include("LICENSE.txt")
include("doc/**")
include("bin/**")
@ -130,7 +132,7 @@ configure(javaProjects) {
apply(plugin = "signing")
apply(plugin = "eclipse")
apply(plugin = "biz.aQute.bnd.builder")
apply(plugin = "com.diffplug.spotless")
apply(plugin = "com.diffplug.gradle.spotless")
apply(plugin = "net.ltgt.errorprone")
tasks.publish {
@ -149,9 +151,9 @@ configure(javaProjects) {
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.7.0")
testImplementation("com.tngtech.archunit:archunit-junit5:0.15.0")
errorprone("com.google.errorprone:error_prone_core:2.5.1")
testImplementation("org.junit.jupiter:junit-jupiter:5.6.2")
testImplementation("com.tngtech.archunit:archunit-junit5:0.14.1")
errorprone("com.google.errorprone:error_prone_core:2.4.0")
}
tasks.test {

@ -61,7 +61,7 @@ public final class BdaOptFlds extends BdaBitString {
if (reportTimestamp) {
value[0] = (byte) (value[0] | 0x20);
} else {
value[0] = (byte) (value[0] & 0xdf);
value[0] = (byte) (value[0] & 0x2f);
}
}

@ -110,7 +110,6 @@ public final class ClientAssociation {
private int responseTimeout;
private int invokeId = 0;
private byte[] servicesSupported = null;
private int negotiatedMaxPduSize;
private ClientEventListener reportListener = null;
@ -391,16 +390,6 @@ public final class ClientAssociation {
return invokeId;
}
/**
* Gets the ServicesSupported. The 11-byte array of bit flags is available after InitiateResponse
* is received from the server, otherwise null is returned
*
* @return the ServicesSupported byte array, or null.
*/
public byte[] getServicesSupported() {
return servicesSupported;
}
private ConfirmedServiceResponse encodeWriteReadDecode(ConfirmedServiceRequest serviceRequest)
throws ServiceError, IOException {
@ -578,7 +567,7 @@ public final class ClientAssociation {
throw new IOException("Unsupported version number was negotiated.");
}
servicesSupported =
byte[] servicesSupported =
initiateResponsePdu.getInitResponseDetail().getServicesSupportedCalled().value;
if ((servicesSupported[0] & 0x40) != 0x40) {
throw new IOException("Obligatory services are not supported by the server.");
@ -2110,17 +2099,15 @@ public final class ClientAssociation {
closed = true;
acseAssociation.close();
lastIOException = e;
if (reportListener != null) {
Thread t1 =
new Thread(
new Runnable() {
@Override
public void run() {
reportListener.associationClosed(lastIOException);
}
});
t1.start();
}
Thread t1 =
new Thread(
new Runnable() {
@Override
public void run() {
reportListener.associationClosed(lastIOException);
}
});
t1.start();
MMSpdu mmsPdu = new MMSpdu();
mmsPdu.setConfirmedRequestPDU(new ConfirmedRequestPDU());

@ -33,11 +33,11 @@ public final class ClientSap {
private static final byte[] DEFAULT_TSEL_LOCAL = new byte[] {0, 0};
private static final byte[] DEFAULT_TSEL_REMOTE = new byte[] {0, 1};
private static final int DEFAULT_TPDU_SIZE_PARAMETER = 10; // size = 1024
private static final int DEFAUTL_TPDU_SIZE_PARAMETER = 10; // size = 1024
private final int proposedMaxServOutstandingCalling = 5;
private final int proposedMaxServOutstandingCalled = 5;
private final int proposedDataStructureNestingLevel = 10;
private final ClientAcseSap acseSap;
private int proposedMaxServOutstandingCalling = 5;
private int proposedMaxServOutstandingCalled = 5;
private int proposedDataStructureNestingLevel = 10;
private int proposedMaxMmsPduSize = 65000;
private byte[] servicesSupportedCalling =
new byte[] {(byte) 0xee, 0x1c, 0, 0, 0x04, 0x08, 0, 0, 0x79, (byte) 0xef, 0x18};
@ -49,7 +49,7 @@ public final class ClientSap {
acseSap = new ClientAcseSap();
acseSap.tSap.tSelLocal = DEFAULT_TSEL_LOCAL;
acseSap.tSap.tSelRemote = DEFAULT_TSEL_REMOTE;
acseSap.tSap.setMaxTPDUSizeParam(DEFAULT_TPDU_SIZE_PARAMETER);
acseSap.tSap.setMaxTPDUSizeParam(DEFAUTL_TPDU_SIZE_PARAMETER);
}
/**
@ -62,7 +62,7 @@ public final class ClientSap {
acseSap = new ClientAcseSap(socketFactory);
acseSap.tSap.tSelLocal = DEFAULT_TSEL_LOCAL;
acseSap.tSap.tSelRemote = DEFAULT_TSEL_REMOTE;
acseSap.tSap.setMaxTPDUSizeParam(DEFAULT_TPDU_SIZE_PARAMETER);
acseSap.tSap.setMaxTPDUSizeParam(DEFAUTL_TPDU_SIZE_PARAMETER);
}
/**
@ -91,18 +91,6 @@ public final class ClientSap {
}
}
public void setProposedMaxServOutstandingCalling(int proposedMaxServOutstandingCalling) {
this.proposedMaxServOutstandingCalling = proposedMaxServOutstandingCalling;
}
public void setProposedMaxServOutstandingCalled(int proposedMaxServOutstandingCalled) {
this.proposedMaxServOutstandingCalled = proposedMaxServOutstandingCalled;
}
public void setProposedDataStructureNestingLevel(int proposedDataStructureNestingLevel) {
this.proposedDataStructureNestingLevel = proposedDataStructureNestingLevel;
}
/**
* Gets the ServicesSupportedCalling parameter.
*

@ -28,25 +28,20 @@ public class SequenceNumber {
public static int getIncrement(int value, int minValue, int maxValue) {
assert (value >= minValue) && (value <= maxValue);
return (value == maxValue) ? minValue : value + 1;
if (value == maxValue) {
return minValue;
} else {
return ++value;
}
}
public int getAndIncrement() {
int oldValue = value;
value = (value == maxValue) ? minValue : value + 1;
if (value == maxValue) {
value = minValue;
} else {
++value;
}
return oldValue;
}
public int get() {
return value;
}
public void increment() {
value = (value == maxValue) ? minValue : value + 1;
}
public int incrementAndGet() {
value = (value == maxValue) ? minValue : value + 1;
return value;
}
}

Loading…
Cancel
Save