From 2e268028e9b46e97a7364b1f6aa9694cac329774 Mon Sep 17 00:00:00 2001 From: Stefan Feuerhahn Date: Fri, 22 Mar 2019 11:16:41 +0100 Subject: [PATCH] updated generated asn1 files --- asn1/iso-acse-layer/compile.sh | 6 +- asn1/iso-presentation-layer/compile.sh | 6 +- asn1/mms/compile.sh | 6 +- configuration.gradle | 2 +- .../internal/acse/asn1/AAREApdu.java | 108 ++++---- .../internal/acse/asn1/AARQApdu.java | 120 ++++----- .../internal/acse/asn1/ACSEApdu.java | 28 +- .../internal/acse/asn1/ACSERequirements.java | 4 +- .../acse/asn1/AEInvocationIdentifier.java | 4 +- .../internal/acse/asn1/AEQualifier.java | 25 +- .../internal/acse/asn1/AEQualifierForm2.java | 4 +- .../josistack/internal/acse/asn1/AETitle.java | 25 +- .../internal/acse/asn1/AETitleForm2.java | 4 +- .../acse/asn1/APInvocationIdentifier.java | 4 +- .../josistack/internal/acse/asn1/APTitle.java | 25 +- .../internal/acse/asn1/APTitleForm2.java | 4 +- .../acse/asn1/ApplicationContextName.java | 4 +- .../acse/asn1/ApplicationContextNameList.java | 38 +-- .../internal/acse/asn1/AssociateResult.java | 4 +- .../acse/asn1/AssociateSourceDiagnostic.java | 36 +-- .../acse/asn1/AssociationInformation.java | 38 +-- .../acse/asn1/AuthenticationValue.java | 36 +-- .../acse/asn1/ImplementationData.java | 4 +- .../internal/acse/asn1/MechanismName.java | 4 +- .../internal/acse/asn1/Myexternal.java | 76 +++--- .../internal/acse/asn1/Myexternal2.java | 76 +++--- .../internal/acse/asn1/OidValues.java | 4 +- .../internal/acse/asn1/RLREApdu.java | 40 +-- .../internal/acse/asn1/RLRQApdu.java | 40 +-- .../acse/asn1/ReleaseRequestReason.java | 4 +- .../acse/asn1/ReleaseResponseReason.java | 4 +- .../presentation/asn1/AbstractSyntaxName.java | 4 +- .../internal/presentation/asn1/CPAPPDU.java | 86 +++---- .../internal/presentation/asn1/CPType.java | 94 ++++--- .../asn1/CalledPresentationSelector.java | 2 +- .../asn1/CallingPresentationSelector.java | 2 +- .../presentation/asn1/ContextList.java | 105 ++++---- .../presentation/asn1/DefaultContextName.java | 40 +-- .../presentation/asn1/FullyEncodedData.java | 38 +-- .../presentation/asn1/ModeSelector.java | 38 +-- .../internal/presentation/asn1/PDVList.java | 78 +++--- .../PresentationContextDefinitionList.java | 2 +- ...esentationContextDefinitionResultList.java | 2 +- .../asn1/PresentationContextIdentifier.java | 4 +- .../asn1/PresentationRequirements.java | 4 +- .../asn1/PresentationSelector.java | 4 +- .../presentation/asn1/ProtocolVersion.java | 4 +- .../asn1/RespondingPresentationSelector.java | 2 +- .../internal/presentation/asn1/Result.java | 4 +- .../presentation/asn1/ResultList.java | 76 +++--- .../presentation/asn1/SimplyEncodedData.java | 4 +- .../presentation/asn1/TransferSyntaxName.java | 4 +- .../internal/presentation/asn1/UserData.java | 28 +- .../asn1/UserSessionRequirements.java | 4 +- .../internal/mms/asn1/AccessResult.java | 26 +- .../internal/mms/asn1/AlternateAccess.java | 54 ++-- .../mms/asn1/AlternateAccessSelection.java | 227 ++++++++-------- .../internal/mms/asn1/BasicIdentifier.java | 4 +- .../internal/mms/asn1/ConcludeRequestPDU.java | 4 +- .../internal/mms/asn1/ConfirmedErrorPDU.java | 44 ++-- .../mms/asn1/ConfirmedRequestPDU.java | 39 ++- .../mms/asn1/ConfirmedResponsePDU.java | 39 ++- .../mms/asn1/ConfirmedServiceRequest.java | 84 +++--- .../mms/asn1/ConfirmedServiceResponse.java | 78 +++--- .../openiec61850/internal/mms/asn1/Data.java | 140 +++++----- .../internal/mms/asn1/DataAccessError.java | 4 +- .../asn1/DefineNamedVariableListRequest.java | 38 +-- .../asn1/DefineNamedVariableListResponse.java | 4 +- .../asn1/DeleteNamedVariableListRequest.java | 97 ++++--- .../asn1/DeleteNamedVariableListResponse.java | 40 +-- .../internal/mms/asn1/DirectoryEntry.java | 40 +-- .../internal/mms/asn1/FileAttributes.java | 42 +-- .../internal/mms/asn1/FileCloseRequest.java | 2 +- .../internal/mms/asn1/FileCloseResponse.java | 4 +- .../internal/mms/asn1/FileDeleteRequest.java | 2 +- .../internal/mms/asn1/FileDeleteResponse.java | 4 +- .../mms/asn1/FileDirectoryRequest.java | 40 +-- .../mms/asn1/FileDirectoryResponse.java | 74 +++--- .../internal/mms/asn1/FileName.java | 40 +-- .../internal/mms/asn1/FileOpenRequest.java | 40 +-- .../internal/mms/asn1/FileOpenResponse.java | 40 +-- .../internal/mms/asn1/FileReadRequest.java | 2 +- .../internal/mms/asn1/FileReadResponse.java | 44 ++-- .../internal/mms/asn1/FloatingPoint.java | 4 +- .../internal/mms/asn1/GetNameListRequest.java | 76 +++--- .../mms/asn1/GetNameListResponse.java | 72 +++--- ...GetNamedVariableListAttributesRequest.java | 2 +- ...etNamedVariableListAttributesResponse.java | 42 +-- .../GetVariableAccessAttributesRequest.java | 28 +- .../GetVariableAccessAttributesResponse.java | 44 ++-- .../internal/mms/asn1/Identifier.java | 4 +- .../internal/mms/asn1/InformationReport.java | 68 +++-- .../internal/mms/asn1/InitiateErrorPDU.java | 2 +- .../internal/mms/asn1/InitiateRequestPDU.java | 88 ++++--- .../mms/asn1/InitiateResponsePDU.java | 88 ++++--- .../internal/mms/asn1/Integer16.java | 4 +- .../internal/mms/asn1/Integer32.java | 4 +- .../internal/mms/asn1/Integer8.java | 4 +- .../internal/mms/asn1/MMSString.java | 4 +- .../internal/mms/asn1/MMSpdu.java | 56 ++-- .../internal/mms/asn1/ObjectClass.java | 26 +- .../internal/mms/asn1/ObjectName.java | 67 +++-- .../mms/asn1/ParameterSupportOptions.java | 4 +- .../internal/mms/asn1/ReadRequest.java | 44 ++-- .../internal/mms/asn1/ReadResponse.java | 72 +++--- .../internal/mms/asn1/RejectPDU.java | 98 ++++--- .../internal/mms/asn1/ServiceError.java | 116 +++++---- .../mms/asn1/ServiceSupportOptions.java | 4 +- .../internal/mms/asn1/TimeOfDay.java | 4 +- .../internal/mms/asn1/TypeDescription.java | 242 +++++++++--------- .../internal/mms/asn1/TypeSpecification.java | 22 +- .../internal/mms/asn1/UnconfirmedPDU.java | 34 +-- .../internal/mms/asn1/UnconfirmedService.java | 24 +- .../internal/mms/asn1/Unsigned16.java | 4 +- .../internal/mms/asn1/Unsigned32.java | 4 +- .../internal/mms/asn1/Unsigned8.java | 4 +- .../internal/mms/asn1/UtcTime.java | 4 +- .../mms/asn1/VariableAccessSpecification.java | 32 +-- .../internal/mms/asn1/VariableDefs.java | 68 +++-- .../mms/asn1/VariableSpecification.java | 28 +- .../internal/mms/asn1/WriteRequest.java | 68 +++-- .../internal/mms/asn1/WriteResponse.java | 62 +++-- .../java/com/beanit/openiec61850/Urcb.java | 2 +- .../openiec61850/app/ConsoleClient.java | 3 +- 124 files changed, 2127 insertions(+), 2207 deletions(-) diff --git a/asn1/iso-acse-layer/compile.sh b/asn1/iso-acse-layer/compile.sh index cce26cb..f139f03 100755 --- a/asn1/iso-acse-layer/compile.sh +++ b/asn1/iso-acse-layer/compile.sh @@ -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 diff --git a/asn1/iso-presentation-layer/compile.sh b/asn1/iso-presentation-layer/compile.sh index 6a3b8d6..696c7c5 100755 --- a/asn1/iso-presentation-layer/compile.sh +++ b/asn1/iso-presentation-layer/compile.sh @@ -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 diff --git a/asn1/mms/compile.sh b/asn1/mms/compile.sh index eb3024f..178f962 100755 --- a/asn1/mms/compile.sh +++ b/asn1/mms/compile.sh @@ -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 diff --git a/configuration.gradle b/configuration.gradle index 362cba7..1f5f75a 100644 --- a/configuration.gradle +++ b/configuration.gradle @@ -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' } diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AAREApdu.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AAREApdu.java index 555fa26..a9bd930 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AAREApdu.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AAREApdu.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AARQApdu.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AARQApdu.java index 3a28b36..504834a 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AARQApdu.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AARQApdu.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ACSEApdu.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ACSEApdu.java index 43fe310..d8f8e2b 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ACSEApdu.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ACSEApdu.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ACSERequirements.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ACSERequirements.java index e74be4a..34d9556 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ACSERequirements.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ACSERequirements.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEInvocationIdentifier.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEInvocationIdentifier.java index a434dc7..e74a710 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEInvocationIdentifier.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEInvocationIdentifier.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEQualifier.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEQualifier.java index 40f4800..9170081 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEQualifier.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEQualifier.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEQualifierForm2.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEQualifierForm2.java index b0c6fe6..d42d585 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEQualifierForm2.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AEQualifierForm2.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AETitle.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AETitle.java index cb5c265..d198314 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AETitle.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AETitle.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AETitleForm2.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AETitleForm2.java index ba87572..9a6466d 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AETitleForm2.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AETitleForm2.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APInvocationIdentifier.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APInvocationIdentifier.java index 91161e1..3d99f8b 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APInvocationIdentifier.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APInvocationIdentifier.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APTitle.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APTitle.java index bfca326..642f324 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APTitle.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APTitle.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APTitleForm2.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APTitleForm2.java index e101445..ba478ca 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APTitleForm2.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/APTitleForm2.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ApplicationContextName.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ApplicationContextName.java index 982d324..79f942b 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ApplicationContextName.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ApplicationContextName.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ApplicationContextNameList.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ApplicationContextNameList.java index a628149..e5d65f4 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ApplicationContextNameList.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ApplicationContextNameList.java @@ -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 seqOf = null; public ApplicationContextNameList() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public ApplicationContextNameList(byte[] code) { @@ -29,36 +30,36 @@ public class ApplicationContextNameList implements Serializable { public List getApplicationContextName() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociateResult.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociateResult.java index c5aac43..e902038 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociateResult.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociateResult.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociateSourceDiagnostic.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociateSourceDiagnostic.java index ea04794..4556532 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociateSourceDiagnostic.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociateSourceDiagnostic.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociationInformation.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociationInformation.java index 041bcd3..c1f13ae 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociationInformation.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AssociationInformation.java @@ -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 seqOf = null; public AssociationInformation() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public AssociationInformation(byte[] code) { @@ -29,36 +30,36 @@ public class AssociationInformation implements Serializable { public List getMyexternal() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AuthenticationValue.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AuthenticationValue.java index f17c58a..8f360f4 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AuthenticationValue.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/AuthenticationValue.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ImplementationData.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ImplementationData.java index e42076d..4a12278 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ImplementationData.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ImplementationData.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/MechanismName.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/MechanismName.java index 0af6ce7..5d4ca70 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/MechanismName.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/MechanismName.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/Myexternal.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/Myexternal.java index 955e30d..7cda7d1 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/Myexternal.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/Myexternal.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/Myexternal2.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/Myexternal2.java index ca401c4..53292cb 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/Myexternal2.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/Myexternal2.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/OidValues.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/OidValues.java index 5fedc4e..1c02024 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/OidValues.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/OidValues.java @@ -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 = diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/RLREApdu.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/RLREApdu.java index 30c8543..811f55a 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/RLREApdu.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/RLREApdu.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/RLRQApdu.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/RLRQApdu.java index c370ca5..f9bbd14 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/RLRQApdu.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/RLRQApdu.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ReleaseRequestReason.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ReleaseRequestReason.java index 9d5ab52..5142b71 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ReleaseRequestReason.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ReleaseRequestReason.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ReleaseResponseReason.java b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ReleaseResponseReason.java index 97471b8..673a950 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ReleaseResponseReason.java +++ b/src/main/java-gen/com/beanit/josistack/internal/acse/asn1/ReleaseResponseReason.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/AbstractSyntaxName.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/AbstractSyntaxName.java index d8d361d..dbb7d40 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/AbstractSyntaxName.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/AbstractSyntaxName.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CPAPPDU.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CPAPPDU.java index 5fde886..2f2f417 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CPAPPDU.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CPAPPDU.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CPType.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CPType.java index a071944..92e062f 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CPType.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CPType.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CalledPresentationSelector.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CalledPresentationSelector.java index 2780868..efe2f0d 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CalledPresentationSelector.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CalledPresentationSelector.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CallingPresentationSelector.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CallingPresentationSelector.java index e49d0c8..7f5e969 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CallingPresentationSelector.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/CallingPresentationSelector.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ContextList.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ContextList.java index 13b28ee..38153bb 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ContextList.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ContextList.java @@ -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 seqOf = null; - public ContextList() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public ContextList(byte[] code) { @@ -31,36 +29,36 @@ public class ContextList implements Serializable { public List getSEQUENCE() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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 seqOf = null; public TransferSyntaxNameList() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public TransferSyntaxNameList(byte[] code) { @@ -333,36 +328,36 @@ public class ContextList implements Serializable { public List getTransferSyntaxName() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/DefaultContextName.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/DefaultContextName.java index 347efdf..77c1a4d 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/DefaultContextName.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/DefaultContextName.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/FullyEncodedData.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/FullyEncodedData.java index f3d8bd7..4167e2d 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/FullyEncodedData.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/FullyEncodedData.java @@ -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 seqOf = null; public FullyEncodedData() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public FullyEncodedData(byte[] code) { @@ -29,36 +30,36 @@ public class FullyEncodedData implements Serializable { public List getPDVList() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ModeSelector.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ModeSelector.java index 0178295..daca9d6 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ModeSelector.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ModeSelector.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PDVList.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PDVList.java index a609c76..91becbf 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PDVList.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PDVList.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextDefinitionList.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextDefinitionList.java index 7c26557..524f0a9 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextDefinitionList.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextDefinitionList.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextDefinitionResultList.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextDefinitionResultList.java index f0e7097..220378f 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextDefinitionResultList.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextDefinitionResultList.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextIdentifier.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextIdentifier.java index c7b852e..2ccb204 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextIdentifier.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationContextIdentifier.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationRequirements.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationRequirements.java index c7cad47..9158098 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationRequirements.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationRequirements.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationSelector.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationSelector.java index edb848d..9522776 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationSelector.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/PresentationSelector.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ProtocolVersion.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ProtocolVersion.java index d63c4bf..14723c3 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ProtocolVersion.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ProtocolVersion.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/RespondingPresentationSelector.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/RespondingPresentationSelector.java index 16988d4..1ea4535 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/RespondingPresentationSelector.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/RespondingPresentationSelector.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/Result.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/Result.java index 672a114..771c5dc 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/Result.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/Result.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ResultList.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ResultList.java index 4aab4e2..9f0d126 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ResultList.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/ResultList.java @@ -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 seqOf = null; - public ResultList() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public ResultList(byte[] code) { @@ -30,36 +30,36 @@ public class ResultList implements Serializable { public List getSEQUENCE() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/SimplyEncodedData.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/SimplyEncodedData.java index 3833ea3..f4d686b 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/SimplyEncodedData.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/SimplyEncodedData.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/TransferSyntaxName.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/TransferSyntaxName.java index a4283f8..fc6656d 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/TransferSyntaxName.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/TransferSyntaxName.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/UserData.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/UserData.java index 395033e..b300af9 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/UserData.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/UserData.java @@ -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); diff --git a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/UserSessionRequirements.java b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/UserSessionRequirements.java index f70492c..0068aae 100644 --- a/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/UserSessionRequirements.java +++ b/src/main/java-gen/com/beanit/josistack/internal/presentation/asn1/UserSessionRequirements.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AccessResult.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AccessResult.java index 063e123..f299b44 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AccessResult.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AccessResult.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AlternateAccess.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AlternateAccess.java index c7fdafd..be56001 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AlternateAccess.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AlternateAccess.java @@ -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 seqOf = null; - public AlternateAccess() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public AlternateAccess(byte[] code) { @@ -29,36 +29,36 @@ public class AlternateAccess implements Serializable { public List getCHOICE() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AlternateAccessSelection.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AlternateAccessSelection.java index 82dc014..f263b1d 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AlternateAccessSelection.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/AlternateAccessSelection.java @@ -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(""); } - 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(""); } - 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(""); } - 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/BasicIdentifier.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/BasicIdentifier.java index 049b9cd..cd450f0 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/BasicIdentifier.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/BasicIdentifier.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConcludeRequestPDU.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConcludeRequestPDU.java index d2a6855..e4fada0 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConcludeRequestPDU.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConcludeRequestPDU.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedErrorPDU.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedErrorPDU.java index 03ac9f1..8917cb4 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedErrorPDU.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedErrorPDU.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedRequestPDU.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedRequestPDU.java index a6cff69..5288186 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedRequestPDU.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedRequestPDU.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedResponsePDU.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedResponsePDU.java index 7f65157..65925bf 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedResponsePDU.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedResponsePDU.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedServiceRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedServiceRequest.java index 60e64bb..8dcd5d8 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedServiceRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedServiceRequest.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedServiceResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedServiceResponse.java index 66eec60..086583f 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedServiceResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ConfirmedServiceResponse.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Data.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Data.java index ae457a9..b1d4980 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Data.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Data.java @@ -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(""); } - 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 seqOf = null; public Array() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public Array(byte[] code) { @@ -436,36 +434,36 @@ public class Data implements Serializable { public List getData() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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 seqOf = null; public Structure() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public Structure(byte[] code) { @@ -563,36 +560,36 @@ public class Data implements Serializable { public List getData() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DataAccessError.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DataAccessError.java index ecab5d9..30a751b 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DataAccessError.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DataAccessError.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DefineNamedVariableListRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DefineNamedVariableListRequest.java index 025ce0e..c41610c 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DefineNamedVariableListRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DefineNamedVariableListRequest.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DefineNamedVariableListResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DefineNamedVariableListResponse.java index a5b070b..b93f3cb 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DefineNamedVariableListResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DefineNamedVariableListResponse.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DeleteNamedVariableListRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DeleteNamedVariableListRequest.java index e9b9cc9..30db7a0 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DeleteNamedVariableListRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DeleteNamedVariableListRequest.java @@ -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 seqOf = null; public ListOfVariableListName() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public ListOfVariableListName(byte[] code) { @@ -234,36 +231,36 @@ public class DeleteNamedVariableListRequest implements Serializable { public List getObjectName() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DeleteNamedVariableListResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DeleteNamedVariableListResponse.java index 744c96d..2588038 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DeleteNamedVariableListResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DeleteNamedVariableListResponse.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DirectoryEntry.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DirectoryEntry.java index 60de1cc..be1d26c 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DirectoryEntry.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/DirectoryEntry.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileAttributes.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileAttributes.java index edc3e62..705ed96 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileAttributes.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileAttributes.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileCloseRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileCloseRequest.java index f290315..25d2635 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileCloseRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileCloseRequest.java @@ -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; diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileCloseResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileCloseResponse.java index 00d6601..84c68b2 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileCloseResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileCloseResponse.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDeleteRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDeleteRequest.java index 4f8634a..8096600 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDeleteRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDeleteRequest.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDeleteResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDeleteResponse.java index 678586e..76a9792 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDeleteResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDeleteResponse.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDirectoryRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDirectoryRequest.java index b834f3f..a77a228 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDirectoryRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDirectoryRequest.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDirectoryResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDirectoryResponse.java index 5101341..c6eb3ec 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDirectoryResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileDirectoryResponse.java @@ -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 seqOf = null; public ListOfDirectoryEntry() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public ListOfDirectoryEntry(byte[] code) { @@ -190,36 +189,36 @@ public class FileDirectoryResponse implements Serializable { public List getDirectoryEntry() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileName.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileName.java index fc7dbfc..1911389 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileName.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileName.java @@ -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 seqOf = null; public FileName() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public FileName(byte[] code) { @@ -30,36 +31,36 @@ public class FileName implements Serializable { public List getBerGraphicString() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileOpenRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileOpenRequest.java index a4a463d..203a56e 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileOpenRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileOpenRequest.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileOpenResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileOpenResponse.java index dd38c8d..c6cb851 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileOpenResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileOpenResponse.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileReadRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileReadRequest.java index d0277d0..e3bdb23 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileReadRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileReadRequest.java @@ -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; diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileReadResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileReadResponse.java index 0d3ba77..1b7295a 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileReadResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FileReadResponse.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FloatingPoint.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FloatingPoint.java index dfa6e3e..e83289c 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FloatingPoint.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/FloatingPoint.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNameListRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNameListRequest.java index 0b319db..72eded1 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNameListRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNameListRequest.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNameListResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNameListResponse.java index 8b20650..f2df664 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNameListResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNameListResponse.java @@ -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 seqOf = null; public ListOfIdentifier() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public ListOfIdentifier(byte[] code) { @@ -185,36 +184,36 @@ public class GetNameListResponse implements Serializable { public List getIdentifier() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNamedVariableListAttributesRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNamedVariableListAttributesRequest.java index 8ce7553..fc386db 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNamedVariableListAttributesRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNamedVariableListAttributesRequest.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNamedVariableListAttributesResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNamedVariableListAttributesResponse.java index 643fdfc..e29e669 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNamedVariableListAttributesResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetNamedVariableListAttributesResponse.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetVariableAccessAttributesRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetVariableAccessAttributesRequest.java index 55efd42..3af6c9f 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetVariableAccessAttributesRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetVariableAccessAttributesRequest.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetVariableAccessAttributesResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetVariableAccessAttributesResponse.java index 1e36320..6164bc7 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetVariableAccessAttributesResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/GetVariableAccessAttributesResponse.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Identifier.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Identifier.java index 839938f..72be23a 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Identifier.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Identifier.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InformationReport.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InformationReport.java index 64d4d70..2e1d6ab 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InformationReport.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InformationReport.java @@ -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 seqOf = null; public ListOfAccessResult() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public ListOfAccessResult(byte[] code) { @@ -176,36 +175,36 @@ public class InformationReport implements Serializable { public List getAccessResult() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateErrorPDU.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateErrorPDU.java index 90625d1..b5680be 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateErrorPDU.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateErrorPDU.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateRequestPDU.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateRequestPDU.java index 205a027..e597270 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateRequestPDU.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateRequestPDU.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateResponsePDU.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateResponsePDU.java index 9f47c08..4270e9f 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateResponsePDU.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/InitiateResponsePDU.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer16.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer16.java index 1edf868..5587cb5 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer16.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer16.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer32.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer32.java index b39ff22..e4fef9d 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer32.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer32.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer8.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer8.java index b58680b..0a814eb 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer8.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Integer8.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/MMSString.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/MMSString.java index 59f7b31..68bcb99 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/MMSString.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/MMSString.java @@ -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 { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/MMSpdu.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/MMSpdu.java index 6280053..d5bd224 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/MMSpdu.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/MMSpdu.java @@ -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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ObjectClass.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ObjectClass.java index d9a5d0b..53d0957 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ObjectClass.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ObjectClass.java @@ -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.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.BerTag; -import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream; -import org.openmuc.jasn1.ber.types.BerInteger; -public class ObjectClass implements Serializable { +public class ObjectClass implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -30,20 +31,20 @@ public class ObjectClass implements Serializable { this.basicObjectClass = basicObjectClass; } - 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 (basicObjectClass != null) { - codeLength += basicObjectClass.encode(os, false); + codeLength += basicObjectClass.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 0 - os.write(0x80); + reverseOS.write(0x80); codeLength += 1; return codeLength; } @@ -79,12 +80,11 @@ public class ObjectClass 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ObjectName.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ObjectName.java index db83dac..6d3f845 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ObjectName.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ObjectName.java @@ -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.string.BerVisibleString; -public class ObjectName implements Serializable { +public class ObjectName implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -18,7 +18,6 @@ public class ObjectName implements Serializable { private Identifier vmdSpecific = null; private DomainSpecific domainSpecific = null; private Identifier aaSpecific = null; - public ObjectName() {} public ObjectName(byte[] code) { @@ -49,36 +48,36 @@ public class ObjectName 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, CONSTRUCTED, 1 - os.write(0xA1); + reverseOS.write(0xA1); 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; } @@ -126,12 +125,11 @@ public class ObjectName 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); @@ -159,7 +157,7 @@ public class ObjectName implements Serializable { sb.append(""); } - public static class DomainSpecific implements Serializable { + public static class DomainSpecific implements BerType, Serializable { public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); private static final long serialVersionUID = 1L; @@ -189,31 +187,31 @@ public class ObjectName implements Serializable { this.itemID = itemID; } - 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 += itemID.encode(os, true); + codeLength += itemID.encode(reverseOS, true); - codeLength += domainID.encode(os, true); + codeLength += domainID.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; @@ -239,7 +237,7 @@ public class ObjectName implements Serializable { codeLength += totalLength; subCodeLength += berTag.decode(is); - if (berTag.equals(BerVisibleString.tag)) { + if (berTag.equals(Identifier.tag)) { domainID = new Identifier(); subCodeLength += domainID.decode(is, false); subCodeLength += berTag.decode(is); @@ -247,7 +245,7 @@ public class ObjectName implements Serializable { throw new IOException("Tag does not match the mandatory sequence element tag."); } - if (berTag.equals(BerVisibleString.tag)) { + if (berTag.equals(Identifier.tag)) { itemID = new Identifier(); subCodeLength += itemID.decode(is, false); if (subCodeLength == totalLength) { @@ -262,12 +260,11 @@ public class ObjectName 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ParameterSupportOptions.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ParameterSupportOptions.java index 37c88f3..de8ffa4 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ParameterSupportOptions.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ParameterSupportOptions.java @@ -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.BerBitString; +import com.beanit.jasn1.ber.types.BerBitString; public class ParameterSupportOptions extends BerBitString { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ReadRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ReadRequest.java index b14e040..57aa556 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ReadRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ReadRequest.java @@ -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 ReadRequest implements Serializable { +public class ReadRequest implements BerType, Serializable { public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); private static final long serialVersionUID = 1L; @@ -41,18 +42,18 @@ public class ReadRequest implements Serializable { this.variableAccessSpecification = variableAccessSpecification; } - 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; } @@ -60,24 +61,24 @@ public class ReadRequest implements Serializable { int codeLength = 0; int sublength; - sublength = variableAccessSpecification.encode(os); + sublength = variableAccessSpecification.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; if (specificationWithResult != null) { - codeLength += specificationWithResult.encode(os, false); + codeLength += specificationWithResult.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 ReadRequest 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ReadResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ReadResponse.java index c84c776..0b7ecd2 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ReadResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ReadResponse.java @@ -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 ReadResponse implements Serializable { +public class ReadResponse 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 ReadResponse() {} public ReadResponse(byte[] code) { @@ -43,18 +43,18 @@ public class ReadResponse 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; } @@ -62,24 +62,24 @@ public class ReadResponse implements Serializable { int codeLength = 0; int sublength; - codeLength += listOfAccessResult.encode(os, false); + codeLength += listOfAccessResult.encode(reverseOS, false); // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 - os.write(0xA1); + reverseOS.write(0xA1); codeLength += 1; if (variableAccessSpecification != null) { - sublength = variableAccessSpecification.encode(os); + sublength = variableAccessSpecification.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; @@ -127,12 +127,11 @@ public class ReadResponse 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 ReadResponse 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; @@ -181,7 +180,7 @@ public class ReadResponse implements Serializable { private List seqOf = null; public ListOfAccessResult() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public ListOfAccessResult(byte[] code) { @@ -190,36 +189,36 @@ public class ReadResponse implements Serializable { public List getAccessResult() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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; @@ -258,12 +257,11 @@ public class ReadResponse 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/RejectPDU.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/RejectPDU.java index 4880422..0819077 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/RejectPDU.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/RejectPDU.java @@ -1,23 +1,23 @@ -/** 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; 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 RejectPDU implements Serializable { +public class RejectPDU 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 Unsigned32 originalInvokeID = null; private RejectReason rejectReason = null; - public RejectPDU() {} public RejectPDU(byte[] code) { @@ -40,36 +40,36 @@ public class RejectPDU implements Serializable { this.rejectReason = rejectReason; } - 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 += rejectReason.encode(os); + codeLength += rejectReason.encode(reverseOS); if (originalInvokeID != null) { - codeLength += originalInvokeID.encode(os, false); + codeLength += originalInvokeID.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; @@ -114,12 +114,11 @@ public class RejectPDU 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 RejectPDU implements Serializable { sb.append("}"); } - public static class RejectReason implements Serializable { + public static class RejectReason implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -270,100 +269,100 @@ public class RejectPDU implements Serializable { this.concludeErrorPDU = concludeErrorPDU; } - 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 (concludeErrorPDU != null) { - codeLength += concludeErrorPDU.encode(os, false); + codeLength += concludeErrorPDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 11 - os.write(0x8B); + reverseOS.write(0x8B); codeLength += 1; return codeLength; } if (concludeResponsePDU != null) { - codeLength += concludeResponsePDU.encode(os, false); + codeLength += concludeResponsePDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 10 - os.write(0x8A); + reverseOS.write(0x8A); codeLength += 1; return codeLength; } if (concludeRequestPDU != null) { - codeLength += concludeRequestPDU.encode(os, false); + codeLength += concludeRequestPDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 9 - os.write(0x89); + reverseOS.write(0x89); codeLength += 1; return codeLength; } if (cancelErrorPDU != null) { - codeLength += cancelErrorPDU.encode(os, false); + codeLength += cancelErrorPDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 8 - os.write(0x88); + reverseOS.write(0x88); codeLength += 1; return codeLength; } if (cancelResponsePDU != null) { - codeLength += cancelResponsePDU.encode(os, false); + codeLength += cancelResponsePDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 7 - os.write(0x87); + reverseOS.write(0x87); codeLength += 1; return codeLength; } if (cancelRequestPDU != null) { - codeLength += cancelRequestPDU.encode(os, false); + codeLength += cancelRequestPDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 6 - os.write(0x86); + reverseOS.write(0x86); codeLength += 1; return codeLength; } if (pduError != null) { - codeLength += pduError.encode(os, false); + codeLength += pduError.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 5 - os.write(0x85); + reverseOS.write(0x85); codeLength += 1; return codeLength; } if (unconfirmedPDU != null) { - codeLength += unconfirmedPDU.encode(os, false); + codeLength += unconfirmedPDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 4 - os.write(0x84); + reverseOS.write(0x84); codeLength += 1; return codeLength; } if (confirmedErrorPDU != null) { - codeLength += confirmedErrorPDU.encode(os, false); + codeLength += confirmedErrorPDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 3 - os.write(0x83); + reverseOS.write(0x83); codeLength += 1; return codeLength; } if (confirmedResponsePDU != null) { - codeLength += confirmedResponsePDU.encode(os, false); + codeLength += confirmedResponsePDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 2 - os.write(0x82); + reverseOS.write(0x82); codeLength += 1; return codeLength; } if (confirmedRequestPDU != null) { - codeLength += confirmedRequestPDU.encode(os, false); + codeLength += confirmedRequestPDU.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 1 - os.write(0x81); + reverseOS.write(0x81); codeLength += 1; return codeLength; } @@ -459,12 +458,11 @@ public class RejectPDU 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ServiceError.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ServiceError.java index da11573..86a962e 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ServiceError.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ServiceError.java @@ -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.BerInteger; +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; 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; -import org.openmuc.jasn1.ber.types.string.BerVisibleString; -public class ServiceError implements Serializable { +public class ServiceError 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 ServiceError implements Serializable { private ErrorClass errorClass = null; private BerInteger additionalCode = null; private BerVisibleString additionalDescription = null; - public ServiceError() {} public ServiceError(byte[] code) { @@ -50,18 +50,18 @@ public class ServiceError implements Serializable { this.additionalDescription = additionalDescription; } - 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; } @@ -70,30 +70,30 @@ public class ServiceError implements Serializable { int sublength; if (additionalDescription != null) { - codeLength += additionalDescription.encode(os, false); + codeLength += additionalDescription.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 2 - os.write(0x82); + reverseOS.write(0x82); codeLength += 1; } if (additionalCode != null) { - codeLength += additionalCode.encode(os, false); + codeLength += additionalCode.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 1 - os.write(0x81); + reverseOS.write(0x81); codeLength += 1; } - sublength = errorClass.encode(os); + sublength = errorClass.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; @@ -155,12 +155,11 @@ public class ServiceError 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); @@ -204,7 +203,7 @@ public class ServiceError implements Serializable { sb.append("}"); } - public static class ErrorClass implements Serializable { + public static class ErrorClass implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -333,116 +332,116 @@ public class ServiceError implements Serializable { this.others = others; } - 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 (others != null) { - codeLength += others.encode(os, false); + codeLength += others.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 12 - os.write(0x8C); + reverseOS.write(0x8C); codeLength += 1; return codeLength; } if (file != null) { - codeLength += file.encode(os, false); + codeLength += file.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 11 - os.write(0x8B); + reverseOS.write(0x8B); codeLength += 1; return codeLength; } if (cancel != null) { - codeLength += cancel.encode(os, false); + codeLength += cancel.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 10 - os.write(0x8A); + reverseOS.write(0x8A); codeLength += 1; return codeLength; } if (conclude != null) { - codeLength += conclude.encode(os, false); + codeLength += conclude.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 9 - os.write(0x89); + reverseOS.write(0x89); codeLength += 1; return codeLength; } if (initiate != null) { - codeLength += initiate.encode(os, false); + codeLength += initiate.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 8 - os.write(0x88); + reverseOS.write(0x88); codeLength += 1; return codeLength; } if (access != null) { - codeLength += access.encode(os, false); + codeLength += access.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 7 - os.write(0x87); + reverseOS.write(0x87); codeLength += 1; return codeLength; } if (timeResolution != null) { - codeLength += timeResolution.encode(os, false); + codeLength += timeResolution.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 6 - os.write(0x86); + reverseOS.write(0x86); codeLength += 1; return codeLength; } if (servicePreempt != null) { - codeLength += servicePreempt.encode(os, false); + codeLength += servicePreempt.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 5 - os.write(0x85); + reverseOS.write(0x85); codeLength += 1; return codeLength; } if (service != null) { - codeLength += service.encode(os, false); + codeLength += service.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 4 - os.write(0x84); + reverseOS.write(0x84); codeLength += 1; return codeLength; } if (resource != null) { - codeLength += resource.encode(os, false); + codeLength += resource.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 3 - os.write(0x83); + reverseOS.write(0x83); codeLength += 1; return codeLength; } if (definition != null) { - codeLength += definition.encode(os, false); + codeLength += definition.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 2 - os.write(0x82); + reverseOS.write(0x82); codeLength += 1; return codeLength; } if (applicationReference != null) { - codeLength += applicationReference.encode(os, false); + codeLength += applicationReference.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 1 - os.write(0x81); + reverseOS.write(0x81); codeLength += 1; return codeLength; } if (vmdState != null) { - codeLength += vmdState.encode(os, false); + codeLength += vmdState.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 0 - os.write(0x80); + reverseOS.write(0x80); codeLength += 1; return codeLength; } @@ -550,12 +549,11 @@ public class ServiceError 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ServiceSupportOptions.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ServiceSupportOptions.java index 09983d6..504364b 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ServiceSupportOptions.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/ServiceSupportOptions.java @@ -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.BerBitString; +import com.beanit.jasn1.ber.types.BerBitString; public class ServiceSupportOptions extends BerBitString { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TimeOfDay.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TimeOfDay.java index 5404767..e1327f3 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TimeOfDay.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TimeOfDay.java @@ -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 TimeOfDay extends BerOctetString { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TypeDescription.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TypeDescription.java index 9f657c0..3be1f06 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TypeDescription.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TypeDescription.java @@ -1,6 +1,12 @@ -/** 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.BerNull; +import com.beanit.jasn1.ber.types.BerType; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -8,14 +14,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.BerBoolean; -import org.openmuc.jasn1.ber.types.BerInteger; -import org.openmuc.jasn1.ber.types.BerNull; -public class TypeDescription implements Serializable { +public class TypeDescription implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -32,9 +32,7 @@ public class TypeDescription implements Serializable { private BerBoolean binaryTime = null; private Integer32 mMSString = null; private BerNull utcTime = null; - public TypeDescription() {} - public TypeDescription(byte[] code) { this.code = code; } @@ -135,108 +133,108 @@ public class TypeDescription 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, CONSTRUCTED, 7 - os.write(0xA7); + reverseOS.write(0xA7); 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; } @@ -338,12 +336,11 @@ public class TypeDescription 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); @@ -418,7 +415,7 @@ public class TypeDescription implements Serializable { sb.append(""); } - 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; @@ -457,18 +454,18 @@ public class TypeDescription implements Serializable { this.elementType = elementType; } - 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; } @@ -476,29 +473,29 @@ public class TypeDescription implements Serializable { int codeLength = 0; int sublength; - sublength = elementType.encode(os); + sublength = elementType.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 += numberOfElements.encode(os, false); + codeLength += numberOfElements.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 1 - os.write(0x81); + reverseOS.write(0x81); codeLength += 1; if (packed != null) { - codeLength += packed.encode(os, false); + codeLength += packed.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; @@ -554,12 +551,11 @@ public class TypeDescription 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); @@ -610,14 +606,13 @@ public class TypeDescription 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; public byte[] code = null; private BerBoolean packed = null; private Components components = null; - public Structure() {} public Structure(byte[] code) { @@ -640,39 +635,39 @@ public class TypeDescription implements Serializable { this.components = components; } - 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 += components.encode(os, false); + codeLength += components.encode(reverseOS, false); // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 - os.write(0xA1); + reverseOS.write(0xA1); codeLength += 1; if (packed != null) { - codeLength += packed.encode(os, false); + codeLength += packed.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; @@ -719,12 +714,11 @@ public class TypeDescription 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); @@ -764,15 +758,14 @@ public class TypeDescription implements Serializable { sb.append("}"); } - public static class Components implements Serializable { + public static class Components 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 seqOf = null; - public Components() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public Components(byte[] code) { @@ -781,36 +774,36 @@ public class TypeDescription implements Serializable { public List getSEQUENCE() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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; @@ -849,12 +842,12 @@ public class TypeDescription 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); @@ -890,7 +883,7 @@ public class TypeDescription 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; @@ -920,18 +913,18 @@ public class TypeDescription implements Serializable { this.componentType = componentType; } - 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; } @@ -939,24 +932,24 @@ public class TypeDescription implements Serializable { int codeLength = 0; int sublength; - sublength = componentType.encode(os); + sublength = componentType.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; if (componentName != null) { - codeLength += componentName.encode(os, false); + codeLength += componentName.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; @@ -1004,12 +997,12 @@ public class TypeDescription 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); @@ -1052,7 +1045,7 @@ public class TypeDescription implements Serializable { } } - public static class FloatingPoint implements Serializable { + public static class FloatingPoint implements BerType, Serializable { public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); private static final long serialVersionUID = 1L; @@ -1082,31 +1075,31 @@ public class TypeDescription implements Serializable { this.exponentWidth = exponentWidth; } - 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 += exponentWidth.encode(os, true); + codeLength += exponentWidth.encode(reverseOS, true); - codeLength += formatWidth.encode(os, true); + codeLength += formatWidth.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; @@ -1132,7 +1125,7 @@ public class TypeDescription implements Serializable { codeLength += totalLength; subCodeLength += berTag.decode(is); - if (berTag.equals(BerInteger.tag)) { + if (berTag.equals(Unsigned8.tag)) { formatWidth = new Unsigned8(); subCodeLength += formatWidth.decode(is, false); subCodeLength += berTag.decode(is); @@ -1140,7 +1133,7 @@ public class TypeDescription implements Serializable { throw new IOException("Tag does not match the mandatory sequence element tag."); } - if (berTag.equals(BerInteger.tag)) { + if (berTag.equals(Unsigned8.tag)) { exponentWidth = new Unsigned8(); subCodeLength += exponentWidth.decode(is, false); if (subCodeLength == totalLength) { @@ -1155,12 +1148,11 @@ public class TypeDescription 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TypeSpecification.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TypeSpecification.java index cc1ecf0..e980dfb 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TypeSpecification.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/TypeSpecification.java @@ -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 TypeSpecification implements Serializable { +public class TypeSpecification implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -29,18 +30,18 @@ public class TypeSpecification implements Serializable { this.typeDescription = typeDescription; } - 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 (typeDescription != null) { - codeLength += typeDescription.encode(os); + codeLength += typeDescription.encode(reverseOS); return codeLength; } @@ -77,12 +78,11 @@ public class TypeSpecification 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UnconfirmedPDU.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UnconfirmedPDU.java index 1594545..0eeb619 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UnconfirmedPDU.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UnconfirmedPDU.java @@ -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 UnconfirmedPDU implements Serializable { +public class UnconfirmedPDU implements BerType, Serializable { public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); private static final long serialVersionUID = 1L; @@ -30,29 +31,29 @@ public class UnconfirmedPDU 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 += BerLength.encodeLength(os, codeLength); + codeLength += BerLength.encodeLength(reverseOS, codeLength); if (withTag) { - codeLength += tag.encode(os); + codeLength += tag.encode(reverseOS); } return codeLength; @@ -91,12 +92,11 @@ public class UnconfirmedPDU 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UnconfirmedService.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UnconfirmedService.java index f8512e4..bac3198 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UnconfirmedService.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UnconfirmedService.java @@ -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 UnconfirmedService implements Serializable { +public class UnconfirmedService implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -29,20 +30,20 @@ public class UnconfirmedService implements Serializable { this.informationReport = informationReport; } - 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 (informationReport != null) { - codeLength += informationReport.encode(os, false); + codeLength += informationReport.encode(reverseOS, false); // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 - os.write(0xA0); + reverseOS.write(0xA0); codeLength += 1; return codeLength; } @@ -78,12 +79,11 @@ public class UnconfirmedService 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned16.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned16.java index c191f44..a9df134 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned16.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned16.java @@ -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 Unsigned16 extends BerInteger { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned32.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned32.java index 0a916e8..9ceafb9 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned32.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned32.java @@ -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 Unsigned32 extends BerInteger { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned8.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned8.java index 6a2d67f..2bc35c4 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned8.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/Unsigned8.java @@ -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 Unsigned8 extends BerInteger { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UtcTime.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UtcTime.java index e6a49bc..b572e3e 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UtcTime.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/UtcTime.java @@ -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 UtcTime extends BerOctetString { diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableAccessSpecification.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableAccessSpecification.java index a3624c0..52e0802 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableAccessSpecification.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableAccessSpecification.java @@ -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 VariableAccessSpecification implements Serializable { +public class VariableAccessSpecification implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -39,11 +40,11 @@ public class VariableAccessSpecification implements Serializable { this.variableListName = variableListName; } - 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; } @@ -52,19 +53,19 @@ public class VariableAccessSpecification implements Serializable { int sublength; if (variableListName != null) { - sublength = variableListName.encode(os); + sublength = variableListName.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; } if (listOfVariable != null) { - codeLength += listOfVariable.encode(os, false); + codeLength += listOfVariable.encode(reverseOS, false); // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 - os.write(0xA0); + reverseOS.write(0xA0); codeLength += 1; return codeLength; } @@ -107,12 +108,11 @@ public class VariableAccessSpecification 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableDefs.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableDefs.java index 38b52a5..194a413 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableDefs.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableDefs.java @@ -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 VariableDefs implements Serializable { +public class VariableDefs 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 seqOf = null; - public VariableDefs() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public VariableDefs(byte[] code) { @@ -29,36 +29,36 @@ public class VariableDefs implements Serializable { public List getSEQUENCE() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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 +97,11 @@ public class VariableDefs 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 VariableDefs 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; @@ -168,36 +167,36 @@ public class VariableDefs 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; if (alternateAccess != null) { - codeLength += alternateAccess.encode(os, false); + codeLength += alternateAccess.encode(reverseOS, false); // write tag: CONTEXT_CLASS, CONSTRUCTED, 5 - os.write(0xA5); + reverseOS.write(0xA5); codeLength += 1; } - codeLength += variableSpecification.encode(os); + codeLength += variableSpecification.encode(reverseOS); - codeLength += BerLength.encodeLength(os, codeLength); + codeLength += BerLength.encodeLength(reverseOS, codeLength); if (withTag) { - codeLength += tag.encode(os); + codeLength += tag.encode(reverseOS); } return codeLength; @@ -245,12 +244,11 @@ public class VariableDefs 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableSpecification.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableSpecification.java index e5b6b88..74d03bb 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableSpecification.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/VariableSpecification.java @@ -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 VariableSpecification implements Serializable { +public class VariableSpecification implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -30,11 +31,11 @@ public class VariableSpecification 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 VariableSpecification 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 VariableSpecification 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/WriteRequest.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/WriteRequest.java index 2e22c79..5142b2f 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/WriteRequest.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/WriteRequest.java @@ -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 WriteRequest implements Serializable { +public class WriteRequest 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 ListOfData listOfData = null; - public WriteRequest() {} public WriteRequest(byte[] code) { @@ -43,34 +43,34 @@ public class WriteRequest implements Serializable { this.listOfData = listOfData; } - 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 += listOfData.encode(os, false); + codeLength += listOfData.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 WriteRequest 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 WriteRequest implements Serializable { sb.append("}"); } - public static class ListOfData implements Serializable { + public static class ListOfData 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 WriteRequest implements Serializable { private List seqOf = null; public ListOfData() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public ListOfData(byte[] code) { @@ -176,36 +175,36 @@ public class WriteRequest implements Serializable { public List getData() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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 WriteRequest 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); diff --git a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/WriteResponse.java b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/WriteResponse.java index d0071d5..7f9cda6 100644 --- a/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/WriteResponse.java +++ b/src/main/java-gen/com/beanit/openiec61850/internal/mms/asn1/WriteResponse.java @@ -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.BerNull; +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.BerNull; -public class WriteResponse implements Serializable { +public class WriteResponse 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 seqOf = null; - public WriteResponse() { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } public WriteResponse(byte[] code) { @@ -30,36 +30,36 @@ public class WriteResponse implements Serializable { public List getCHOICE() { if (seqOf == null) { - seqOf = new ArrayList<>(); + seqOf = new ArrayList(); } 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; @@ -98,12 +98,11 @@ public class WriteResponse 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 WriteResponse implements Serializable { sb.append("}"); } - public static class CHOICE implements Serializable { + public static class CHOICE implements BerType, Serializable { private static final long serialVersionUID = 1L; @@ -169,28 +168,28 @@ public class WriteResponse 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, false); + codeLength += success.encode(reverseOS, false); // write tag: CONTEXT_CLASS, PRIMITIVE, 1 - os.write(0x81); + reverseOS.write(0x81); codeLength += 1; 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; } @@ -232,12 +231,11 @@ public class WriteResponse 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); diff --git a/src/main/java/com/beanit/openiec61850/Urcb.java b/src/main/java/com/beanit/openiec61850/Urcb.java index 4ceb007..8c08cbd 100644 --- a/src/main/java/com/beanit/openiec61850/Urcb.java +++ b/src/main/java/com/beanit/openiec61850/Urcb.java @@ -30,7 +30,7 @@ import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; -import org.openmuc.jasn1.ber.types.BerBitString; +import com.beanit.jasn1.ber.types.BerBitString; public class Urcb extends Rcb { diff --git a/src/main/java/com/beanit/openiec61850/app/ConsoleClient.java b/src/main/java/com/beanit/openiec61850/app/ConsoleClient.java index 49171ad..fec4483 100644 --- a/src/main/java/com/beanit/openiec61850/app/ConsoleClient.java +++ b/src/main/java/com/beanit/openiec61850/app/ConsoleClient.java @@ -36,7 +36,6 @@ import com.beanit.openiec61850.internal.cli.CliParameter; import com.beanit.openiec61850.internal.cli.CliParameterBuilder; import com.beanit.openiec61850.internal.cli.CliParseException; import com.beanit.openiec61850.internal.cli.CliParser; -import com.beanit.openiec61850.internal.cli.FatalActionException; import com.beanit.openiec61850.internal.cli.IntCliParameter; import com.beanit.openiec61850.internal.cli.StringCliParameter; import java.io.IOException; @@ -191,7 +190,7 @@ public class ConsoleClient { private static class ActionExecutor implements ActionListener { @Override - public void actionCalled(String actionKey) throws ActionException, FatalActionException { + public void actionCalled(String actionKey) throws ActionException { try { switch (actionKey) { case PRINT_MODEL_KEY: