
ccsds.sle.transfer.service.rcf.outgoing.pdus.RcfProviderToUserPdu Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsle Show documentation
Show all versions of jsle Show documentation
Java implementation for the SLE (Space Link Extension) protocol.
/**
* This class file was automatically generated by jASN1 v1.11.2 (http://www.beanit.com)
*/
package ccsds.sle.transfer.service.rcf.outgoing.pdus;
import java.io.IOException;
import java.io.EOFException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.io.Serializable;
import com.beanit.jasn1.ber.*;
import com.beanit.jasn1.ber.types.*;
import com.beanit.jasn1.ber.types.string.*;
import ccsds.sle.transfer.service.bind.types.SleBindInvocation;
import ccsds.sle.transfer.service.bind.types.SleBindReturn;
import ccsds.sle.transfer.service.bind.types.SlePeerAbort;
import ccsds.sle.transfer.service.bind.types.SleUnbindInvocation;
import ccsds.sle.transfer.service.bind.types.SleUnbindReturn;
import ccsds.sle.transfer.service.common.pdus.SleAcknowledgement;
import ccsds.sle.transfer.service.common.pdus.SleScheduleStatusReportReturn;
import ccsds.sle.transfer.service.common.types.Credentials;
import ccsds.sle.transfer.service.common.types.IntUnsignedLong;
import ccsds.sle.transfer.service.common.types.InvokeId;
import ccsds.sle.transfer.service.common.types.SpaceLinkDataUnit;
import ccsds.sle.transfer.service.common.types.Time;
import ccsds.sle.transfer.service.rcf.structures.AntennaId;
import ccsds.sle.transfer.service.rcf.structures.CarrierLockStatus;
import ccsds.sle.transfer.service.rcf.structures.DiagnosticRcfGet;
import ccsds.sle.transfer.service.rcf.structures.DiagnosticRcfStart;
import ccsds.sle.transfer.service.rcf.structures.FrameSyncLockStatus;
import ccsds.sle.transfer.service.rcf.structures.LockStatus;
import ccsds.sle.transfer.service.rcf.structures.Notification;
import ccsds.sle.transfer.service.rcf.structures.RcfGetParameter;
import ccsds.sle.transfer.service.rcf.structures.RcfProductionStatus;
import ccsds.sle.transfer.service.rcf.structures.SymbolLockStatus;
public class RcfProviderToUserPdu implements BerType, Serializable {
private static final long serialVersionUID = 1L;
public byte[] code = null;
private SleBindInvocation rcfBindInvocation = null;
private SleBindReturn rcfBindReturn = null;
private SleUnbindInvocation rcfUnbindInvocation = null;
private SleUnbindReturn rcfUnbindReturn = null;
private RcfStartReturn rcfStartReturn = null;
private SleAcknowledgement rcfStopReturn = null;
private RcfTransferBuffer rcfTransferBuffer = null;
private SleScheduleStatusReportReturn rcfScheduleStatusReportReturn = null;
private RcfStatusReportInvocation rcfStatusReportInvocation = null;
private RcfGetParameterReturn rcfGetParameterReturn = null;
private SlePeerAbort rcfPeerAbortInvocation = null;
public RcfProviderToUserPdu() {
}
public RcfProviderToUserPdu(byte[] code) {
this.code = code;
}
public void setRcfBindInvocation(SleBindInvocation rcfBindInvocation) {
this.rcfBindInvocation = rcfBindInvocation;
}
public SleBindInvocation getRcfBindInvocation() {
return rcfBindInvocation;
}
public void setRcfBindReturn(SleBindReturn rcfBindReturn) {
this.rcfBindReturn = rcfBindReturn;
}
public SleBindReturn getRcfBindReturn() {
return rcfBindReturn;
}
public void setRcfUnbindInvocation(SleUnbindInvocation rcfUnbindInvocation) {
this.rcfUnbindInvocation = rcfUnbindInvocation;
}
public SleUnbindInvocation getRcfUnbindInvocation() {
return rcfUnbindInvocation;
}
public void setRcfUnbindReturn(SleUnbindReturn rcfUnbindReturn) {
this.rcfUnbindReturn = rcfUnbindReturn;
}
public SleUnbindReturn getRcfUnbindReturn() {
return rcfUnbindReturn;
}
public void setRcfStartReturn(RcfStartReturn rcfStartReturn) {
this.rcfStartReturn = rcfStartReturn;
}
public RcfStartReturn getRcfStartReturn() {
return rcfStartReturn;
}
public void setRcfStopReturn(SleAcknowledgement rcfStopReturn) {
this.rcfStopReturn = rcfStopReturn;
}
public SleAcknowledgement getRcfStopReturn() {
return rcfStopReturn;
}
public void setRcfTransferBuffer(RcfTransferBuffer rcfTransferBuffer) {
this.rcfTransferBuffer = rcfTransferBuffer;
}
public RcfTransferBuffer getRcfTransferBuffer() {
return rcfTransferBuffer;
}
public void setRcfScheduleStatusReportReturn(SleScheduleStatusReportReturn rcfScheduleStatusReportReturn) {
this.rcfScheduleStatusReportReturn = rcfScheduleStatusReportReturn;
}
public SleScheduleStatusReportReturn getRcfScheduleStatusReportReturn() {
return rcfScheduleStatusReportReturn;
}
public void setRcfStatusReportInvocation(RcfStatusReportInvocation rcfStatusReportInvocation) {
this.rcfStatusReportInvocation = rcfStatusReportInvocation;
}
public RcfStatusReportInvocation getRcfStatusReportInvocation() {
return rcfStatusReportInvocation;
}
public void setRcfGetParameterReturn(RcfGetParameterReturn rcfGetParameterReturn) {
this.rcfGetParameterReturn = rcfGetParameterReturn;
}
public RcfGetParameterReturn getRcfGetParameterReturn() {
return rcfGetParameterReturn;
}
public void setRcfPeerAbortInvocation(SlePeerAbort rcfPeerAbortInvocation) {
this.rcfPeerAbortInvocation = rcfPeerAbortInvocation;
}
public SlePeerAbort getRcfPeerAbortInvocation() {
return rcfPeerAbortInvocation;
}
public int encode(OutputStream reverseOS) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
reverseOS.write(code[i]);
}
return code.length;
}
int codeLength = 0;
if (rcfPeerAbortInvocation != null) {
codeLength += rcfPeerAbortInvocation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 104
reverseOS.write(0x68);
reverseOS.write(0x9F);
codeLength += 2;
return codeLength;
}
if (rcfGetParameterReturn != null) {
codeLength += rcfGetParameterReturn.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 7
reverseOS.write(0xA7);
codeLength += 1;
return codeLength;
}
if (rcfStatusReportInvocation != null) {
codeLength += rcfStatusReportInvocation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 9
reverseOS.write(0xA9);
codeLength += 1;
return codeLength;
}
if (rcfScheduleStatusReportReturn != null) {
codeLength += rcfScheduleStatusReportReturn.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 5
reverseOS.write(0xA5);
codeLength += 1;
return codeLength;
}
if (rcfTransferBuffer != null) {
codeLength += rcfTransferBuffer.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 8
reverseOS.write(0xA8);
codeLength += 1;
return codeLength;
}
if (rcfStopReturn != null) {
codeLength += rcfStopReturn.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 3
reverseOS.write(0xA3);
codeLength += 1;
return codeLength;
}
if (rcfStartReturn != null) {
codeLength += rcfStartReturn.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
reverseOS.write(0xA1);
codeLength += 1;
return codeLength;
}
if (rcfUnbindReturn != null) {
codeLength += rcfUnbindReturn.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 103
reverseOS.write(0x67);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
if (rcfUnbindInvocation != null) {
codeLength += rcfUnbindInvocation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 102
reverseOS.write(0x66);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
if (rcfBindReturn != null) {
codeLength += rcfBindReturn.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 101
reverseOS.write(0x65);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
if (rcfBindInvocation != null) {
codeLength += rcfBindInvocation.encode(reverseOS, false);
// write tag: CONTEXT_CLASS, CONSTRUCTED, 100
reverseOS.write(0x64);
reverseOS.write(0xBF);
codeLength += 2;
return codeLength;
}
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
}
public int decode(InputStream is) throws IOException {
return decode(is, null);
}
public int decode(InputStream is, BerTag berTag) throws IOException {
int codeLength = 0;
BerTag passedTag = berTag;
if (berTag == null) {
berTag = new BerTag();
codeLength += berTag.decode(is);
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 100)) {
rcfBindInvocation = new SleBindInvocation();
codeLength += rcfBindInvocation.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 101)) {
rcfBindReturn = new SleBindReturn();
codeLength += rcfBindReturn.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 102)) {
rcfUnbindInvocation = new SleUnbindInvocation();
codeLength += rcfUnbindInvocation.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 103)) {
rcfUnbindReturn = new SleUnbindReturn();
codeLength += rcfUnbindReturn.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) {
rcfStartReturn = new RcfStartReturn();
codeLength += rcfStartReturn.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) {
rcfStopReturn = new SleAcknowledgement();
codeLength += rcfStopReturn.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 8)) {
rcfTransferBuffer = new RcfTransferBuffer();
codeLength += rcfTransferBuffer.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 5)) {
rcfScheduleStatusReportReturn = new SleScheduleStatusReportReturn();
codeLength += rcfScheduleStatusReportReturn.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 9)) {
rcfStatusReportInvocation = new RcfStatusReportInvocation();
codeLength += rcfStatusReportInvocation.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 7)) {
rcfGetParameterReturn = new RcfGetParameterReturn();
codeLength += rcfGetParameterReturn.decode(is, false);
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 104)) {
rcfPeerAbortInvocation = new SlePeerAbort();
codeLength += rcfPeerAbortInvocation.decode(is, false);
return codeLength;
}
if (passedTag != null) {
return 0;
}
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess);
encode(reverseOS);
code = reverseOS.getArray();
}
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
return sb.toString();
}
public void appendAsString(StringBuilder sb, int indentLevel) {
if (rcfBindInvocation != null) {
sb.append("rcfBindInvocation: ");
rcfBindInvocation.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfBindReturn != null) {
sb.append("rcfBindReturn: ");
rcfBindReturn.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfUnbindInvocation != null) {
sb.append("rcfUnbindInvocation: ");
rcfUnbindInvocation.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfUnbindReturn != null) {
sb.append("rcfUnbindReturn: ");
rcfUnbindReturn.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfStartReturn != null) {
sb.append("rcfStartReturn: ");
rcfStartReturn.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfStopReturn != null) {
sb.append("rcfStopReturn: ");
rcfStopReturn.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfTransferBuffer != null) {
sb.append("rcfTransferBuffer: ");
rcfTransferBuffer.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfScheduleStatusReportReturn != null) {
sb.append("rcfScheduleStatusReportReturn: ");
rcfScheduleStatusReportReturn.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfStatusReportInvocation != null) {
sb.append("rcfStatusReportInvocation: ");
rcfStatusReportInvocation.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfGetParameterReturn != null) {
sb.append("rcfGetParameterReturn: ");
rcfGetParameterReturn.appendAsString(sb, indentLevel + 1);
return;
}
if (rcfPeerAbortInvocation != null) {
sb.append("rcfPeerAbortInvocation: ").append(rcfPeerAbortInvocation);
return;
}
sb.append("");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy