|
|
@ -1,19 +1,25 @@
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
|
|
|
* This class file was automatically generated by jASN1 v1.9.0 (http://www.openmuc.org)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
package org.openmuc.josistack.internal.presentation.asn1;
|
|
|
|
package org.openmuc.josistack.internal.presentation.asn1;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
|
|
|
import java.io.OutputStream;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
|
|
|
|
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
|
|
|
|
|
|
|
import org.openmuc.jasn1.ber.BerLength;
|
|
|
|
import org.openmuc.jasn1.ber.BerLength;
|
|
|
|
import org.openmuc.jasn1.ber.BerTag;
|
|
|
|
import org.openmuc.jasn1.ber.BerTag;
|
|
|
|
|
|
|
|
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
|
|
|
|
|
|
|
|
|
|
|
|
public class CPType {
|
|
|
|
public class CPType implements Serializable {
|
|
|
|
|
|
|
|
|
|
|
|
public static class NormalModeParameters {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static class NormalModeParameters implements Serializable {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
|
|
|
|
|
|
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
|
|
|
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
|
|
|
|
|
|
|
|
|
|
@ -99,11 +105,11 @@ public class CPType {
|
|
|
|
return userData;
|
|
|
|
return userData;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int encode(BerByteArrayOutputStream os) throws IOException {
|
|
|
|
public int encode(OutputStream os) throws IOException {
|
|
|
|
return encode(os, true);
|
|
|
|
return encode(os, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
|
|
|
public int encode(OutputStream os, boolean withTag) throws IOException {
|
|
|
|
|
|
|
|
|
|
|
|
if (code != null) {
|
|
|
|
if (code != null) {
|
|
|
|
for (int i = code.length - 1; i >= 0; i--) {
|
|
|
|
for (int i = code.length - 1; i >= 0; i--) {
|
|
|
@ -277,23 +283,37 @@ public class CPType {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
|
|
|
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
|
|
|
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
|
|
|
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
|
|
|
|
encode(os, false);
|
|
|
|
encode(os, false);
|
|
|
|
code = os.getArray();
|
|
|
|
code = os.getArray();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
public String toString() {
|
|
|
|
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
|
|
appendAsString(sb, 0);
|
|
|
|
|
|
|
|
return sb.toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void appendAsString(StringBuilder sb, int indentLevel) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sb.append("{");
|
|
|
|
boolean firstSelectedElement = true;
|
|
|
|
boolean firstSelectedElement = true;
|
|
|
|
if (protocolVersion != null) {
|
|
|
|
if (protocolVersion != null) {
|
|
|
|
|
|
|
|
sb.append("\n");
|
|
|
|
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
|
|
|
|
}
|
|
|
|
sb.append("protocolVersion: ").append(protocolVersion);
|
|
|
|
sb.append("protocolVersion: ").append(protocolVersion);
|
|
|
|
firstSelectedElement = false;
|
|
|
|
firstSelectedElement = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (callingPresentationSelector != null) {
|
|
|
|
if (callingPresentationSelector != null) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
sb.append(", ");
|
|
|
|
sb.append(",\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sb.append("callingPresentationSelector: ").append(callingPresentationSelector);
|
|
|
|
sb.append("callingPresentationSelector: ").append(callingPresentationSelector);
|
|
|
|
firstSelectedElement = false;
|
|
|
|
firstSelectedElement = false;
|
|
|
@ -301,7 +321,10 @@ public class CPType {
|
|
|
|
|
|
|
|
|
|
|
|
if (calledPresentationSelector != null) {
|
|
|
|
if (calledPresentationSelector != null) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
sb.append(", ");
|
|
|
|
sb.append(",\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sb.append("calledPresentationSelector: ").append(calledPresentationSelector);
|
|
|
|
sb.append("calledPresentationSelector: ").append(calledPresentationSelector);
|
|
|
|
firstSelectedElement = false;
|
|
|
|
firstSelectedElement = false;
|
|
|
@ -309,23 +332,34 @@ public class CPType {
|
|
|
|
|
|
|
|
|
|
|
|
if (presentationContextDefinitionList != null) {
|
|
|
|
if (presentationContextDefinitionList != null) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
sb.append(", ");
|
|
|
|
sb.append(",\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sb.append("presentationContextDefinitionList: ").append(presentationContextDefinitionList);
|
|
|
|
sb.append("presentationContextDefinitionList: ");
|
|
|
|
|
|
|
|
presentationContextDefinitionList.appendAsString(sb, indentLevel + 1);
|
|
|
|
firstSelectedElement = false;
|
|
|
|
firstSelectedElement = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (defaultContextName != null) {
|
|
|
|
if (defaultContextName != null) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
sb.append(", ");
|
|
|
|
sb.append(",\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sb.append("defaultContextName: ").append(defaultContextName);
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sb.append("defaultContextName: ");
|
|
|
|
|
|
|
|
defaultContextName.appendAsString(sb, indentLevel + 1);
|
|
|
|
firstSelectedElement = false;
|
|
|
|
firstSelectedElement = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (presentationRequirements != null) {
|
|
|
|
if (presentationRequirements != null) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
sb.append(", ");
|
|
|
|
sb.append(",\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sb.append("presentationRequirements: ").append(presentationRequirements);
|
|
|
|
sb.append("presentationRequirements: ").append(presentationRequirements);
|
|
|
|
firstSelectedElement = false;
|
|
|
|
firstSelectedElement = false;
|
|
|
@ -333,7 +367,10 @@ public class CPType {
|
|
|
|
|
|
|
|
|
|
|
|
if (userSessionRequirements != null) {
|
|
|
|
if (userSessionRequirements != null) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
sb.append(", ");
|
|
|
|
sb.append(",\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sb.append("userSessionRequirements: ").append(userSessionRequirements);
|
|
|
|
sb.append("userSessionRequirements: ").append(userSessionRequirements);
|
|
|
|
firstSelectedElement = false;
|
|
|
|
firstSelectedElement = false;
|
|
|
@ -341,14 +378,21 @@ public class CPType {
|
|
|
|
|
|
|
|
|
|
|
|
if (userData != null) {
|
|
|
|
if (userData != null) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
if (!firstSelectedElement) {
|
|
|
|
sb.append(", ");
|
|
|
|
sb.append(",\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sb.append("userData: ").append(userData);
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sb.append("userData: ");
|
|
|
|
|
|
|
|
userData.appendAsString(sb, indentLevel + 1);
|
|
|
|
firstSelectedElement = false;
|
|
|
|
firstSelectedElement = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sb.append("\n");
|
|
|
|
|
|
|
|
for (int i = 0; i < indentLevel; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
|
|
|
|
}
|
|
|
|
sb.append("}");
|
|
|
|
sb.append("}");
|
|
|
|
return sb.toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -382,11 +426,11 @@ public class CPType {
|
|
|
|
return normalModeParameters;
|
|
|
|
return normalModeParameters;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int encode(BerByteArrayOutputStream os) throws IOException {
|
|
|
|
public int encode(OutputStream os) throws IOException {
|
|
|
|
return encode(os, true);
|
|
|
|
return encode(os, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
|
|
|
public int encode(OutputStream os, boolean withTag) throws IOException {
|
|
|
|
|
|
|
|
|
|
|
|
if (code != null) {
|
|
|
|
if (code != null) {
|
|
|
|
for (int i = code.length - 1; i >= 0; i--) {
|
|
|
|
for (int i = code.length - 1; i >= 0; i--) {
|
|
|
@ -460,23 +504,47 @@ public class CPType {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
|
|
|
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
|
|
|
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
|
|
|
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(encodingSizeGuess);
|
|
|
|
encode(os, false);
|
|
|
|
encode(os, false);
|
|
|
|
code = os.getArray();
|
|
|
|
code = os.getArray();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
public String toString() {
|
|
|
|
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
sb.append("modeSelector: ").append(modeSelector);
|
|
|
|
appendAsString(sb, 0);
|
|
|
|
|
|
|
|
return sb.toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void appendAsString(StringBuilder sb, int indentLevel) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sb.append("{");
|
|
|
|
|
|
|
|
sb.append("\n");
|
|
|
|
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (modeSelector != null) {
|
|
|
|
|
|
|
|
sb.append("modeSelector: ");
|
|
|
|
|
|
|
|
modeSelector.appendAsString(sb, indentLevel + 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
sb.append("modeSelector: <empty-required-field>");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (normalModeParameters != null) {
|
|
|
|
if (normalModeParameters != null) {
|
|
|
|
sb.append(", ");
|
|
|
|
sb.append(",\n");
|
|
|
|
sb.append("normalModeParameters: ").append(normalModeParameters);
|
|
|
|
for (int i = 0; i < indentLevel + 1; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sb.append("normalModeParameters: ");
|
|
|
|
|
|
|
|
normalModeParameters.appendAsString(sb, indentLevel + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sb.append("\n");
|
|
|
|
|
|
|
|
for (int i = 0; i < indentLevel; i++) {
|
|
|
|
|
|
|
|
sb.append("\t");
|
|
|
|
|
|
|
|
}
|
|
|
|
sb.append("}");
|
|
|
|
sb.append("}");
|
|
|
|
return sb.toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|