Exemplo n.º 1
0
        public override int DecodeFrameData(int frameIndex, byte[] packetBytes, int startIndex, int length)
        {
            int currentIndex = startIndex;

            // Handling empty list.
            if (length == 0)
            {
                return(currentIndex);
            }

            BubbleFragment entry = new BubbleFragment();

            currentIndex  = entry.DecodeFragmentData(packetBytes, currentIndex);
            currentIndex += 60; // No need to read the padding.
            BubbleFragments.Add(entry);
            return(currentIndex);
        }
Exemplo n.º 2
0
        public override int DecodeFrameData(int frameIndex, byte[] packetBytes, int startIndex, int length)
        {
            int currentIndex = startIndex;

            currentIndex = EncodeUtil.Decode(ref TargetBubbleId, packetBytes, currentIndex);

            currentIndex = SourceBubbleFragment.DecodeFragmentData(packetBytes, currentIndex);

            // Program Fragment
            currentIndex = EncodeUtil.Decode(ref ProgramName, packetBytes, currentIndex, 25);
            currentIndex = EncodeUtil.Decode(ref ProgramMajorVersion, packetBytes, currentIndex);
            currentIndex = EncodeUtil.Decode(ref ProgramMinorVersion, packetBytes, currentIndex);
            currentIndex = EncodeUtil.Decode(ref ProtocolMajorVersion, packetBytes, currentIndex);
            currentIndex = EncodeUtil.Decode(ref ProtocolMinorVersion, packetBytes, currentIndex);
            currentIndex = EncodeUtil.Decode(ref ProtocolSourceRevision, packetBytes, currentIndex);

            //FramesDecoded++;
            return(currentIndex);
        }