pull/20/head
Matthias Kruse 5 years ago
parent 0afb4f56a1
commit ef06aea374

@ -99,12 +99,12 @@ import java.util.concurrent.TimeoutException;
public final class ClientAssociation { public final class ClientAssociation {
private static final Integer16 version = new Integer16(new byte[] {(byte) 0x01, (byte) 0x01}); private static final Integer16 version = new Integer16(new byte[] {(byte) 0x01, (byte) 0x01});
private static final ParameterSupportOptions proposedParameterCbbBitString =
new ParameterSupportOptions(new byte[] {0x03, 0x05, (byte) 0xf1, 0x00});
private final ClientReceiver clientReceiver; private final ClientReceiver clientReceiver;
private final BlockingQueue<MMSpdu> incomingResponses = new LinkedBlockingQueue<>(); private final BlockingQueue<MMSpdu> incomingResponses = new LinkedBlockingQueue<>();
private final ReverseByteArrayOutputStream reverseOStream = private final ReverseByteArrayOutputStream reverseOStream =
new ReverseByteArrayOutputStream(500, true); new ReverseByteArrayOutputStream(500, true);
private static ParameterSupportOptions proposedParameterCbbBitString =
new ParameterSupportOptions(new byte[] {0x03, 0x05, (byte) 0xf1, 0x00});
ServerModel serverModel; ServerModel serverModel;
private AcseAssociation acseAssociation = null; private AcseAssociation acseAssociation = null;
private int responseTimeout; private int responseTimeout;
@ -582,6 +582,15 @@ public final class ClientAssociation {
public void setServerModel(ServerModel model) { public void setServerModel(ServerModel model) {
this.serverModel = model; this.serverModel = model;
} }
/**
* Set the ProposedParameterCbbBitString parameter, default is byte[] {0x03, 0x05, (byte) 0xf1, 0x00}.
*
* @param proposedParameterCbbBitString the new Proposed Parameter Cbb-Bit-String
*/
public static void setProposedParameterCbbBitString(ParameterSupportOptions proposedParameterCbbBitString) {
ClientAssociation.proposedParameterCbbBitString = proposedParameterCbbBitString;
}
/** /**
* Triggers all GetDirectory and GetDefinition ACSI services needed to get the complete server * Triggers all GetDirectory and GetDefinition ACSI services needed to get the complete server

@ -13,11 +13,13 @@
*/ */
package com.beanit.iec61850bean; package com.beanit.iec61850bean;
import com.beanit.josistack.ClientAcseSap;
import java.io.IOException; import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import javax.net.SocketFactory; import javax.net.SocketFactory;
import com.beanit.josistack.ClientAcseSap;
/** /**
* The <code>ClientSap</code> class represents the IEC 61850 service access point for client * The <code>ClientSap</code> class represents the IEC 61850 service access point for client
* applications. A client application that wants to connect to a server should first create an * applications. A client application that wants to connect to a server should first create an
@ -33,11 +35,11 @@ public final class ClientSap {
private static final byte[] DEFAULT_TSEL_LOCAL = new byte[] {0, 0}; 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 byte[] DEFAULT_TSEL_REMOTE = new byte[] {0, 1};
private static final int DEFAUTL_TPDU_SIZE_PARAMETER = 10; // size = 1024 private static final int DEFAULT_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 final ClientAcseSap acseSap;
private int proposedMaxServOutstandingCalling = 5;
private int proposedMaxServOutstandingCalled = 5;
private int proposedDataStructureNestingLevel = 10;
private int proposedMaxMmsPduSize = 65000; private int proposedMaxMmsPduSize = 65000;
private byte[] servicesSupportedCalling = private byte[] servicesSupportedCalling =
new byte[] {(byte) 0xee, 0x1c, 0, 0, 0x04, 0x08, 0, 0, 0x79, (byte) 0xef, 0x18}; new byte[] {(byte) 0xee, 0x1c, 0, 0, 0x04, 0x08, 0, 0, 0x79, (byte) 0xef, 0x18};
@ -49,7 +51,7 @@ public final class ClientSap {
acseSap = new ClientAcseSap(); acseSap = new ClientAcseSap();
acseSap.tSap.tSelLocal = DEFAULT_TSEL_LOCAL; acseSap.tSap.tSelLocal = DEFAULT_TSEL_LOCAL;
acseSap.tSap.tSelRemote = DEFAULT_TSEL_REMOTE; acseSap.tSap.tSelRemote = DEFAULT_TSEL_REMOTE;
acseSap.tSap.setMaxTPDUSizeParam(DEFAUTL_TPDU_SIZE_PARAMETER); acseSap.tSap.setMaxTPDUSizeParam(DEFAULT_TPDU_SIZE_PARAMETER);
} }
/** /**
@ -62,7 +64,7 @@ public final class ClientSap {
acseSap = new ClientAcseSap(socketFactory); acseSap = new ClientAcseSap(socketFactory);
acseSap.tSap.tSelLocal = DEFAULT_TSEL_LOCAL; acseSap.tSap.tSelLocal = DEFAULT_TSEL_LOCAL;
acseSap.tSap.tSelRemote = DEFAULT_TSEL_REMOTE; acseSap.tSap.tSelRemote = DEFAULT_TSEL_REMOTE;
acseSap.tSap.setMaxTPDUSizeParam(DEFAUTL_TPDU_SIZE_PARAMETER); acseSap.tSap.setMaxTPDUSizeParam(DEFAULT_TPDU_SIZE_PARAMETER);
} }
/** /**
@ -90,7 +92,31 @@ public final class ClientSap {
throw new IllegalArgumentException("maximum size is out of bound"); throw new IllegalArgumentException("maximum size is out of bound");
} }
} }
public int getProposedMaxServOutstandingCalling() {
return proposedMaxServOutstandingCalling;
}
public void setProposedMaxServOutstandingCalling(int proposedMaxServOutstandingCalling) {
this.proposedMaxServOutstandingCalling = proposedMaxServOutstandingCalling;
}
public int getProposedMaxServOutstandingCalled() {
return proposedMaxServOutstandingCalled;
}
public void setProposedMaxServOutstandingCalled(int proposedMaxServOutstandingCalled) {
this.proposedMaxServOutstandingCalled = proposedMaxServOutstandingCalled;
}
public int getProposedDataStructureNestingLevel() {
return proposedDataStructureNestingLevel;
}
public void setProposedDataStructureNestingLevel(int proposedDataStructureNestingLevel) {
this.proposedDataStructureNestingLevel = proposedDataStructureNestingLevel;
}
/** /**
* Gets the ServicesSupportedCalling parameter. * Gets the ServicesSupportedCalling parameter.
* *

Loading…
Cancel
Save