new public PDU Decode(BACPacket cm)
        {
            System.Console.Write("Decoding PDUComplexAck");
            byte a = cm.getNextByte();

            segMessage  = DecodeSegMessage(a);
            moreFollows = DecodeMoreFollows(a);
            orgInvokeID = cm.getNextByte();
            // If the optional parameter are present
            if (segMessage)
            {
                sequenceNumber     = cm.getNextByte();
                proposedWindowSize = cm.getNextByte();
            }

            serviceACKchoice = (ConfirmedServiceChoice)cm.getNextByte();

            switch (serviceACKchoice)
            {
            case ConfirmedServiceChoice.READPROPERTY:
                apduService = new APDUReadProperty();
                apduService.Decode(cm);

                break;
            }

            return(this);
        }
Beispiel #2
0
        new public PDU Decode(BACPacket cm)
        {
            System.Console.Write("Decoding PDUComplexAck");
            byte a = cm.getNextByte();

            segMessage      = DecodeSegMessage(a);
            moreFollows     = DecodeMoreFollows(a);
            segResponseAccp = DecodeSegResponse(a);

            if (segResponseAccp == true)
            {
                maxSegmentsAccepted = (MAX_SEGMENTS_ACCEPTED)cm.getByte();
            }

            maxAPDUlengthAccepted = DecodeMaxAPDUlengthAccp(cm.getNextByte());

            invokeID = cm.getNextByte();

            // If the optional parameter are present
            if (segMessage)
            {
                sequenceNumber     = cm.getNextByte();
                proposedWindowSize = cm.getNextByte();
            }

            serviceChoice = (ConfirmedServiceChoice)cm.getNextByte();

            switch (serviceChoice)
            {
            case ConfirmedServiceChoice.READPROPERTY:
                apduService = new APDUReadProperty();
                apduService.Decode(cm);

                break;
            }
            return(this);
        }