示例#1
0
        public void ProcessPacket(IPEndPoint source, AcnRootLayer header, AcnBinaryReader data)
        {
            StreamingAcnDmxPacket newPacket = AcnPacket.ReadPacket(header, data) as StreamingAcnDmxPacket;

            if (newPacket != null)
            {
                RaiseNewPacket(source, newPacket);
            }
        }
示例#2
0
        private void ProcessAcnPacket(IPEndPoint source, AcnBinaryReader data)
        {
            AcnRootLayer rootLayer = GetRootLayer();

            rootLayer.ReadData(data, TcpTraffic);

            IProtocolFilter filter;

            if (filters.TryGetValue(rootLayer.ProtocolId, out filter))
            {
                filter.ProcessPacket(source, rootLayer, data);
            }
        }
示例#3
0
        /// <summary>
        /// Processes the packet that have been recieved and allocated to this filter.
        /// </summary>
        /// <param name="source">The source IP address of the packet.</param>
        /// <param name="header">The header information for the ACN packet.</param>
        /// <param name="data">The data reader for the remaining packet data.</param>
        /// <remarks>
        /// Only packets that have supported protocol ID's will be sent to this function.
        /// </remarks>
        void IProtocolFilter.ProcessPacket(IPEndPoint source, AcnRootLayer header, AcnBinaryReader data)
        {
            RdmNetPacket newPacket = AcnPacket.ReadPacket(header, data) as RdmNetPacket;

            if (newPacket != null)
            {
                RdmBinaryReader dmxReader = new RdmBinaryReader(new MemoryStream(newPacket.RdmNet.RdmData));

                //Skip Start Code and sub-start code
                dmxReader.BaseStream.Seek(1, SeekOrigin.Begin);

                RdmPacket rdmPacket = RdmPacket.ReadPacket(dmxReader);
                RaiseNewRdmPacket(new RdmEndPoint(source, newPacket.Framing.EndpointID), rdmPacket);
            }
        }
示例#4
0
        /// <summary>
        /// Processes the packet that have been recieved and allocated to this filter.
        /// </summary>
        /// <param name="source">The source IP address of the packet.</param>
        /// <param name="header">The header information for the ACN packet.</param>
        /// <param name="data">The data reader for the remaining packet data.</param>
        /// <remarks>
        /// Only packets that have supported protocol ID's will be sent to this function.
        /// </remarks>
        public void ProcessPacket(IPEndPoint source, AcnRootLayer header, AcnBinaryReader data)
        {
            AcnPacket packet = AcnPacket.ReadPacket(header, data);

            if (packet is StreamingAcnDmxPacket)
            {
                RaiseNewPacket(source, (StreamingAcnDmxPacket)packet);
            }
            if (packet is StreamingAcnSynchronizationPacket)
            {
                RaiseNewSynchronize(source, (StreamingAcnSynchronizationPacket)packet);
            }
            if (packet is StreamingAcnDiscoveryPacket)
            {
                RaiseNewDiscovery(source, (StreamingAcnDiscoveryPacket)packet);
            }
        }
示例#5
0
 void IProtocolFilter.ProcessPacket(IPEndPoint source, AcnRootLayer header, AcnBinaryReader data)
 {
     parent.LastContact = DateTime.Now;
 }