Exemple #1
0
        public static Imaqdx.ImaqdxCameraInformation[] GetCameraInformation(bool connectedOnly)
        {
            uint count;
            int  status = NiImaqdxDll.IMAQdxEnumerateCameras(null, out count, Convert.ToUInt32(connectedOnly));

            ExceptionBuilder.CheckErrorAndThrow(status);
            Internal.ImaqdxCameraInformation[] cameraInfoArray = new Internal.ImaqdxCameraInformation[count];
            status = NiImaqdxDll.IMAQdxEnumerateCameras(cameraInfoArray, out count, Convert.ToUInt32(connectedOnly));
            ExceptionBuilder.CheckErrorAndThrow(status);

            return(ImaqdxCameraInformation.CreateCameraInformationArray(cameraInfoArray));
        }
Exemple #2
0
        internal ImaqdxCameraInformation(Internal.ImaqdxCameraInformation cameraInfo)
        {
            long serialNumberLow  = cameraInfo.SerialNumberLo;
            long serialNumberHigh = cameraInfo.SerialNumberHi;

            serialNumberHigh    = serialNumberHigh << 32;
            _serialNumber       = serialNumberLow | serialNumberHigh;
            _type               = cameraInfo.BusType;
            _name               = cameraInfo.InterfaceName;
            _vendor             = cameraInfo.VendorName;
            _model              = cameraInfo.ModelName;
            _cameraFile         = cameraInfo.CameraFileName;
            _cameraAttributeUrl = cameraInfo.CameraAttributeUrl;
            _isConnected        = (cameraInfo.Flags & ImaqdxInterfaceFileFlags.Connected) != 0;
        }