public ParsedPagePacket FindPagePacket(ParsedPacket packet)
        {
            ParsedSitePacket sitePacket = FindSitePacket(packet.TerminalId);

            if (sitePacket == null)
            {
                return(null);
            }

            ParsedDevicePacket devicePacket = sitePacket.FindDevicePacket(packet.ProtocolHeader);

            if (devicePacket == null)
            {
                return(null);
            }

            ParsedPagePacket pagePacket = devicePacket.FindPagePacket(packet.PageNumber);


            return(pagePacket);
        }
        public void SaveState(ParsedPacket packet)
        {
            ParsedSitePacket sitePacket = null;

            if (packet == null)
            {
                return;
            }

            if (!SitePackets.ContainsKey(packet.TerminalId))
            {
                sitePacket = new ParsedSitePacket(packet);
                SitePackets.Add(sitePacket.TerminalId, sitePacket);
            }
            else
            {
                sitePacket = SitePackets[packet.TerminalId];
                if (sitePacket != null)
                {
                    sitePacket.AddDevicePacket(packet);
                }
            }
        }