public static FtdiUsbDmxPort[] GetPorts()
        {
            int nbDevices;

            FtdiInterop.CreateDeviceInfoList(out nbDevices).Validate();
            if (nbDevices == 0)
            {
                return(new FtdiUsbDmxPort[0]);
            }

            var devices = new FtdiInterop.FtDeviceListInfoNode[nbDevices];

            FtdiInterop.FT_GetDeviceInfoList(devices, ref nbDevices).Validate();

            return(devices.Select((x, i) => new FtdiUsbDmxPort(i, x)).ToArray());
        }
 private FtdiUsbDmxPort(int portNo, FtdiInterop.FtDeviceListInfoNode portInfo)
 {
     _portNo   = portNo;
     _portInfo = portInfo;
 }