updated generated asn1 files

pull/11/head
Stefan Feuerhahn 7 years ago
parent 3082a3739e
commit 2e268028e9

@ -1,5 +1,5 @@
#!/bin/sh
#!/bin/bash
rm ../../src/main/java-gen/org/openmuc/josistack/internal/acse/asn1/*
rm ../../src/main/java-gen/com/beanit/josistack/internal/acse/asn1/*
jasn1-compiler -o "../../src/main/java-gen/" -p "com.beanit.josistack.internal.acse" -f iso-acse-layer.asn
jasn1-compiler -o "../../src/main/java-gen/" -p "com.beanit.josistack.internal.acse" -f iso-acse-layer.asn -dv

@ -1,5 +1,5 @@
#!/bin/sh
#!/bin/bash
rm ../../src/main/java-gen/org/openmuc/josistack/internal/presentation/asn1/*.java
rm ../../src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/*.java
jasn1-compiler -o ../../src/main/java-gen/ -p com.beanit.josistack.internal.presentation -f iso-presentation-layer.asn
jasn1-compiler -o ../../src/main/java-gen/ -p com.beanit.josistack.internal.presentation -f iso-presentation-layer.asn -dv

@ -1,5 +1,5 @@
#!/bin/sh
#!/bin/bash
rm -r ../../src/main/java-gen/org/openmuc/openiec61850/internal/mms/asn1/*
rm -r ../../src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/*
jasn1-compiler -o "../../src/main/java-gen" -p "com.beanit.openiec61850.internal.mms" -f mms.asn
jasn1-compiler -o "../../src/main/java-gen" -p "com.beanit.openiec61850.internal.mms" -f mms.asn -dv

@ -81,7 +81,7 @@ def projectName = 'OpenIEC61850'
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.openmuc', name: 'jasn1-iec61850mod', version: '1.10.0'
compile group: 'com.beanit', name: 'jasn1', version: '1.11.0'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'com.toedter', name: 'jcalendar', version: '1.4'
}

@ -1,17 +1,18 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerBitString;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
public class AAREApdu implements Serializable {
public class AAREApdu implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 1);
private static final long serialVersionUID = 1L;
@ -151,18 +152,18 @@ public class AAREApdu implements Serializable {
this.userInformation = userInformation;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
@ -171,117 +172,117 @@ public class AAREApdu implements Serializable {
int sublength;
if (userInformation != null) {
codeLength += userInformation.encode(os, false);
codeLength += userInformation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 30
os.write(0xBE);
reverseOS.write(0xBE);
codeLength += 1;
}
if (implementationInformation != null) {
codeLength += implementationInformation.encode(os, false);
codeLength += implementationInformation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 29
os.write(0x9D);
reverseOS.write(0x9D);
codeLength += 1;
}
if (applicationContextNameList != null) {
codeLength += applicationContextNameList.encode(os, false);
codeLength += applicationContextNameList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 11
os.write(0xAB);
reverseOS.write(0xAB);
codeLength += 1;
}
if (respondingAuthenticationValue != null) {
sublength = respondingAuthenticationValue.encode(os);
sublength = respondingAuthenticationValue.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 10
os.write(0xAA);
reverseOS.write(0xAA);
codeLength += 1;
}
if (mechanismName != null) {
codeLength += mechanismName.encode(os, false);
codeLength += mechanismName.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 9
os.write(0x89);
reverseOS.write(0x89);
codeLength += 1;
}
if (responderAcseRequirements != null) {
codeLength += responderAcseRequirements.encode(os, false);
codeLength += responderAcseRequirements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 8
os.write(0x88);
reverseOS.write(0x88);
codeLength += 1;
}
if (respondingAEInvocationIdentifier != null) {
sublength = respondingAEInvocationIdentifier.encode(os, true);
sublength = respondingAEInvocationIdentifier.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 7
os.write(0xA7);
reverseOS.write(0xA7);
codeLength += 1;
}
if (respondingAPInvocationIdentifier != null) {
sublength = respondingAPInvocationIdentifier.encode(os, true);
sublength = respondingAPInvocationIdentifier.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 6
os.write(0xA6);
reverseOS.write(0xA6);
codeLength += 1;
}
if (respondingAEQualifier != null) {
sublength = respondingAEQualifier.encode(os);
sublength = respondingAEQualifier.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 5
os.write(0xA5);
reverseOS.write(0xA5);
codeLength += 1;
}
if (respondingAPTitle != null) {
sublength = respondingAPTitle.encode(os);
sublength = respondingAPTitle.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
os.write(0xA4);
reverseOS.write(0xA4);
codeLength += 1;
}
sublength = resultSourceDiagnostic.encode(os);
sublength = resultSourceDiagnostic.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 3
os.write(0xA3);
reverseOS.write(0xA3);
codeLength += 1;
sublength = result.encode(os, true);
sublength = result.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
sublength = applicationContextName.encode(os, true);
sublength = applicationContextName.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
if (protocolVersion != null) {
codeLength += protocolVersion.encode(os, false);
codeLength += protocolVersion.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -444,12 +445,11 @@ public class AAREApdu implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,17 +1,18 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerBitString;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
public class AARQApdu implements Serializable {
public class AARQApdu implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 0);
private static final long serialVersionUID = 1L;
@ -169,18 +170,18 @@ public class AARQApdu implements Serializable {
this.userInformation = userInformation;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
@ -189,139 +190,139 @@ public class AARQApdu implements Serializable {
int sublength;
if (userInformation != null) {
codeLength += userInformation.encode(os, false);
codeLength += userInformation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 30
os.write(0xBE);
reverseOS.write(0xBE);
codeLength += 1;
}
if (implementationInformation != null) {
codeLength += implementationInformation.encode(os, false);
codeLength += implementationInformation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 29
os.write(0x9D);
reverseOS.write(0x9D);
codeLength += 1;
}
if (applicationContextNameList != null) {
codeLength += applicationContextNameList.encode(os, false);
codeLength += applicationContextNameList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 13
os.write(0xAD);
reverseOS.write(0xAD);
codeLength += 1;
}
if (callingAuthenticationValue != null) {
sublength = callingAuthenticationValue.encode(os);
sublength = callingAuthenticationValue.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 12
os.write(0xAC);
reverseOS.write(0xAC);
codeLength += 1;
}
if (mechanismName != null) {
codeLength += mechanismName.encode(os, false);
codeLength += mechanismName.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 11
os.write(0x8B);
reverseOS.write(0x8B);
codeLength += 1;
}
if (senderAcseRequirements != null) {
codeLength += senderAcseRequirements.encode(os, false);
codeLength += senderAcseRequirements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 10
os.write(0x8A);
reverseOS.write(0x8A);
codeLength += 1;
}
if (callingAEInvocationIdentifier != null) {
sublength = callingAEInvocationIdentifier.encode(os, true);
sublength = callingAEInvocationIdentifier.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 9
os.write(0xA9);
reverseOS.write(0xA9);
codeLength += 1;
}
if (callingAPInvocationIdentifier != null) {
sublength = callingAPInvocationIdentifier.encode(os, true);
sublength = callingAPInvocationIdentifier.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 8
os.write(0xA8);
reverseOS.write(0xA8);
codeLength += 1;
}
if (callingAEQualifier != null) {
sublength = callingAEQualifier.encode(os);
sublength = callingAEQualifier.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 7
os.write(0xA7);
reverseOS.write(0xA7);
codeLength += 1;
}
if (callingAPTitle != null) {
sublength = callingAPTitle.encode(os);
sublength = callingAPTitle.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 6
os.write(0xA6);
reverseOS.write(0xA6);
codeLength += 1;
}
if (calledAEInvocationIdentifier != null) {
sublength = calledAEInvocationIdentifier.encode(os, true);
sublength = calledAEInvocationIdentifier.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 5
os.write(0xA5);
reverseOS.write(0xA5);
codeLength += 1;
}
if (calledAPInvocationIdentifier != null) {
sublength = calledAPInvocationIdentifier.encode(os, true);
sublength = calledAPInvocationIdentifier.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
os.write(0xA4);
reverseOS.write(0xA4);
codeLength += 1;
}
if (calledAEQualifier != null) {
sublength = calledAEQualifier.encode(os);
sublength = calledAEQualifier.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 3
os.write(0xA3);
reverseOS.write(0xA3);
codeLength += 1;
}
if (calledAPTitle != null) {
sublength = calledAPTitle.encode(os);
sublength = calledAPTitle.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
}
sublength = applicationContextName.encode(os, true);
sublength = applicationContextName.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
if (protocolVersion != null) {
codeLength += protocolVersion.encode(os, false);
codeLength += protocolVersion.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -506,12 +507,11 @@ public class AARQApdu implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,14 +1,15 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class ACSEApdu implements Serializable {
public class ACSEApdu implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -56,33 +57,33 @@ public class ACSEApdu implements Serializable {
this.rlre = rlre;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (rlre != null) {
codeLength += rlre.encode(os, true);
codeLength += rlre.encode(reverseOS, true);
return codeLength;
}
if (rlrq != null) {
codeLength += rlrq.encode(os, true);
codeLength += rlrq.encode(reverseOS, true);
return codeLength;
}
if (aare != null) {
codeLength += aare.encode(os, true);
codeLength += aare.encode(reverseOS, true);
return codeLength;
}
if (aarq != null) {
codeLength += aarq.encode(os, true);
codeLength += aarq.encode(reverseOS, true);
return codeLength;
}
@ -135,12 +136,11 @@ public class ACSEApdu implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import org.openmuc.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerBitString;
public class ACSERequirements extends BerBitString {

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class AEInvocationIdentifier extends BerInteger {

@ -1,15 +1,15 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerInteger;
public class AEQualifier implements Serializable {
public class AEQualifier implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -30,18 +30,18 @@ public class AEQualifier implements Serializable {
this.aeQualifierForm2 = aeQualifierForm2;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (aeQualifierForm2 != null) {
codeLength += aeQualifierForm2.encode(os, true);
codeLength += aeQualifierForm2.encode(reverseOS, true);
return codeLength;
}
@ -62,7 +62,7 @@ public class AEQualifier implements Serializable {
codeLength += berTag.decode(is);
}
if (berTag.equals(BerInteger.tag)) {
if (berTag.equals(AEQualifierForm2.tag)) {
aeQualifierForm2 = new AEQualifierForm2();
codeLength += aeQualifierForm2.decode(is, false);
return codeLength;
@ -76,12 +76,11 @@ public class AEQualifier implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class AEQualifierForm2 extends BerInteger {

@ -1,15 +1,15 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
public class AETitle implements Serializable {
public class AETitle implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -30,18 +30,18 @@ public class AETitle implements Serializable {
this.aeTitleForm2 = aeTitleForm2;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (aeTitleForm2 != null) {
codeLength += aeTitleForm2.encode(os, true);
codeLength += aeTitleForm2.encode(reverseOS, true);
return codeLength;
}
@ -62,7 +62,7 @@ public class AETitle implements Serializable {
codeLength += berTag.decode(is);
}
if (berTag.equals(BerObjectIdentifier.tag)) {
if (berTag.equals(AETitleForm2.tag)) {
aeTitleForm2 = new AETitleForm2();
codeLength += aeTitleForm2.decode(is, false);
return codeLength;
@ -76,12 +76,11 @@ public class AETitle implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
public class AETitleForm2 extends BerObjectIdentifier {

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class APInvocationIdentifier extends BerInteger {

@ -1,15 +1,15 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
public class APTitle implements Serializable {
public class APTitle implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -30,18 +30,18 @@ public class APTitle implements Serializable {
this.apTitleForm2 = apTitleForm2;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (apTitleForm2 != null) {
codeLength += apTitleForm2.encode(os, true);
codeLength += apTitleForm2.encode(reverseOS, true);
return codeLength;
}
@ -62,7 +62,7 @@ public class APTitle implements Serializable {
codeLength += berTag.decode(is);
}
if (berTag.equals(BerObjectIdentifier.tag)) {
if (berTag.equals(APTitleForm2.tag)) {
apTitleForm2 = new APTitleForm2();
codeLength += apTitleForm2.decode(is, false);
return codeLength;
@ -76,12 +76,11 @@ public class APTitle implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
public class APTitleForm2 extends BerObjectIdentifier {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
public class ApplicationContextName extends BerObjectIdentifier {

@ -1,6 +1,10 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,11 +12,8 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class ApplicationContextNameList implements Serializable {
public class ApplicationContextNameList implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -20,7 +21,7 @@ public class ApplicationContextNameList implements Serializable {
private List<ApplicationContextName> seqOf = null;
public ApplicationContextNameList() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<ApplicationContextName>();
}
public ApplicationContextNameList(byte[] code) {
@ -29,36 +30,36 @@ public class ApplicationContextNameList implements Serializable {
public List<ApplicationContextName> getApplicationContextName() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<ApplicationContextName>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os, true);
codeLength += seqOf.get(i).encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -97,12 +98,11 @@ public class ApplicationContextNameList implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class AssociateResult extends BerInteger {

@ -1,16 +1,17 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerInteger;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerInteger;
public class AssociateSourceDiagnostic implements Serializable {
public class AssociateSourceDiagnostic implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -40,11 +41,11 @@ public class AssociateSourceDiagnostic implements Serializable {
this.acseServiceProvider = acseServiceProvider;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
@ -53,21 +54,21 @@ public class AssociateSourceDiagnostic implements Serializable {
int sublength;
if (acseServiceProvider != null) {
sublength = acseServiceProvider.encode(os, true);
sublength = acseServiceProvider.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
return codeLength;
}
if (acseServiceUser != null) {
sublength = acseServiceUser.encode(os, true);
sublength = acseServiceUser.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
return codeLength;
}
@ -111,12 +112,11 @@ public class AssociateSourceDiagnostic implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,6 +1,10 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,11 +12,8 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class AssociationInformation implements Serializable {
public class AssociationInformation implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -20,7 +21,7 @@ public class AssociationInformation implements Serializable {
private List<Myexternal> seqOf = null;
public AssociationInformation() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<Myexternal>();
}
public AssociationInformation(byte[] code) {
@ -29,36 +30,36 @@ public class AssociationInformation implements Serializable {
public List<Myexternal> getMyexternal() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<Myexternal>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os, true);
codeLength += seqOf.get(i).encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -97,12 +98,11 @@ public class AssociationInformation implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,16 +1,17 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerType;
import com.beanit.jasn1.ber.types.string.BerGraphicString;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerBitString;
import org.openmuc.jasn1.ber.types.string.BerGraphicString;
public class AuthenticationValue implements Serializable {
public class AuthenticationValue implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -49,36 +50,36 @@ public class AuthenticationValue implements Serializable {
this.external = external;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (external != null) {
codeLength += external.encode(os, false);
codeLength += external.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
return codeLength;
}
if (bitstring != null) {
codeLength += bitstring.encode(os, false);
codeLength += bitstring.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
return codeLength;
}
if (charstring != null) {
codeLength += charstring.encode(os, false);
codeLength += charstring.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
return codeLength;
}
@ -126,12 +127,11 @@ public class AuthenticationValue implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import org.openmuc.jasn1.ber.types.string.BerGraphicString;
import com.beanit.jasn1.ber.types.string.BerGraphicString;
public class ImplementationData extends BerGraphicString {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
public class MechanismName extends BerObjectIdentifier {

@ -1,20 +1,21 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerAny;
import com.beanit.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerInteger;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerOctetString;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerAny;
import org.openmuc.jasn1.ber.types.BerBitString;
import org.openmuc.jasn1.ber.types.BerInteger;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import org.openmuc.jasn1.ber.types.BerOctetString;
public class Myexternal implements Serializable {
public class Myexternal implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 8);
private static final long serialVersionUID = 1L;
@ -22,7 +23,6 @@ public class Myexternal implements Serializable {
private BerObjectIdentifier directReference = null;
private BerInteger indirectReference = null;
private Encoding encoding = null;
public Myexternal() {}
public Myexternal(byte[] code) {
@ -53,37 +53,37 @@ public class Myexternal implements Serializable {
this.encoding = encoding;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += encoding.encode(os);
codeLength += encoding.encode(reverseOS);
if (indirectReference != null) {
codeLength += indirectReference.encode(os, true);
codeLength += indirectReference.encode(reverseOS, true);
}
if (directReference != null) {
codeLength += directReference.encode(os, true);
codeLength += directReference.encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -134,12 +134,11 @@ public class Myexternal implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -190,7 +189,7 @@ public class Myexternal implements Serializable {
sb.append("}");
}
public static class Encoding implements Serializable {
public static class Encoding implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -229,11 +228,11 @@ public class Myexternal implements Serializable {
this.arbitrary = arbitrary;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
@ -242,27 +241,27 @@ public class Myexternal implements Serializable {
int sublength;
if (arbitrary != null) {
codeLength += arbitrary.encode(os, false);
codeLength += arbitrary.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
return codeLength;
}
if (octetAligned != null) {
codeLength += octetAligned.encode(os, false);
codeLength += octetAligned.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
return codeLength;
}
if (singleASN1Type != null) {
sublength = singleASN1Type.encode(os);
sublength = singleASN1Type.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
return codeLength;
}
@ -311,12 +310,11 @@ public class Myexternal implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,20 +1,21 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerAny;
import com.beanit.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerInteger;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerOctetString;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerAny;
import org.openmuc.jasn1.ber.types.BerBitString;
import org.openmuc.jasn1.ber.types.BerInteger;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import org.openmuc.jasn1.ber.types.BerOctetString;
public class Myexternal2 implements Serializable {
public class Myexternal2 implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 8);
private static final long serialVersionUID = 1L;
@ -22,7 +23,6 @@ public class Myexternal2 implements Serializable {
private BerObjectIdentifier directReference = null;
private BerInteger indirectReference = null;
private Encoding encoding = null;
public Myexternal2() {}
public Myexternal2(byte[] code) {
@ -53,37 +53,37 @@ public class Myexternal2 implements Serializable {
this.encoding = encoding;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += encoding.encode(os);
codeLength += encoding.encode(reverseOS);
if (indirectReference != null) {
codeLength += indirectReference.encode(os, true);
codeLength += indirectReference.encode(reverseOS, true);
}
if (directReference != null) {
codeLength += directReference.encode(os, true);
codeLength += directReference.encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -134,12 +134,11 @@ public class Myexternal2 implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -190,7 +189,7 @@ public class Myexternal2 implements Serializable {
sb.append("}");
}
public static class Encoding implements Serializable {
public static class Encoding implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -229,11 +228,11 @@ public class Myexternal2 implements Serializable {
this.arbitrary = arbitrary;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
@ -242,27 +241,27 @@ public class Myexternal2 implements Serializable {
int sublength;
if (arbitrary != null) {
codeLength += arbitrary.encode(os, false);
codeLength += arbitrary.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
return codeLength;
}
if (octetAligned != null) {
codeLength += octetAligned.encode(os, false);
codeLength += octetAligned.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
return codeLength;
}
if (singleASN1Type != null) {
sublength = singleASN1Type.encode(os);
sublength = singleASN1Type.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
return codeLength;
}
@ -311,12 +310,11 @@ public class Myexternal2 implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
public final class OidValues {
public static final BerObjectIdentifier aCSEId =

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class RLREApdu implements Serializable {
public class RLREApdu implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 3);
private static final long serialVersionUID = 1L;
@ -39,41 +40,41 @@ public class RLREApdu implements Serializable {
this.userInformation = userInformation;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (userInformation != null) {
codeLength += userInformation.encode(os, false);
codeLength += userInformation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 30
os.write(0xBE);
reverseOS.write(0xBE);
codeLength += 1;
}
if (reason != null) {
codeLength += reason.encode(os, false);
codeLength += reason.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -126,12 +127,11 @@ public class RLREApdu implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class RLRQApdu implements Serializable {
public class RLRQApdu implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 2);
private static final long serialVersionUID = 1L;
@ -39,41 +40,41 @@ public class RLRQApdu implements Serializable {
this.userInformation = userInformation;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (userInformation != null) {
codeLength += userInformation.encode(os, false);
codeLength += userInformation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 30
os.write(0xBE);
reverseOS.write(0xBE);
codeLength += 1;
}
if (reason != null) {
codeLength += reason.encode(os, false);
codeLength += reason.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -126,12 +127,11 @@ public class RLRQApdu implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class ReleaseRequestReason extends BerInteger {

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.acse.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class ReleaseResponseReason extends BerInteger {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
public class AbstractSyntaxName extends BerObjectIdentifier {

@ -1,22 +1,22 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class CPAPPDU implements Serializable {
public class CPAPPDU implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17);
private static final long serialVersionUID = 1L;
public byte[] code = null;
private ModeSelector modeSelector = null;
private NormalModeParameters normalModeParameters = null;
public CPAPPDU() {}
public CPAPPDU(byte[] code) {
@ -39,39 +39,39 @@ public class CPAPPDU implements Serializable {
this.normalModeParameters = normalModeParameters;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (normalModeParameters != null) {
codeLength += normalModeParameters.encode(os, false);
codeLength += normalModeParameters.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
}
codeLength += modeSelector.encode(os, false);
codeLength += modeSelector.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -117,12 +117,11 @@ public class CPAPPDU implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -159,7 +158,7 @@ public class CPAPPDU implements Serializable {
sb.append("}");
}
public static class NormalModeParameters implements Serializable {
public static class NormalModeParameters implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -227,66 +226,66 @@ public class CPAPPDU implements Serializable {
this.userData = userData;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (userData != null) {
codeLength += userData.encode(os);
codeLength += userData.encode(reverseOS);
}
if (userSessionRequirements != null) {
codeLength += userSessionRequirements.encode(os, false);
codeLength += userSessionRequirements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 9
os.write(0x89);
reverseOS.write(0x89);
codeLength += 1;
}
if (presentationRequirements != null) {
codeLength += presentationRequirements.encode(os, false);
codeLength += presentationRequirements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 8
os.write(0x88);
reverseOS.write(0x88);
codeLength += 1;
}
if (presentationContextDefinitionResultList != null) {
codeLength += presentationContextDefinitionResultList.encode(os, false);
codeLength += presentationContextDefinitionResultList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 5
os.write(0xA5);
reverseOS.write(0xA5);
codeLength += 1;
}
if (respondingPresentationSelector != null) {
codeLength += respondingPresentationSelector.encode(os, false);
codeLength += respondingPresentationSelector.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 3
os.write(0x83);
reverseOS.write(0x83);
codeLength += 1;
}
if (protocolVersion != null) {
codeLength += protocolVersion.encode(os, false);
codeLength += protocolVersion.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -374,12 +373,11 @@ public class CPAPPDU implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,22 +1,22 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class CPType implements Serializable {
public class CPType implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17);
private static final long serialVersionUID = 1L;
public byte[] code = null;
private ModeSelector modeSelector = null;
private NormalModeParameters normalModeParameters = null;
public CPType() {}
public CPType(byte[] code) {
@ -39,39 +39,39 @@ public class CPType implements Serializable {
this.normalModeParameters = normalModeParameters;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (normalModeParameters != null) {
codeLength += normalModeParameters.encode(os, false);
codeLength += normalModeParameters.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
}
codeLength += modeSelector.encode(os, false);
codeLength += modeSelector.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -117,12 +117,11 @@ public class CPType implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -159,7 +158,7 @@ public class CPType implements Serializable {
sb.append("}");
}
public static class NormalModeParameters implements Serializable {
public static class NormalModeParameters implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -246,80 +245,80 @@ public class CPType implements Serializable {
this.userData = userData;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (userData != null) {
codeLength += userData.encode(os);
codeLength += userData.encode(reverseOS);
}
if (userSessionRequirements != null) {
codeLength += userSessionRequirements.encode(os, false);
codeLength += userSessionRequirements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 9
os.write(0x89);
reverseOS.write(0x89);
codeLength += 1;
}
if (presentationRequirements != null) {
codeLength += presentationRequirements.encode(os, false);
codeLength += presentationRequirements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 8
os.write(0x88);
reverseOS.write(0x88);
codeLength += 1;
}
if (defaultContextName != null) {
codeLength += defaultContextName.encode(os, false);
codeLength += defaultContextName.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 6
os.write(0xA6);
reverseOS.write(0xA6);
codeLength += 1;
}
if (presentationContextDefinitionList != null) {
codeLength += presentationContextDefinitionList.encode(os, false);
codeLength += presentationContextDefinitionList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
os.write(0xA4);
reverseOS.write(0xA4);
codeLength += 1;
}
if (calledPresentationSelector != null) {
codeLength += calledPresentationSelector.encode(os, false);
codeLength += calledPresentationSelector.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
}
if (callingPresentationSelector != null) {
codeLength += callingPresentationSelector.encode(os, false);
codeLength += callingPresentationSelector.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
}
if (protocolVersion != null) {
codeLength += protocolVersion.encode(os, false);
codeLength += protocolVersion.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -425,12 +424,11 @@ public class CPType implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
public class CalledPresentationSelector extends PresentationSelector {

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
public class CallingPresentationSelector extends PresentationSelector {

@ -1,6 +1,10 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,21 +12,15 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerInteger;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
public class ContextList implements Serializable {
public class ContextList implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
public byte[] code = null;
private List<SEQUENCE> seqOf = null;
public ContextList() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<SEQUENCE>();
}
public ContextList(byte[] code) {
@ -31,36 +29,36 @@ public class ContextList implements Serializable {
public List<SEQUENCE> getSEQUENCE() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<SEQUENCE>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os, true);
codeLength += seqOf.get(i).encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -99,12 +97,11 @@ public class ContextList implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -140,7 +137,7 @@ public class ContextList implements Serializable {
sb.append("}");
}
public static class SEQUENCE implements Serializable {
public static class SEQUENCE implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -148,7 +145,6 @@ public class ContextList implements Serializable {
private PresentationContextIdentifier presentationContextIdentifier = null;
private AbstractSyntaxName abstractSyntaxName = null;
private TransferSyntaxNameList transferSyntaxNameList = null;
public SEQUENCE() {}
public SEQUENCE(byte[] code) {
@ -180,33 +176,33 @@ public class ContextList implements Serializable {
this.transferSyntaxNameList = transferSyntaxNameList;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += transferSyntaxNameList.encode(os, true);
codeLength += transferSyntaxNameList.encode(reverseOS, true);
codeLength += abstractSyntaxName.encode(os, true);
codeLength += abstractSyntaxName.encode(reverseOS, true);
codeLength += presentationContextIdentifier.encode(os, true);
codeLength += presentationContextIdentifier.encode(reverseOS, true);
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -232,7 +228,7 @@ public class ContextList implements Serializable {
codeLength += totalLength;
subCodeLength += berTag.decode(is);
if (berTag.equals(BerInteger.tag)) {
if (berTag.equals(PresentationContextIdentifier.tag)) {
presentationContextIdentifier = new PresentationContextIdentifier();
subCodeLength += presentationContextIdentifier.decode(is, false);
subCodeLength += berTag.decode(is);
@ -240,7 +236,7 @@ public class ContextList implements Serializable {
throw new IOException("Tag does not match the mandatory sequence element tag.");
}
if (berTag.equals(BerObjectIdentifier.tag)) {
if (berTag.equals(AbstractSyntaxName.tag)) {
abstractSyntaxName = new AbstractSyntaxName();
subCodeLength += abstractSyntaxName.decode(is, false);
subCodeLength += berTag.decode(is);
@ -263,12 +259,11 @@ public class ContextList implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -316,7 +311,7 @@ public class ContextList implements Serializable {
sb.append("}");
}
public static class TransferSyntaxNameList implements Serializable {
public static class TransferSyntaxNameList implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -324,7 +319,7 @@ public class ContextList implements Serializable {
private List<TransferSyntaxName> seqOf = null;
public TransferSyntaxNameList() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<TransferSyntaxName>();
}
public TransferSyntaxNameList(byte[] code) {
@ -333,36 +328,36 @@ public class ContextList implements Serializable {
public List<TransferSyntaxName> getTransferSyntaxName() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<TransferSyntaxName>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os, true);
codeLength += seqOf.get(i).encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -401,12 +396,12 @@ public class ContextList implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS =
new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class DefaultContextName implements Serializable {
public class DefaultContextName implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -39,37 +40,37 @@ public class DefaultContextName implements Serializable {
this.transferSyntaxName = transferSyntaxName;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += transferSyntaxName.encode(os, false);
codeLength += transferSyntaxName.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
codeLength += abstractSyntaxName.encode(os, false);
codeLength += abstractSyntaxName.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -118,12 +119,11 @@ public class DefaultContextName implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,6 +1,10 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,11 +12,8 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class FullyEncodedData implements Serializable {
public class FullyEncodedData implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -20,7 +21,7 @@ public class FullyEncodedData implements Serializable {
private List<PDVList> seqOf = null;
public FullyEncodedData() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<PDVList>();
}
public FullyEncodedData(byte[] code) {
@ -29,36 +30,36 @@ public class FullyEncodedData implements Serializable {
public List<PDVList> getPDVList() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<PDVList>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os, true);
codeLength += seqOf.get(i).encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -97,12 +98,11 @@ public class FullyEncodedData implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,16 +1,17 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerInteger;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerInteger;
public class ModeSelector implements Serializable {
public class ModeSelector implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17);
private static final long serialVersionUID = 1L;
@ -31,32 +32,32 @@ public class ModeSelector implements Serializable {
this.modeValue = modeValue;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += modeValue.encode(os, false);
codeLength += modeValue.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -99,12 +100,11 @@ public class ModeSelector implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,20 +1,19 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerAny;
import com.beanit.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerOctetString;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerAny;
import org.openmuc.jasn1.ber.types.BerBitString;
import org.openmuc.jasn1.ber.types.BerInteger;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import org.openmuc.jasn1.ber.types.BerOctetString;
public class PDVList implements Serializable {
public class PDVList implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -22,7 +21,6 @@ public class PDVList implements Serializable {
private TransferSyntaxName transferSyntaxName = null;
private PresentationContextIdentifier presentationContextIdentifier = null;
private PresentationDataValues presentationDataValues = null;
public PDVList() {}
public PDVList(byte[] code) {
@ -54,35 +52,35 @@ public class PDVList implements Serializable {
this.presentationDataValues = presentationDataValues;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += presentationDataValues.encode(os);
codeLength += presentationDataValues.encode(reverseOS);
codeLength += presentationContextIdentifier.encode(os, true);
codeLength += presentationContextIdentifier.encode(reverseOS, true);
if (transferSyntaxName != null) {
codeLength += transferSyntaxName.encode(os, true);
codeLength += transferSyntaxName.encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -108,13 +106,13 @@ public class PDVList implements Serializable {
codeLength += totalLength;
subCodeLength += berTag.decode(is);
if (berTag.equals(BerObjectIdentifier.tag)) {
if (berTag.equals(TransferSyntaxName.tag)) {
transferSyntaxName = new TransferSyntaxName();
subCodeLength += transferSyntaxName.decode(is, false);
subCodeLength += berTag.decode(is);
}
if (berTag.equals(BerInteger.tag)) {
if (berTag.equals(PresentationContextIdentifier.tag)) {
presentationContextIdentifier = new PresentationContextIdentifier();
subCodeLength += presentationContextIdentifier.decode(is, false);
subCodeLength += berTag.decode(is);
@ -135,12 +133,11 @@ public class PDVList implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -190,7 +187,7 @@ public class PDVList implements Serializable {
sb.append("}");
}
public static class PresentationDataValues implements Serializable {
public static class PresentationDataValues implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -229,11 +226,11 @@ public class PDVList implements Serializable {
this.arbitrary = arbitrary;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
@ -242,27 +239,27 @@ public class PDVList implements Serializable {
int sublength;
if (arbitrary != null) {
codeLength += arbitrary.encode(os, false);
codeLength += arbitrary.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
return codeLength;
}
if (octetAligned != null) {
codeLength += octetAligned.encode(os, false);
codeLength += octetAligned.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
return codeLength;
}
if (singleASN1Type != null) {
sublength = singleASN1Type.encode(os);
sublength = singleASN1Type.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
return codeLength;
}
@ -311,12 +308,11 @@ public class PDVList implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
public class PresentationContextDefinitionList extends ContextList {

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
public class PresentationContextDefinitionResultList extends ResultList {

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class PresentationContextIdentifier extends BerInteger {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import org.openmuc.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerBitString;
public class PresentationRequirements extends BerBitString {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import org.openmuc.jasn1.ber.types.BerOctetString;
import com.beanit.jasn1.ber.types.BerOctetString;
public class PresentationSelector extends BerOctetString {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import org.openmuc.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerBitString;
public class ProtocolVersion extends BerBitString {

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
public class RespondingPresentationSelector extends PresentationSelector {

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class Result extends BerInteger {

@ -1,6 +1,11 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerInteger;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,20 +13,15 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerInteger;
public class ResultList implements Serializable {
public class ResultList implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
public byte[] code = null;
private List<SEQUENCE> seqOf = null;
public ResultList() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<SEQUENCE>();
}
public ResultList(byte[] code) {
@ -30,36 +30,36 @@ public class ResultList implements Serializable {
public List<SEQUENCE> getSEQUENCE() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<SEQUENCE>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os, true);
codeLength += seqOf.get(i).encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -98,12 +98,11 @@ public class ResultList implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -139,7 +138,7 @@ public class ResultList implements Serializable {
sb.append("}");
}
public static class SEQUENCE implements Serializable {
public static class SEQUENCE implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -178,46 +177,46 @@ public class ResultList implements Serializable {
this.providerReason = providerReason;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (providerReason != null) {
codeLength += providerReason.encode(os, false);
codeLength += providerReason.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
}
if (transferSyntaxName != null) {
codeLength += transferSyntaxName.encode(os, false);
codeLength += transferSyntaxName.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
}
codeLength += result.encode(os, false);
codeLength += result.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -278,12 +277,11 @@ public class ResultList implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import org.openmuc.jasn1.ber.types.BerOctetString;
import com.beanit.jasn1.ber.types.BerOctetString;
public class SimplyEncodedData extends BerOctetString {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
import com.beanit.jasn1.ber.types.BerObjectIdentifier;
public class TransferSyntaxName extends BerObjectIdentifier {

@ -1,14 +1,15 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class UserData implements Serializable {
public class UserData implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -38,28 +39,28 @@ public class UserData implements Serializable {
this.fullyEncodedData = fullyEncodedData;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (fullyEncodedData != null) {
codeLength += fullyEncodedData.encode(os, false);
codeLength += fullyEncodedData.encode(reverseOS, false);
// write tag: APPLICATION_CLASS, CONSTRUCTED, 1
os.write(0x61);
reverseOS.write(0x61);
codeLength += 1;
return codeLength;
}
if (simplyEncodedData != null) {
codeLength += simplyEncodedData.encode(os, false);
codeLength += simplyEncodedData.encode(reverseOS, false);
// write tag: APPLICATION_CLASS, PRIMITIVE, 0
os.write(0x40);
reverseOS.write(0x40);
codeLength += 1;
return codeLength;
}
@ -101,12 +102,11 @@ public class UserData implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.josistack.internal.presentation.asn1;
import org.openmuc.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerBitString;
public class UserSessionRequirements extends BerBitString {

@ -1,14 +1,15 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class AccessResult implements Serializable {
public class AccessResult implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -38,25 +39,25 @@ public class AccessResult implements Serializable {
this.success = success;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (success != null) {
codeLength += success.encode(os);
codeLength += success.encode(reverseOS);
return codeLength;
}
if (failure != null) {
codeLength += failure.encode(os, false);
codeLength += failure.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
return codeLength;
}
@ -100,12 +101,11 @@ public class AccessResult implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,6 +1,10 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,19 +12,15 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class AlternateAccess implements Serializable {
public class AlternateAccess implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
public byte[] code = null;
private List<CHOICE> seqOf = null;
public AlternateAccess() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<CHOICE>();
}
public AlternateAccess(byte[] code) {
@ -29,36 +29,36 @@ public class AlternateAccess implements Serializable {
public List<CHOICE> getCHOICE() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<CHOICE>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os);
codeLength += seqOf.get(i).encode(reverseOS);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -97,12 +97,11 @@ public class AlternateAccess implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -138,7 +137,7 @@ public class AlternateAccess implements Serializable {
sb.append("}");
}
public static class CHOICE implements Serializable {
public static class CHOICE implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -159,18 +158,18 @@ public class AlternateAccess implements Serializable {
this.unnamed = unnamed;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (unnamed != null) {
codeLength += unnamed.encode(os);
codeLength += unnamed.encode(reverseOS);
return codeLength;
}
@ -207,12 +206,11 @@ public class AlternateAccess implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,17 +1,17 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerNull;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerNull;
import org.openmuc.jasn1.ber.types.string.BerVisibleString;
public class AlternateAccessSelection implements Serializable {
public class AlternateAccessSelection implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -20,7 +20,6 @@ public class AlternateAccessSelection implements Serializable {
private SelectAccess selectAccess = null;
public AlternateAccessSelection() {}
public AlternateAccessSelection(byte[] code) {
this.code = code;
}
@ -41,25 +40,25 @@ public class AlternateAccessSelection implements Serializable {
this.selectAccess = selectAccess;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (selectAccess != null) {
codeLength += selectAccess.encode(os);
codeLength += selectAccess.encode(reverseOS);
return codeLength;
}
if (selectAlternateAccess != null) {
codeLength += selectAlternateAccess.encode(os, false);
codeLength += selectAlternateAccess.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
return codeLength;
}
@ -103,12 +102,11 @@ public class AlternateAccessSelection implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -132,14 +130,13 @@ public class AlternateAccessSelection implements Serializable {
sb.append("<none>");
}
public static class SelectAlternateAccess implements Serializable {
public static class SelectAlternateAccess implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
public byte[] code = null;
private AccessSelection accessSelection = null;
private AlternateAccess alternateAccess = null;
public SelectAlternateAccess() {}
public SelectAlternateAccess(byte[] code) {
@ -162,31 +159,31 @@ public class AlternateAccessSelection implements Serializable {
this.alternateAccess = alternateAccess;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += alternateAccess.encode(os, true);
codeLength += alternateAccess.encode(reverseOS, true);
codeLength += accessSelection.encode(os);
codeLength += accessSelection.encode(reverseOS);
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -231,12 +228,11 @@ public class AlternateAccessSelection implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -275,7 +271,7 @@ public class AlternateAccessSelection implements Serializable {
sb.append("}");
}
public static class AccessSelection implements Serializable {
public static class AccessSelection implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -284,9 +280,7 @@ public class AlternateAccessSelection implements Serializable {
private Unsigned32 index = null;
private IndexRange indexRange = null;
private BerNull allElements = null;
public AccessSelection() {}
public AccessSelection(byte[] code) {
this.code = code;
}
@ -323,11 +317,11 @@ public class AlternateAccessSelection implements Serializable {
this.allElements = allElements;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
@ -336,35 +330,35 @@ public class AlternateAccessSelection implements Serializable {
int sublength;
if (allElements != null) {
codeLength += allElements.encode(os, false);
codeLength += allElements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 3
os.write(0x83);
reverseOS.write(0x83);
codeLength += 1;
return codeLength;
}
if (indexRange != null) {
codeLength += indexRange.encode(os, false);
codeLength += indexRange.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
return codeLength;
}
if (index != null) {
codeLength += index.encode(os, false);
codeLength += index.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
return codeLength;
}
if (component != null) {
sublength = component.encode(os);
sublength = component.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
return codeLength;
}
@ -419,12 +413,12 @@ public class AlternateAccessSelection implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS =
new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -458,7 +452,7 @@ public class AlternateAccessSelection implements Serializable {
sb.append("<none>");
}
public static class Component implements Serializable {
public static class Component implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -479,18 +473,18 @@ public class AlternateAccessSelection implements Serializable {
this.basic = basic;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (basic != null) {
codeLength += basic.encode(os, true);
codeLength += basic.encode(reverseOS, true);
return codeLength;
}
@ -511,7 +505,7 @@ public class AlternateAccessSelection implements Serializable {
codeLength += berTag.decode(is);
}
if (berTag.equals(BerVisibleString.tag)) {
if (berTag.equals(BasicIdentifier.tag)) {
basic = new BasicIdentifier();
codeLength += basic.decode(is, false);
return codeLength;
@ -525,12 +519,12 @@ public class AlternateAccessSelection implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS =
new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -548,7 +542,7 @@ public class AlternateAccessSelection implements Serializable {
}
}
public static class IndexRange implements Serializable {
public static class IndexRange implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -578,37 +572,37 @@ public class AlternateAccessSelection implements Serializable {
this.numberOfElements = numberOfElements;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += numberOfElements.encode(os, false);
codeLength += numberOfElements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
codeLength += lowIndex.encode(os, false);
codeLength += lowIndex.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -657,12 +651,12 @@ public class AlternateAccessSelection implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS =
new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -702,7 +696,7 @@ public class AlternateAccessSelection implements Serializable {
}
}
public static class SelectAccess implements Serializable {
public static class SelectAccess implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -711,9 +705,7 @@ public class AlternateAccessSelection implements Serializable {
private Unsigned32 index = null;
private IndexRange indexRange = null;
private BerNull allElements = null;
public SelectAccess() {}
public SelectAccess(byte[] code) {
this.code = code;
}
@ -750,11 +742,11 @@ public class AlternateAccessSelection implements Serializable {
this.allElements = allElements;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
@ -763,35 +755,35 @@ public class AlternateAccessSelection implements Serializable {
int sublength;
if (allElements != null) {
codeLength += allElements.encode(os, false);
codeLength += allElements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 4
os.write(0x84);
reverseOS.write(0x84);
codeLength += 1;
return codeLength;
}
if (indexRange != null) {
codeLength += indexRange.encode(os, false);
codeLength += indexRange.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 3
os.write(0xA3);
reverseOS.write(0xA3);
codeLength += 1;
return codeLength;
}
if (index != null) {
codeLength += index.encode(os, false);
codeLength += index.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
return codeLength;
}
if (component != null) {
sublength = component.encode(os);
sublength = component.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
return codeLength;
}
@ -846,12 +838,11 @@ public class AlternateAccessSelection implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -885,7 +876,7 @@ public class AlternateAccessSelection implements Serializable {
sb.append("<none>");
}
public static class Component implements Serializable {
public static class Component implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -906,18 +897,18 @@ public class AlternateAccessSelection implements Serializable {
this.basic = basic;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (basic != null) {
codeLength += basic.encode(os, true);
codeLength += basic.encode(reverseOS, true);
return codeLength;
}
@ -938,7 +929,7 @@ public class AlternateAccessSelection implements Serializable {
codeLength += berTag.decode(is);
}
if (berTag.equals(BerVisibleString.tag)) {
if (berTag.equals(BasicIdentifier.tag)) {
basic = new BasicIdentifier();
codeLength += basic.decode(is, false);
return codeLength;
@ -952,12 +943,12 @@ public class AlternateAccessSelection implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS =
new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -975,7 +966,7 @@ public class AlternateAccessSelection implements Serializable {
}
}
public static class IndexRange implements Serializable {
public static class IndexRange implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -1005,37 +996,37 @@ public class AlternateAccessSelection implements Serializable {
this.numberOfElements = numberOfElements;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += numberOfElements.encode(os, false);
codeLength += numberOfElements.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
codeLength += lowIndex.encode(os, false);
codeLength += lowIndex.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -1084,12 +1075,12 @@ public class AlternateAccessSelection implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS =
new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import org.openmuc.jasn1.ber.types.string.BerVisibleString;
import com.beanit.jasn1.ber.types.string.BerVisibleString;
public class BasicIdentifier extends BerVisibleString {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import org.openmuc.jasn1.ber.types.BerNull;
import com.beanit.jasn1.ber.types.BerNull;
public class ConcludeRequestPDU extends BerNull {

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class ConfirmedErrorPDU implements Serializable {
public class ConfirmedErrorPDU implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -48,44 +49,44 @@ public class ConfirmedErrorPDU implements Serializable {
this.serviceError = serviceError;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += serviceError.encode(os, false);
codeLength += serviceError.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
if (modifierPosition != null) {
codeLength += modifierPosition.encode(os, false);
codeLength += modifierPosition.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
}
codeLength += invokeID.encode(os, false);
codeLength += invokeID.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -140,12 +141,11 @@ public class ConfirmedErrorPDU implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,16 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerInteger;
public class ConfirmedRequestPDU implements Serializable {
public class ConfirmedRequestPDU implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -40,31 +40,31 @@ public class ConfirmedRequestPDU implements Serializable {
this.service = service;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += service.encode(os);
codeLength += service.encode(reverseOS);
codeLength += invokeID.encode(os, true);
codeLength += invokeID.encode(reverseOS, true);
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -90,7 +90,7 @@ public class ConfirmedRequestPDU implements Serializable {
codeLength += totalLength;
subCodeLength += berTag.decode(is);
if (berTag.equals(BerInteger.tag)) {
if (berTag.equals(Unsigned32.tag)) {
invokeID = new Unsigned32();
subCodeLength += invokeID.decode(is, false);
subCodeLength += berTag.decode(is);
@ -111,12 +111,11 @@ public class ConfirmedRequestPDU implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,16 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerInteger;
public class ConfirmedResponsePDU implements Serializable {
public class ConfirmedResponsePDU implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -40,31 +40,31 @@ public class ConfirmedResponsePDU implements Serializable {
this.service = service;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += service.encode(os);
codeLength += service.encode(reverseOS);
codeLength += invokeID.encode(os, true);
codeLength += invokeID.encode(reverseOS, true);
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -90,7 +90,7 @@ public class ConfirmedResponsePDU implements Serializable {
codeLength += totalLength;
subCodeLength += berTag.decode(is);
if (berTag.equals(BerInteger.tag)) {
if (berTag.equals(Unsigned32.tag)) {
invokeID = new Unsigned32();
subCodeLength += invokeID.decode(is, false);
subCodeLength += berTag.decode(is);
@ -111,12 +111,11 @@ public class ConfirmedResponsePDU implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class ConfirmedServiceRequest implements Serializable {
public class ConfirmedServiceRequest implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -131,11 +132,11 @@ public class ConfirmedServiceRequest implements Serializable {
this.fileDirectory = fileDirectory;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
@ -144,106 +145,106 @@ public class ConfirmedServiceRequest implements Serializable {
int sublength;
if (fileDirectory != null) {
codeLength += fileDirectory.encode(os, false);
codeLength += fileDirectory.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 77
os.write(0x4D);
os.write(0xBF);
reverseOS.write(0x4D);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
if (fileDelete != null) {
codeLength += fileDelete.encode(os, false);
codeLength += fileDelete.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 76
os.write(0x4C);
os.write(0xBF);
reverseOS.write(0x4C);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
if (fileClose != null) {
codeLength += fileClose.encode(os, false);
codeLength += fileClose.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 74
os.write(0x4A);
os.write(0x9F);
reverseOS.write(0x4A);
reverseOS.write(0x9F);
codeLength += 2;
return codeLength;
}
if (fileRead != null) {
codeLength += fileRead.encode(os, false);
codeLength += fileRead.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 73
os.write(0x49);
os.write(0x9F);
reverseOS.write(0x49);
reverseOS.write(0x9F);
codeLength += 2;
return codeLength;
}
if (fileOpen != null) {
codeLength += fileOpen.encode(os, false);
codeLength += fileOpen.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 72
os.write(0x48);
os.write(0xBF);
reverseOS.write(0x48);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
if (deleteNamedVariableList != null) {
codeLength += deleteNamedVariableList.encode(os, false);
codeLength += deleteNamedVariableList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 13
os.write(0xAD);
reverseOS.write(0xAD);
codeLength += 1;
return codeLength;
}
if (getNamedVariableListAttributes != null) {
sublength = getNamedVariableListAttributes.encode(os);
sublength = getNamedVariableListAttributes.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 12
os.write(0xAC);
reverseOS.write(0xAC);
codeLength += 1;
return codeLength;
}
if (defineNamedVariableList != null) {
codeLength += defineNamedVariableList.encode(os, false);
codeLength += defineNamedVariableList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 11
os.write(0xAB);
reverseOS.write(0xAB);
codeLength += 1;
return codeLength;
}
if (getVariableAccessAttributes != null) {
sublength = getVariableAccessAttributes.encode(os);
sublength = getVariableAccessAttributes.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 6
os.write(0xA6);
reverseOS.write(0xA6);
codeLength += 1;
return codeLength;
}
if (write != null) {
codeLength += write.encode(os, false);
codeLength += write.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 5
os.write(0xA5);
reverseOS.write(0xA5);
codeLength += 1;
return codeLength;
}
if (read != null) {
codeLength += read.encode(os, false);
codeLength += read.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
os.write(0xA4);
reverseOS.write(0xA4);
codeLength += 1;
return codeLength;
}
if (getNameList != null) {
codeLength += getNameList.encode(os, false);
codeLength += getNameList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
return codeLength;
}
@ -347,12 +348,11 @@ public class ConfirmedServiceRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,14 +1,15 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class ConfirmedServiceResponse implements Serializable {
public class ConfirmedServiceResponse implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -130,113 +131,113 @@ public class ConfirmedServiceResponse implements Serializable {
this.fileDirectory = fileDirectory;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (fileDirectory != null) {
codeLength += fileDirectory.encode(os, false);
codeLength += fileDirectory.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 77
os.write(0x4D);
os.write(0xBF);
reverseOS.write(0x4D);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
if (fileDelete != null) {
codeLength += fileDelete.encode(os, false);
codeLength += fileDelete.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 76
os.write(0x4C);
os.write(0x9F);
reverseOS.write(0x4C);
reverseOS.write(0x9F);
codeLength += 2;
return codeLength;
}
if (fileClose != null) {
codeLength += fileClose.encode(os, false);
codeLength += fileClose.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 74
os.write(0x4A);
os.write(0x9F);
reverseOS.write(0x4A);
reverseOS.write(0x9F);
codeLength += 2;
return codeLength;
}
if (fileRead != null) {
codeLength += fileRead.encode(os, false);
codeLength += fileRead.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 73
os.write(0x49);
os.write(0xBF);
reverseOS.write(0x49);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
if (fileOpen != null) {
codeLength += fileOpen.encode(os, false);
codeLength += fileOpen.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 72
os.write(0x48);
os.write(0xBF);
reverseOS.write(0x48);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
if (deleteNamedVariableList != null) {
codeLength += deleteNamedVariableList.encode(os, false);
codeLength += deleteNamedVariableList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 13
os.write(0xAD);
reverseOS.write(0xAD);
codeLength += 1;
return codeLength;
}
if (getNamedVariableListAttributes != null) {
codeLength += getNamedVariableListAttributes.encode(os, false);
codeLength += getNamedVariableListAttributes.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 12
os.write(0xAC);
reverseOS.write(0xAC);
codeLength += 1;
return codeLength;
}
if (defineNamedVariableList != null) {
codeLength += defineNamedVariableList.encode(os, false);
codeLength += defineNamedVariableList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 11
os.write(0x8B);
reverseOS.write(0x8B);
codeLength += 1;
return codeLength;
}
if (getVariableAccessAttributes != null) {
codeLength += getVariableAccessAttributes.encode(os, false);
codeLength += getVariableAccessAttributes.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 6
os.write(0xA6);
reverseOS.write(0xA6);
codeLength += 1;
return codeLength;
}
if (write != null) {
codeLength += write.encode(os, false);
codeLength += write.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 5
os.write(0xA5);
reverseOS.write(0xA5);
codeLength += 1;
return codeLength;
}
if (read != null) {
codeLength += read.encode(os, false);
codeLength += read.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
os.write(0xA4);
reverseOS.write(0xA4);
codeLength += 1;
return codeLength;
}
if (getNameList != null) {
codeLength += getNameList.encode(os, false);
codeLength += getNameList.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
return codeLength;
}
@ -338,12 +339,11 @@ public class ConfirmedServiceResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,6 +1,15 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerBitString;
import com.beanit.jasn1.ber.types.BerBoolean;
import com.beanit.jasn1.ber.types.BerInteger;
import com.beanit.jasn1.ber.types.BerOctetString;
import com.beanit.jasn1.ber.types.BerType;
import com.beanit.jasn1.ber.types.string.BerVisibleString;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,16 +17,8 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerBitString;
import org.openmuc.jasn1.ber.types.BerBoolean;
import org.openmuc.jasn1.ber.types.BerInteger;
import org.openmuc.jasn1.ber.types.BerOctetString;
import org.openmuc.jasn1.ber.types.string.BerVisibleString;
public class Data implements Serializable {
public class Data implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -34,9 +35,7 @@ public class Data implements Serializable {
private TimeOfDay binaryTime = null;
private MMSString mMSString = null;
private UtcTime utcTime = null;
public Data() {}
public Data(byte[] code) {
this.code = code;
}
@ -137,108 +136,108 @@ public class Data implements Serializable {
this.utcTime = utcTime;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (utcTime != null) {
codeLength += utcTime.encode(os, false);
codeLength += utcTime.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 17
os.write(0x91);
reverseOS.write(0x91);
codeLength += 1;
return codeLength;
}
if (mMSString != null) {
codeLength += mMSString.encode(os, false);
codeLength += mMSString.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 16
os.write(0x90);
reverseOS.write(0x90);
codeLength += 1;
return codeLength;
}
if (binaryTime != null) {
codeLength += binaryTime.encode(os, false);
codeLength += binaryTime.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 12
os.write(0x8C);
reverseOS.write(0x8C);
codeLength += 1;
return codeLength;
}
if (visibleString != null) {
codeLength += visibleString.encode(os, false);
codeLength += visibleString.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 10
os.write(0x8A);
reverseOS.write(0x8A);
codeLength += 1;
return codeLength;
}
if (octetString != null) {
codeLength += octetString.encode(os, false);
codeLength += octetString.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 9
os.write(0x89);
reverseOS.write(0x89);
codeLength += 1;
return codeLength;
}
if (floatingPoint != null) {
codeLength += floatingPoint.encode(os, false);
codeLength += floatingPoint.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 7
os.write(0x87);
reverseOS.write(0x87);
codeLength += 1;
return codeLength;
}
if (unsigned != null) {
codeLength += unsigned.encode(os, false);
codeLength += unsigned.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 6
os.write(0x86);
reverseOS.write(0x86);
codeLength += 1;
return codeLength;
}
if (integer != null) {
codeLength += integer.encode(os, false);
codeLength += integer.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 5
os.write(0x85);
reverseOS.write(0x85);
codeLength += 1;
return codeLength;
}
if (bitString != null) {
codeLength += bitString.encode(os, false);
codeLength += bitString.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 4
os.write(0x84);
reverseOS.write(0x84);
codeLength += 1;
return codeLength;
}
if (bool != null) {
codeLength += bool.encode(os, false);
codeLength += bool.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 3
os.write(0x83);
reverseOS.write(0x83);
codeLength += 1;
return codeLength;
}
if (structure != null) {
codeLength += structure.encode(os, false);
codeLength += structure.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
return codeLength;
}
if (array != null) {
codeLength += array.encode(os, false);
codeLength += array.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
return codeLength;
}
@ -340,12 +339,11 @@ public class Data implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -419,7 +417,7 @@ public class Data implements Serializable {
sb.append("<none>");
}
public static class Array implements Serializable {
public static class Array implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -427,7 +425,7 @@ public class Data implements Serializable {
private List<Data> seqOf = null;
public Array() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<Data>();
}
public Array(byte[] code) {
@ -436,36 +434,36 @@ public class Data implements Serializable {
public List<Data> getData() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<Data>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os);
codeLength += seqOf.get(i).encode(reverseOS);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -504,12 +502,11 @@ public class Data implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -546,7 +543,7 @@ public class Data implements Serializable {
}
}
public static class Structure implements Serializable {
public static class Structure implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -554,7 +551,7 @@ public class Data implements Serializable {
private List<Data> seqOf = null;
public Structure() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<Data>();
}
public Structure(byte[] code) {
@ -563,36 +560,36 @@ public class Data implements Serializable {
public List<Data> getData() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<Data>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os);
codeLength += seqOf.get(i).encode(reverseOS);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -631,12 +628,11 @@ public class Data implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class DataAccessError extends BerInteger {

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class DefineNamedVariableListRequest implements Serializable {
public class DefineNamedVariableListRequest implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -39,34 +40,34 @@ public class DefineNamedVariableListRequest implements Serializable {
this.listOfVariable = listOfVariable;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += listOfVariable.encode(os, false);
codeLength += listOfVariable.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
codeLength += variableListName.encode(os);
codeLength += variableListName.encode(reverseOS);
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -111,12 +112,11 @@ public class DefineNamedVariableListRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import org.openmuc.jasn1.ber.types.BerNull;
import com.beanit.jasn1.ber.types.BerNull;
public class DefineNamedVariableListResponse extends BerNull {

@ -1,6 +1,11 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerInteger;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,13 +13,8 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerInteger;
import org.openmuc.jasn1.ber.types.string.BerVisibleString;
public class DeleteNamedVariableListRequest implements Serializable {
public class DeleteNamedVariableListRequest implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -22,9 +22,7 @@ public class DeleteNamedVariableListRequest implements Serializable {
private BerInteger scopeOfDelete = null;
private ListOfVariableListName listOfVariableListName = null;
private DomainName domainName = null;
public DeleteNamedVariableListRequest() {}
public DeleteNamedVariableListRequest(byte[] code) {
this.code = code;
}
@ -53,18 +51,18 @@ public class DeleteNamedVariableListRequest implements Serializable {
this.domainName = domainName;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
@ -73,32 +71,32 @@ public class DeleteNamedVariableListRequest implements Serializable {
int sublength;
if (domainName != null) {
sublength = domainName.encode(os);
sublength = domainName.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
}
if (listOfVariableListName != null) {
codeLength += listOfVariableListName.encode(os, false);
codeLength += listOfVariableListName.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
}
if (scopeOfDelete != null) {
codeLength += scopeOfDelete.encode(os, false);
codeLength += scopeOfDelete.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -161,12 +159,11 @@ public class DeleteNamedVariableListRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -217,7 +214,7 @@ public class DeleteNamedVariableListRequest implements Serializable {
sb.append("}");
}
public static class ListOfVariableListName implements Serializable {
public static class ListOfVariableListName implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -225,7 +222,7 @@ public class DeleteNamedVariableListRequest implements Serializable {
private List<ObjectName> seqOf = null;
public ListOfVariableListName() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<ObjectName>();
}
public ListOfVariableListName(byte[] code) {
@ -234,36 +231,36 @@ public class DeleteNamedVariableListRequest implements Serializable {
public List<ObjectName> getObjectName() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<ObjectName>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os);
codeLength += seqOf.get(i).encode(reverseOS);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -302,12 +299,11 @@ public class DeleteNamedVariableListRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -344,7 +340,7 @@ public class DeleteNamedVariableListRequest implements Serializable {
}
}
public static class DomainName implements Serializable {
public static class DomainName implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -365,18 +361,18 @@ public class DeleteNamedVariableListRequest implements Serializable {
this.basic = basic;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (basic != null) {
codeLength += basic.encode(os, true);
codeLength += basic.encode(reverseOS, true);
return codeLength;
}
@ -397,7 +393,7 @@ public class DeleteNamedVariableListRequest implements Serializable {
codeLength += berTag.decode(is);
}
if (berTag.equals(BerVisibleString.tag)) {
if (berTag.equals(BasicIdentifier.tag)) {
basic = new BasicIdentifier();
codeLength += basic.decode(is, false);
return codeLength;
@ -411,12 +407,11 @@ public class DeleteNamedVariableListRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class DeleteNamedVariableListResponse implements Serializable {
public class DeleteNamedVariableListResponse implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -39,37 +40,37 @@ public class DeleteNamedVariableListResponse implements Serializable {
this.numberDeleted = numberDeleted;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += numberDeleted.encode(os, false);
codeLength += numberDeleted.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
codeLength += numberMatched.encode(os, false);
codeLength += numberMatched.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -118,12 +119,11 @@ public class DeleteNamedVariableListResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class DirectoryEntry implements Serializable {
public class DirectoryEntry implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -39,37 +40,37 @@ public class DirectoryEntry implements Serializable {
this.fileAttributes = fileAttributes;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += fileAttributes.encode(os, false);
codeLength += fileAttributes.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
codeLength += fileName.encode(os, false);
codeLength += fileName.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -118,12 +119,11 @@ public class DirectoryEntry implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,16 +1,17 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerGeneralizedTime;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerGeneralizedTime;
public class FileAttributes implements Serializable {
public class FileAttributes implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -40,39 +41,39 @@ public class FileAttributes implements Serializable {
this.lastModified = lastModified;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (lastModified != null) {
codeLength += lastModified.encode(os, false);
codeLength += lastModified.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
}
codeLength += sizeOfFile.encode(os, false);
codeLength += sizeOfFile.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -124,12 +125,11 @@ public class FileAttributes implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import java.math.BigInteger;

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import org.openmuc.jasn1.ber.types.BerNull;
import com.beanit.jasn1.ber.types.BerNull;
public class FileCloseResponse extends BerNull {

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
public class FileDeleteRequest extends FileName {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import org.openmuc.jasn1.ber.types.BerNull;
import com.beanit.jasn1.ber.types.BerNull;
public class FileDeleteResponse extends BerNull {

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class FileDirectoryRequest implements Serializable {
public class FileDirectoryRequest implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -39,41 +40,41 @@ public class FileDirectoryRequest implements Serializable {
this.continueAfter = continueAfter;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (continueAfter != null) {
codeLength += continueAfter.encode(os, false);
codeLength += continueAfter.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
}
if (fileSpecification != null) {
codeLength += fileSpecification.encode(os, false);
codeLength += fileSpecification.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -126,12 +127,11 @@ public class FileDirectoryRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,6 +1,11 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerBoolean;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,19 +13,14 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerBoolean;
public class FileDirectoryResponse implements Serializable {
public class FileDirectoryResponse implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
public byte[] code = null;
private ListOfDirectoryEntry listOfDirectoryEntry = null;
private BerBoolean moreFollows = null;
public FileDirectoryResponse() {}
public FileDirectoryResponse(byte[] code) {
@ -43,18 +43,18 @@ public class FileDirectoryResponse implements Serializable {
this.moreFollows = moreFollows;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
@ -63,23 +63,23 @@ public class FileDirectoryResponse implements Serializable {
int sublength;
if (moreFollows != null) {
codeLength += moreFollows.encode(os, false);
codeLength += moreFollows.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
}
sublength = listOfDirectoryEntry.encode(os, true);
sublength = listOfDirectoryEntry.encode(reverseOS, true);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -132,12 +132,11 @@ public class FileDirectoryResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -173,7 +172,7 @@ public class FileDirectoryResponse implements Serializable {
sb.append("}");
}
public static class ListOfDirectoryEntry implements Serializable {
public static class ListOfDirectoryEntry implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -181,7 +180,7 @@ public class FileDirectoryResponse implements Serializable {
private List<DirectoryEntry> seqOf = null;
public ListOfDirectoryEntry() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<DirectoryEntry>();
}
public ListOfDirectoryEntry(byte[] code) {
@ -190,36 +189,36 @@ public class FileDirectoryResponse implements Serializable {
public List<DirectoryEntry> getDirectoryEntry() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<DirectoryEntry>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os, true);
codeLength += seqOf.get(i).encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -258,12 +257,11 @@ public class FileDirectoryResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,6 +1,11 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import com.beanit.jasn1.ber.types.string.BerGraphicString;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,12 +13,8 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.string.BerGraphicString;
public class FileName implements Serializable {
public class FileName implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -21,7 +22,7 @@ public class FileName implements Serializable {
private List<BerGraphicString> seqOf = null;
public FileName() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<BerGraphicString>();
}
public FileName(byte[] code) {
@ -30,36 +31,36 @@ public class FileName implements Serializable {
public List<BerGraphicString> getBerGraphicString() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<BerGraphicString>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os, true);
codeLength += seqOf.get(i).encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -98,12 +99,11 @@ public class FileName implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class FileOpenRequest implements Serializable {
public class FileOpenRequest implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -39,37 +40,37 @@ public class FileOpenRequest implements Serializable {
this.initialPosition = initialPosition;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += initialPosition.encode(os, false);
codeLength += initialPosition.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
codeLength += fileName.encode(os, false);
codeLength += fileName.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -118,12 +119,11 @@ public class FileOpenRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class FileOpenResponse implements Serializable {
public class FileOpenResponse implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -39,37 +40,37 @@ public class FileOpenResponse implements Serializable {
this.fileAttributes = fileAttributes;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += fileAttributes.encode(os, false);
codeLength += fileAttributes.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
codeLength += frsmID.encode(os, false);
codeLength += frsmID.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -118,12 +119,11 @@ public class FileOpenResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import java.math.BigInteger;

@ -1,17 +1,18 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerBoolean;
import com.beanit.jasn1.ber.types.BerOctetString;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerBoolean;
import org.openmuc.jasn1.ber.types.BerOctetString;
public class FileReadResponse implements Serializable {
public class FileReadResponse implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -41,39 +42,39 @@ public class FileReadResponse implements Serializable {
this.moreFollows = moreFollows;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (moreFollows != null) {
codeLength += moreFollows.encode(os, false);
codeLength += moreFollows.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
}
codeLength += fileData.encode(os, false);
codeLength += fileData.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -125,12 +126,11 @@ public class FileReadResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import org.openmuc.jasn1.ber.types.BerOctetString;
import com.beanit.jasn1.ber.types.BerOctetString;
public class FloatingPoint extends BerOctetString {

@ -1,16 +1,17 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerNull;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerNull;
public class GetNameListRequest implements Serializable {
public class GetNameListRequest implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -18,7 +19,6 @@ public class GetNameListRequest implements Serializable {
private ObjectClass objectClass = null;
private ObjectScope objectScope = null;
private Identifier continueAfter = null;
public GetNameListRequest() {}
public GetNameListRequest(byte[] code) {
@ -49,18 +49,18 @@ public class GetNameListRequest implements Serializable {
this.continueAfter = continueAfter;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
@ -69,30 +69,30 @@ public class GetNameListRequest implements Serializable {
int sublength;
if (continueAfter != null) {
codeLength += continueAfter.encode(os, false);
codeLength += continueAfter.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
}
sublength = objectScope.encode(os);
sublength = objectScope.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
sublength = objectClass.encode(os);
sublength = objectClass.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -154,12 +154,11 @@ public class GetNameListRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -206,7 +205,7 @@ public class GetNameListRequest implements Serializable {
sb.append("}");
}
public static class ObjectScope implements Serializable {
public static class ObjectScope implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -245,36 +244,36 @@ public class GetNameListRequest implements Serializable {
this.aaSpecific = aaSpecific;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (aaSpecific != null) {
codeLength += aaSpecific.encode(os, false);
codeLength += aaSpecific.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
return codeLength;
}
if (domainSpecific != null) {
codeLength += domainSpecific.encode(os, false);
codeLength += domainSpecific.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
return codeLength;
}
if (vmdSpecific != null) {
codeLength += vmdSpecific.encode(os, false);
codeLength += vmdSpecific.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
return codeLength;
}
@ -322,12 +321,11 @@ public class GetNameListRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,6 +1,11 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerBoolean;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,19 +13,14 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerBoolean;
public class GetNameListResponse implements Serializable {
public class GetNameListResponse implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
public byte[] code = null;
private ListOfIdentifier listOfIdentifier = null;
private BerBoolean moreFollows = null;
public GetNameListResponse() {}
public GetNameListResponse(byte[] code) {
@ -43,39 +43,39 @@ public class GetNameListResponse implements Serializable {
this.moreFollows = moreFollows;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
if (moreFollows != null) {
codeLength += moreFollows.encode(os, false);
codeLength += moreFollows.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
}
codeLength += listOfIdentifier.encode(os, false);
codeLength += listOfIdentifier.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -127,12 +127,11 @@ public class GetNameListResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -168,7 +167,7 @@ public class GetNameListResponse implements Serializable {
sb.append("}");
}
public static class ListOfIdentifier implements Serializable {
public static class ListOfIdentifier implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -176,7 +175,7 @@ public class GetNameListResponse implements Serializable {
private List<Identifier> seqOf = null;
public ListOfIdentifier() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<Identifier>();
}
public ListOfIdentifier(byte[] code) {
@ -185,36 +184,36 @@ public class GetNameListResponse implements Serializable {
public List<Identifier> getIdentifier() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<Identifier>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os, true);
codeLength += seqOf.get(i).encode(reverseOS, true);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -253,12 +252,11 @@ public class GetNameListResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
public class GetNamedVariableListAttributesRequest extends ObjectName {

@ -1,16 +1,17 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerBoolean;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerBoolean;
public class GetNamedVariableListAttributesResponse implements Serializable {
public class GetNamedVariableListAttributesResponse implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -40,37 +41,37 @@ public class GetNamedVariableListAttributesResponse implements Serializable {
this.listOfVariable = listOfVariable;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += listOfVariable.encode(os, false);
codeLength += listOfVariable.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
codeLength += mmsDeletable.encode(os, false);
codeLength += mmsDeletable.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -119,12 +120,11 @@ public class GetNamedVariableListAttributesResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class GetVariableAccessAttributesRequest implements Serializable {
public class GetVariableAccessAttributesRequest implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -30,11 +31,11 @@ public class GetVariableAccessAttributesRequest implements Serializable {
this.name = name;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
@ -43,11 +44,11 @@ public class GetVariableAccessAttributesRequest implements Serializable {
int sublength;
if (name != null) {
sublength = name.encode(os);
sublength = name.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
return codeLength;
}
@ -84,12 +85,11 @@ public class GetVariableAccessAttributesRequest implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,16 +1,17 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerBoolean;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import org.openmuc.jasn1.ber.types.BerBoolean;
public class GetVariableAccessAttributesResponse implements Serializable {
public class GetVariableAccessAttributesResponse implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -40,18 +41,18 @@ public class GetVariableAccessAttributesResponse implements Serializable {
this.typeDescription = typeDescription;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
@ -59,22 +60,22 @@ public class GetVariableAccessAttributesResponse implements Serializable {
int codeLength = 0;
int sublength;
sublength = typeDescription.encode(os);
sublength = typeDescription.encode(reverseOS);
codeLength += sublength;
codeLength += BerLength.encodeLength(os, sublength);
codeLength += BerLength.encodeLength(reverseOS, sublength);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
codeLength += mmsDeletable.encode(os, false);
codeLength += mmsDeletable.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -124,12 +125,11 @@ public class GetVariableAccessAttributesResponse implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import org.openmuc.jasn1.ber.types.string.BerVisibleString;
import com.beanit.jasn1.ber.types.string.BerVisibleString;
public class Identifier extends BerVisibleString {

@ -1,6 +1,10 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -8,18 +12,14 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class InformationReport implements Serializable {
public class InformationReport implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
public byte[] code = null;
private VariableAccessSpecification variableAccessSpecification = null;
private ListOfAccessResult listOfAccessResult = null;
public InformationReport() {}
public InformationReport(byte[] code) {
@ -43,34 +43,34 @@ public class InformationReport implements Serializable {
this.listOfAccessResult = listOfAccessResult;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += listOfAccessResult.encode(os, false);
codeLength += listOfAccessResult.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
codeLength += variableAccessSpecification.encode(os);
codeLength += variableAccessSpecification.encode(reverseOS);
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -115,12 +115,11 @@ public class InformationReport implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -159,7 +158,7 @@ public class InformationReport implements Serializable {
sb.append("}");
}
public static class ListOfAccessResult implements Serializable {
public static class ListOfAccessResult implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -167,7 +166,7 @@ public class InformationReport implements Serializable {
private List<AccessResult> seqOf = null;
public ListOfAccessResult() {
seqOf = new ArrayList<>();
seqOf = new ArrayList<AccessResult>();
}
public ListOfAccessResult(byte[] code) {
@ -176,36 +175,36 @@ public class InformationReport implements Serializable {
public List<AccessResult> getAccessResult() {
if (seqOf == null) {
seqOf = new ArrayList<>();
seqOf = new ArrayList<AccessResult>();
}
return seqOf;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
for (int i = (seqOf.size() - 1); i >= 0; i--) {
codeLength += seqOf.get(i).encode(os);
codeLength += seqOf.get(i).encode(reverseOS);
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -244,12 +243,11 @@ public class InformationReport implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,4 +1,4 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
public class InitiateErrorPDU extends ServiceError {

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class InitiateRequestPDU implements Serializable {
public class InitiateRequestPDU implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -19,7 +20,6 @@ public class InitiateRequestPDU implements Serializable {
private Integer16 proposedMaxServOutstandingCalled = null;
private Integer8 proposedDataStructureNestingLevel = null;
private InitRequestDetail initRequestDetail = null;
public InitiateRequestPDU() {}
public InitiateRequestPDU(byte[] code) {
@ -66,56 +66,56 @@ public class InitiateRequestPDU implements Serializable {
this.initRequestDetail = initRequestDetail;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += initRequestDetail.encode(os, false);
codeLength += initRequestDetail.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
os.write(0xA4);
reverseOS.write(0xA4);
codeLength += 1;
if (proposedDataStructureNestingLevel != null) {
codeLength += proposedDataStructureNestingLevel.encode(os, false);
codeLength += proposedDataStructureNestingLevel.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 3
os.write(0x83);
reverseOS.write(0x83);
codeLength += 1;
}
codeLength += proposedMaxServOutstandingCalled.encode(os, false);
codeLength += proposedMaxServOutstandingCalled.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
codeLength += proposedMaxServOutstandingCalling.encode(os, false);
codeLength += proposedMaxServOutstandingCalling.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
if (localDetailCalling != null) {
codeLength += localDetailCalling.encode(os, false);
codeLength += localDetailCalling.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -184,12 +184,11 @@ public class InitiateRequestPDU implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -257,7 +256,7 @@ public class InitiateRequestPDU implements Serializable {
sb.append("}");
}
public static class InitRequestDetail implements Serializable {
public static class InitRequestDetail implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -296,42 +295,42 @@ public class InitiateRequestPDU implements Serializable {
this.servicesSupportedCalling = servicesSupportedCalling;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += servicesSupportedCalling.encode(os, false);
codeLength += servicesSupportedCalling.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
codeLength += proposedParameterCBB.encode(os, false);
codeLength += proposedParameterCBB.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
codeLength += proposedVersionNumber.encode(os, false);
codeLength += proposedVersionNumber.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -388,12 +387,11 @@ public class InitiateRequestPDU implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,15 +1,16 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerLength;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerLength;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class InitiateResponsePDU implements Serializable {
public class InitiateResponsePDU implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -19,7 +20,6 @@ public class InitiateResponsePDU implements Serializable {
private Integer16 negotiatedMaxServOutstandingCalled = null;
private Integer8 negotiatedDataStructureNestingLevel = null;
private InitResponseDetail initResponseDetail = null;
public InitiateResponsePDU() {}
public InitiateResponsePDU(byte[] code) {
@ -67,56 +67,56 @@ public class InitiateResponsePDU implements Serializable {
this.initResponseDetail = initResponseDetail;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += initResponseDetail.encode(os, false);
codeLength += initResponseDetail.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
os.write(0xA4);
reverseOS.write(0xA4);
codeLength += 1;
if (negotiatedDataStructureNestingLevel != null) {
codeLength += negotiatedDataStructureNestingLevel.encode(os, false);
codeLength += negotiatedDataStructureNestingLevel.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 3
os.write(0x83);
reverseOS.write(0x83);
codeLength += 1;
}
codeLength += negotiatedMaxServOutstandingCalled.encode(os, false);
codeLength += negotiatedMaxServOutstandingCalled.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
codeLength += negotiatedMaxServOutstandingCalling.encode(os, false);
codeLength += negotiatedMaxServOutstandingCalling.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
if (localDetailCalled != null) {
codeLength += localDetailCalled.encode(os, false);
codeLength += localDetailCalled.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
}
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -185,12 +185,11 @@ public class InitiateResponsePDU implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
@ -260,7 +259,7 @@ public class InitiateResponsePDU implements Serializable {
sb.append("}");
}
public static class InitResponseDetail implements Serializable {
public static class InitResponseDetail implements BerType, Serializable {
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
private static final long serialVersionUID = 1L;
@ -299,42 +298,42 @@ public class InitiateResponsePDU implements Serializable {
this.servicesSupportedCalled = servicesSupportedCalled;
}
public int encode(OutputStream os) throws IOException {
return encode(os, true);
public int encode(OutputStream reverseOS) throws IOException {
return encode(reverseOS, true);
}
public int encode(OutputStream os, boolean withTag) throws IOException {
public int encode(OutputStream reverseOS, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
return tag.encode(reverseOS) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += servicesSupportedCalled.encode(os, false);
codeLength += servicesSupportedCalled.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
os.write(0x82);
reverseOS.write(0x82);
codeLength += 1;
codeLength += negotiatedParameterCBB.encode(os, false);
codeLength += negotiatedParameterCBB.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
os.write(0x81);
reverseOS.write(0x81);
codeLength += 1;
codeLength += negotiatedVersionNumber.encode(os, false);
codeLength += negotiatedVersionNumber.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
reverseOS.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
codeLength += BerLength.encodeLength(reverseOS, codeLength);
if (withTag) {
codeLength += tag.encode(os);
codeLength += tag.encode(reverseOS);
}
return codeLength;
@ -391,12 +390,11 @@ public class InitiateResponsePDU implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS, false);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class Integer16 extends BerInteger {

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class Integer32 extends BerInteger {

@ -1,8 +1,8 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.types.BerInteger;
import java.math.BigInteger;
import org.openmuc.jasn1.ber.types.BerInteger;
public class Integer8 extends BerInteger {

@ -1,7 +1,7 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import org.openmuc.jasn1.ber.types.string.BerVisibleString;
import com.beanit.jasn1.ber.types.string.BerVisibleString;
public class MMSString extends BerVisibleString {

@ -1,14 +1,15 @@
/** This class file was automatically generated by jASN1 v1.9.1-SNAPSHOT (http://www.openmuc.org) */
/** This class file was automatically generated by jASN1 (http://www.beanit.com) */
package com.beanit.openiec61850.internal.mms.asn1;
import com.beanit.jasn1.ber.BerTag;
import com.beanit.jasn1.ber.ReverseByteArrayOutputStream;
import com.beanit.jasn1.ber.types.BerType;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.openmuc.jasn1.ber.BerTag;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
public class MMSpdu implements Serializable {
public class MMSpdu implements BerType, Serializable {
private static final long serialVersionUID = 1L;
@ -101,84 +102,84 @@ public class MMSpdu implements Serializable {
this.concludeRequestPDU = concludeRequestPDU;
}
public int encode(OutputStream os) throws IOException {
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (concludeRequestPDU != null) {
codeLength += concludeRequestPDU.encode(os, false);
codeLength += concludeRequestPDU.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 11
os.write(0x8B);
reverseOS.write(0x8B);
codeLength += 1;
return codeLength;
}
if (initiateErrorPDU != null) {
codeLength += initiateErrorPDU.encode(os, false);
codeLength += initiateErrorPDU.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 10
os.write(0xAA);
reverseOS.write(0xAA);
codeLength += 1;
return codeLength;
}
if (initiateResponsePDU != null) {
codeLength += initiateResponsePDU.encode(os, false);
codeLength += initiateResponsePDU.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 9
os.write(0xA9);
reverseOS.write(0xA9);
codeLength += 1;
return codeLength;
}
if (initiateRequestPDU != null) {
codeLength += initiateRequestPDU.encode(os, false);
codeLength += initiateRequestPDU.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 8
os.write(0xA8);
reverseOS.write(0xA8);
codeLength += 1;
return codeLength;
}
if (rejectPDU != null) {
codeLength += rejectPDU.encode(os, false);
codeLength += rejectPDU.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
os.write(0xA4);
reverseOS.write(0xA4);
codeLength += 1;
return codeLength;
}
if (unconfirmedPDU != null) {
codeLength += unconfirmedPDU.encode(os, false);
codeLength += unconfirmedPDU.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 3
os.write(0xA3);
reverseOS.write(0xA3);
codeLength += 1;
return codeLength;
}
if (confirmedErrorPDU != null) {
codeLength += confirmedErrorPDU.encode(os, false);
codeLength += confirmedErrorPDU.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
os.write(0xA2);
reverseOS.write(0xA2);
codeLength += 1;
return codeLength;
}
if (confirmedResponsePDU != null) {
codeLength += confirmedResponsePDU.encode(os, false);
codeLength += confirmedResponsePDU.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
os.write(0xA1);
reverseOS.write(0xA1);
codeLength += 1;
return codeLength;
}
if (confirmedRequestPDU != null) {
codeLength += confirmedRequestPDU.encode(os, false);
codeLength += confirmedRequestPDU.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
os.write(0xA0);
reverseOS.write(0xA0);
codeLength += 1;
return codeLength;
}
@ -262,12 +263,11 @@ public class MMSpdu implements Serializable {
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(os);
code = os.getArray();
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save