Package org.hxzon.asn1.core.type.base

Examples of org.hxzon.asn1.core.type.base.BerNode


        }
    }

    private BerNode getAccessResult_Success_RealNode(BerSequenceOf seqOf, int i) {
        AccessResult accessResult = (AccessResult) seqOf.getChildren()[i];
        BerNode result = accessResult.getChildren()[0];
        if (result instanceof Data) {
            return ((Data) result).getChildren()[0];
        }
        return null;
    }
View Full Code Here


    }

    public void updateSv92AsduDataDisplay(List<String> displays) {
        for (BerNode child : getChildren()) {
            if (child.getTag() == (Tag.CONTEXT | 2)) {
                BerSequenceOf seqOf = (BerSequenceOf) child;
                for (BerNode sv92Asdu : seqOf.getChildren()) {
                    ((Sv92Asdu) sv92Asdu).updateAsduDataDisplay(displays);
                }
            }
        }
    }
View Full Code Here

        readBerBitString(set, 0, primitive);
        return set;
    }

    public BitStringPresentation readBitString2(boolean primitive) throws IOException {
        BitStringPresentation set = new BitStringPresentation();
        readBerBitString2(set, 0, primitive);
        return set;
    }
View Full Code Here

    protected void readValue(BerInputStream stream) {
        super.readValue(stream);
        byte[] data = getValue();
        fList = new ArrayList<BerNode>(data.length / 4);
        FakeBerNode node;
        for (int i = 0; i < data.length; i += 8) {
            long value = BytesUtil.toSigned(data, i, 4);
            long quality = BytesUtil.toSigned(data, i + 4, 4);
            node = new Sv92AsduDataItem(value, quality);
            node.setTagOffset(super.getValueOffset() + i);
            node.setTotalLen(8);
            node.setId(String.valueOf(i / 8));
            node.setName(String.valueOf(i / 8));
            node.setParent(this);
            fList.add(node);
        }
    }
View Full Code Here

//        String reverse=BytesUtil.toHexString(data);
//        System.out.println(reverse);
        ByteArrayInputStream inStream = new ByteArrayInputStream(data);
        BerInputStream in = new BerInputStream(inStream);

        GoosePduParser parser = GoosePduParser.parser;
        BerNode node;
        while (null != (node = parser.readPacket(in))) {
            System.out.println(node.toString());
        }
    }
View Full Code Here

        String reverse = BytesUtil.toHexString(data);
        System.out.println(reverse);
        ByteArrayInputStream inStream = new ByteArrayInputStream(data);
        BerInputStream in = new BerInputStream(inStream);

        MmsPduParser parser = new MmsPduParser();
        BerNode node;
        while (null != (node = parser.readPacket(in))) {
            System.out.println(Asn1Utils.printBerNode(node));
        }
    }
View Full Code Here

    @Override
    public BerNode create(int tag, BerInputStream stream) {
        switch (tag) {
        case Tag.CONTEXT | 79:
            return new CSRequestDetail().init(tag, stream, true);
        default:
            return new UnconfirmedService().init(tag, stream, false);
        }
    }
View Full Code Here

//      } OPTIONAL
//  }
    public BerNode create(int tag, BerInputStream stream) {
        switch (tag) {
        case Tag.CONTEXT | 0:
            return new ErrorClass().init("errorClass", "errorClass", tag, stream, true);
        case Tag.CONTEXT | 1:
            return Asn1Utils.createBerIntegerX("additionalCode", "additionalCode", tag, stream);
        case Tag.CONTEXT | 2:
            return Asn1Utils.createBerVisibleString("additionalDescription", "additionalDescription", tag, stream);
        case Tag.CONTEXT | 3:
View Full Code Here

//  newIdentifier    [2] IMPLICIT Identifier
//        }
    public BerNode create(int tag, BerInputStream stream) {
        switch (tag) {
        case Tag.CONTEXT | 0:
            return new ExtendedObjectClass().init(tag, stream);
        case Tag.CONTEXT | 1:
            return new ObjectName().init("currentName", "currentName", tag, stream);
        case Tag.CONTEXT | 2:
            return new Identifier().init("newIdentifier", "newIdentifier", tag, stream);
        default:
View Full Code Here

//        evaluationInterval    [4] IMPLICIT Unsigned32 OPTIONAL
//  }
    public BerNode create(int tag, BerInputStream stream) {
        switch (tag) {
        case Tag.CONTEXT | 0:
            return new ObjectName().init("eventConditionName", "eventConditionName", tag, stream);
        case Tag.CONTEXT | 1:
            return Asn1Utils.createBerBoolean("enabled", "enabled", tag, stream);
        case Tag.CONTEXT | 2:
            return new Priority().init("priority", "priority", tag, stream);
        case Tag.CONTEXT | 3:
View Full Code Here

TOP

Related Classes of org.hxzon.asn1.core.type.base.BerNode

Copyright © 2018 www.massapicom. 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.