示例#1
0
        public static void ConfigureAcquisition(ImaqdxSessionHandle session, ImaqdxAcquisitionType acquisitionType, int bufferCount)
        {
            Debug.Assert(session != null, "The session parameter cannot be null.");
            Debug.Assert(!session.IsInvalid, "The session parameter must be a valid handle.");
            Debug.Assert(bufferCount > 0, "The bufferCount parameter must be greater than zero.");

            bool isContinuous = (acquisitionType == ImaqdxAcquisitionType.Continuous);
            int  status       = NiImaqdxDll.IMAQdxConfigureAcquisition(session, Convert.ToUInt32(isContinuous), (uint)bufferCount);

            ExceptionBuilder.CheckErrorAndThrow(status);
        }