Exemplo n.º 1
0
        public static UInt32 GetEstReadoutTime(this Int16 cameraHandle)
        {
            UInt32 time = 0;

            if (cameraHandle.IsParamAvailable(PvTypes.PARAM_READOUT_TIME))
            {
                IntPtr unmgReadoutTime = Marshal.AllocHGlobal(sizeof(Int32));

                if (Pvcam.pl_get_param(cameraHandle, PvTypes.PARAM_READOUT_TIME,
                                       (Int16)PvTypes.AttributeIDs.ATTR_CURRENT, unmgReadoutTime))
                {
                    time = (UInt32)Marshal.ReadInt32(unmgReadoutTime);
                }

                Marshal.FreeHGlobal(unmgReadoutTime);
                unmgReadoutTime = IntPtr.Zero;
            }

            return(time);
        }