Package org.hxzon.asn1.mms.sequence

Source Code of org.hxzon.asn1.mms.sequence.VariableDescription

package org.hxzon.asn1.mms.sequence;

import org.hxzon.asn1.core.parse.BerInputStream;
import org.hxzon.asn1.core.type.BerSequence;
import org.hxzon.asn1.core.type.base.BerNode;
import org.hxzon.asn1.core.type.ext.UnknownBerNode;
import org.hxzon.asn1.mms.choice.Address;
import org.hxzon.asn1.mms.choice.TypeSpecification;

public class VariableDescription extends BerSequence {

    public VariableDescription() {
        setId("VariableDescription");
        setName("VariableDescription");
    }

//  VariableSpecification ::= CHOICE
//  {
//  name        [0] ObjectName,
//  address        [1] Address,
//  variableDescription    [2] IMPLICIT SEQUENCE
//    {
//    address      Address,
//    typeSpecification  TypeSpecification
//    },
//  scatteredAccessDescription  [3] IMPLICIT ScatteredAccessDescription,
//  invalidated      [4] IMPLICIT NULL
//  }
    public BerNode create(int tag, BerInputStream stream) {
        //TODO
        BerNode node = new Address().init("address", "address", tag, stream);
        if (((Address) node).getRealNode() instanceof UnknownBerNode) {
            node = new TypeSpecification().init("typeSpecification", "typeSpecification", tag, stream);
        }
        return node;
//    switch (tag) {
//    default:
//      return Asn1Utils.createUnknownTagBerNode(tag, stream);
//    }
    }
}
TOP

Related Classes of org.hxzon.asn1.mms.sequence.VariableDescription

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.