Example #1
0
        protected void packetManager_PacketReceived(object sender, DmxPacketManager.DmxPacketReceivedEventArgs e)
        {
            string bufData = string.Join(",", e.PacketData.ToList().ConvertAll(x => x.ToString("d")));

            this.log.Information("Received from DMXPro: Label: {0:d}   Payload: {1}", e.Label, bufData);

            if (!foundDmxPro)
            {
                // Check if we have a DMX Pro
                if (e.PacketData.Length == 5)
                {
                    int version = e.PacketData[0] + (e.PacketData[1] << 8);
                    if (version >= 300)
                    {
                        foundDmxPro = true;
                    }
                    this.initWait.Set();
                }
            }
        }