int doConversion(IPacket packet, System.Reflection.PropertyInfo property, byte[] data, int index)
        {
            switch (property.PropertyType.Name) {
                case "UInt16":
                    property.SetValue(packet, BitConverter.ToUInt16(data, index));
                    return index + 2;

                case "UInt32":
                    property.SetValue(packet, BitConverter.ToUInt32(data, index));
                    return index + 4;

                case "UInt64":
                    property.SetValue(packet, BitConverter.ToUInt32(data, index));
                    return index + 8;
            }
            return 0;
        }
 public Boolean TryGetPacket(out IPacket packet)
 {
     return stateMachine.OutQueue.TryDequeue(out packet);
 }
 public void addDecoder(IPacket decoder)
 {
     stateMachine.addDecoder(decoder);
 }