/// <summary>
        /// Parse the message.
        /// </summary>
        /// <param name="byteData">The MPEG2 section containing the message.</param>
        /// <param name="index">Index of the first byte of the message following the header in the MPEG2 section.</param>
        public override void Process(byte[] byteData, int index)
        {
            lastIndex = index;

            try
            {
                downloadID = Utils.Convert4BytesToInt(byteData, lastIndex);
                lastIndex += 4;

                blockSize  = Utils.Convert2BytesToInt(byteData, lastIndex);
                lastIndex += 2;

                windowSize = (int)byteData[lastIndex];
                lastIndex++;

                ackPeriod = (int)byteData[lastIndex];
                lastIndex++;

                tcDownloadWindow = Utils.Convert4BytesToInt(byteData, lastIndex);
                lastIndex       += 4;

                tcDownloadScenario = Utils.Convert4BytesToInt(byteData, lastIndex);
                lastIndex         += 4;

                compatibilityDescriptorLength = Utils.Convert2BytesToInt(byteData, lastIndex);
                lastIndex += 2;

                if (compatibilityDescriptorLength != 0)
                {
                    compatibilityDescriptor = new DSMCCCompatibilityDescriptor();
                    compatibilityDescriptor.Process(byteData, lastIndex);
                    lastIndex = compatibilityDescriptor.Index;
                }

                numberOfModules = Utils.Convert2BytesToInt(byteData, lastIndex);
                lastIndex      += 2;

                if (numberOfModules != 0)
                {
                    moduleList = new Collection <DSMCCDownloadInfoIndicationModule>();

                    while (moduleList.Count < numberOfModules)
                    {
                        DSMCCDownloadInfoIndicationModule module = new DSMCCDownloadInfoIndicationModule();
                        module.Process(byteData, lastIndex);
                        moduleList.Add(module);

                        lastIndex = module.Index;
                    }
                }

                privateDataLength = Utils.Convert2BytesToInt(byteData, lastIndex);
                lastIndex        += 2;

                if (privateDataLength != 0)
                {
                    privateData = Utils.GetBytes(byteData, lastIndex, privateDataLength);
                    lastIndex  += privateDataLength;
                }

                Validate();
            }
            catch (IndexOutOfRangeException)
            {
                throw (new ArgumentOutOfRangeException("The DSMCC DownloadInfo Indication message is short"));
            }
        }
        /// <summary>
        /// Parse the message.
        /// </summary>
        /// <param name="byteData">The MPEG2 section containing the message.</param>
        /// <param name="index">Index of the first byte of the message following the header in the MPEG2 section.</param>
        public override void Process(byte[] byteData, int index)
        {
            lastIndex = index;

            try
            {
                downloadID = Utils.Convert4BytesToInt(byteData, lastIndex);
                lastIndex += 4;

                blockSize = Utils.Convert2BytesToInt(byteData, lastIndex);
                lastIndex += 2;

                windowSize = (int)byteData[lastIndex];
                lastIndex++;

                ackPeriod = (int)byteData[lastIndex];
                lastIndex++;

                tcDownloadWindow = Utils.Convert4BytesToInt(byteData, lastIndex);
                lastIndex += 4;

                tcDownloadScenario = Utils.Convert4BytesToInt(byteData, lastIndex);
                lastIndex += 4;

                compatibilityDescriptorLength = Utils.Convert2BytesToInt(byteData, lastIndex);
                lastIndex += 2;

                if (compatibilityDescriptorLength != 0)
                {
                    compatibilityDescriptor = new DSMCCCompatibilityDescriptor();
                    compatibilityDescriptor.Process(byteData, lastIndex);
                    lastIndex = compatibilityDescriptor.Index;
                }

                numberOfModules = Utils.Convert2BytesToInt(byteData, lastIndex);
                lastIndex += 2;

                if (numberOfModules != 0)
                {
                    moduleList = new Collection<DSMCCDownloadInfoIndicationModule>();

                    while (moduleList.Count < numberOfModules)
                    {
                        DSMCCDownloadInfoIndicationModule module = new DSMCCDownloadInfoIndicationModule();
                        module.Process(byteData, lastIndex);
                        moduleList.Add(module);

                        lastIndex = module.Index;
                    }
                }

                privateDataLength = Utils.Convert2BytesToInt(byteData, lastIndex);
                lastIndex += 2;

                if (privateDataLength != 0)
                {
                    privateData = Utils.GetBytes(byteData, lastIndex, privateDataLength);
                    lastIndex += privateDataLength;
                }

                Validate();
            }
            catch (IndexOutOfRangeException)
            {
                throw (new ArgumentOutOfRangeException("The DSMCC DownloadInfo Indication message is short"));
            }
        }