From e248abeffe5ba8793b18a2071f27a181aa1dd42c Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 18:01:49 -0600 Subject: [PATCH 01/47] fix: introduce cspell and fix spelling errors across codebase Add cspell spell-checking configuration: - cspell.json with file/path scoping and Mako template override - cspell-dict.txt for project-specific technical terms - cspell-ignore-words.txt for known abbreviations and API identifiers - cspell-mako-keywords.txt for Mako template keywords Fix spelling errors in variable, function, file names, comments, docstrings, and test names throughout the codebase. --- cspell-dict.txt | 40 +++++ cspell-ignore-words.txt | 126 ++++++++++++++ cspell-mako-keywords.txt | 7 + cspell.json | 30 ++++ examples/playrec.py | 28 ++-- .../templates/_grpc_interpreter.py.mako | 2 +- .../templates/_library_interpreter.py.mako | 158 +++++++++--------- .../default_c_function_call.py.mako | 12 +- .../double_c_function_call.py.mako | 12 +- .../event_function_call.py.mako | 12 +- .../exec_cdecl_c_function_call.py.mako | 8 +- .../property_legacy_deleter_template.py.mako | 14 +- .../property_legacy_setter_template.py.mako | 14 +- .../triggering/_arm_start_trigger.py.mako | 4 +- .../triggering/_handshake_trigger.py.mako | 4 +- .../task/triggering/_pause_trigger.py.mako | 4 +- .../triggering/_reference_trigger.py.mako | 4 +- .../task/triggering/_start_trigger.py.mako | 4 +- src/codegen/utilities/function_helpers.py | 4 +- src/codegen/utilities/interpreter_helpers.py | 2 +- .../{_dotenvpath.py => _dotenv_path.py} | 0 src/handwritten/_feature_toggles.py | 2 +- src/handwritten/_install_daqmx.py | 2 +- src/handwritten/_lib.py | 12 +- .../_linux_installation_commands.py | 2 +- src/handwritten/types.py | 12 +- src/handwritten/utils.py | 4 +- tests/acceptance/test_internationalization.py | 4 + tests/component/_analog_utils.py | 2 +- .../component/system/_collections/__init__.py | 2 +- .../system/storage/test_persisted_task.py | 2 +- .../task/channels/test_ai_channel.py | 2 +- .../component/task/test_timing_properties.py | 2 +- .../test_stream_digital_readers_writers.py | 16 +- ...test_dotenvpath.py => test_dotenv_path.py} | 12 +- 35 files changed, 386 insertions(+), 179 deletions(-) create mode 100644 cspell-dict.txt create mode 100644 cspell-ignore-words.txt create mode 100644 cspell-mako-keywords.txt create mode 100644 cspell.json rename src/handwritten/{_dotenvpath.py => _dotenv_path.py} (100%) rename tests/unit/{test_dotenvpath.py => test_dotenv_path.py} (66%) diff --git a/cspell-dict.txt b/cspell-dict.txt new file mode 100644 index 000000000..03f3c830e --- /dev/null +++ b/cspell-dict.txt @@ -0,0 +1,40 @@ +nidaqmx +tdms +yoctosecond +yoctoseconds +unflatten +timebase +bitfield +DAQmx +cDAQ +LVDT +bitstream +overrange +CPLD +IEPE +PXIe +fullscale +coeff +coeffs +RVDT +overtemperature +NRSE +retriggerable +readall +RTSI +PICO +regen +ACRMS +SCXI +forcebridge +torquebridge +pressurebridge +MILLI +unreserve +unreserves +DKMS +subsecond +subseconds +EEPROM +docstrings +cdecl diff --git a/cspell-ignore-words.txt b/cspell-ignore-words.txt new file mode 100644 index 000000000..84037e718 --- /dev/null +++ b/cspell-ignore-words.txt @@ -0,0 +1,126 @@ +# numpy +allclose +ascontiguousarray +dtype +frombuffer +iinfo +nbytes +ndarray +ndpointer +printoptions +tobytes +tolist +rtol + +# nitypes +nitypes + +# hightime +hightime + +# nptdms +bnptdms +nptdms + +# ctypes (stdlib) +argtype +argtypes +byref +ctypeslib +varargs + +# pytest +addoption +callspec +caplog +fixturenames +getfixturevalue +metafunc +modifyitems +parametrizing +unraisable +unraisablehook + +# python-decouple / dotenv +dotenv + +# tzlocal +localzone + +# matplotlib +xlabel +ylabel + +# pykka +pykka + +# nidaqmx abbreviations +chan +chans +samp +samps + +# codegen internals +codegen +scrapigen + +# nidaqmx C library / header filenames (external) +nicaiu +nicai + +# NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +outp +rngs +srcs +xfer +lvls +cfgs +nums +CAPI +descr + +# Linux system tool names (external) +autoinstall +dpkg +insserv +chkconfig +NISHAREDDIR +typeshed + +# nidaqmx public API (compat-breaking names) +expir +excit +fltr +thrmcpl +thrmstr +anlg +DAQError +pretrig +aognd +zidx +APFI +hwteds +installdriver +AHIGH +TEDSAIRTD +CIGPS +TEDSAI +AIRTD +MIOAI +tedshwteds +MeasurementLink +forcelb +BHIGH +aignd +BBULK +acceld +voltaged + +# NI CVI calling convention macro (C interop comment) +CVICALLBACK + +# NI-DAQmx C API constant fragment +VERIF + +# Deprecated public property name in backward-compat rename map +sensord diff --git a/cspell-mako-keywords.txt b/cspell-mako-keywords.txt new file mode 100644 index 000000000..aebf8d7af --- /dev/null +++ b/cspell-mako-keywords.txt @@ -0,0 +1,7 @@ +endfor +endif +endwhile +endwith +endtry +enddef +endblock diff --git a/cspell.json b/cspell.json new file mode 100644 index 000000000..9c7fe60e7 --- /dev/null +++ b/cspell.json @@ -0,0 +1,30 @@ +{ + "version": "0.2", + "dictionaryDefinitions": [ + { "name": "cspell-dict", "path": "./cspell-dict.txt", "addWords": true }, + { "name": "cspell-ignore-words", "path": "./cspell-ignore-words.txt", "noSuggest": true }, + { "name": "cspell-mako-keywords", "path": "./cspell-mako-keywords.txt", "noSuggest": true } + ], + "dictionaries": ["cspell-dict", "cspell-ignore-words"], + "files": [ + "src/handwritten/**/*.py", + "src/codegen/utilities/**/*.py", + "src/codegen/templates/**/*.mako", + "tests/**/*.py", + "examples/**/*.py" + ], + "ignorePaths": [ + "src/codegen/metadata/**", + "src/codegen/properties/**", + "src/codegen/functions/**", + "src/codegen/protos/**", + "generated/**" + ], + "overrides": [ + { + // Mako templates: activate the Python dictionary so Python identifiers in templates aren't flagged. + "filename": "**/*.mako", + "dictionaries": ["python", "cspell-mako-keywords"] + } + ] +} diff --git a/examples/playrec.py b/examples/playrec.py index f1462d93c..b7a8bc57c 100644 --- a/examples/playrec.py +++ b/examples/playrec.py @@ -16,15 +16,15 @@ def query_devices(): print("Output channels:", [chan.name for chan in device.ao_physical_chans]) -def playrec(data, samplerate, input_mapping, output_mapping): +def play_record(data, sample_rate, input_mapping, output_mapping): """Simultaneous playback and recording though NI device. Parameters: ----------- - data: array_like, shape (nsamples, len(output_mapping)) + data: array_like, shape (num_samples, len(output_mapping)) Data to be send to output channels. - samplerate: int - Samplerate + sample_rate: int + Sample rate input_mapping: list of str Input device channels output_mapping: list of str @@ -32,33 +32,33 @@ def playrec(data, samplerate, input_mapping, output_mapping): Returns ------- - ndarray, shape (nsamples, len(input_mapping)) + ndarray, shape (num_samples, len(input_mapping)) Recorded data """ devices = nidaqmx.system.System.local().devices data = np.asarray(data).T - nsamples = data.shape[1] + num_samples = data.shape[1] with nidaqmx.Task() as read_task, nidaqmx.Task() as write_task: for i, o in enumerate(output_mapping): - aochan = write_task.ao_channels.add_ao_voltage_chan( + ao_channel = write_task.ao_channels.add_ao_voltage_chan( o, min_val=devices[o].ao_voltage_rngs[0], max_val=devices[o].ao_voltage_rngs[1], ) min_data, max_data = np.min(data[i]), np.max(data[i]) - if ((max_data > aochan.ao_max) | (min_data < aochan.ao_min)).any(): + if ((max_data > ao_channel.ao_max) | (min_data < ao_channel.ao_min)).any(): raise ValueError( f"Data range ({min_data:.2f}, {max_data:.2f}) exceeds output range of " - f"{o} ({aochan.ao_min:.2f}, {aochan.ao_max:.2f})." + f"{o} ({ao_channel.ao_min:.2f}, {ao_channel.ao_max:.2f})." ) for i in input_mapping: read_task.ai_channels.add_ai_voltage_chan(i) for task in (read_task, write_task): task.timing.cfg_samp_clk_timing( - rate=samplerate, source="OnboardClock", samps_per_chan=nsamples + rate=sample_rate, source="OnboardClock", samps_per_chan=num_samples ) # trigger write_task as soon as read_task starts @@ -70,9 +70,9 @@ def playrec(data, samplerate, input_mapping, output_mapping): # write_task doesn't start at read_task's start_trigger without this write_task.start() # do not time out for long inputs - indata = read_task.read(nsamples, timeout=WAIT_INFINITELY) + input_data = read_task.read(num_samples, timeout=WAIT_INFINITELY) - return np.asarray(indata).T + return np.asarray(input_data).T if __name__ == "__main__": @@ -84,9 +84,9 @@ def playrec(data, samplerate, input_mapping, output_mapping): # excite through one output and record at three inputs outdata = np.random.normal(size=(5000, 1)) * 0.01 - indata = playrec( + input_data = play_record( outdata, - samplerate=96000, + sample_rate=96000, input_mapping=["Dev2/ai0", "Dev2/ai1", "Dev2/ai2"], output_mapping=["Dev2/ao0"], ) diff --git a/src/codegen/templates/_grpc_interpreter.py.mako b/src/codegen/templates/_grpc_interpreter.py.mako index 6141af792..a348eeeee 100644 --- a/src/codegen/templates/_grpc_interpreter.py.mako +++ b/src/codegen/templates/_grpc_interpreter.py.mako @@ -469,7 +469,7 @@ def _assign_numpy_array(numpy_array, grpc_array): Assigns grpc array to numpy array maintaining the original shape. Checks for the instance of grpc_array with bytes, if validated to True, - the numpy array is assigned to a 1D array of the grpc arrray. + the numpy array is assigned to a 1D array of the grpc array. """ grpc_array_size = len(grpc_array) if isinstance(grpc_array, bytes): diff --git a/src/codegen/templates/_library_interpreter.py.mako b/src/codegen/templates/_library_interpreter.py.mako index 574bd1e92..5a3ad6ac1 100644 --- a/src/codegen/templates/_library_interpreter.py.mako +++ b/src/codegen/templates/_library_interpreter.py.mako @@ -168,14 +168,14 @@ class LibraryInterpreter(BaseInterpreter): def get_error_string(self, error_code): error_buffer = ctypes.create_string_buffer(2048) - cfunc = lib_importer.windll.DAQmxGetErrorString - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ctypes.c_int, ctypes.c_char_p, + c_func = lib_importer.windll.DAQmxGetErrorString + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_uint] - query_error_code = cfunc(error_code, error_buffer, 2048) + query_error_code = c_func(error_code, error_buffer, 2048) if query_error_code < 0: _logger.error('Failed to get error string for error code %d. DAQmxGetErrorString returned error code %d.', error_code, query_error_code) return 'Failed to retrieve error description.' @@ -186,13 +186,13 @@ class LibraryInterpreter(BaseInterpreter): def get_extended_error_info(self): error_buffer = ctypes.create_string_buffer(2048) - cfunc = lib_importer.windll.DAQmxGetExtendedErrorInfo - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ctypes.c_char_p, ctypes.c_uint] + c_func = lib_importer.windll.DAQmxGetExtendedErrorInfo + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ctypes.c_char_p, ctypes.c_uint] - query_error_code = cfunc(error_buffer, 2048) + query_error_code = c_func(error_buffer, 2048) if query_error_code < 0: _logger.error('Failed to get extended error info. DAQmxGetExtendedErrorInfo returned error code %d.', query_error_code) return 'Failed to retrieve error description.' @@ -302,11 +302,11 @@ class LibraryInterpreter(BaseInterpreter): assert isinstance(task_handle, TaskHandle) samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxInternalReadAnalogWaveformEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalReadAnalogWaveformEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, ctypes.c_double, @@ -322,7 +322,7 @@ class LibraryInterpreter(BaseInterpreter): ctypes.POINTER(c_bool32), ] - error_code = cfunc( + error_code = c_func( task_handle, number_of_samples_per_channel, timeout, @@ -361,11 +361,11 @@ class LibraryInterpreter(BaseInterpreter): array_size = read_arrays[0].size assert all(read_array.size == array_size for read_array in read_arrays) - cfunc = lib_importer.windll.DAQmxInternalReadAnalogWaveformPerChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalReadAnalogWaveformPerChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, ctypes.c_double, @@ -381,11 +381,11 @@ class LibraryInterpreter(BaseInterpreter): ctypes.POINTER(c_bool32), ] - read_array_ptrs = (ctypes.POINTER(ctypes.c_double) * channel_count)() + read_array_pointers = (ctypes.POINTER(ctypes.c_double) * channel_count)() for i, read_array in enumerate(read_arrays): - read_array_ptrs[i] = read_array.ctypes.data_as(ctypes.POINTER(ctypes.c_double)) + read_array_pointers[i] = read_array.ctypes.data_as(ctypes.POINTER(ctypes.c_double)) - error_code = cfunc( + error_code = c_func( task_handle, num_samps_per_chan, timeout, @@ -394,7 +394,7 @@ class LibraryInterpreter(BaseInterpreter): 0 if t0_array is None else t0_array.size, self._get_wfm_attr_callback(properties), None, - read_array_ptrs, + read_array_pointers, channel_count, array_size, ctypes.byref(samps_per_chan_read), @@ -658,11 +658,11 @@ class LibraryInterpreter(BaseInterpreter): samps_per_chan_read = ctypes.c_int() num_bytes_per_samp = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxInternalReadDigitalWaveform - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalReadDigitalWaveform + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, ctypes.c_double, @@ -681,7 +681,7 @@ class LibraryInterpreter(BaseInterpreter): ctypes.POINTER(c_bool32), ] - error_code = cfunc( + error_code = c_func( task_handle, number_of_samples_per_channel, timeout, @@ -708,17 +708,17 @@ class LibraryInterpreter(BaseInterpreter): data_length_read = ctypes.c_uint() format_code = ctypes.c_uint() - cfunc = lib_importer.windll.DAQmxReadIDPinMemory - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadIDPinMemory + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str, wrapped_ndpointer(dtype=numpy.uint8, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint)] - array_size = cfunc( + array_size = c_func( device_name, id_pin_name, None, 0, ctypes.byref(data_length_read), ctypes.byref(format_code)) @@ -727,7 +727,7 @@ class LibraryInterpreter(BaseInterpreter): data = numpy.zeros(array_size, dtype=numpy.uint8) - error_code = cfunc( + error_code = c_func( device_name, id_pin_name, data, array_size, ctypes.byref(data_length_read), ctypes.byref(format_code)) self.check_for_error(error_code) @@ -739,11 +739,11 @@ class LibraryInterpreter(BaseInterpreter): read_voltage_array, read_current_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadPowerBinaryI16 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadPowerBinaryI16 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, c_bool32, wrapped_ndpointer(dtype=numpy.int16, flags=('C', 'W')), @@ -751,7 +751,7 @@ class LibraryInterpreter(BaseInterpreter): ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_voltage_array, read_current_array, read_voltage_array.size, ctypes.byref(samps_per_chan_read), None) @@ -765,11 +765,11 @@ class LibraryInterpreter(BaseInterpreter): read_voltage_array, read_current_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadPowerF64 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadPowerF64 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, c_bool32, wrapped_ndpointer(dtype=numpy.float64, flags=('C', 'W')), @@ -777,7 +777,7 @@ class LibraryInterpreter(BaseInterpreter): ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_voltage_array, read_current_array, read_voltage_array.size, ctypes.byref(samps_per_chan_read), None) @@ -790,17 +790,17 @@ class LibraryInterpreter(BaseInterpreter): samples_read = ctypes.c_int() number_of_bytes_per_sample = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadRaw - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadRaw + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, wrapped_ndpointer(dtype=read_array.dtype, flags=('C', 'W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, read_array, read_array.nbytes, ctypes.byref(samples_read), ctypes.byref(number_of_bytes_per_sample), None) @@ -874,11 +874,11 @@ class LibraryInterpreter(BaseInterpreter): assert channel_count > 0 assert all(write_array.size >= num_samps_per_chan for write_array in write_arrays) - cfunc = lib_importer.windll.DAQmxInternalWriteAnalogWaveformPerChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalWriteAnalogWaveformPerChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, c_bool32, @@ -889,16 +889,16 @@ class LibraryInterpreter(BaseInterpreter): ctypes.POINTER(c_bool32), ] - write_array_ptrs = (ctypes.POINTER(ctypes.c_double) * channel_count)() + write_array_pointers = (ctypes.POINTER(ctypes.c_double) * channel_count)() for i, write_array in enumerate(write_arrays): - write_array_ptrs[i] = write_array.ctypes.data_as(ctypes.POINTER(ctypes.c_double)) + write_array_pointers[i] = write_array.ctypes.data_as(ctypes.POINTER(ctypes.c_double)) - error_code = cfunc( + error_code = c_func( task_handle, num_samps_per_chan, auto_start, timeout, - write_array_ptrs, + write_array_pointers, channel_count, ctypes.byref(samps_per_chan_written), None, @@ -989,11 +989,11 @@ class LibraryInterpreter(BaseInterpreter): assert isinstance(task_handle, TaskHandle) samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxInternalWriteDigitalWaveform - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalWriteDigitalWaveform + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, c_bool32, @@ -1006,7 +1006,7 @@ class LibraryInterpreter(BaseInterpreter): ctypes.POINTER(c_bool32), ] - error_code = cfunc( + error_code = c_func( task_handle, num_samps_per_chan, auto_start, @@ -1026,18 +1026,18 @@ class LibraryInterpreter(BaseInterpreter): self, task_handle, num_samps_per_chan, auto_start, timeout, numpy_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteRaw - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteRaw + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, wrapped_ndpointer(dtype=numpy_array.dtype, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task_handle, num_samps_per_chan, auto_start, timeout, numpy_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) diff --git a/src/codegen/templates/library_interpreter/default_c_function_call.py.mako b/src/codegen/templates/library_interpreter/default_c_function_call.py.mako index d16c6be09..fc27bfeb3 100644 --- a/src/codegen/templates/library_interpreter/default_c_function_call.py.mako +++ b/src/codegen/templates/library_interpreter/default_c_function_call.py.mako @@ -13,14 +13,14 @@ # or samps_per_chan_written=) samps_per_chan_param = get_samps_per_chan_read_or_write_param(function.base_parameters) %>\ - cfunc = lib_importer.${'windll' if function.calling_convention == 'StdCall' else 'cdll'}.DAQmx${function.c_function_name} - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.${'windll' if function.calling_convention == 'StdCall' else 'cdll'}.DAQmx${function.c_function_name} + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ${', '.join(get_argument_types(function)) | wrap(24, 24)}] - error_code = cfunc( + error_code = c_func( ${', '.join(function_call_args) | wrap(12, 12)}) %if samps_per_chan_param is None: self.check_for_error(error_code) diff --git a/src/codegen/templates/library_interpreter/double_c_function_call.py.mako b/src/codegen/templates/library_interpreter/double_c_function_call.py.mako index 185badf08..b01e00c2f 100644 --- a/src/codegen/templates/library_interpreter/double_c_function_call.py.mako +++ b/src/codegen/templates/library_interpreter/double_c_function_call.py.mako @@ -13,17 +13,17 @@ function_call_args = generate_interpreter_function_call_args(function) explicit_output_param = get_output_param_with_ivi_dance_mechanism(function) %>\ - cfunc = lib_importer.${'windll' if function.calling_convention == 'StdCall' else 'cdll'}.DAQmx${function.c_function_name} - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.${'windll' if function.calling_convention == 'StdCall' else 'cdll'}.DAQmx${function.c_function_name} + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ${', '.join(get_argument_types(function)) | wrap(24, 24)}] temp_size = ${'size_hint' if function.function_name in INCLUDE_SIZE_HINT_FUNCTIONS else '0'} while True: ${instantiate_explicit_output_param(explicit_output_param)} - size_or_code = cfunc( + size_or_code = c_func( ${', '.join(function_call_args) | wrap(16, 16)}) %if explicit_output_param.ctypes_data_type == 'ctypes.c_char_p': if is_string_buffer_too_small(size_or_code): diff --git a/src/codegen/templates/library_interpreter/event_function_call.py.mako b/src/codegen/templates/library_interpreter/event_function_call.py.mako index 2b45ca098..076146350 100644 --- a/src/codegen/templates/library_interpreter/event_function_call.py.mako +++ b/src/codegen/templates/library_interpreter/event_function_call.py.mako @@ -24,11 +24,11 @@ ${callback_func_param.type} = ctypes.CFUNCTYPE( ${', '.join(callback_param_types) | wrap(12)}) - cfunc = lib_importer.${'windll' if function.calling_convention == 'StdCall' else 'cdll'}.DAQmx${function.c_function_name} - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.${'windll' if function.calling_convention == 'StdCall' else 'cdll'}.DAQmx${function.c_function_name} + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ${', '.join(argument_types) | wrap(24)}] %if is_event_register_function(function): @@ -43,7 +43,7 @@ callback_data = None %endif - error_code = cfunc( + error_code = c_func( ${', '.join(function_call_args) | wrap(12)}) self.check_for_error(error_code) %if is_event_register_function(function): diff --git a/src/codegen/templates/library_interpreter/exec_cdecl_c_function_call.py.mako b/src/codegen/templates/library_interpreter/exec_cdecl_c_function_call.py.mako index 3285ded60..16a642447 100644 --- a/src/codegen/templates/library_interpreter/exec_cdecl_c_function_call.py.mako +++ b/src/codegen/templates/library_interpreter/exec_cdecl_c_function_call.py.mako @@ -30,8 +30,8 @@ args.append(None) argtypes.append(ctypes.c_void_p) - cfunc = lib_importer.${'windll' if function.calling_convention == 'StdCall' else 'cdll'}.DAQmx${function.c_function_name} - with cfunc.arglock: - cfunc.argtypes = argtypes - error_code = cfunc(*args) + c_func = lib_importer.${'windll' if function.calling_convention == 'StdCall' else 'cdll'}.DAQmx${function.c_function_name} + with c_func.arg_lock: + c_func.argtypes = argtypes + error_code = c_func(*args) self.check_for_error(error_code) diff --git a/src/codegen/templates/property_legacy_deleter_template.py.mako b/src/codegen/templates/property_legacy_deleter_template.py.mako index 140fb2b24..6a70e2220 100644 --- a/src/codegen/templates/property_legacy_deleter_template.py.mako +++ b/src/codegen/templates/property_legacy_deleter_template.py.mako @@ -10,15 +10,15 @@ raise NotImplementedError ## When the length of the function name is too long, it will be wrapped to the next line %if len(attribute.c_function_name) < 33: - cfunc = lib_importer.${attribute.get_lib_importer_type()}.DAQmxReset${attribute.c_function_name} + c_func = lib_importer.${attribute.get_lib_importer_type()}.DAQmxReset${attribute.c_function_name} %else: - cfunc = (lib_importer.${attribute.get_lib_importer_type()}. + c_func = (lib_importer.${attribute.get_lib_importer_type()}. DAQmxReset${attribute.c_function_name}) %endif - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ${', '.join(attribute.get_handle_parameter_arguments()) | wrap(initial_indent=24)}] \ ## Script function call. @@ -27,7 +27,7 @@ for handle_parameter in attribute.handle_parameters: function_call_args.append(handle_parameter.accessor) %>\ - error_code = cfunc( + error_code = c_func( ${', '.join(function_call_args) | wrap(initial_indent=12)}) self._interpreter.check_for_error(error_code) \ No newline at end of file diff --git a/src/codegen/templates/property_legacy_setter_template.py.mako b/src/codegen/templates/property_legacy_setter_template.py.mako index 1d6b92dfb..9c23dfc8c 100644 --- a/src/codegen/templates/property_legacy_setter_template.py.mako +++ b/src/codegen/templates/property_legacy_setter_template.py.mako @@ -46,15 +46,15 @@ %>\ ## When the length of the function name is too long, it will be wrapped to the next line %if len(attribute.c_function_name) < 33: - cfunc = lib_importer.${attribute.get_lib_importer_type()}.DAQmxSet${attribute.c_function_name} + c_func = lib_importer.${attribute.get_lib_importer_type()}.DAQmxSet${attribute.c_function_name} %else: - cfunc = (lib_importer.${attribute.get_lib_importer_type()}. + c_func = (lib_importer.${attribute.get_lib_importer_type()}. DAQmxSet${attribute.c_function_name}) %endif - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ${', '.join(argtypes) | wrap(initial_indent=24)}] \ ## Script function call. @@ -66,7 +66,7 @@ if attribute.has_explicit_write_buffer_size: function_call_args.append('len(val)') %>\ - error_code = cfunc( + error_code = c_func( ${', '.join(function_call_args) | wrap(initial_indent=12)}) self._interpreter.check_for_error(error_code) \ No newline at end of file diff --git a/src/codegen/templates/task/triggering/_arm_start_trigger.py.mako b/src/codegen/templates/task/triggering/_arm_start_trigger.py.mako index d9a03d15e..5894afb8f 100644 --- a/src/codegen/templates/task/triggering/_arm_start_trigger.py.mako +++ b/src/codegen/templates/task/triggering/_arm_start_trigger.py.mako @@ -7,8 +7,8 @@ attributes = get_attributes(data, "ArmStartTrigger") functions = get_functions(data,"ArmStartTrigger") attr_enums = attribute_enums(attributes) - fuct_enums = functions_enums(functions) - enums_used = get_enums_to_import(attr_enums, fuct_enums) + func_enums = functions_enums(functions) + enums_used = get_enums_to_import(attr_enums, func_enums) %>\ # Do not edit this file; it was automatically generated. diff --git a/src/codegen/templates/task/triggering/_handshake_trigger.py.mako b/src/codegen/templates/task/triggering/_handshake_trigger.py.mako index 21e9be9c8..49a3c96e0 100644 --- a/src/codegen/templates/task/triggering/_handshake_trigger.py.mako +++ b/src/codegen/templates/task/triggering/_handshake_trigger.py.mako @@ -6,8 +6,8 @@ attributes = get_attributes(data, "HandshakeTrigger") functions = get_functions(data,"HandshakeTrigger") attr_enums = attribute_enums(attributes) - fuct_enums = functions_enums(functions) - enums_used = get_enums_to_import(attr_enums, fuct_enums) + func_enums = functions_enums(functions) + enums_used = get_enums_to_import(attr_enums, func_enums) %>\ # Do not edit this file; it was automatically generated. diff --git a/src/codegen/templates/task/triggering/_pause_trigger.py.mako b/src/codegen/templates/task/triggering/_pause_trigger.py.mako index b58093423..e6a46d54e 100644 --- a/src/codegen/templates/task/triggering/_pause_trigger.py.mako +++ b/src/codegen/templates/task/triggering/_pause_trigger.py.mako @@ -6,8 +6,8 @@ attributes = get_attributes(data, "PauseTrigger") functions = get_functions(data,"PauseTrigger") attr_enums = attribute_enums(attributes) - fuct_enums = functions_enums(functions) - enums_used = get_enums_to_import(attr_enums, fuct_enums) + func_enums = functions_enums(functions) + enums_used = get_enums_to_import(attr_enums, func_enums) %>\ # Do not edit this file; it was automatically generated. diff --git a/src/codegen/templates/task/triggering/_reference_trigger.py.mako b/src/codegen/templates/task/triggering/_reference_trigger.py.mako index 12e39916c..9bac3196c 100644 --- a/src/codegen/templates/task/triggering/_reference_trigger.py.mako +++ b/src/codegen/templates/task/triggering/_reference_trigger.py.mako @@ -6,8 +6,8 @@ attributes = get_attributes(data, "ReferenceTrigger") functions = get_functions(data,"ReferenceTrigger") attr_enums = attribute_enums(attributes) - fuct_enums = functions_enums(functions) - enums_used = get_enums_to_import(attr_enums, fuct_enums) + func_enums = functions_enums(functions) + enums_used = get_enums_to_import(attr_enums, func_enums) %>\ # Do not edit this file; it was automatically generated. diff --git a/src/codegen/templates/task/triggering/_start_trigger.py.mako b/src/codegen/templates/task/triggering/_start_trigger.py.mako index 27de6128f..8718b0ad6 100644 --- a/src/codegen/templates/task/triggering/_start_trigger.py.mako +++ b/src/codegen/templates/task/triggering/_start_trigger.py.mako @@ -6,8 +6,8 @@ attributes = get_attributes(data, "StartTrigger") functions = get_functions(data,"StartTrigger") attr_enums = attribute_enums(attributes) - fuct_enums = functions_enums(functions) - enums_used = get_enums_to_import(attr_enums, fuct_enums) + func_enums = functions_enums(functions) + enums_used = get_enums_to_import(attr_enums, func_enums) %>\ # Do not edit this file; it was automatically generated. diff --git a/src/codegen/utilities/function_helpers.py b/src/codegen/utilities/function_helpers.py index 4ba242474..c1613c028 100644 --- a/src/codegen/utilities/function_helpers.py +++ b/src/codegen/utilities/function_helpers.py @@ -87,7 +87,7 @@ def get_enums_used(functions): def order_function_parameters_by_optional(function_parameters): - """Sorts optional parameters and non optional parameters for function defintion.""" + """Sorts optional parameters and non optional parameters for function definition.""" optional_params = [] non_optional_params = [] for param in function_parameters: @@ -100,7 +100,7 @@ def order_function_parameters_by_optional(function_parameters): def get_parameter_signature(is_python_factory, sorted_params): - """Gets parameter signature for function defintion.""" + """Gets parameter signature for function definition.""" params_with_defaults = [] if not is_python_factory: params_with_defaults.append("self") diff --git a/src/codegen/utilities/interpreter_helpers.py b/src/codegen/utilities/interpreter_helpers.py index 911de7cdb..01157f83f 100644 --- a/src/codegen/utilities/interpreter_helpers.py +++ b/src/codegen/utilities/interpreter_helpers.py @@ -557,7 +557,7 @@ def get_input_arguments_for_compound_params(func): def create_compound_parameter_request(func): - """Gets the input parameters for createing the compound type parameter.""" + """Gets the input parameters for creating the compound type parameter.""" parameters = [] compound_parameter_type = "" for parameter in func.base_parameters: diff --git a/src/handwritten/_dotenvpath.py b/src/handwritten/_dotenv_path.py similarity index 100% rename from src/handwritten/_dotenvpath.py rename to src/handwritten/_dotenv_path.py diff --git a/src/handwritten/_feature_toggles.py b/src/handwritten/_feature_toggles.py index db5e583cf..a979188c7 100644 --- a/src/handwritten/_feature_toggles.py +++ b/src/handwritten/_feature_toggles.py @@ -10,7 +10,7 @@ from decouple import AutoConfig, Undefined, undefined -from nidaqmx._dotenvpath import get_dotenv_search_path +from nidaqmx._dotenv_path import get_dotenv_search_path from nidaqmx.errors import FeatureNotSupportedError if TYPE_CHECKING: diff --git a/src/handwritten/_install_daqmx.py b/src/handwritten/_install_daqmx.py index 4a30e42c2..68ce913a7 100644 --- a/src/handwritten/_install_daqmx.py +++ b/src/handwritten/_install_daqmx.py @@ -302,7 +302,7 @@ def _install_daqmx_driver_linux_core(download_url: str, release: str) -> None: def _validate_download_url(download_url: str) -> None: - """Velidate that the download URL uses https and points to a trusted site.""" + """Validate that the download URL uses https and points to a trusted site.""" parsed_url = urlparse(download_url) if parsed_url.scheme != "https" or parsed_url.netloc != "download.ni.com": raise click.ClickException(f"Unsupported download URL: {download_url}") diff --git a/src/handwritten/_lib.py b/src/handwritten/_lib.py index 8fccba52b..acd49749b 100644 --- a/src/handwritten/_lib.py +++ b/src/handwritten/_lib.py @@ -103,10 +103,10 @@ def __getattr__( # noqa: D105 - Missing docstring in magic method (auto-generat ): try: cfunc = getattr(self._library, function) - if not hasattr(cfunc, "arglock"): + if not hasattr(cfunc, "arg_lock"): with self._lib_lock: - if not hasattr(cfunc, "arglock"): - cfunc.arglock = threading.Lock() + if not hasattr(cfunc, "arg_lock"): + cfunc.arg_lock = threading.Lock() return cfunc except AttributeError: raise DaqFunctionNotSupportedError(_FUNCTION_NOT_SUPPORTED_MESSAGE.format(function)) @@ -188,9 +188,9 @@ def _import_lib(self): if sys.platform.startswith("win"): - def _load_lib(libname: str): - windll = ctypes.windll.LoadLibrary(libname) - cdll = ctypes.cdll.LoadLibrary(libname) + def _load_lib(library_name: str): + windll = ctypes.windll.LoadLibrary(library_name) + cdll = ctypes.cdll.LoadLibrary(library_name) return windll, cdll # Feature Toggle to load nicaiu.dll or nicai_utf8.dll diff --git a/src/handwritten/_linux_installation_commands.py b/src/handwritten/_linux_installation_commands.py index 91e688ebe..c5d522492 100644 --- a/src/handwritten/_linux_installation_commands.py +++ b/src/handwritten/_linux_installation_commands.py @@ -66,7 +66,7 @@ class DistroInfo: # noqa: D101 - Missing docstring in public class (auto-genera install_commands: list[list[str]] -# Mapping of distros to their command templates and version handlers +# Mapping of Linux distributions to their command templates and version handlers LINUX_COMMANDS = { "ubuntu": DistroInfo(_get_version_ubuntu, _DEBIAN_DAQMX_VERSION_COMMAND, _APT_INSTALL_COMMANDS), "opensuse": DistroInfo( diff --git a/src/handwritten/types.py b/src/handwritten/types.py index 45f296004..561b34ece 100644 --- a/src/handwritten/types.py +++ b/src/handwritten/types.py @@ -3,7 +3,7 @@ import collections import typing -# region Task Counter IO namedtuples +# region Task Counter IO named tuples CtrFreq = collections.namedtuple("CtrFreq", ["freq", "duty_cycle"]) @@ -13,13 +13,13 @@ # endregion -# region Power IO namedtuples +# region Power IO named tuples PowerMeasurement = collections.namedtuple("PowerMeasurement", ["voltage", "current"]) # endregion -# region Watchdog namedtuples +# region Watchdog named tuples AOExpirationState = collections.namedtuple( "AOExpirationState", ["physical_channel", "expiration_state", "output_type"] @@ -35,7 +35,7 @@ # endregion -# region Power Up States namedtuples +# region Power Up States named tuples AOPowerUpState = collections.namedtuple( "AOPowerUpState", ["physical_channel", "power_up_state", "channel_type"] @@ -49,7 +49,7 @@ # endregion -# region System namedtuples +# region System named tuples CDAQSyncConnection = collections.namedtuple("CDAQSyncConnection", ["output_port", "input_port"]) @@ -59,7 +59,7 @@ # endregion -# region ID Pin namedtuples +# region ID Pin named tuples class IDPinContents(typing.NamedTuple): diff --git a/src/handwritten/utils.py b/src/handwritten/utils.py index 3eb25f7b1..9524aac6c 100644 --- a/src/handwritten/utils.py +++ b/src/handwritten/utils.py @@ -10,7 +10,7 @@ from nidaqmx.grpc_session_options import GrpcSessionOptions # Method logic adapted from -# //Measurements/Infrastructure/dmxf/trunk/2.5/source/nimuck/parseUtilities.cpp +# //Measurements/Infrastructure/dmxf/trunk/2.5/source/nimuck/parseUtilities.cpp # cspell:disable-line _invalid_range_syntax_message = ( "Syntax for a range of objects in the input string is invalid.\n\n" @@ -184,7 +184,7 @@ def unflatten_channel_string(channel_names: str) -> list[str]: for i in range(number_of_channels): current_number = num_min + i if num_min_width > 0: - # Using fstrings to create format strings. Braces for days! + # Using f-strings to create format strings. Braces for days! zero_padded_format_specifier = f"{{:0{num_min_width}d}}" current_number_str = zero_padded_format_specifier.format(current_number) else: diff --git a/tests/acceptance/test_internationalization.py b/tests/acceptance/test_internationalization.py index 6228d3b6d..9a8c55153 100644 --- a/tests/acceptance/test_internationalization.py +++ b/tests/acceptance/test_internationalization.py @@ -1,3 +1,7 @@ +# cspell:ignore Gerät +# cspell:ignore appareil +# cspell:ignore prüfende Daten +# cspell:ignore Données from __future__ import annotations import pathlib diff --git a/tests/component/_analog_utils.py b/tests/component/_analog_utils.py index 7f39ef07e..5fb2347e1 100644 --- a/tests/component/_analog_utils.py +++ b/tests/component/_analog_utils.py @@ -12,7 +12,7 @@ import nidaqmx.system -# Simulated DAQ voltage data is a noisy sinewave within the range of the minimum and maximum values +# Simulated DAQ voltage data is a noisy sine wave within the range of the minimum and maximum values # of the virtual channel. We can leverage this behavior to validate we get the correct data from # the Python bindings. def _get_voltage_offset_for_chan(chan_index: int) -> float: diff --git a/tests/component/system/_collections/__init__.py b/tests/component/system/_collections/__init__.py index 2ae12b04b..1f851aabe 100644 --- a/tests/component/system/_collections/__init__.py +++ b/tests/component/system/_collections/__init__.py @@ -1 +1 @@ -"""Component tests for nidaqmx.system.storage._collecitons.*.""" +"""Component tests for nidaqmx.system.storage._collections.*.""" diff --git a/tests/component/system/storage/test_persisted_task.py b/tests/component/system/storage/test_persisted_task.py index 22b3116bd..68022313b 100644 --- a/tests/component/system/storage/test_persisted_task.py +++ b/tests/component/system/storage/test_persisted_task.py @@ -62,7 +62,7 @@ def test___persisted_task___load_twice___raises_duplicate_task(persisted_task: P @pytest.mark.task_name("VoltageTesterTask") @pytest.mark.grpc_only(reason="Default gRPC initialization behavior is auto (create or attach)") @pytest.mark.grpc_session_initialization_behavior(SessionInitializationBehavior.AUTO) -def test___grpc_session_initializaton_behavior_auto___load_twice___returns_multiple_task_proxies( +def test___grpc_session_initialization_behavior_auto___load_twice___returns_multiple_task_proxies( persisted_task: PersistedTask, ): with persisted_task.load() as task1: diff --git a/tests/component/task/channels/test_ai_channel.py b/tests/component/task/channels/test_ai_channel.py index 8fe8bb7d5..e182bbbfa 100644 --- a/tests/component/task/channels/test_ai_channel.py +++ b/tests/component/task/channels/test_ai_channel.py @@ -902,7 +902,7 @@ def test___task___add_teds_ai_rtd_chan___sets_channel_attributes( assert chan.ai_meas_type == UsageTypeAI.TEMPERATURE_RTD assert chan.ai_resistance_cfg == resistance_config assert chan.ai_teds_is_teds - # rtd type and coeffeicients come from the TEDS file + # rtd type and coefficients come from the TEDS file assert chan.ai_rtd_type == RTDType.CUSTOM assert chan.ai_rtd_a == pytest.approx(3.81e-3, abs=1e-5) assert chan.ai_rtd_b == pytest.approx(-6.02e-7, abs=1e-9) diff --git a/tests/component/task/test_timing_properties.py b/tests/component/task/test_timing_properties.py index 1ccaecfc0..8504015bc 100644 --- a/tests/component/task/test_timing_properties.py +++ b/tests/component/task/test_timing_properties.py @@ -462,7 +462,7 @@ def test___timing___reset_uint64_property_with_device_context___throws_daqerror( assert e.value.error_type == DAQmxErrors.M_STUDIO_OPERATION_DOES_NOT_SUPPORT_DEVICE_CONTEXT -def test___timing___set_unint64_property_out_of_range_value___throws_daqerror( +def test___timing___set_uint64_property_out_of_range_value___throws_daqerror( task, sim_6363_device ): task.ai_channels.add_ai_voltage_chan(sim_6363_device.ai_physical_chans[0].name) diff --git a/tests/legacy/test_stream_digital_readers_writers.py b/tests/legacy/test_stream_digital_readers_writers.py index 054bad3c8..22d8ad789 100644 --- a/tests/legacy/test_stream_digital_readers_writers.py +++ b/tests/legacy/test_stream_digital_readers_writers.py @@ -290,7 +290,7 @@ class TestDigitalMultiChannelReaderWriter(TestDAQmxIOBase): @pytest.mark.parametrize("seed", [generate_random_seed()]) def test_one_sample_one_line(self, task, real_x_series_device, seed): - """Test to validate digital mutichannel read and write operation with sample data.""" + """Test to validate digital multichannel read and write operation with sample data.""" # Reset the pseudorandom number generator with seed. random.seed(seed) @@ -320,7 +320,7 @@ def test_one_sample_one_line(self, task, real_x_series_device, seed): @pytest.mark.parametrize("seed", [generate_random_seed()]) def test_one_sample_multi_line(self, task, real_x_series_device, seed): - """Test to validate digital mutichannel read and write operation with sample data.""" + """Test to validate digital multichannel read and write operation with sample data.""" # Reset the pseudorandom number generator with seed. random.seed(seed) @@ -360,7 +360,7 @@ def test_one_sample_multi_line(self, task, real_x_series_device, seed): @pytest.mark.parametrize("seed", [generate_random_seed()]) def test_one_sample_port_byte(self, task, real_x_series_device, seed): - """Test to validate digital mutichannel read and write operation with sample bytes.""" + """Test to validate digital multichannel read and write operation with sample bytes.""" if len([d.do_port_width <= 8 for d in real_x_series_device.do_ports]) < 2: pytest.skip("Requires 2 digital ports with at most 8 lines.") @@ -394,7 +394,7 @@ def test_one_sample_port_byte(self, task, real_x_series_device, seed): @pytest.mark.parametrize("seed", [generate_random_seed()]) def test_one_sample_port_uint16(self, task, real_x_series_device, seed): - """Test to validate digital mutichannel read and write operation with uint16.""" + """Test to validate digital multichannel read and write operation with uint16.""" if len([d.do_port_width <= 16 for d in real_x_series_device.do_ports]) < 2: pytest.skip("Requires 2 digital ports with at most 16 lines.") @@ -428,7 +428,7 @@ def test_one_sample_port_uint16(self, task, real_x_series_device, seed): @pytest.mark.parametrize("seed", [generate_random_seed()]) def test_one_sample_port_uint32(self, task, real_x_series_device, seed): - """Test to validate digital mutichannel read and write operation with uint32.""" + """Test to validate digital multichannel read and write operation with uint32.""" if len([d.do_port_width <= 32 for d in real_x_series_device.do_ports]) < 2: pytest.skip("Requires 2 digital ports with at most 32 lines.") @@ -462,7 +462,7 @@ def test_one_sample_port_uint32(self, task, real_x_series_device, seed): @pytest.mark.parametrize("seed", [generate_random_seed()]) def test_many_sample_port_byte(self, task, real_x_series_device, seed): - """Test to validate digital mutichannel read and write operation with sample bytes.""" + """Test to validate digital multichannel read and write operation with sample bytes.""" if len([d.do_port_width <= 8 for d in real_x_series_device.do_ports]) < 2: pytest.skip("Requires 2 digital ports with at most 8 lines.") @@ -514,7 +514,7 @@ def test_many_sample_port_byte(self, task, real_x_series_device, seed): @pytest.mark.parametrize("seed", [generate_random_seed()]) def test_many_sample_port_uint16(self, task, real_x_series_device, seed): - """Test to validate digital mutichannel read and write operation with uint16.""" + """Test to validate digital multichannel read and write operation with uint16.""" if len([d.do_port_width <= 16 for d in real_x_series_device.do_ports]) < 2: pytest.skip("Requires 2 digital ports with at most 16 lines.") @@ -566,7 +566,7 @@ def test_many_sample_port_uint16(self, task, real_x_series_device, seed): @pytest.mark.parametrize("seed", [generate_random_seed()]) def test_many_sample_port_uint32(self, task, real_x_series_device, seed): - """Test to validate digital mutichannel read and write operation with uint32.""" + """Test to validate digital multichannel read and write operation with uint32.""" if len([d.do_port_width <= 32 for d in real_x_series_device.do_ports]) < 2: pytest.skip("Requires 2 digital ports with at most 32 lines.") diff --git a/tests/unit/test_dotenvpath.py b/tests/unit/test_dotenv_path.py similarity index 66% rename from tests/unit/test_dotenvpath.py rename to tests/unit/test_dotenv_path.py index 3856523b3..588558117 100644 --- a/tests/unit/test_dotenvpath.py +++ b/tests/unit/test_dotenv_path.py @@ -2,7 +2,7 @@ import pytest -from nidaqmx import _dotenvpath +from nidaqmx import _dotenv_path @pytest.mark.parametrize("dotenv_exists", [False, True]) @@ -15,20 +15,20 @@ def test___dotenv_exists_varies___has_dotenv_file___matches_dotenv_exists( for dir in subdirs: dir.mkdir() - assert _dotenvpath._has_dotenv_file(tmp_path) == dotenv_exists - assert all([_dotenvpath._has_dotenv_file(p) == dotenv_exists for p in subdirs]) + assert _dotenv_path._has_dotenv_file(tmp_path) == dotenv_exists + assert all([_dotenv_path._has_dotenv_file(p) == dotenv_exists for p in subdirs]) def test___get_caller_path___returns_this_modules_path() -> None: - assert _dotenvpath._get_caller_path() == Path(__file__) + assert _dotenv_path._get_caller_path() == Path(__file__) def test___get_package_path___returns_package_dir() -> None: - assert _dotenvpath._get_package_path() == Path(_dotenvpath.__file__).parent + assert _dotenv_path._get_package_path() == Path(_dotenv_path.__file__).parent def test___get_script_or_exe_path___returns_pytest_path() -> None: - path = _dotenvpath._get_script_or_exe_path() + path = _dotenv_path._get_script_or_exe_path() assert path is not None assert "pytest" in path.parts or "pytest.exe" in path.parts or "vscode_pytest" in path.parts From 79f3786e0481ca0cc2554646efbdd80259d5ac77 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 19:21:15 -0600 Subject: [PATCH 02/47] chore: regenerate code after spelling fixes --- .../{_dotenvpath.py => _dotenv_path.py} | 0 generated/nidaqmx/_feature_toggles.py | 2 +- generated/nidaqmx/_grpc_interpreter.py | 2 +- generated/nidaqmx/_install_daqmx.py | 2 +- generated/nidaqmx/_lib.py | 12 +- generated/nidaqmx/_library_interpreter.py | 4494 ++++++++--------- .../nidaqmx/_linux_installation_commands.py | 2 +- generated/nidaqmx/system/physical_channel.py | 144 +- generated/nidaqmx/types.py | 12 +- generated/nidaqmx/utils.py | 4 +- 10 files changed, 2337 insertions(+), 2337 deletions(-) rename generated/nidaqmx/{_dotenvpath.py => _dotenv_path.py} (100%) diff --git a/generated/nidaqmx/_dotenvpath.py b/generated/nidaqmx/_dotenv_path.py similarity index 100% rename from generated/nidaqmx/_dotenvpath.py rename to generated/nidaqmx/_dotenv_path.py diff --git a/generated/nidaqmx/_feature_toggles.py b/generated/nidaqmx/_feature_toggles.py index db5e583cf..a979188c7 100644 --- a/generated/nidaqmx/_feature_toggles.py +++ b/generated/nidaqmx/_feature_toggles.py @@ -10,7 +10,7 @@ from decouple import AutoConfig, Undefined, undefined -from nidaqmx._dotenvpath import get_dotenv_search_path +from nidaqmx._dotenv_path import get_dotenv_search_path from nidaqmx.errors import FeatureNotSupportedError if TYPE_CHECKING: diff --git a/generated/nidaqmx/_grpc_interpreter.py b/generated/nidaqmx/_grpc_interpreter.py index 688585276..38782fe17 100644 --- a/generated/nidaqmx/_grpc_interpreter.py +++ b/generated/nidaqmx/_grpc_interpreter.py @@ -3850,7 +3850,7 @@ def _assign_numpy_array(numpy_array, grpc_array): Assigns grpc array to numpy array maintaining the original shape. Checks for the instance of grpc_array with bytes, if validated to True, - the numpy array is assigned to a 1D array of the grpc arrray. + the numpy array is assigned to a 1D array of the grpc array. """ grpc_array_size = len(grpc_array) if isinstance(grpc_array, bytes): diff --git a/generated/nidaqmx/_install_daqmx.py b/generated/nidaqmx/_install_daqmx.py index 4a30e42c2..68ce913a7 100644 --- a/generated/nidaqmx/_install_daqmx.py +++ b/generated/nidaqmx/_install_daqmx.py @@ -302,7 +302,7 @@ def _install_daqmx_driver_linux_core(download_url: str, release: str) -> None: def _validate_download_url(download_url: str) -> None: - """Velidate that the download URL uses https and points to a trusted site.""" + """Validate that the download URL uses https and points to a trusted site.""" parsed_url = urlparse(download_url) if parsed_url.scheme != "https" or parsed_url.netloc != "download.ni.com": raise click.ClickException(f"Unsupported download URL: {download_url}") diff --git a/generated/nidaqmx/_lib.py b/generated/nidaqmx/_lib.py index 8fccba52b..acd49749b 100644 --- a/generated/nidaqmx/_lib.py +++ b/generated/nidaqmx/_lib.py @@ -103,10 +103,10 @@ def __getattr__( # noqa: D105 - Missing docstring in magic method (auto-generat ): try: cfunc = getattr(self._library, function) - if not hasattr(cfunc, "arglock"): + if not hasattr(cfunc, "arg_lock"): with self._lib_lock: - if not hasattr(cfunc, "arglock"): - cfunc.arglock = threading.Lock() + if not hasattr(cfunc, "arg_lock"): + cfunc.arg_lock = threading.Lock() return cfunc except AttributeError: raise DaqFunctionNotSupportedError(_FUNCTION_NOT_SUPPORTED_MESSAGE.format(function)) @@ -188,9 +188,9 @@ def _import_lib(self): if sys.platform.startswith("win"): - def _load_lib(libname: str): - windll = ctypes.windll.LoadLibrary(libname) - cdll = ctypes.cdll.LoadLibrary(libname) + def _load_lib(library_name: str): + windll = ctypes.windll.LoadLibrary(library_name) + cdll = ctypes.cdll.LoadLibrary(library_name) return windll, cdll # Feature Toggle to load nicaiu.dll or nicai_utf8.dll diff --git a/generated/nidaqmx/_library_interpreter.py b/generated/nidaqmx/_library_interpreter.py index 344aa1f85..549d8b41f 100644 --- a/generated/nidaqmx/_library_interpreter.py +++ b/generated/nidaqmx/_library_interpreter.py @@ -105,43 +105,43 @@ def driver_version(self): def add_cdaq_sync_connection(self, port_list): - cfunc = lib_importer.windll.DAQmxAddCDAQSyncConnection - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxAddCDAQSyncConnection + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( port_list) self.check_for_error(error_code) def add_global_chans_to_task(self, task, channel_names): - cfunc = lib_importer.windll.DAQmxAddGlobalChansToTask - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxAddGlobalChansToTask + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, channel_names) self.check_for_error(error_code) def add_network_device( self, ip_address, device_name, attempt_reservation, timeout): - cfunc = lib_importer.windll.DAQmxAddNetworkDevice - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxAddNetworkDevice + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str, c_bool32, ctypes.c_double, ctypes.c_char_p, ctypes.c_uint] temp_size = 0 while True: device_name_out = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( ip_address, device_name, attempt_reservation, timeout, device_name_out, temp_size) if is_string_buffer_too_small(size_or_code): @@ -159,15 +159,15 @@ def are_configured_cdaq_sync_ports_disconnected( self, chassis_devices_ports, timeout): disconnected_ports_exist = c_bool32() - cfunc = lib_importer.windll.DAQmxAreConfiguredCDAQSyncPortsDisconnected - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxAreConfiguredCDAQSyncPortsDisconnected + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_double, ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( chassis_devices_ports, timeout, ctypes.byref(disconnected_ports_exist)) self.check_for_error(error_code) @@ -175,14 +175,14 @@ def are_configured_cdaq_sync_ports_disconnected( def auto_configure_cdaq_sync_connections( self, chassis_devices_ports, timeout): - cfunc = lib_importer.windll.DAQmxAutoConfigureCDAQSyncConnections - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxAutoConfigureCDAQSyncConnections + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_double] - error_code = cfunc( + error_code = c_func( chassis_devices_ports, timeout) self.check_for_error(error_code) @@ -192,18 +192,18 @@ def calculate_reverse_poly_coeff( size = len(forward_coeffs) if reverse_poly_order < 0 else reverse_poly_order + 1 reverse_coeffs = numpy.zeros(size, dtype=numpy.float64) - cfunc = lib_importer.windll.DAQmxCalculateReversePolyCoeff - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCalculateReversePolyCoeff + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, wrapped_ndpointer(dtype=numpy.float64, flags=('C','W'))] - error_code = cfunc( + error_code = c_func( forward_coeffs, len(forward_coeffs), min_val_x, max_val_x, num_points_to_compute, reverse_poly_order, reverse_coeffs) self.check_for_error(error_code) @@ -212,47 +212,47 @@ def calculate_reverse_poly_coeff( def cfg_anlg_edge_ref_trig( self, task, trigger_source, pretrigger_samples, trigger_slope, trigger_level): - cfunc = lib_importer.windll.DAQmxCfgAnlgEdgeRefTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgAnlgEdgeRefTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_uint] - error_code = cfunc( + error_code = c_func( task, trigger_source, trigger_slope, trigger_level, pretrigger_samples) self.check_for_error(error_code) def cfg_anlg_edge_start_trig( self, task, trigger_source, trigger_slope, trigger_level): - cfunc = lib_importer.windll.DAQmxCfgAnlgEdgeStartTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgAnlgEdgeStartTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, trigger_source, trigger_slope, trigger_level) self.check_for_error(error_code) def cfg_anlg_multi_edge_ref_trig( self, task, trigger_sources, pretrigger_samples, trigger_slope_array, trigger_level_array): - cfunc = lib_importer.windll.DAQmxCfgAnlgMultiEdgeRefTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgAnlgMultiEdgeRefTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, wrapped_ndpointer(dtype=numpy.int32, flags=('C')), wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint32, ctypes.c_uint] - error_code = cfunc( + error_code = c_func( task, trigger_sources, trigger_slope_array, trigger_level_array, pretrigger_samples, len(trigger_level_array)) self.check_for_error(error_code) @@ -260,17 +260,17 @@ def cfg_anlg_multi_edge_ref_trig( def cfg_anlg_multi_edge_start_trig( self, task, trigger_sources, trigger_slope_array, trigger_level_array): - cfunc = lib_importer.windll.DAQmxCfgAnlgMultiEdgeStartTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgAnlgMultiEdgeStartTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, wrapped_ndpointer(dtype=numpy.int32, flags=('C')), wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint] - error_code = cfunc( + error_code = c_func( task, trigger_sources, trigger_slope_array, trigger_level_array, len(trigger_level_array)) self.check_for_error(error_code) @@ -278,16 +278,16 @@ def cfg_anlg_multi_edge_start_trig( def cfg_anlg_window_ref_trig( self, task, trigger_source, window_top, window_bottom, pretrigger_samples, trigger_when): - cfunc = lib_importer.windll.DAQmxCfgAnlgWindowRefTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgAnlgWindowRefTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_uint] - error_code = cfunc( + error_code = c_func( task, trigger_source, trigger_when, window_top, window_bottom, pretrigger_samples) self.check_for_error(error_code) @@ -295,15 +295,15 @@ def cfg_anlg_window_ref_trig( def cfg_anlg_window_start_trig( self, task, window_top, window_bottom, trigger_source, trigger_when): - cfunc = lib_importer.windll.DAQmxCfgAnlgWindowStartTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgAnlgWindowStartTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, trigger_source, trigger_when, window_top, window_bottom) self.check_for_error(error_code) @@ -311,16 +311,16 @@ def cfg_burst_handshaking_timing_export_clock( self, task, sample_clk_rate, sample_clk_outp_term, sample_mode, samps_per_chan, sample_clk_pulse_polarity, pause_when, ready_event_active_level): - cfunc = lib_importer.windll.DAQmxCfgBurstHandshakingTimingExportClock - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgBurstHandshakingTimingExportClock + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_ulonglong, ctypes.c_double, ctypes_byte_str, ctypes.c_int, ctypes.c_int, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, sample_mode, samps_per_chan, sample_clk_rate, sample_clk_outp_term, sample_clk_pulse_polarity, pause_when, ready_event_active_level) @@ -330,16 +330,16 @@ def cfg_burst_handshaking_timing_import_clock( self, task, sample_clk_rate, sample_clk_src, sample_mode, samps_per_chan, sample_clk_active_edge, pause_when, ready_event_active_level): - cfunc = lib_importer.windll.DAQmxCfgBurstHandshakingTimingImportClock - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgBurstHandshakingTimingImportClock + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_ulonglong, ctypes.c_double, ctypes_byte_str, ctypes.c_int, ctypes.c_int, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, sample_mode, samps_per_chan, sample_clk_rate, sample_clk_src, sample_clk_active_edge, pause_when, ready_event_active_level) @@ -348,265 +348,265 @@ def cfg_burst_handshaking_timing_import_clock( def cfg_change_detection_timing( self, task, rising_edge_chan, falling_edge_chan, sample_mode, samps_per_chan): - cfunc = lib_importer.windll.DAQmxCfgChangeDetectionTiming - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgChangeDetectionTiming + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_ulonglong] - error_code = cfunc( + error_code = c_func( task, rising_edge_chan, falling_edge_chan, sample_mode, samps_per_chan) self.check_for_error(error_code) def cfg_dig_edge_ref_trig( self, task, trigger_source, pretrigger_samples, trigger_edge): - cfunc = lib_importer.windll.DAQmxCfgDigEdgeRefTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgDigEdgeRefTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int, ctypes.c_uint] - error_code = cfunc( + error_code = c_func( task, trigger_source, trigger_edge, pretrigger_samples) self.check_for_error(error_code) def cfg_dig_edge_start_trig(self, task, trigger_source, trigger_edge): - cfunc = lib_importer.windll.DAQmxCfgDigEdgeStartTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgDigEdgeStartTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, trigger_source, trigger_edge) self.check_for_error(error_code) def cfg_dig_pattern_ref_trig( self, task, trigger_source, trigger_pattern, pretrigger_samples, trigger_when): - cfunc = lib_importer.windll.DAQmxCfgDigPatternRefTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgDigPatternRefTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_uint] - error_code = cfunc( + error_code = c_func( task, trigger_source, trigger_pattern, trigger_when, pretrigger_samples) self.check_for_error(error_code) def cfg_dig_pattern_start_trig( self, task, trigger_source, trigger_pattern, trigger_when): - cfunc = lib_importer.windll.DAQmxCfgDigPatternStartTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgDigPatternStartTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, trigger_source, trigger_pattern, trigger_when) self.check_for_error(error_code) def cfg_handshaking_timing(self, task, sample_mode, samps_per_chan): - cfunc = lib_importer.windll.DAQmxCfgHandshakingTiming - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgHandshakingTiming + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_ulonglong] - error_code = cfunc( + error_code = c_func( task, sample_mode, samps_per_chan) self.check_for_error(error_code) def cfg_implicit_timing(self, task, sample_mode, samps_per_chan): - cfunc = lib_importer.windll.DAQmxCfgImplicitTiming - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgImplicitTiming + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_ulonglong] - error_code = cfunc( + error_code = c_func( task, sample_mode, samps_per_chan) self.check_for_error(error_code) def cfg_pipelined_samp_clk_timing( self, task, rate, source, active_edge, sample_mode, samps_per_chan): - cfunc = lib_importer.windll.DAQmxCfgPipelinedSampClkTiming - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgPipelinedSampClkTiming + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_ulonglong] - error_code = cfunc( + error_code = c_func( task, source, rate, active_edge, sample_mode, samps_per_chan) self.check_for_error(error_code) def cfg_samp_clk_timing( self, task, rate, source, active_edge, sample_mode, samps_per_chan): - cfunc = lib_importer.windll.DAQmxCfgSampClkTiming - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgSampClkTiming + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_ulonglong] - error_code = cfunc( + error_code = c_func( task, source, rate, active_edge, sample_mode, samps_per_chan) self.check_for_error(error_code) def cfg_time_start_trig(self, task, when, timescale): - cfunc = lib_importer.windll.DAQmxCfgTimeStartTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgTimeStartTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, AbsoluteTime, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, AbsoluteTime.from_datetime(when), timescale) self.check_for_error(error_code) def cfg_watchdog_ao_expir_states( self, task, channel_names, expir_state_array, output_type_array): - cfunc = lib_importer.windll.DAQmxCfgWatchdogAOExpirStates - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgWatchdogAOExpirStates + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, wrapped_ndpointer(dtype=numpy.float64, flags=('C')), wrapped_ndpointer(dtype=numpy.int32, flags=('C')), ctypes.c_uint] - error_code = cfunc( + error_code = c_func( task, channel_names, expir_state_array, output_type_array, len(output_type_array)) self.check_for_error(error_code) def cfg_watchdog_co_expir_states( self, task, channel_names, expir_state_array): - cfunc = lib_importer.windll.DAQmxCfgWatchdogCOExpirStates - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgWatchdogCOExpirStates + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, wrapped_ndpointer(dtype=numpy.int32, flags=('C')), ctypes.c_uint] - error_code = cfunc( + error_code = c_func( task, channel_names, expir_state_array, len(expir_state_array)) self.check_for_error(error_code) def cfg_watchdog_do_expir_states( self, task, channel_names, expir_state_array): - cfunc = lib_importer.windll.DAQmxCfgWatchdogDOExpirStates - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCfgWatchdogDOExpirStates + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, wrapped_ndpointer(dtype=numpy.int32, flags=('C')), ctypes.c_uint] - error_code = cfunc( + error_code = c_func( task, channel_names, expir_state_array, len(expir_state_array)) self.check_for_error(error_code) def clear_task(self, task): - cfunc = lib_importer.windll.DAQmxClearTask - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxClearTask + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle] - error_code = cfunc( + error_code = c_func( task) self.check_for_error(error_code) def clear_teds(self, physical_channel): - cfunc = lib_importer.windll.DAQmxClearTEDS - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxClearTEDS + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( physical_channel) self.check_for_error(error_code) def configure_logging( self, task, file_path, logging_mode, group_name, operation): - cfunc = lib_importer.windll.DAQmxConfigureLogging - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxConfigureLogging + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, file_path, logging_mode, group_name, operation) self.check_for_error(error_code) def configure_teds(self, physical_channel, file_path): - cfunc = lib_importer.windll.DAQmxConfigureTEDS - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxConfigureTEDS + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( physical_channel, file_path) self.check_for_error(error_code) def connect_terms( self, source_terminal, destination_terminal, signal_modifiers): - cfunc = lib_importer.windll.DAQmxConnectTerms - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxConnectTerms + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( source_terminal, destination_terminal, signal_modifiers) self.check_for_error(error_code) def control_watchdog_task(self, task, action): - cfunc = lib_importer.windll.DAQmxControlWatchdogTask - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxControlWatchdogTask + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, action) self.check_for_error(error_code) @@ -615,18 +615,18 @@ def create_ai_accel4_wire_dc_voltage_chan( terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, voltage_excit_source, voltage_excit_val, use_excit_for_scaling, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIAccel4WireDCVoltageChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIAccel4WireDCVoltageChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, c_bool32, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, voltage_excit_source, voltage_excit_val, @@ -638,18 +638,18 @@ def create_ai_accel_chan( terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, current_excit_source, current_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIAccelChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIAccelChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, current_excit_source, current_excit_val, @@ -660,17 +660,17 @@ def create_ai_accel_charge_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIAccelChargeChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIAccelChargeChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, custom_scale_name) @@ -680,17 +680,17 @@ def create_ai_bridge_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIBridgeChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIBridgeChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, custom_scale_name) @@ -701,18 +701,18 @@ def create_ai_calculated_power_chan( name_to_assign_to_channel, terminal_config, voltage_min_val, voltage_max_val, current_min_val, current_max_val, units, shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAICalculatedPowerChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAICalculatedPowerChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, voltage_physical_channel, current_physical_channel, name_to_assign_to_channel, terminal_config, voltage_min_val, voltage_max_val, current_min_val, current_max_val, units, @@ -722,16 +722,16 @@ def create_ai_calculated_power_chan( def create_ai_charge_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIChargeChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIChargeChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, custom_scale_name) self.check_for_error(error_code) @@ -740,17 +740,17 @@ def create_ai_current_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAICurrentChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAICurrentChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name) @@ -760,17 +760,17 @@ def create_ai_current_rms_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAICurrentRMSChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAICurrentRMSChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name) @@ -782,11 +782,11 @@ def create_ai_force_bridge_polynomial_chan( voltage_excit_val, nominal_bridge_resistance, forward_coeffs, reverse_coeffs, electrical_units, physical_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIForceBridgePolynomialChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIForceBridgePolynomialChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -796,7 +796,7 @@ def create_ai_force_bridge_polynomial_chan( flags=('C')), ctypes.c_uint, ctypes.c_int, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, forward_coeffs, @@ -810,11 +810,11 @@ def create_ai_force_bridge_table_chan( voltage_excit_val, nominal_bridge_resistance, electrical_vals, electrical_units, physical_vals, physical_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIForceBridgeTableChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIForceBridgeTableChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -824,7 +824,7 @@ def create_ai_force_bridge_table_chan( wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, electrical_vals, @@ -839,11 +839,11 @@ def create_ai_force_bridge_two_point_lin_chan( first_electrical_val, second_electrical_val, electrical_units, first_physical_val, second_physical_val, physical_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIForceBridgeTwoPointLinChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIForceBridgeTwoPointLinChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -851,7 +851,7 @@ def create_ai_force_bridge_two_point_lin_chan( ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, @@ -865,18 +865,18 @@ def create_ai_force_iepe_chan( terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, current_excit_source, current_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIForceIEPEChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIForceIEPEChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, current_excit_source, current_excit_val, @@ -886,17 +886,17 @@ def create_ai_force_iepe_chan( def create_ai_freq_voltage_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, threshold_level, hysteresis, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIFreqVoltageChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIFreqVoltageChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, threshold_level, hysteresis, custom_scale_name) self.check_for_error(error_code) @@ -905,17 +905,17 @@ def create_ai_microphone_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, units, mic_sensitivity, max_snd_press_level, current_excit_source, current_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIMicrophoneChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIMicrophoneChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, units, mic_sensitivity, max_snd_press_level, current_excit_source, current_excit_val, custom_scale_name) @@ -925,17 +925,17 @@ def create_ai_pos_eddy_curr_prox_probe_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, sensitivity, sensitivity_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIPosEddyCurrProxProbeChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIPosEddyCurrProxProbeChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, sensitivity, sensitivity_units, custom_scale_name) self.check_for_error(error_code) @@ -945,18 +945,18 @@ def create_ai_pos_lvdt_chan( max_val, units, sensitivity, sensitivity_units, voltage_excit_source, voltage_excit_val, voltage_excit_freq, ac_excit_wire_mode, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIPosLVDTChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIPosLVDTChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, sensitivity, sensitivity_units, voltage_excit_source, voltage_excit_val, voltage_excit_freq, @@ -968,18 +968,18 @@ def create_ai_pos_rvdt_chan( max_val, units, sensitivity, sensitivity_units, voltage_excit_source, voltage_excit_val, voltage_excit_freq, ac_excit_wire_mode, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIPosRVDTChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIPosRVDTChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, sensitivity, sensitivity_units, voltage_excit_source, voltage_excit_val, voltage_excit_freq, @@ -989,16 +989,16 @@ def create_ai_pos_rvdt_chan( def create_ai_power_chan( self, task, physical_channel, voltage_setpoint, current_setpoint, output_enable, name_to_assign_to_channel): - cfunc = lib_importer.windll.DAQmxCreateAIPowerChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIPowerChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, c_bool32] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, voltage_setpoint, current_setpoint, output_enable) self.check_for_error(error_code) @@ -1009,11 +1009,11 @@ def create_ai_pressure_bridge_polynomial_chan( voltage_excit_val, nominal_bridge_resistance, forward_coeffs, reverse_coeffs, electrical_units, physical_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIPressureBridgePolynomialChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIPressureBridgePolynomialChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -1023,7 +1023,7 @@ def create_ai_pressure_bridge_polynomial_chan( flags=('C')), ctypes.c_uint, ctypes.c_int, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, forward_coeffs, @@ -1037,11 +1037,11 @@ def create_ai_pressure_bridge_table_chan( voltage_excit_val, nominal_bridge_resistance, electrical_vals, electrical_units, physical_vals, physical_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIPressureBridgeTableChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIPressureBridgeTableChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -1051,7 +1051,7 @@ def create_ai_pressure_bridge_table_chan( wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, electrical_vals, @@ -1066,11 +1066,11 @@ def create_ai_pressure_bridge_two_point_lin_chan( first_electrical_val, second_electrical_val, electrical_units, first_physical_val, second_physical_val, physical_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIPressureBridgeTwoPointLinChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIPressureBridgeTwoPointLinChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -1078,7 +1078,7 @@ def create_ai_pressure_bridge_two_point_lin_chan( ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, @@ -1091,17 +1091,17 @@ def create_ai_resistance_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIResistanceChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIResistanceChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val, custom_scale_name) @@ -1113,11 +1113,11 @@ def create_ai_rosette_strain_gage_chan( strain_config, voltage_excit_source, voltage_excit_val, gage_factor, nominal_gage_resistance, poisson_ratio, lead_wire_resistance): - cfunc = lib_importer.windll.DAQmxCreateAIRosetteStrainGageChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIRosetteStrainGageChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, @@ -1126,7 +1126,7 @@ def create_ai_rosette_strain_gage_chan( ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, rosette_type, gage_orientation, rosette_meas_types, len(rosette_meas_types), strain_config, voltage_excit_source, @@ -1140,11 +1140,11 @@ def create_ai_strain_gage_chan( voltage_excit_val, gage_factor, initial_bridge_voltage, nominal_gage_resistance, poisson_ratio, lead_wire_resistance, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIStrainGageChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIStrainGageChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -1152,7 +1152,7 @@ def create_ai_strain_gage_chan( ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, strain_config, voltage_excit_source, voltage_excit_val, gage_factor, initial_bridge_voltage, @@ -1162,15 +1162,15 @@ def create_ai_strain_gage_chan( def create_ai_temp_built_in_sensor_chan( self, task, physical_channel, name_to_assign_to_channel, units): - cfunc = lib_importer.windll.DAQmxCreateAITempBuiltInSensorChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAITempBuiltInSensorChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, units) self.check_for_error(error_code) @@ -1178,17 +1178,17 @@ def create_ai_thrmcpl_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, thermocouple_type, cjc_source, cjc_val, cjc_channel): - cfunc = lib_importer.windll.DAQmxCreateAIThrmcplChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIThrmcplChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, thermocouple_type, cjc_source, cjc_val, cjc_channel) @@ -1198,18 +1198,18 @@ def create_ai_thrmstr_chan_iex( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val, a, b, c): - cfunc = lib_importer.windll.DAQmxCreateAIThrmstrChanIex - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIThrmstrChanIex + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val, a, b, c) @@ -1219,18 +1219,18 @@ def create_ai_thrmstr_chan_vex( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, voltage_excit_source, voltage_excit_val, a, b, c, r_1): - cfunc = lib_importer.windll.DAQmxCreateAIThrmstrChanVex - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIThrmstrChanVex + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, voltage_excit_source, voltage_excit_val, a, b, c, r_1) @@ -1242,11 +1242,11 @@ def create_ai_torque_bridge_polynomial_chan( voltage_excit_val, nominal_bridge_resistance, forward_coeffs, reverse_coeffs, electrical_units, physical_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAITorqueBridgePolynomialChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAITorqueBridgePolynomialChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -1256,7 +1256,7 @@ def create_ai_torque_bridge_polynomial_chan( flags=('C')), ctypes.c_uint, ctypes.c_int, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, forward_coeffs, @@ -1270,11 +1270,11 @@ def create_ai_torque_bridge_table_chan( voltage_excit_val, nominal_bridge_resistance, electrical_vals, electrical_units, physical_vals, physical_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAITorqueBridgeTableChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAITorqueBridgeTableChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -1284,7 +1284,7 @@ def create_ai_torque_bridge_table_chan( wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, electrical_vals, @@ -1299,11 +1299,11 @@ def create_ai_torque_bridge_two_point_lin_chan( first_electrical_val, second_electrical_val, electrical_units, first_physical_val, second_physical_val, physical_units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAITorqueBridgeTwoPointLinChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAITorqueBridgeTwoPointLinChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, @@ -1311,7 +1311,7 @@ def create_ai_torque_bridge_two_point_lin_chan( ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, nominal_bridge_resistance, @@ -1325,18 +1325,18 @@ def create_ai_velocity_iepe_chan( terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, current_excit_source, current_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIVelocityIEPEChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIVelocityIEPEChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, sensitivity, sensitivity_units, current_excit_source, current_excit_val, @@ -1346,16 +1346,16 @@ def create_ai_velocity_iepe_chan( def create_ai_voltage_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIVoltageChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIVoltageChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, custom_scale_name) self.check_for_error(error_code) @@ -1365,18 +1365,18 @@ def create_ai_voltage_chan_with_excit( terminal_config, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, use_excit_for_scaling, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIVoltageChanWithExcit - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIVoltageChanWithExcit + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, c_bool32, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, bridge_config, voltage_excit_source, voltage_excit_val, use_excit_for_scaling, @@ -1386,16 +1386,16 @@ def create_ai_voltage_chan_with_excit( def create_ai_voltage_rms_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAIVoltageRMSChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIVoltageRMSChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, custom_scale_name) self.check_for_error(error_code) @@ -1404,17 +1404,17 @@ def create_airtd_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, rtd_type, resistance_config, current_excit_source, current_excit_val, r_0): - cfunc = lib_importer.windll.DAQmxCreateAIRTDChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAIRTDChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, rtd_type, resistance_config, current_excit_source, current_excit_val, r_0) @@ -1423,16 +1423,16 @@ def create_airtd_chan( def create_ao_current_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAOCurrentChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAOCurrentChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, custom_scale_name) self.check_for_error(error_code) @@ -1440,16 +1440,16 @@ def create_ao_current_chan( def create_ao_func_gen_chan( self, task, physical_channel, name_to_assign_to_channel, type, freq, amplitude, offset): - cfunc = lib_importer.windll.DAQmxCreateAOFuncGenChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAOFuncGenChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, type, freq, amplitude, offset) self.check_for_error(error_code) @@ -1457,16 +1457,16 @@ def create_ao_func_gen_chan( def create_ao_voltage_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateAOVoltageChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateAOVoltageChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, custom_scale_name) self.check_for_error(error_code) @@ -1475,17 +1475,17 @@ def create_ci_ang_encoder_chan( self, task, counter, name_to_assign_to_channel, decoding_type, zidx_enable, zidx_val, zidx_phase, units, pulses_per_rev, initial_angle, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCIAngEncoderChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIAngEncoderChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_uint, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, decoding_type, zidx_enable, zidx_val, zidx_phase, units, pulses_per_rev, initial_angle, custom_scale_name) @@ -1494,17 +1494,17 @@ def create_ci_ang_encoder_chan( def create_ci_ang_velocity_chan( self, task, counter, name_to_assign_to_channel, min_val, max_val, decoding_type, units, pulses_per_rev, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCIAngVelocityChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIAngVelocityChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_uint, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_val, max_val, decoding_type, units, pulses_per_rev, custom_scale_name) self.check_for_error(error_code) @@ -1512,16 +1512,16 @@ def create_ci_ang_velocity_chan( def create_ci_count_edges_chan( self, task, counter, name_to_assign_to_channel, edge, initial_count, count_direction): - cfunc = lib_importer.windll.DAQmxCreateCICountEdgesChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCICountEdgesChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_uint, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, edge, initial_count, count_direction) self.check_for_error(error_code) @@ -1529,16 +1529,16 @@ def create_ci_count_edges_chan( def create_ci_duty_cycle_chan( self, task, counter, name_to_assign_to_channel, min_freq, max_freq, edge, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCIDutyCycleChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIDutyCycleChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_freq, max_freq, edge, custom_scale_name) self.check_for_error(error_code) @@ -1546,17 +1546,17 @@ def create_ci_duty_cycle_chan( def create_ci_freq_chan( self, task, counter, name_to_assign_to_channel, min_val, max_val, units, edge, meas_method, meas_time, divisor, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCIFreqChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIFreqChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_uint, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_val, max_val, units, edge, meas_method, meas_time, divisor, custom_scale_name) self.check_for_error(error_code) @@ -1565,17 +1565,17 @@ def create_ci_lin_encoder_chan( self, task, counter, name_to_assign_to_channel, decoding_type, zidx_enable, zidx_val, zidx_phase, units, dist_per_pulse, initial_pos, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCILinEncoderChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCILinEncoderChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, decoding_type, zidx_enable, zidx_val, zidx_phase, units, dist_per_pulse, initial_pos, custom_scale_name) @@ -1584,17 +1584,17 @@ def create_ci_lin_encoder_chan( def create_ci_lin_velocity_chan( self, task, counter, name_to_assign_to_channel, min_val, max_val, decoding_type, units, dist_per_pulse, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCILinVelocityChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCILinVelocityChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_val, max_val, decoding_type, units, dist_per_pulse, custom_scale_name) self.check_for_error(error_code) @@ -1602,17 +1602,17 @@ def create_ci_lin_velocity_chan( def create_ci_period_chan( self, task, counter, name_to_assign_to_channel, min_val, max_val, units, edge, meas_method, meas_time, divisor, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCIPeriodChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIPeriodChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_uint, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_val, max_val, units, edge, meas_method, meas_time, divisor, custom_scale_name) self.check_for_error(error_code) @@ -1620,32 +1620,32 @@ def create_ci_period_chan( def create_ci_pulse_chan_freq( self, task, counter, name_to_assign_to_channel, min_val, max_val, units): - cfunc = lib_importer.windll.DAQmxCreateCIPulseChanFreq - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIPulseChanFreq + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_val, max_val, units) self.check_for_error(error_code) def create_ci_pulse_chan_ticks( self, task, counter, name_to_assign_to_channel, source_terminal, min_val, max_val): - cfunc = lib_importer.windll.DAQmxCreateCIPulseChanTicks - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIPulseChanTicks + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, source_terminal, min_val, max_val) self.check_for_error(error_code) @@ -1653,32 +1653,32 @@ def create_ci_pulse_chan_ticks( def create_ci_pulse_chan_time( self, task, counter, name_to_assign_to_channel, min_val, max_val, units): - cfunc = lib_importer.windll.DAQmxCreateCIPulseChanTime - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIPulseChanTime + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_val, max_val, units) self.check_for_error(error_code) def create_ci_pulse_width_chan( self, task, counter, name_to_assign_to_channel, min_val, max_val, units, starting_edge, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCIPulseWidthChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIPulseWidthChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_val, max_val, units, starting_edge, custom_scale_name) self.check_for_error(error_code) @@ -1686,16 +1686,16 @@ def create_ci_pulse_width_chan( def create_ci_semi_period_chan( self, task, counter, name_to_assign_to_channel, min_val, max_val, units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCISemiPeriodChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCISemiPeriodChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_val, max_val, units, custom_scale_name) self.check_for_error(error_code) @@ -1703,17 +1703,17 @@ def create_ci_semi_period_chan( def create_ci_two_edge_sep_chan( self, task, counter, name_to_assign_to_channel, min_val, max_val, units, first_edge, second_edge, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCITwoEdgeSepChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCITwoEdgeSepChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, min_val, max_val, units, first_edge, second_edge, custom_scale_name) self.check_for_error(error_code) @@ -1721,16 +1721,16 @@ def create_ci_two_edge_sep_chan( def create_cigps_timestamp_chan( self, task, counter, name_to_assign_to_channel, units, sync_method, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateCIGPSTimestampChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCIGPSTimestampChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, units, sync_method, custom_scale_name) self.check_for_error(error_code) @@ -1738,16 +1738,16 @@ def create_cigps_timestamp_chan( def create_co_pulse_chan_freq( self, task, counter, name_to_assign_to_channel, units, idle_state, initial_delay, freq, duty_cycle): - cfunc = lib_importer.windll.DAQmxCreateCOPulseChanFreq - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCOPulseChanFreq + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, units, idle_state, initial_delay, freq, duty_cycle) self.check_for_error(error_code) @@ -1755,16 +1755,16 @@ def create_co_pulse_chan_freq( def create_co_pulse_chan_ticks( self, task, counter, source_terminal, name_to_assign_to_channel, idle_state, initial_delay, low_ticks, high_ticks): - cfunc = lib_importer.windll.DAQmxCreateCOPulseChanTicks - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCOPulseChanTicks + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, source_terminal, idle_state, initial_delay, low_ticks, high_ticks) self.check_for_error(error_code) @@ -1772,75 +1772,75 @@ def create_co_pulse_chan_ticks( def create_co_pulse_chan_time( self, task, counter, name_to_assign_to_channel, units, idle_state, initial_delay, low_time, high_time): - cfunc = lib_importer.windll.DAQmxCreateCOPulseChanTime - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateCOPulseChanTime + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, counter, name_to_assign_to_channel, units, idle_state, initial_delay, low_time, high_time) self.check_for_error(error_code) def create_di_chan( self, task, lines, name_to_assign_to_lines, line_grouping): - cfunc = lib_importer.windll.DAQmxCreateDIChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateDIChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, lines, name_to_assign_to_lines, line_grouping) self.check_for_error(error_code) def create_do_chan( self, task, lines, name_to_assign_to_lines, line_grouping): - cfunc = lib_importer.windll.DAQmxCreateDOChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateDOChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, lines, name_to_assign_to_lines, line_grouping) self.check_for_error(error_code) def create_lin_scale( self, name, slope, y_intercept, pre_scaled_units, scaled_units): - cfunc = lib_importer.windll.DAQmxCreateLinScale - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateLinScale + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( name, slope, y_intercept, pre_scaled_units, scaled_units) self.check_for_error(error_code) def create_map_scale( self, name, prescaled_min, prescaled_max, scaled_min, scaled_max, pre_scaled_units, scaled_units): - cfunc = lib_importer.windll.DAQmxCreateMapScale - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateMapScale + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( name, prescaled_min, prescaled_max, scaled_min, scaled_max, pre_scaled_units, scaled_units) self.check_for_error(error_code) @@ -1848,18 +1848,18 @@ def create_map_scale( def create_polynomial_scale( self, name, forward_coeffs, reverse_coeffs, pre_scaled_units, scaled_units): - cfunc = lib_importer.windll.DAQmxCreatePolynomialScale - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreatePolynomialScale + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint, wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( name, forward_coeffs, len(forward_coeffs), reverse_coeffs, len(reverse_coeffs), pre_scaled_units, scaled_units) self.check_for_error(error_code) @@ -1867,18 +1867,18 @@ def create_polynomial_scale( def create_table_scale( self, name, prescaled_vals, scaled_vals, pre_scaled_units, scaled_units): - cfunc = lib_importer.windll.DAQmxCreateTableScale - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTableScale + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint, wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.c_uint, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( name, prescaled_vals, len(prescaled_vals), scaled_vals, len(scaled_vals), pre_scaled_units, scaled_units) self.check_for_error(error_code) @@ -1887,15 +1887,15 @@ def create_task(self, session_name): new_session_initialized = True task = lib_importer.task_handle(0) - cfunc = lib_importer.windll.DAQmxCreateTask - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTask + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.POINTER(lib_importer.task_handle)] - error_code = cfunc( + error_code = c_func( session_name, ctypes.byref(task)) self.check_for_error(error_code) return task, new_session_initialized @@ -1904,17 +1904,17 @@ def create_tedsai_accel_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, current_excit_source, current_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIAccelChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIAccelChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, current_excit_source, current_excit_val, custom_scale_name) @@ -1924,17 +1924,17 @@ def create_tedsai_bridge_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIBridgeChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIBridgeChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name) @@ -1944,17 +1944,17 @@ def create_tedsai_current_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAICurrentChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAICurrentChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name) @@ -1964,17 +1964,17 @@ def create_tedsai_force_bridge_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIForceBridgeChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIForceBridgeChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name) @@ -1984,17 +1984,17 @@ def create_tedsai_force_iepe_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, current_excit_source, current_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIForceIEPEChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIForceIEPEChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, current_excit_source, current_excit_val, custom_scale_name) @@ -2004,17 +2004,17 @@ def create_tedsai_microphone_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, units, max_snd_press_level, current_excit_source, current_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIMicrophoneChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIMicrophoneChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, units, max_snd_press_level, current_excit_source, current_excit_val, custom_scale_name) @@ -2024,17 +2024,17 @@ def create_tedsai_pos_lvdt_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, voltage_excit_freq, ac_excit_wire_mode, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIPosLVDTChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIPosLVDTChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, voltage_excit_freq, ac_excit_wire_mode, custom_scale_name) @@ -2044,17 +2044,17 @@ def create_tedsai_pos_rvdt_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, voltage_excit_freq, ac_excit_wire_mode, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIPosRVDTChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIPosRVDTChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, voltage_excit_freq, ac_excit_wire_mode, custom_scale_name) @@ -2064,17 +2064,17 @@ def create_tedsai_pressure_bridge_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIPressureBridgeChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIPressureBridgeChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name) @@ -2084,17 +2084,17 @@ def create_tedsai_resistance_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIResistanceChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIResistanceChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val, custom_scale_name) @@ -2104,17 +2104,17 @@ def create_tedsai_strain_gage_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, initial_bridge_voltage, lead_wire_resistance, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIStrainGageChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIStrainGageChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, initial_bridge_voltage, lead_wire_resistance, custom_scale_name) @@ -2123,17 +2123,17 @@ def create_tedsai_strain_gage_chan( def create_tedsai_thrmcpl_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, cjc_source, cjc_val, cjc_channel): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIThrmcplChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIThrmcplChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, cjc_source, cjc_val, cjc_channel) self.check_for_error(error_code) @@ -2142,17 +2142,17 @@ def create_tedsai_thrmstr_chan_iex( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIThrmstrChanIex - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIThrmstrChanIex + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val) @@ -2162,17 +2162,17 @@ def create_tedsai_thrmstr_chan_vex( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, voltage_excit_source, voltage_excit_val, r_1): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIThrmstrChanVex - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIThrmstrChanVex + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, voltage_excit_source, voltage_excit_val, r_1) @@ -2182,17 +2182,17 @@ def create_tedsai_torque_bridge_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAITorqueBridgeChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAITorqueBridgeChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name) @@ -2201,16 +2201,16 @@ def create_tedsai_torque_bridge_chan( def create_tedsai_voltage_chan( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIVoltageChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIVoltageChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, custom_scale_name) self.check_for_error(error_code) @@ -2219,17 +2219,17 @@ def create_tedsai_voltage_chan_with_excit( self, task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIVoltageChanWithExcit - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIVoltageChanWithExcit + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_int, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_double, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, terminal_config, min_val, max_val, units, voltage_excit_source, voltage_excit_val, custom_scale_name) @@ -2239,17 +2239,17 @@ def create_tedsairtd_chan( self, task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val): - cfunc = lib_importer.windll.DAQmxCreateTEDSAIRTDChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateTEDSAIRTDChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_double, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, physical_channel, name_to_assign_to_channel, min_val, max_val, units, resistance_config, current_excit_source, current_excit_val) @@ -2260,129 +2260,129 @@ def create_watchdog_timer_task_ex( new_session_initialized = True task = lib_importer.task_handle(0) - cfunc = lib_importer.windll.DAQmxCreateWatchdogTimerTaskEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxCreateWatchdogTimerTaskEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str, ctypes.POINTER(lib_importer.task_handle), ctypes.c_double] - error_code = cfunc( + error_code = c_func( device_name, session_name, ctypes.byref(task), timeout) self.check_for_error(error_code) return task, new_session_initialized def delete_network_device(self, device_name): - cfunc = lib_importer.windll.DAQmxDeleteNetworkDevice - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxDeleteNetworkDevice + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( device_name) self.check_for_error(error_code) def delete_saved_global_chan(self, channel_name): - cfunc = lib_importer.windll.DAQmxDeleteSavedGlobalChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxDeleteSavedGlobalChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( channel_name) self.check_for_error(error_code) def delete_saved_scale(self, scale_name): - cfunc = lib_importer.windll.DAQmxDeleteSavedScale - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxDeleteSavedScale + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( scale_name) self.check_for_error(error_code) def delete_saved_task(self, task_name): - cfunc = lib_importer.windll.DAQmxDeleteSavedTask - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxDeleteSavedTask + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task_name) self.check_for_error(error_code) def device_supports_cal(self, device_name): cal_supported = c_bool32() - cfunc = lib_importer.windll.DAQmxDeviceSupportsCal - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxDeviceSupportsCal + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( device_name, ctypes.byref(cal_supported)) self.check_for_error(error_code) return cal_supported.value def disable_ref_trig(self, task): - cfunc = lib_importer.windll.DAQmxDisableRefTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxDisableRefTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle] - error_code = cfunc( + error_code = c_func( task) self.check_for_error(error_code) def disable_start_trig(self, task): - cfunc = lib_importer.windll.DAQmxDisableStartTrig - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxDisableStartTrig + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle] - error_code = cfunc( + error_code = c_func( task) self.check_for_error(error_code) def disconnect_terms(self, source_terminal, destination_terminal): - cfunc = lib_importer.windll.DAQmxDisconnectTerms - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxDisconnectTerms + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( source_terminal, destination_terminal) self.check_for_error(error_code) def export_signal(self, task, signal_id, output_terminal): - cfunc = lib_importer.windll.DAQmxExportSignal - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxExportSignal + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, signal_id, output_terminal) self.check_for_error(error_code) @@ -2392,34 +2392,34 @@ def get_analog_power_up_states_with_output_type( channel_type_array = numpy.zeros(array_size, dtype=numpy.int32) array_size = ctypes.c_uint32(array_size) - cfunc = lib_importer.cdll.DAQmxGetAnalogPowerUpStatesWithOutputType - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetAnalogPowerUpStatesWithOutputType + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, wrapped_ndpointer(dtype=numpy.float64, flags=('C','W')), wrapped_ndpointer(dtype=numpy.int32, flags=('C','W')), ctypes.POINTER(ctypes.c_uint)] - error_code = cfunc( + error_code = c_func( channel_names, state_array, channel_type_array, ctypes.byref(array_size)) self.check_for_error(error_code) return state_array.tolist(), channel_type_array.tolist() def get_auto_configured_cdaq_sync_connections(self): - cfunc = lib_importer.windll.DAQmxGetAutoConfiguredCDAQSyncConnections - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxGetAutoConfiguredCDAQSyncConnections + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes.c_char_p, ctypes.c_uint] temp_size = 0 while True: port_list = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( port_list, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -2435,14 +2435,14 @@ def get_auto_configured_cdaq_sync_connections(self): def get_buffer_attribute_uint32(self, task, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetBufferAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetBufferAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -2450,14 +2450,14 @@ def get_buffer_attribute_uint32(self, task, attribute): def get_cal_info_attribute_bool(self, device_name, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetCalInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetCalInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -2465,30 +2465,30 @@ def get_cal_info_attribute_bool(self, device_name, attribute): def get_cal_info_attribute_double(self, device_name, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetCalInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetCalInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_cal_info_attribute_string(self, device_name, attribute): - cfunc = lib_importer.cdll.DAQmxGetCalInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetCalInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( device_name, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -2504,14 +2504,14 @@ def get_cal_info_attribute_string(self, device_name, attribute): def get_cal_info_attribute_uint32(self, device_name, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetCalInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetCalInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -2519,15 +2519,15 @@ def get_cal_info_attribute_uint32(self, device_name, attribute): def get_chan_attribute_bool(self, task, channel, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -2535,32 +2535,32 @@ def get_chan_attribute_bool(self, task, channel, attribute): def get_chan_attribute_double(self, task, channel, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_chan_attribute_double_array(self, task, channel, attribute): - cfunc = lib_importer.cdll.DAQmxGetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.float64) - size_or_code = cfunc( + size_or_code = c_func( task, channel, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -2577,32 +2577,32 @@ def get_chan_attribute_double_array(self, task, channel, attribute): def get_chan_attribute_int32(self, task, channel, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_chan_attribute_string(self, task, channel, attribute): - cfunc = lib_importer.cdll.DAQmxGetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task, channel, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -2618,15 +2618,15 @@ def get_chan_attribute_string(self, task, channel, attribute): def get_chan_attribute_uint32(self, task, channel, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -2634,14 +2634,14 @@ def get_chan_attribute_uint32(self, task, channel, attribute): def get_device_attribute_bool(self, device_name, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetDeviceAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetDeviceAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -2649,30 +2649,30 @@ def get_device_attribute_bool(self, device_name, attribute): def get_device_attribute_double(self, device_name, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetDeviceAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetDeviceAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_device_attribute_double_array(self, device_name, attribute): - cfunc = lib_importer.cdll.DAQmxGetDeviceAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetDeviceAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.float64) - size_or_code = cfunc( + size_or_code = c_func( device_name, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -2689,30 +2689,30 @@ def get_device_attribute_double_array(self, device_name, attribute): def get_device_attribute_int32(self, device_name, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetDeviceAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetDeviceAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_device_attribute_int32_array(self, device_name, attribute): - cfunc = lib_importer.cdll.DAQmxGetDeviceAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetDeviceAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.int32) - size_or_code = cfunc( + size_or_code = c_func( device_name, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -2727,17 +2727,17 @@ def get_device_attribute_int32_array(self, device_name, attribute): return value.tolist() def get_device_attribute_string(self, device_name, attribute): - cfunc = lib_importer.cdll.DAQmxGetDeviceAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetDeviceAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( device_name, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -2753,30 +2753,30 @@ def get_device_attribute_string(self, device_name, attribute): def get_device_attribute_uint32(self, device_name, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetDeviceAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetDeviceAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_device_attribute_uint32_array(self, device_name, attribute): - cfunc = lib_importer.cdll.DAQmxGetDeviceAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetDeviceAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.uint32) - size_or_code = cfunc( + size_or_code = c_func( device_name, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -2793,14 +2793,14 @@ def get_device_attribute_uint32_array(self, device_name, attribute): def get_digital_logic_family_power_up_state(self, device_name): logic_family = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxGetDigitalLogicFamilyPowerUpState - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxGetDigitalLogicFamilyPowerUpState + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.POINTER(ctypes.c_int)] - error_code = cfunc( + error_code = c_func( device_name, ctypes.byref(logic_family)) self.check_for_error(error_code) return logic_family.value @@ -2824,10 +2824,10 @@ def get_digital_power_up_states(self, device_name, channel_name): args.append(None) argtypes.append(ctypes.c_void_p) - cfunc = lib_importer.cdll.DAQmxGetDigitalPowerUpStates - with cfunc.arglock: - cfunc.argtypes = argtypes - error_code = cfunc(*args) + c_func = lib_importer.cdll.DAQmxGetDigitalPowerUpStates + with c_func.arg_lock: + c_func.argtypes = argtypes + error_code = c_func(*args) self.check_for_error(error_code) return [state_element.value for state_element in state] @@ -2850,25 +2850,25 @@ def get_digital_pull_up_pull_down_states(self, device_name, channel_name): args.append(None) argtypes.append(ctypes.c_void_p) - cfunc = lib_importer.cdll.DAQmxGetDigitalPullUpPullDownStates - with cfunc.arglock: - cfunc.argtypes = argtypes - error_code = cfunc(*args) + c_func = lib_importer.cdll.DAQmxGetDigitalPullUpPullDownStates + with c_func.arg_lock: + c_func.argtypes = argtypes + error_code = c_func(*args) self.check_for_error(error_code) return [state_element.value for state_element in state] def get_disconnected_cdaq_sync_ports(self): - cfunc = lib_importer.windll.DAQmxGetDisconnectedCDAQSyncPorts - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxGetDisconnectedCDAQSyncPorts + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes.c_char_p, ctypes.c_uint] temp_size = 0 while True: port_list = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( port_list, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -2884,14 +2884,14 @@ def get_disconnected_cdaq_sync_ports(self): def get_exported_signal_attribute_bool(self, task, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -2899,14 +2899,14 @@ def get_exported_signal_attribute_bool(self, task, attribute): def get_exported_signal_attribute_double(self, task, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -2914,30 +2914,30 @@ def get_exported_signal_attribute_double(self, task, attribute): def get_exported_signal_attribute_int32(self, task, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_exported_signal_attribute_string(self, task, attribute): - cfunc = lib_importer.cdll.DAQmxGetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -2953,14 +2953,14 @@ def get_exported_signal_attribute_string(self, task, attribute): def get_exported_signal_attribute_uint32(self, task, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -2972,18 +2972,18 @@ def get_ext_cal_last_date_and_time(self, device_name): hour = ctypes.c_uint() minute = ctypes.c_uint() - cfunc = lib_importer.windll.DAQmxGetExtCalLastDateAndTime - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxGetExtCalLastDateAndTime + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint)] - error_code = cfunc( + error_code = c_func( device_name, ctypes.byref(year), ctypes.byref(month), ctypes.byref(day), ctypes.byref(hour), ctypes.byref(minute)) self.check_for_error(error_code) @@ -2992,30 +2992,30 @@ def get_ext_cal_last_date_and_time(self, device_name): def get_persisted_chan_attribute_bool(self, channel, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetPersistedChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPersistedChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( channel, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_persisted_chan_attribute_string(self, channel, attribute): - cfunc = lib_importer.cdll.DAQmxGetPersistedChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPersistedChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( channel, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3031,30 +3031,30 @@ def get_persisted_chan_attribute_string(self, channel, attribute): def get_persisted_scale_attribute_bool(self, scale_name, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetPersistedScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPersistedScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( scale_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_persisted_scale_attribute_string(self, scale_name, attribute): - cfunc = lib_importer.cdll.DAQmxGetPersistedScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPersistedScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( scale_name, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3070,30 +3070,30 @@ def get_persisted_scale_attribute_string(self, scale_name, attribute): def get_persisted_task_attribute_bool(self, task_name, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetPersistedTaskAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPersistedTaskAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_persisted_task_attribute_string(self, task_name, attribute): - cfunc = lib_importer.cdll.DAQmxGetPersistedTaskAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPersistedTaskAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task_name, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3109,30 +3109,30 @@ def get_persisted_task_attribute_string(self, task_name, attribute): def get_physical_chan_attribute_bool(self, physical_channel, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetPhysicalChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPhysicalChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( physical_channel, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_physical_chan_attribute_bytes(self, physical_channel, attribute): - cfunc = lib_importer.cdll.DAQmxGetPhysicalChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPhysicalChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.uint8) - size_or_code = cfunc( + size_or_code = c_func( physical_channel, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -3149,31 +3149,31 @@ def get_physical_chan_attribute_bytes(self, physical_channel, attribute): def get_physical_chan_attribute_double(self, physical_channel, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetPhysicalChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPhysicalChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( physical_channel, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_physical_chan_attribute_double_array( self, physical_channel, attribute): - cfunc = lib_importer.cdll.DAQmxGetPhysicalChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPhysicalChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.float64) - size_or_code = cfunc( + size_or_code = c_func( physical_channel, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -3190,31 +3190,31 @@ def get_physical_chan_attribute_double_array( def get_physical_chan_attribute_int32(self, physical_channel, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetPhysicalChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPhysicalChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( physical_channel, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_physical_chan_attribute_int32_array( self, physical_channel, attribute): - cfunc = lib_importer.cdll.DAQmxGetPhysicalChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPhysicalChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.int32) - size_or_code = cfunc( + size_or_code = c_func( physical_channel, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -3229,17 +3229,17 @@ def get_physical_chan_attribute_int32_array( return value.tolist() def get_physical_chan_attribute_string(self, physical_channel, attribute): - cfunc = lib_importer.cdll.DAQmxGetPhysicalChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPhysicalChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( physical_channel, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3255,31 +3255,31 @@ def get_physical_chan_attribute_string(self, physical_channel, attribute): def get_physical_chan_attribute_uint32(self, physical_channel, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetPhysicalChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPhysicalChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( physical_channel, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_physical_chan_attribute_uint32_array( self, physical_channel, attribute): - cfunc = lib_importer.cdll.DAQmxGetPhysicalChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetPhysicalChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.uint32) - size_or_code = cfunc( + size_or_code = c_func( physical_channel, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -3296,14 +3296,14 @@ def get_physical_chan_attribute_uint32_array( def get_read_attribute_bool(self, task, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3311,14 +3311,14 @@ def get_read_attribute_bool(self, task, attribute): def get_read_attribute_double(self, task, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3326,30 +3326,30 @@ def get_read_attribute_double(self, task, attribute): def get_read_attribute_int32(self, task, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_read_attribute_string(self, task, attribute, size_hint=0): - cfunc = lib_importer.cdll.DAQmxGetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] temp_size = size_hint while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3365,14 +3365,14 @@ def get_read_attribute_string(self, task, attribute, size_hint=0): def get_read_attribute_uint32(self, task, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3380,14 +3380,14 @@ def get_read_attribute_uint32(self, task, attribute): def get_read_attribute_uint64(self, task, attribute): value = ctypes.c_uint64() - cfunc = lib_importer.cdll.DAQmxGetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3395,30 +3395,30 @@ def get_read_attribute_uint64(self, task, attribute): def get_scale_attribute_double(self, scale_name, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( scale_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_scale_attribute_double_array(self, scale_name, attribute): - cfunc = lib_importer.cdll.DAQmxGetScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.float64) - size_or_code = cfunc( + size_or_code = c_func( scale_name, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -3435,30 +3435,30 @@ def get_scale_attribute_double_array(self, scale_name, attribute): def get_scale_attribute_int32(self, scale_name, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( scale_name, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_scale_attribute_string(self, scale_name, attribute): - cfunc = lib_importer.cdll.DAQmxGetScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( scale_name, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3478,35 +3478,35 @@ def get_self_cal_last_date_and_time(self, device_name): hour = ctypes.c_uint() minute = ctypes.c_uint() - cfunc = lib_importer.windll.DAQmxGetSelfCalLastDateAndTime - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxGetSelfCalLastDateAndTime + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint)] - error_code = cfunc( + error_code = c_func( device_name, ctypes.byref(year), ctypes.byref(month), ctypes.byref(day), ctypes.byref(hour), ctypes.byref(minute)) self.check_for_error(error_code) return year.value, month.value, day.value, hour.value, minute.value def get_system_info_attribute_string(self, attribute): - cfunc = lib_importer.cdll.DAQmxGetSystemInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetSystemInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3522,14 +3522,14 @@ def get_system_info_attribute_string(self, attribute): def get_system_info_attribute_uint32(self, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetSystemInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetSystemInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes.c_int32] - error_code = cfunc( + error_code = c_func( attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3537,30 +3537,30 @@ def get_system_info_attribute_uint32(self, attribute): def get_task_attribute_bool(self, task, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetTaskAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTaskAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_task_attribute_string(self, task, attribute): - cfunc = lib_importer.cdll.DAQmxGetTaskAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTaskAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3576,14 +3576,14 @@ def get_task_attribute_string(self, task, attribute): def get_task_attribute_uint32(self, task, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetTaskAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTaskAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3591,14 +3591,14 @@ def get_task_attribute_uint32(self, task, attribute): def get_timing_attribute_bool(self, task, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3606,14 +3606,14 @@ def get_timing_attribute_bool(self, task, attribute): def get_timing_attribute_double(self, task, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3621,15 +3621,15 @@ def get_timing_attribute_double(self, task, attribute): def get_timing_attribute_ex_bool(self, task, device_names, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3637,15 +3637,15 @@ def get_timing_attribute_ex_bool(self, task, device_names, attribute): def get_timing_attribute_ex_double(self, task, device_names, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3653,32 +3653,32 @@ def get_timing_attribute_ex_double(self, task, device_names, attribute): def get_timing_attribute_ex_int32(self, task, device_names, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_timing_attribute_ex_string(self, task, device_names, attribute): - cfunc = lib_importer.cdll.DAQmxGetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task, device_names, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3694,15 +3694,15 @@ def get_timing_attribute_ex_string(self, task, device_names, attribute): def get_timing_attribute_ex_uint32(self, task, device_names, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3710,15 +3710,15 @@ def get_timing_attribute_ex_uint32(self, task, device_names, attribute): def get_timing_attribute_ex_uint64(self, task, device_names, attribute): value = ctypes.c_uint64() - cfunc = lib_importer.cdll.DAQmxGetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3726,30 +3726,30 @@ def get_timing_attribute_ex_uint64(self, task, device_names, attribute): def get_timing_attribute_int32(self, task, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_timing_attribute_string(self, task, attribute): - cfunc = lib_importer.cdll.DAQmxGetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3765,14 +3765,14 @@ def get_timing_attribute_string(self, task, attribute): def get_timing_attribute_timestamp(self, task, attribute): value = AbsoluteTime() - cfunc = lib_importer.cdll.DAQmxGetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.to_datetime() @@ -3780,14 +3780,14 @@ def get_timing_attribute_timestamp(self, task, attribute): def get_timing_attribute_uint32(self, task, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3795,14 +3795,14 @@ def get_timing_attribute_uint32(self, task, attribute): def get_timing_attribute_uint64(self, task, attribute): value = ctypes.c_uint64() - cfunc = lib_importer.cdll.DAQmxGetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3810,14 +3810,14 @@ def get_timing_attribute_uint64(self, task, attribute): def get_trig_attribute_bool(self, task, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3825,30 +3825,30 @@ def get_trig_attribute_bool(self, task, attribute): def get_trig_attribute_double(self, task, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_trig_attribute_double_array(self, task, attribute): - cfunc = lib_importer.cdll.DAQmxGetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.float64) - size_or_code = cfunc( + size_or_code = c_func( task, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -3865,30 +3865,30 @@ def get_trig_attribute_double_array(self, task, attribute): def get_trig_attribute_int32(self, task, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_trig_attribute_int32_array(self, task, attribute): - cfunc = lib_importer.cdll.DAQmxGetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] temp_size = 0 while True: value = numpy.zeros(temp_size, dtype=numpy.int32) - size_or_code = cfunc( + size_or_code = c_func( task, attribute, value.ctypes.data_as(ctypes.c_void_p), temp_size) if is_array_buffer_too_small(size_or_code): @@ -3903,17 +3903,17 @@ def get_trig_attribute_int32_array(self, task, attribute): return value.tolist() def get_trig_attribute_string(self, task, attribute): - cfunc = lib_importer.cdll.DAQmxGetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -3929,14 +3929,14 @@ def get_trig_attribute_string(self, task, attribute): def get_trig_attribute_timestamp(self, task, attribute): value = AbsoluteTime() - cfunc = lib_importer.cdll.DAQmxGetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.to_datetime() @@ -3944,14 +3944,14 @@ def get_trig_attribute_timestamp(self, task, attribute): def get_trig_attribute_uint32(self, task, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3959,15 +3959,15 @@ def get_trig_attribute_uint32(self, task, attribute): def get_watchdog_attribute_bool(self, task, lines, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetWatchdogAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWatchdogAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, lines, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3975,15 +3975,15 @@ def get_watchdog_attribute_bool(self, task, lines, attribute): def get_watchdog_attribute_double(self, task, lines, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetWatchdogAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWatchdogAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, lines, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -3991,32 +3991,32 @@ def get_watchdog_attribute_double(self, task, lines, attribute): def get_watchdog_attribute_int32(self, task, lines, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetWatchdogAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWatchdogAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, lines, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_watchdog_attribute_string(self, task, lines, attribute): - cfunc = lib_importer.cdll.DAQmxGetWatchdogAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWatchdogAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task, lines, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -4032,14 +4032,14 @@ def get_watchdog_attribute_string(self, task, lines, attribute): def get_write_attribute_bool(self, task, attribute): value = c_bool32() - cfunc = lib_importer.cdll.DAQmxGetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -4047,14 +4047,14 @@ def get_write_attribute_bool(self, task, attribute): def get_write_attribute_double(self, task, attribute): value = ctypes.c_double() - cfunc = lib_importer.cdll.DAQmxGetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -4062,30 +4062,30 @@ def get_write_attribute_double(self, task, attribute): def get_write_attribute_int32(self, task, attribute): value = ctypes.c_int32() - cfunc = lib_importer.cdll.DAQmxGetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def get_write_attribute_string(self, task, attribute, size_hint=0): - cfunc = lib_importer.cdll.DAQmxGetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] temp_size = size_hint while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( task, attribute, value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -4101,14 +4101,14 @@ def get_write_attribute_string(self, task, attribute, size_hint=0): def get_write_attribute_uint32(self, task, attribute): value = ctypes.c_uint32() - cfunc = lib_importer.cdll.DAQmxGetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value @@ -4116,30 +4116,30 @@ def get_write_attribute_uint32(self, task, attribute): def get_write_attribute_uint64(self, task, attribute): value = ctypes.c_uint64() - cfunc = lib_importer.cdll.DAQmxGetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxGetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.byref(value)) self.check_for_error(error_code) return value.value def internal_get_last_created_chan(self): - cfunc = lib_importer.windll.DAQmxInternalGetLastCreatedChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalGetLastCreatedChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes.c_char_p, ctypes.c_uint] temp_size = 0 while True: value = ctypes.create_string_buffer(temp_size) - size_or_code = cfunc( + size_or_code = c_func( value, temp_size) if is_string_buffer_too_small(size_or_code): # Buffer size must have changed between calls; check again. @@ -4155,14 +4155,14 @@ def internal_get_last_created_chan(self): def is_task_done(self, task): is_task_done = c_bool32() - cfunc = lib_importer.windll.DAQmxIsTaskDone - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxIsTaskDone + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, ctypes.byref(is_task_done)) self.check_for_error(error_code) return is_task_done.value @@ -4171,29 +4171,29 @@ def load_task(self, session_name): new_session_initialized = True task = lib_importer.task_handle(0) - cfunc = lib_importer.windll.DAQmxLoadTask - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxLoadTask + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.POINTER(lib_importer.task_handle)] - error_code = cfunc( + error_code = c_func( session_name, ctypes.byref(task)) self.check_for_error(error_code) return task, new_session_initialized def perform_bridge_offset_nulling_cal_ex( self, task, channel, skip_unsupported_channels): - cfunc = lib_importer.windll.DAQmxPerformBridgeOffsetNullingCalEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxPerformBridgeOffsetNullingCalEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, c_bool32] - error_code = cfunc( + error_code = c_func( task, channel, skip_unsupported_channels) self.check_for_error(error_code) @@ -4202,16 +4202,16 @@ def perform_bridge_shunt_cal_ex( shunt_resistor_location, shunt_resistor_select, shunt_resistor_source, bridge_resistance, skip_unsupported_channels): - cfunc = lib_importer.windll.DAQmxPerformBridgeShuntCalEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxPerformBridgeShuntCalEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, c_bool32] - error_code = cfunc( + error_code = c_func( task, channel, shunt_resistor_value, shunt_resistor_location, shunt_resistor_select, shunt_resistor_source, bridge_resistance, skip_unsupported_channels) @@ -4221,16 +4221,16 @@ def perform_strain_shunt_cal_ex( self, task, channel, shunt_resistor_value, shunt_resistor_location, shunt_resistor_select, shunt_resistor_source, skip_unsupported_channels): - cfunc = lib_importer.windll.DAQmxPerformStrainShuntCalEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxPerformStrainShuntCalEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_double, ctypes.c_int, ctypes.c_int, ctypes.c_int, c_bool32] - error_code = cfunc( + error_code = c_func( task, channel, shunt_resistor_value, shunt_resistor_location, shunt_resistor_select, shunt_resistor_source, skip_unsupported_channels) @@ -4238,14 +4238,14 @@ def perform_strain_shunt_cal_ex( def perform_thrmcpl_lead_offset_nulling_cal( self, task, channel, skip_unsupported_channels): - cfunc = lib_importer.windll.DAQmxPerformThrmcplLeadOffsetNullingCal - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxPerformThrmcplLeadOffsetNullingCal + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, c_bool32] - error_code = cfunc( + error_code = c_func( task, channel, skip_unsupported_channels) self.check_for_error(error_code) @@ -4253,18 +4253,18 @@ def read_analog_f64( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadAnalogF64 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadAnalogF64 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.float64, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4273,16 +4273,16 @@ def read_analog_f64( def read_analog_scalar_f64(self, task, timeout): value = ctypes.c_double() - cfunc = lib_importer.windll.DAQmxReadAnalogScalarF64 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadAnalogScalarF64 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_double, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, timeout, ctypes.byref(value), None) self.check_for_error(error_code) return value.value @@ -4291,18 +4291,18 @@ def read_binary_i16( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadBinaryI16 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadBinaryI16 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.int16, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4312,18 +4312,18 @@ def read_binary_i32( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadBinaryI32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadBinaryI32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.int32, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4333,18 +4333,18 @@ def read_binary_u16( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadBinaryU16 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadBinaryU16 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint16, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4354,18 +4354,18 @@ def read_binary_u32( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadBinaryU32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadBinaryU32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint32, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4374,18 +4374,18 @@ def read_binary_u32( def read_counter_f64(self, task, num_samps_per_chan, timeout, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadCounterF64 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCounterF64 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, wrapped_ndpointer(dtype=numpy.float64, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4395,18 +4395,18 @@ def read_counter_f64_ex( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadCounterF64Ex - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCounterF64Ex + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.float64, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4415,16 +4415,16 @@ def read_counter_f64_ex( def read_counter_scalar_f64(self, task, timeout): value = ctypes.c_double() - cfunc = lib_importer.windll.DAQmxReadCounterScalarF64 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCounterScalarF64 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_double, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, timeout, ctypes.byref(value), None) self.check_for_error(error_code) return value.value @@ -4432,16 +4432,16 @@ def read_counter_scalar_f64(self, task, timeout): def read_counter_scalar_u32(self, task, timeout): value = ctypes.c_uint() - cfunc = lib_importer.windll.DAQmxReadCounterScalarU32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCounterScalarU32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_double, ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, timeout, ctypes.byref(value), None) self.check_for_error(error_code) return value.value @@ -4449,17 +4449,17 @@ def read_counter_scalar_u32(self, task, timeout): def read_counter_u32(self, task, num_samps_per_chan, timeout, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadCounterU32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCounterU32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, wrapped_ndpointer(dtype=numpy.uint32, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4469,18 +4469,18 @@ def read_counter_u32_ex( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadCounterU32Ex - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCounterU32Ex + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint32, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4491,11 +4491,11 @@ def read_ctr_freq( read_array_frequency, read_array_duty_cycle): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadCtrFreq - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCtrFreq + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.float64, @@ -4504,7 +4504,7 @@ def read_ctr_freq( flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, interleaved, read_array_frequency, read_array_duty_cycle, read_array_duty_cycle.size, ctypes.byref(samps_per_chan_read), @@ -4516,17 +4516,17 @@ def read_ctr_freq_scalar(self, task, timeout): frequency = ctypes.c_double() duty_cycle = ctypes.c_double() - cfunc = lib_importer.windll.DAQmxReadCtrFreqScalar - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCtrFreqScalar + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_double, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, timeout, ctypes.byref(frequency), ctypes.byref(duty_cycle), None) self.check_for_error(error_code) @@ -4537,11 +4537,11 @@ def read_ctr_ticks( read_array_high_ticks, read_array_low_ticks): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadCtrTicks - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCtrTicks + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint32, @@ -4550,7 +4550,7 @@ def read_ctr_ticks( flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, interleaved, read_array_high_ticks, read_array_low_ticks, read_array_low_ticks.size, ctypes.byref(samps_per_chan_read), None) @@ -4561,17 +4561,17 @@ def read_ctr_ticks_scalar(self, task, timeout): high_ticks = ctypes.c_uint32() low_ticks = ctypes.c_uint32() - cfunc = lib_importer.windll.DAQmxReadCtrTicksScalar - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCtrTicksScalar + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_double, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, timeout, ctypes.byref(high_ticks), ctypes.byref(low_ticks), None) self.check_for_error(error_code) @@ -4582,11 +4582,11 @@ def read_ctr_time( read_array_high_time, read_array_low_time): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadCtrTime - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCtrTime + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.float64, @@ -4595,7 +4595,7 @@ def read_ctr_time( flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, interleaved, read_array_high_time, read_array_low_time, read_array_low_time.size, ctypes.byref(samps_per_chan_read), None) @@ -4606,17 +4606,17 @@ def read_ctr_time_scalar(self, task, timeout): high_time = ctypes.c_double() low_time = ctypes.c_double() - cfunc = lib_importer.windll.DAQmxReadCtrTimeScalar - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadCtrTimeScalar + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_double, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, timeout, ctypes.byref(high_time), ctypes.byref(low_time), None) self.check_for_error(error_code) @@ -4627,18 +4627,18 @@ def read_digital_lines( samps_per_chan_read = ctypes.c_int() num_bytes_per_samp = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadDigitalLines - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadDigitalLines + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=bool, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), ctypes.byref(num_bytes_per_samp), None) @@ -4648,16 +4648,16 @@ def read_digital_lines( def read_digital_scalar_u32(self, task, timeout): value = ctypes.c_uint() - cfunc = lib_importer.windll.DAQmxReadDigitalScalarU32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadDigitalScalarU32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_double, ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, timeout, ctypes.byref(value), None) self.check_for_error(error_code) return value.value @@ -4666,18 +4666,18 @@ def read_digital_u16( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadDigitalU16 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadDigitalU16 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint16, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4687,18 +4687,18 @@ def read_digital_u32( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadDigitalU32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadDigitalU32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint32, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4708,18 +4708,18 @@ def read_digital_u8( self, task, num_samps_per_chan, timeout, fill_mode, read_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadDigitalU8 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadDigitalU8 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint8, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_array, read_array.size, ctypes.byref(samps_per_chan_read), None) self.check_for_error(error_code, samps_per_chan_read=samps_per_chan_read.value) @@ -4729,17 +4729,17 @@ def read_power_scalar_f64(self, task, timeout): voltage = ctypes.c_double() current = ctypes.c_double() - cfunc = lib_importer.windll.DAQmxReadPowerScalarF64 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadPowerScalarF64 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_double, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, timeout, ctypes.byref(voltage), ctypes.byref(current), None) self.check_for_error(error_code) return voltage.value, current.value @@ -4750,11 +4750,11 @@ def register_done_event( ctypes.c_int32, lib_importer.task_handle, ctypes.c_int, ctypes.c_void_p) - cfunc = lib_importer.windll.DAQmxRegisterDoneEvent - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxRegisterDoneEvent + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_uint, DAQmxDoneEventCallbackPtr, ctypes.POINTER(ctypes.c_void_p)] @@ -4762,7 +4762,7 @@ def register_done_event( assert callback_function is not None callback_method_ptr = DAQmxDoneEventCallbackPtr(callback_function) - error_code = cfunc( + error_code = c_func( task, options, callback_method_ptr, callback_data) self.check_for_error(error_code) @@ -4775,11 +4775,11 @@ def register_every_n_samples_event( ctypes.c_int32, lib_importer.task_handle, ctypes.c_int, ctypes.c_uint, ctypes.c_void_p) - cfunc = lib_importer.windll.DAQmxRegisterEveryNSamplesEvent - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxRegisterEveryNSamplesEvent + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_uint, ctypes.c_uint, DAQmxEveryNSamplesEventCallbackPtr, ctypes.POINTER(ctypes.c_void_p)] @@ -4787,7 +4787,7 @@ def register_every_n_samples_event( assert callback_function is not None callback_method_ptr = DAQmxEveryNSamplesEventCallbackPtr(callback_function) - error_code = cfunc( + error_code = c_func( task, every_n_samples_event_type, n_samples, options, callback_method_ptr, callback_data) self.check_for_error(error_code) @@ -4800,11 +4800,11 @@ def register_signal_event( ctypes.c_int32, lib_importer.task_handle, ctypes.c_int, ctypes.c_void_p) - cfunc = lib_importer.windll.DAQmxRegisterSignalEvent - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxRegisterSignalEvent + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_uint, DAQmxSignalEventCallbackPtr, ctypes.POINTER(ctypes.c_void_p)] @@ -4812,231 +4812,231 @@ def register_signal_event( assert callback_function is not None callback_method_ptr = DAQmxSignalEventCallbackPtr(callback_function) - error_code = cfunc( + error_code = c_func( task, signal_id, options, callback_method_ptr, callback_data) self.check_for_error(error_code) return LibraryEventHandler(callback_method_ptr) def remove_cdaq_sync_connection(self, port_list): - cfunc = lib_importer.windll.DAQmxRemoveCDAQSyncConnection - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxRemoveCDAQSyncConnection + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( port_list) self.check_for_error(error_code) def reserve_network_device(self, device_name, override_reservation): - cfunc = lib_importer.windll.DAQmxReserveNetworkDevice - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReserveNetworkDevice + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, c_bool32] - error_code = cfunc( + error_code = c_func( device_name, override_reservation) self.check_for_error(error_code) def reset_buffer_attribute(self, task, attribute): - cfunc = lib_importer.windll.DAQmxResetBufferAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetBufferAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute) self.check_for_error(error_code) def reset_chan_attribute(self, task, channel, attribute): - cfunc = lib_importer.windll.DAQmxResetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute) self.check_for_error(error_code) def reset_device(self, device_name): - cfunc = lib_importer.windll.DAQmxResetDevice - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetDevice + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( device_name) self.check_for_error(error_code) def reset_exported_signal_attribute(self, task, attribute): - cfunc = lib_importer.windll.DAQmxResetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, attribute) self.check_for_error(error_code) def reset_read_attribute(self, task, attribute): - cfunc = lib_importer.windll.DAQmxResetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, attribute) self.check_for_error(error_code) def reset_timing_attribute(self, task, attribute): - cfunc = lib_importer.windll.DAQmxResetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, attribute) self.check_for_error(error_code) def reset_timing_attribute_ex(self, task, device_names, attribute): - cfunc = lib_importer.windll.DAQmxResetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, device_names, attribute) self.check_for_error(error_code) def reset_trig_attribute(self, task, attribute): - cfunc = lib_importer.windll.DAQmxResetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, attribute) self.check_for_error(error_code) def reset_watchdog_attribute(self, task, lines, attribute): - cfunc = lib_importer.windll.DAQmxResetWatchdogAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetWatchdogAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, lines, attribute) self.check_for_error(error_code) def reset_write_attribute(self, task, attribute): - cfunc = lib_importer.windll.DAQmxResetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, attribute) self.check_for_error(error_code) def restore_last_ext_cal_const(self, device_name): - cfunc = lib_importer.windll.DAQmxRestoreLastExtCalConst - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxRestoreLastExtCalConst + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( device_name) self.check_for_error(error_code) def save_global_chan(self, task, channel_name, save_as, author, options): - cfunc = lib_importer.windll.DAQmxSaveGlobalChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSaveGlobalChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes_byte_str, ctypes.c_uint32] - error_code = cfunc( + error_code = c_func( task, channel_name, save_as, author, options) self.check_for_error(error_code) def save_scale(self, scale_name, save_as, author, options): - cfunc = lib_importer.windll.DAQmxSaveScale - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSaveScale + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str, ctypes_byte_str, ctypes.c_uint32] - error_code = cfunc( + error_code = c_func( scale_name, save_as, author, options) self.check_for_error(error_code) def save_task(self, task, save_as, author, options): - cfunc = lib_importer.windll.DAQmxSaveTask - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSaveTask + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes_byte_str, ctypes.c_uint32] - error_code = cfunc( + error_code = c_func( task, save_as, author, options) self.check_for_error(error_code) def self_cal(self, device_name): - cfunc = lib_importer.windll.DAQmxSelfCal - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSelfCal + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( device_name) self.check_for_error(error_code) def self_test_device(self, device_name): - cfunc = lib_importer.windll.DAQmxSelfTestDevice - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSelfTestDevice + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( device_name) self.check_for_error(error_code) @@ -5059,178 +5059,178 @@ def set_analog_power_up_states( args.append(None) argtypes.append(ctypes.c_void_p) - cfunc = lib_importer.cdll.DAQmxSetAnalogPowerUpStates - with cfunc.arglock: - cfunc.argtypes = argtypes - error_code = cfunc(*args) + c_func = lib_importer.cdll.DAQmxSetAnalogPowerUpStates + with c_func.arg_lock: + c_func.argtypes = argtypes + error_code = c_func(*args) self.check_for_error(error_code) def set_analog_power_up_states_with_output_type( self, channel_names, state_array, channel_type_array): - cfunc = lib_importer.cdll.DAQmxSetAnalogPowerUpStatesWithOutputType - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetAnalogPowerUpStatesWithOutputType + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, wrapped_ndpointer(dtype=numpy.float64, flags=('C')), wrapped_ndpointer(dtype=numpy.int32, flags=('C')), ctypes.c_uint] - error_code = cfunc( + error_code = c_func( channel_names, state_array, channel_type_array, len(channel_type_array)) self.check_for_error(error_code) def set_buffer_attribute_uint32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetBufferAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetBufferAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_uint32(value)) self.check_for_error(error_code) def set_cal_info_attribute_bool(self, device_name, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetCalInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetCalInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, c_bool32(value)) self.check_for_error(error_code) def set_cal_info_attribute_double(self, device_name, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetCalInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetCalInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_cal_info_attribute_string(self, device_name, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetCalInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetCalInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_cal_info_attribute_uint32(self, device_name, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetCalInfoAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetCalInfoAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( device_name, attribute, ctypes.c_uint32(value)) self.check_for_error(error_code) def set_chan_attribute_bool(self, task, channel, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, c_bool32(value)) self.check_for_error(error_code) def set_chan_attribute_double(self, task, channel, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_chan_attribute_double_array(self, task, channel, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, value.ctypes.data_as(ctypes.c_void_p), len(value)) self.check_for_error(error_code) def set_chan_attribute_int32(self, task, channel, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, ctypes.c_int32(value)) self.check_for_error(error_code) def set_chan_attribute_string(self, task, channel, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_chan_attribute_uint32(self, task, channel, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetChanAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetChanAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, channel, attribute, ctypes.c_uint32(value)) self.check_for_error(error_code) def set_digital_logic_family_power_up_state( self, device_name, logic_family): - cfunc = lib_importer.windll.DAQmxSetDigitalLogicFamilyPowerUpState - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSetDigitalLogicFamilyPowerUpState + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( device_name, logic_family) self.check_for_error(error_code) @@ -5249,10 +5249,10 @@ def set_digital_power_up_states(self, device_name, channel_names, state): args.append(None) argtypes.append(ctypes.c_void_p) - cfunc = lib_importer.cdll.DAQmxSetDigitalPowerUpStates - with cfunc.arglock: - cfunc.argtypes = argtypes - error_code = cfunc(*args) + c_func = lib_importer.cdll.DAQmxSetDigitalPowerUpStates + with c_func.arg_lock: + c_func.argtypes = argtypes + error_code = c_func(*args) self.check_for_error(error_code) def set_digital_pull_up_pull_down_states( @@ -5271,640 +5271,640 @@ def set_digital_pull_up_pull_down_states( args.append(None) argtypes.append(ctypes.c_void_p) - cfunc = lib_importer.cdll.DAQmxSetDigitalPullUpPullDownStates - with cfunc.arglock: - cfunc.argtypes = argtypes - error_code = cfunc(*args) + c_func = lib_importer.cdll.DAQmxSetDigitalPullUpPullDownStates + with c_func.arg_lock: + c_func.argtypes = argtypes + error_code = c_func(*args) self.check_for_error(error_code) def set_exported_signal_attribute_bool(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, c_bool32(value)) self.check_for_error(error_code) def set_exported_signal_attribute_double(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_exported_signal_attribute_int32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_int32(value)) self.check_for_error(error_code) def set_exported_signal_attribute_string(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_exported_signal_attribute_uint32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetExportedSignalAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetExportedSignalAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_uint32(value)) self.check_for_error(error_code) def set_read_attribute_bool(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, c_bool32(value)) self.check_for_error(error_code) def set_read_attribute_double(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_read_attribute_int32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_int32(value)) self.check_for_error(error_code) def set_read_attribute_string(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_read_attribute_uint32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_uint32(value)) self.check_for_error(error_code) def set_read_attribute_uint64(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetReadAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetReadAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_uint64(value)) self.check_for_error(error_code) def set_runtime_environment( self, environment, environment_version, reserved_1, reserved_2): - cfunc = lib_importer.windll.DAQmxSetRuntimeEnvironment - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSetRuntimeEnvironment + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str, ctypes_byte_str, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( environment, environment_version, reserved_1, reserved_2) self.check_for_error(error_code) def set_scale_attribute_double(self, scale_name, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( scale_name, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_scale_attribute_double_array(self, scale_name, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( scale_name, attribute, value.ctypes.data_as(ctypes.c_void_p), len(value)) self.check_for_error(error_code) def set_scale_attribute_int32(self, scale_name, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( scale_name, attribute, ctypes.c_int32(value)) self.check_for_error(error_code) def set_scale_attribute_string(self, scale_name, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetScaleAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetScaleAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( scale_name, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_timing_attribute_bool(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, c_bool32(value)) self.check_for_error(error_code) def set_timing_attribute_double(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_timing_attribute_ex_bool( self, task, device_names, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, c_bool32(value)) self.check_for_error(error_code) def set_timing_attribute_ex_double( self, task, device_names, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_timing_attribute_ex_int32( self, task, device_names, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, ctypes.c_int32(value)) self.check_for_error(error_code) def set_timing_attribute_ex_string( self, task, device_names, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_timing_attribute_ex_uint32( self, task, device_names, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, ctypes.c_uint32(value)) self.check_for_error(error_code) def set_timing_attribute_ex_uint64( self, task, device_names, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttributeEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttributeEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, device_names, attribute, ctypes.c_uint64(value)) self.check_for_error(error_code) def set_timing_attribute_int32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_int32(value)) self.check_for_error(error_code) def set_timing_attribute_string(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_timing_attribute_uint32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_uint32(value)) self.check_for_error(error_code) def set_timing_attribute_uint64(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTimingAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTimingAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_uint64(value)) self.check_for_error(error_code) def set_trig_attribute_bool(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, c_bool32(value)) self.check_for_error(error_code) def set_trig_attribute_double(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_trig_attribute_double_array(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, value.ctypes.data_as(ctypes.c_void_p), len(value)) self.check_for_error(error_code) def set_trig_attribute_int32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_int32(value)) self.check_for_error(error_code) def set_trig_attribute_int32_array(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, value.ctypes.data_as(ctypes.c_void_p), len(value)) self.check_for_error(error_code) def set_trig_attribute_string(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_trig_attribute_timestamp(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, AbsoluteTime.from_datetime(value)) self.check_for_error(error_code) def set_trig_attribute_uint32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetTrigAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetTrigAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_uint32(value)) self.check_for_error(error_code) def set_watchdog_attribute_bool(self, task, lines, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWatchdogAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWatchdogAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, lines, attribute, c_bool32(value)) self.check_for_error(error_code) def set_watchdog_attribute_double(self, task, lines, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWatchdogAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWatchdogAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, lines, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_watchdog_attribute_int32(self, task, lines, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWatchdogAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWatchdogAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, lines, attribute, ctypes.c_int32(value)) self.check_for_error(error_code) def set_watchdog_attribute_string(self, task, lines, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWatchdogAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWatchdogAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, lines, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_write_attribute_bool(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, c_bool32(value)) self.check_for_error(error_code) def set_write_attribute_double(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_double(value)) self.check_for_error(error_code) def set_write_attribute_int32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_int32(value)) self.check_for_error(error_code) def set_write_attribute_string(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, value.encode(lib_importer.encoding)) self.check_for_error(error_code) def set_write_attribute_uint32(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_uint32(value)) self.check_for_error(error_code) def set_write_attribute_uint64(self, task, attribute, value): - cfunc = lib_importer.cdll.DAQmxSetWriteAttribute - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.cdll.DAQmxSetWriteAttribute + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32] - error_code = cfunc( + error_code = c_func( task, attribute, ctypes.c_uint64(value)) self.check_for_error(error_code) def start_new_file(self, task, file_path): - cfunc = lib_importer.windll.DAQmxStartNewFile - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxStartNewFile + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes_byte_str] - error_code = cfunc( + error_code = c_func( task, file_path) self.check_for_error(error_code) def start_task(self, task): - cfunc = lib_importer.windll.DAQmxStartTask - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxStartTask + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle] - error_code = cfunc( + error_code = c_func( task) self.check_for_error(error_code) def stop_task(self, task): - cfunc = lib_importer.windll.DAQmxStopTask - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxStopTask + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle] - error_code = cfunc( + error_code = c_func( task) self.check_for_error(error_code) def task_control(self, task, action): - cfunc = lib_importer.windll.DAQmxTaskControl - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxTaskControl + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int] - error_code = cfunc( + error_code = c_func( task, action) self.check_for_error(error_code) def tristate_output_term(self, output_terminal): - cfunc = lib_importer.windll.DAQmxTristateOutputTerm - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxTristateOutputTerm + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( output_terminal) self.check_for_error(error_code) @@ -5913,11 +5913,11 @@ def unregister_done_event(self, task): ctypes.c_int32, lib_importer.task_handle, ctypes.c_int, ctypes.c_void_p) - cfunc = lib_importer.windll.DAQmxRegisterDoneEvent - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxRegisterDoneEvent + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_uint, DAQmxDoneEventCallbackPtr, ctypes.POINTER(ctypes.c_void_p)] @@ -5926,7 +5926,7 @@ def unregister_done_event(self, task): callback_method_ptr = DAQmxDoneEventCallbackPtr() callback_data = None - error_code = cfunc( + error_code = c_func( task, options, callback_method_ptr, callback_data) self.check_for_error(error_code) @@ -5936,11 +5936,11 @@ def unregister_every_n_samples_event( ctypes.c_int32, lib_importer.task_handle, ctypes.c_int, ctypes.c_uint, ctypes.c_void_p) - cfunc = lib_importer.windll.DAQmxRegisterEveryNSamplesEvent - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxRegisterEveryNSamplesEvent + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_uint, ctypes.c_uint, DAQmxEveryNSamplesEventCallbackPtr, ctypes.POINTER(ctypes.c_void_p)] @@ -5950,7 +5950,7 @@ def unregister_every_n_samples_event( callback_method_ptr = DAQmxEveryNSamplesEventCallbackPtr() callback_data = None - error_code = cfunc( + error_code = c_func( task, every_n_samples_event_type, n_samples, options, callback_method_ptr, callback_data) self.check_for_error(error_code) @@ -5960,11 +5960,11 @@ def unregister_signal_event(self, task, signal_id): ctypes.c_int32, lib_importer.task_handle, ctypes.c_int, ctypes.c_void_p) - cfunc = lib_importer.windll.DAQmxRegisterSignalEvent - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxRegisterSignalEvent + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_uint, DAQmxSignalEventCallbackPtr, ctypes.POINTER(ctypes.c_void_p)] @@ -5973,47 +5973,47 @@ def unregister_signal_event(self, task, signal_id): callback_method_ptr = DAQmxSignalEventCallbackPtr() callback_data = None - error_code = cfunc( + error_code = c_func( task, signal_id, options, callback_method_ptr, callback_data) self.check_for_error(error_code) def unreserve_network_device(self, device_name): - cfunc = lib_importer.windll.DAQmxUnreserveNetworkDevice - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxUnreserveNetworkDevice + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( device_name) self.check_for_error(error_code) def wait_for_valid_timestamp(self, task, timestamp_event, timeout): timestamp = AbsoluteTime() - cfunc = lib_importer.windll.DAQmxWaitForValidTimestamp - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWaitForValidTimestamp + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int32, ctypes.c_double, ctypes.POINTER(AbsoluteTime)] - error_code = cfunc( + error_code = c_func( task, timestamp_event, timeout, ctypes.byref(timestamp)) self.check_for_error(error_code) return timestamp.to_datetime() def wait_until_task_done(self, task, time_to_wait): - cfunc = lib_importer.windll.DAQmxWaitUntilTaskDone - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWaitUntilTaskDone + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_double] - error_code = cfunc( + error_code = c_func( task, time_to_wait) self.check_for_error(error_code) @@ -6022,32 +6022,32 @@ def write_analog_f64( write_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteAnalogF64 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteAnalogF64 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) return samps_per_chan_written.value def write_analog_scalar_f64(self, task, auto_start, timeout, value): - cfunc = lib_importer.windll.DAQmxWriteAnalogScalarF64 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteAnalogScalarF64 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, c_bool32, ctypes.c_double, ctypes.c_double, ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, auto_start, timeout, value, None) self.check_for_error(error_code) @@ -6056,17 +6056,17 @@ def write_binary_i16( write_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteBinaryI16 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteBinaryI16 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.int16, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) @@ -6077,17 +6077,17 @@ def write_binary_i32( write_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteBinaryI32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteBinaryI32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.int32, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) @@ -6098,17 +6098,17 @@ def write_binary_u16( write_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteBinaryU16 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteBinaryU16 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint16, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) @@ -6119,17 +6119,17 @@ def write_binary_u32( write_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteBinaryU32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteBinaryU32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint32, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) @@ -6140,18 +6140,18 @@ def write_ctr_freq( frequency, duty_cycle): num_samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteCtrFreq - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteCtrFreq + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.float64, flags=('C')), wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, frequency, duty_cycle, ctypes.byref(num_samps_per_chan_written), None) @@ -6160,16 +6160,16 @@ def write_ctr_freq( def write_ctr_freq_scalar( self, task, auto_start, timeout, frequency, duty_cycle): - cfunc = lib_importer.windll.DAQmxWriteCtrFreqScalar - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteCtrFreqScalar + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, c_bool32, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, auto_start, timeout, frequency, duty_cycle, None) self.check_for_error(error_code) @@ -6178,18 +6178,18 @@ def write_ctr_ticks( high_ticks, low_ticks): num_samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteCtrTicks - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteCtrTicks + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint32, flags=('C')), wrapped_ndpointer(dtype=numpy.uint32, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, high_ticks, low_ticks, ctypes.byref(num_samps_per_chan_written), None) @@ -6198,16 +6198,16 @@ def write_ctr_ticks( def write_ctr_ticks_scalar( self, task, auto_start, timeout, high_ticks, low_ticks): - cfunc = lib_importer.windll.DAQmxWriteCtrTicksScalar - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteCtrTicksScalar + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, c_bool32, ctypes.c_double, ctypes.c_uint32, ctypes.c_uint32, ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, auto_start, timeout, high_ticks, low_ticks, None) self.check_for_error(error_code) @@ -6216,18 +6216,18 @@ def write_ctr_time( high_time, low_time): num_samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteCtrTime - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteCtrTime + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.float64, flags=('C')), wrapped_ndpointer(dtype=numpy.float64, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, high_time, low_time, ctypes.byref(num_samps_per_chan_written), None) @@ -6236,16 +6236,16 @@ def write_ctr_time( def write_ctr_time_scalar( self, task, auto_start, timeout, high_time, low_time): - cfunc = lib_importer.windll.DAQmxWriteCtrTimeScalar - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteCtrTimeScalar + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, c_bool32, ctypes.c_double, ctypes.c_double, ctypes.c_double, ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, auto_start, timeout, high_time, low_time, None) self.check_for_error(error_code) @@ -6254,32 +6254,32 @@ def write_digital_lines( write_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteDigitalLines - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteDigitalLines + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=bool, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) return samps_per_chan_written.value def write_digital_scalar_u32(self, task, auto_start, timeout, value): - cfunc = lib_importer.windll.DAQmxWriteDigitalScalarU32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteDigitalScalarU32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, c_bool32, ctypes.c_double, ctypes.c_uint, ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, auto_start, timeout, value, None) self.check_for_error(error_code) @@ -6288,17 +6288,17 @@ def write_digital_u16( write_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteDigitalU16 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteDigitalU16 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint16, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) @@ -6309,17 +6309,17 @@ def write_digital_u32( write_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteDigitalU32 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteDigitalU32 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint32, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) @@ -6330,74 +6330,74 @@ def write_digital_u8( write_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteDigitalU8 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteDigitalU8 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, ctypes.c_int, wrapped_ndpointer(dtype=numpy.uint8, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) return samps_per_chan_written.value def write_id_pin_memory(self, device_name, id_pin_name, data, format_code): - cfunc = lib_importer.windll.DAQmxWriteIDPinMemory - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteIDPinMemory + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str, wrapped_ndpointer(dtype=numpy.uint8, flags=('C')), ctypes.c_uint, ctypes.c_uint] - error_code = cfunc( + error_code = c_func( device_name, id_pin_name, data, len(data), format_code) self.check_for_error(error_code) def write_to_teds_from_array( self, physical_channel, bit_stream, basic_teds_options): - cfunc = lib_importer.windll.DAQmxWriteToTEDSFromArray - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteToTEDSFromArray + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, wrapped_ndpointer(dtype=numpy.uint8, flags=('C')), ctypes.c_uint, ctypes.c_int] - error_code = cfunc( + error_code = c_func( physical_channel, bit_stream, len(bit_stream), basic_teds_options) self.check_for_error(error_code) def write_to_teds_from_file( self, physical_channel, file_path, basic_teds_options): - cfunc = lib_importer.windll.DAQmxWriteToTEDSFromFile - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteToTEDSFromFile + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( physical_channel, file_path, basic_teds_options) self.check_for_error(error_code) def get_error_string(self, error_code): error_buffer = ctypes.create_string_buffer(2048) - cfunc = lib_importer.windll.DAQmxGetErrorString - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ctypes.c_int, ctypes.c_char_p, + c_func = lib_importer.windll.DAQmxGetErrorString + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_uint] - query_error_code = cfunc(error_code, error_buffer, 2048) + query_error_code = c_func(error_code, error_buffer, 2048) if query_error_code < 0: _logger.error('Failed to get error string for error code %d. DAQmxGetErrorString returned error code %d.', error_code, query_error_code) return 'Failed to retrieve error description.' @@ -6406,13 +6406,13 @@ def get_error_string(self, error_code): def get_extended_error_info(self): error_buffer = ctypes.create_string_buffer(2048) - cfunc = lib_importer.windll.DAQmxGetExtendedErrorInfo - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ctypes.c_char_p, ctypes.c_uint] + c_func = lib_importer.windll.DAQmxGetExtendedErrorInfo + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ctypes.c_char_p, ctypes.c_uint] - query_error_code = cfunc(error_buffer, 2048) + query_error_code = c_func(error_buffer, 2048) if query_error_code < 0: _logger.error('Failed to get extended error info. DAQmxGetExtendedErrorInfo returned error code %d.', query_error_code) return 'Failed to retrieve error description.' @@ -6520,11 +6520,11 @@ def _internal_read_analog_waveform_ex( assert isinstance(task_handle, TaskHandle) samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxInternalReadAnalogWaveformEx - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalReadAnalogWaveformEx + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, ctypes.c_double, @@ -6540,7 +6540,7 @@ def _internal_read_analog_waveform_ex( ctypes.POINTER(c_bool32), ] - error_code = cfunc( + error_code = c_func( task_handle, number_of_samples_per_channel, timeout, @@ -6579,11 +6579,11 @@ def _internal_read_analog_waveform_per_chan( array_size = read_arrays[0].size assert all(read_array.size == array_size for read_array in read_arrays) - cfunc = lib_importer.windll.DAQmxInternalReadAnalogWaveformPerChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalReadAnalogWaveformPerChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, ctypes.c_double, @@ -6599,11 +6599,11 @@ def _internal_read_analog_waveform_per_chan( ctypes.POINTER(c_bool32), ] - read_array_ptrs = (ctypes.POINTER(ctypes.c_double) * channel_count)() + read_array_pointers = (ctypes.POINTER(ctypes.c_double) * channel_count)() for i, read_array in enumerate(read_arrays): - read_array_ptrs[i] = read_array.ctypes.data_as(ctypes.POINTER(ctypes.c_double)) + read_array_pointers[i] = read_array.ctypes.data_as(ctypes.POINTER(ctypes.c_double)) - error_code = cfunc( + error_code = c_func( task_handle, num_samps_per_chan, timeout, @@ -6612,7 +6612,7 @@ def _internal_read_analog_waveform_per_chan( 0 if t0_array is None else t0_array.size, self._get_wfm_attr_callback(properties), None, - read_array_ptrs, + read_array_pointers, channel_count, array_size, ctypes.byref(samps_per_chan_read), @@ -6875,11 +6875,11 @@ def _internal_read_digital_waveform( samps_per_chan_read = ctypes.c_int() num_bytes_per_samp = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxInternalReadDigitalWaveform - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalReadDigitalWaveform + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, ctypes.c_double, @@ -6898,7 +6898,7 @@ def _internal_read_digital_waveform( ctypes.POINTER(c_bool32), ] - error_code = cfunc( + error_code = c_func( task_handle, number_of_samples_per_channel, timeout, @@ -6923,17 +6923,17 @@ def read_id_pin_memory(self, device_name, id_pin_name): data_length_read = ctypes.c_uint() format_code = ctypes.c_uint() - cfunc = lib_importer.windll.DAQmxReadIDPinMemory - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadIDPinMemory + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes_byte_str, wrapped_ndpointer(dtype=numpy.uint8, flags=('C','W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint)] - array_size = cfunc( + array_size = c_func( device_name, id_pin_name, None, 0, ctypes.byref(data_length_read), ctypes.byref(format_code)) @@ -6942,7 +6942,7 @@ def read_id_pin_memory(self, device_name, id_pin_name): data = numpy.zeros(array_size, dtype=numpy.uint8) - error_code = cfunc( + error_code = c_func( device_name, id_pin_name, data, array_size, ctypes.byref(data_length_read), ctypes.byref(format_code)) self.check_for_error(error_code) @@ -6953,11 +6953,11 @@ def read_power_binary_i16( read_voltage_array, read_current_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadPowerBinaryI16 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadPowerBinaryI16 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, c_bool32, wrapped_ndpointer(dtype=numpy.int16, flags=('C', 'W')), @@ -6965,7 +6965,7 @@ def read_power_binary_i16( ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_voltage_array, read_current_array, read_voltage_array.size, ctypes.byref(samps_per_chan_read), None) @@ -6978,11 +6978,11 @@ def read_power_f64( read_voltage_array, read_current_array): samps_per_chan_read = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadPowerF64 - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadPowerF64 + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, c_bool32, wrapped_ndpointer(dtype=numpy.float64, flags=('C', 'W')), @@ -6990,7 +6990,7 @@ def read_power_f64( ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, fill_mode, read_voltage_array, read_current_array, read_voltage_array.size, ctypes.byref(samps_per_chan_read), None) @@ -7002,17 +7002,17 @@ def read_raw(self, task, num_samps_per_chan, timeout, read_array): samples_read = ctypes.c_int() number_of_bytes_per_sample = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxReadRaw - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxReadRaw + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, ctypes.c_double, wrapped_ndpointer(dtype=read_array.dtype, flags=('C', 'W')), ctypes.c_uint, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task, num_samps_per_chan, timeout, read_array, read_array.nbytes, ctypes.byref(samples_read), ctypes.byref(number_of_bytes_per_sample), None) @@ -7084,11 +7084,11 @@ def _internal_write_analog_waveform_per_chan( assert channel_count > 0 assert all(write_array.size >= num_samps_per_chan for write_array in write_arrays) - cfunc = lib_importer.windll.DAQmxInternalWriteAnalogWaveformPerChan - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalWriteAnalogWaveformPerChan + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, c_bool32, @@ -7099,16 +7099,16 @@ def _internal_write_analog_waveform_per_chan( ctypes.POINTER(c_bool32), ] - write_array_ptrs = (ctypes.POINTER(ctypes.c_double) * channel_count)() + write_array_pointers = (ctypes.POINTER(ctypes.c_double) * channel_count)() for i, write_array in enumerate(write_arrays): - write_array_ptrs[i] = write_array.ctypes.data_as(ctypes.POINTER(ctypes.c_double)) + write_array_pointers[i] = write_array.ctypes.data_as(ctypes.POINTER(ctypes.c_double)) - error_code = cfunc( + error_code = c_func( task_handle, num_samps_per_chan, auto_start, timeout, - write_array_ptrs, + write_array_pointers, channel_count, ctypes.byref(samps_per_chan_written), None, @@ -7199,11 +7199,11 @@ def _internal_write_digital_waveform( assert isinstance(task_handle, TaskHandle) samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxInternalWriteDigitalWaveform - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxInternalWriteDigitalWaveform + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ TaskHandle, ctypes.c_int, c_bool32, @@ -7216,7 +7216,7 @@ def _internal_write_digital_waveform( ctypes.POINTER(c_bool32), ] - error_code = cfunc( + error_code = c_func( task_handle, num_samps_per_chan, auto_start, @@ -7235,18 +7235,18 @@ def write_raw( self, task_handle, num_samps_per_chan, auto_start, timeout, numpy_array): samps_per_chan_written = ctypes.c_int() - cfunc = lib_importer.windll.DAQmxWriteRaw - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxWriteRaw + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ lib_importer.task_handle, ctypes.c_int, c_bool32, ctypes.c_double, wrapped_ndpointer(dtype=numpy_array.dtype, flags=('C')), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(c_bool32)] - error_code = cfunc( + error_code = c_func( task_handle, num_samps_per_chan, auto_start, timeout, numpy_array, ctypes.byref(samps_per_chan_written), None) self.check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value) diff --git a/generated/nidaqmx/_linux_installation_commands.py b/generated/nidaqmx/_linux_installation_commands.py index 91e688ebe..c5d522492 100644 --- a/generated/nidaqmx/_linux_installation_commands.py +++ b/generated/nidaqmx/_linux_installation_commands.py @@ -66,7 +66,7 @@ class DistroInfo: # noqa: D101 - Missing docstring in public class (auto-genera install_commands: list[list[str]] -# Mapping of distros to their command templates and version handlers +# Mapping of Linux distributions to their command templates and version handlers LINUX_COMMANDS = { "ubuntu": DistroInfo(_get_version_ubuntu, _DEBIAN_DAQMX_VERSION_COMMAND, _APT_INSTALL_COMMANDS), "opensuse": DistroInfo( diff --git a/generated/nidaqmx/system/physical_channel.py b/generated/nidaqmx/system/physical_channel.py index 8bc74606e..cc76517e5 100644 --- a/generated/nidaqmx/system/physical_channel.py +++ b/generated/nidaqmx/system/physical_channel.py @@ -92,13 +92,13 @@ def ai_power_control_enable(self, val): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = lib_importer.windll.DAQmxSetPhysicalChanAIPowerControlEnable - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSetPhysicalChanAIPowerControlEnable + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, c_bool32] - error_code = cfunc( + error_code = c_func( self._name, val) self._interpreter.check_for_error(error_code) @@ -108,13 +108,13 @@ def ai_power_control_enable(self): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = lib_importer.windll.DAQmxResetPhysicalChanAIPowerControlEnable - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetPhysicalChanAIPowerControlEnable + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( self._name) self._interpreter.check_for_error(error_code) @@ -135,13 +135,13 @@ def ai_power_control_type(self, val): if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError val = val.value - cfunc = lib_importer.windll.DAQmxSetPhysicalChanAIPowerControlType - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSetPhysicalChanAIPowerControlType + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( self._name, val) self._interpreter.check_for_error(error_code) @@ -151,13 +151,13 @@ def ai_power_control_type(self): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = lib_importer.windll.DAQmxResetPhysicalChanAIPowerControlType - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetPhysicalChanAIPowerControlType + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( self._name) self._interpreter.check_for_error(error_code) @@ -177,14 +177,14 @@ def ai_power_control_voltage(self, val): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = (lib_importer.windll. + c_func = (lib_importer.windll. DAQmxSetPhysicalChanAIPowerControlVoltage) - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_double] - error_code = cfunc( + error_code = c_func( self._name, val) self._interpreter.check_for_error(error_code) @@ -194,14 +194,14 @@ def ai_power_control_voltage(self): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = (lib_importer.windll. + c_func = (lib_importer.windll. DAQmxResetPhysicalChanAIPowerControlVoltage) - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( self._name) self._interpreter.check_for_error(error_code) @@ -287,14 +287,14 @@ def ao_manual_control_enable(self, val): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = (lib_importer.windll. + c_func = (lib_importer.windll. DAQmxSetPhysicalChanAOManualControlEnable) - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, c_bool32] - error_code = cfunc( + error_code = c_func( self._name, val) self._interpreter.check_for_error(error_code) @@ -304,14 +304,14 @@ def ao_manual_control_enable(self): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = (lib_importer.windll. + c_func = (lib_importer.windll. DAQmxResetPhysicalChanAOManualControlEnable) - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( self._name) self._interpreter.check_for_error(error_code) @@ -362,13 +362,13 @@ def ao_power_amp_channel_enable(self, val): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = lib_importer.windll.DAQmxSetAOPowerAmpChannelEnable - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSetAOPowerAmpChannelEnable + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, c_bool32] - error_code = cfunc( + error_code = c_func( self._name, val) self._interpreter.check_for_error(error_code) @@ -378,13 +378,13 @@ def ao_power_amp_channel_enable(self): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = lib_importer.windll.DAQmxResetAOPowerAmpChannelEnable - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetAOPowerAmpChannelEnable + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( self._name) self._interpreter.check_for_error(error_code) @@ -530,13 +530,13 @@ def dig_port_logic_family(self, val): if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError val = val.value - cfunc = lib_importer.windll.DAQmxSetPhysicalChanDigPortLogicFamily - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxSetPhysicalChanDigPortLogicFamily + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str, ctypes.c_int] - error_code = cfunc( + error_code = c_func( self._name, val) self._interpreter.check_for_error(error_code) @@ -546,13 +546,13 @@ def dig_port_logic_family(self): from nidaqmx._lib import lib_importer, ctypes_byte_str, c_bool32 if not isinstance(self._interpreter, LibraryInterpreter): raise NotImplementedError - cfunc = lib_importer.windll.DAQmxResetPhysicalChanDigPortLogicFamily - if cfunc.argtypes is None: - with cfunc.arglock: - if cfunc.argtypes is None: - cfunc.argtypes = [ + c_func = lib_importer.windll.DAQmxResetPhysicalChanDigPortLogicFamily + if c_func.argtypes is None: + with c_func.arg_lock: + if c_func.argtypes is None: + c_func.argtypes = [ ctypes_byte_str] - error_code = cfunc( + error_code = c_func( self._name) self._interpreter.check_for_error(error_code) diff --git a/generated/nidaqmx/types.py b/generated/nidaqmx/types.py index 45f296004..561b34ece 100644 --- a/generated/nidaqmx/types.py +++ b/generated/nidaqmx/types.py @@ -3,7 +3,7 @@ import collections import typing -# region Task Counter IO namedtuples +# region Task Counter IO named tuples CtrFreq = collections.namedtuple("CtrFreq", ["freq", "duty_cycle"]) @@ -13,13 +13,13 @@ # endregion -# region Power IO namedtuples +# region Power IO named tuples PowerMeasurement = collections.namedtuple("PowerMeasurement", ["voltage", "current"]) # endregion -# region Watchdog namedtuples +# region Watchdog named tuples AOExpirationState = collections.namedtuple( "AOExpirationState", ["physical_channel", "expiration_state", "output_type"] @@ -35,7 +35,7 @@ # endregion -# region Power Up States namedtuples +# region Power Up States named tuples AOPowerUpState = collections.namedtuple( "AOPowerUpState", ["physical_channel", "power_up_state", "channel_type"] @@ -49,7 +49,7 @@ # endregion -# region System namedtuples +# region System named tuples CDAQSyncConnection = collections.namedtuple("CDAQSyncConnection", ["output_port", "input_port"]) @@ -59,7 +59,7 @@ # endregion -# region ID Pin namedtuples +# region ID Pin named tuples class IDPinContents(typing.NamedTuple): diff --git a/generated/nidaqmx/utils.py b/generated/nidaqmx/utils.py index 3eb25f7b1..9524aac6c 100644 --- a/generated/nidaqmx/utils.py +++ b/generated/nidaqmx/utils.py @@ -10,7 +10,7 @@ from nidaqmx.grpc_session_options import GrpcSessionOptions # Method logic adapted from -# //Measurements/Infrastructure/dmxf/trunk/2.5/source/nimuck/parseUtilities.cpp +# //Measurements/Infrastructure/dmxf/trunk/2.5/source/nimuck/parseUtilities.cpp # cspell:disable-line _invalid_range_syntax_message = ( "Syntax for a range of objects in the input string is invalid.\n\n" @@ -184,7 +184,7 @@ def unflatten_channel_string(channel_names: str) -> list[str]: for i in range(number_of_channels): current_number = num_min + i if num_min_width > 0: - # Using fstrings to create format strings. Braces for days! + # Using f-strings to create format strings. Braces for days! zero_padded_format_specifier = f"{{:0{num_min_width}d}}" current_number_str = zero_padded_format_specifier.format(current_number) else: From ce218c358970f6ce16616c9242f1780db6ddd158 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 19:25:56 -0600 Subject: [PATCH 03/47] fix: address styleguide lint issues --- mypy_output.txt | Bin 0 -> 94 bytes src/handwritten/utils.py | 3 ++- tests/component/task/test_timing_properties.py | 4 +--- 3 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 mypy_output.txt diff --git a/mypy_output.txt b/mypy_output.txt new file mode 100644 index 0000000000000000000000000000000000000000..023a84fdb425e6c1cd967c0af40288560bee7594 GIT binary patch literal 94 zcmezWFPNc}AsGl$8H$0>ia~)Pk0BpOW`g;pU~vV8G@w{1P$mT|lLsV?7|a+ffpjrg TrU+~TNL?mF4p Date: Thu, 5 Mar 2026 19:26:38 -0600 Subject: [PATCH 04/47] chore: remove temporary mypy output file --- mypy_output.txt | Bin 94 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 mypy_output.txt diff --git a/mypy_output.txt b/mypy_output.txt deleted file mode 100644 index 023a84fdb425e6c1cd967c0af40288560bee7594..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 94 zcmezWFPNc}AsGl$8H$0>ia~)Pk0BpOW`g;pU~vV8G@w{1P$mT|lLsV?7|a+ffpjrg TrU+~TNL?mF4p Date: Thu, 5 Mar 2026 19:34:46 -0600 Subject: [PATCH 05/47] fix: remove UTF-8 BOM from cspell-ignore-words.txt --- cspell-ignore-words.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cspell-ignore-words.txt b/cspell-ignore-words.txt index 84037e718..201a500c8 100644 --- a/cspell-ignore-words.txt +++ b/cspell-ignore-words.txt @@ -1,4 +1,4 @@ -# numpy +# numpy allclose ascontiguousarray dtype From 9f91f4ca44c9d28a5281efc503e1846827563111 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 19:40:35 -0600 Subject: [PATCH 06/47] chore: move cspell dictionaries to .cspell/ directory --- cspell-dict.txt => .cspell/cspell-dict.txt | 0 cspell-ignore-words.txt => .cspell/cspell-ignore-words.txt | 0 .../cspell-mako-keywords.txt | 0 cspell.json | 6 +++--- 4 files changed, 3 insertions(+), 3 deletions(-) rename cspell-dict.txt => .cspell/cspell-dict.txt (100%) rename cspell-ignore-words.txt => .cspell/cspell-ignore-words.txt (100%) rename cspell-mako-keywords.txt => .cspell/cspell-mako-keywords.txt (100%) diff --git a/cspell-dict.txt b/.cspell/cspell-dict.txt similarity index 100% rename from cspell-dict.txt rename to .cspell/cspell-dict.txt diff --git a/cspell-ignore-words.txt b/.cspell/cspell-ignore-words.txt similarity index 100% rename from cspell-ignore-words.txt rename to .cspell/cspell-ignore-words.txt diff --git a/cspell-mako-keywords.txt b/.cspell/cspell-mako-keywords.txt similarity index 100% rename from cspell-mako-keywords.txt rename to .cspell/cspell-mako-keywords.txt diff --git a/cspell.json b/cspell.json index 9c7fe60e7..25580d202 100644 --- a/cspell.json +++ b/cspell.json @@ -1,9 +1,9 @@ { "version": "0.2", "dictionaryDefinitions": [ - { "name": "cspell-dict", "path": "./cspell-dict.txt", "addWords": true }, - { "name": "cspell-ignore-words", "path": "./cspell-ignore-words.txt", "noSuggest": true }, - { "name": "cspell-mako-keywords", "path": "./cspell-mako-keywords.txt", "noSuggest": true } + { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "addWords": true }, + { "name": "cspell-ignore-words", "path": "./.cspell/cspell-ignore-words.txt", "noSuggest": true }, + { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true } ], "dictionaries": ["cspell-dict", "cspell-ignore-words"], "files": [ From 09e695b6307b07626ca1afc08cb43fd7e7926edb Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 19:43:22 -0600 Subject: [PATCH 07/47] chore: merge cspell-ignore-words.txt into cspell-dict.txt --- .cspell/cspell-dict.txt | 127 ++++++++++++++++++++++++++++++++ .cspell/cspell-ignore-words.txt | 126 ------------------------------- cspell.json | 3 +- 3 files changed, 128 insertions(+), 128 deletions(-) delete mode 100644 .cspell/cspell-ignore-words.txt diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 03f3c830e..cc4bc3698 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -38,3 +38,130 @@ subseconds EEPROM docstrings cdecl + +# numpy +allclose +ascontiguousarray +dtype +frombuffer +iinfo +nbytes +ndarray +ndpointer +printoptions +tobytes +tolist +rtol + +# nitypes +nitypes + +# hightime +hightime + +# nptdms +bnptdms +nptdms + +# ctypes (stdlib) +argtype +argtypes +byref +ctypeslib +varargs + +# pytest +addoption +callspec +caplog +fixturenames +getfixturevalue +metafunc +modifyitems +parametrizing +unraisable +unraisablehook + +# python-decouple / dotenv +dotenv + +# tzlocal +localzone + +# matplotlib +xlabel +ylabel + +# pykka +pykka + +# nidaqmx abbreviations +chan +chans +samp +samps + +# codegen internals +codegen +scrapigen + +# nidaqmx C library / header filenames (external) +nicaiu +nicai + +# NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +outp +rngs +srcs +xfer +lvls +cfgs +nums +CAPI +descr + +# Linux system tool names (external) +autoinstall +dpkg +insserv +chkconfig +NISHAREDDIR +typeshed + +# nidaqmx public API (compat-breaking names) +expir +excit +fltr +thrmcpl +thrmstr +anlg +DAQError +pretrig +aognd +zidx +APFI +hwteds +installdriver +AHIGH +TEDSAIRTD +CIGPS +TEDSAI +AIRTD +MIOAI +tedshwteds +MeasurementLink +forcelb +BHIGH +aignd +BBULK +acceld +voltaged + +# NI CVI calling convention macro (C interop comment) +CVICALLBACK + +# NI-DAQmx C API constant fragment +VERIF + +# Deprecated public property name in backward-compat rename map +sensord diff --git a/.cspell/cspell-ignore-words.txt b/.cspell/cspell-ignore-words.txt deleted file mode 100644 index 201a500c8..000000000 --- a/.cspell/cspell-ignore-words.txt +++ /dev/null @@ -1,126 +0,0 @@ -# numpy -allclose -ascontiguousarray -dtype -frombuffer -iinfo -nbytes -ndarray -ndpointer -printoptions -tobytes -tolist -rtol - -# nitypes -nitypes - -# hightime -hightime - -# nptdms -bnptdms -nptdms - -# ctypes (stdlib) -argtype -argtypes -byref -ctypeslib -varargs - -# pytest -addoption -callspec -caplog -fixturenames -getfixturevalue -metafunc -modifyitems -parametrizing -unraisable -unraisablehook - -# python-decouple / dotenv -dotenv - -# tzlocal -localzone - -# matplotlib -xlabel -ylabel - -# pykka -pykka - -# nidaqmx abbreviations -chan -chans -samp -samps - -# codegen internals -codegen -scrapigen - -# nidaqmx C library / header filenames (external) -nicaiu -nicai - -# NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) -outp -rngs -srcs -xfer -lvls -cfgs -nums -CAPI -descr - -# Linux system tool names (external) -autoinstall -dpkg -insserv -chkconfig -NISHAREDDIR -typeshed - -# nidaqmx public API (compat-breaking names) -expir -excit -fltr -thrmcpl -thrmstr -anlg -DAQError -pretrig -aognd -zidx -APFI -hwteds -installdriver -AHIGH -TEDSAIRTD -CIGPS -TEDSAI -AIRTD -MIOAI -tedshwteds -MeasurementLink -forcelb -BHIGH -aignd -BBULK -acceld -voltaged - -# NI CVI calling convention macro (C interop comment) -CVICALLBACK - -# NI-DAQmx C API constant fragment -VERIF - -# Deprecated public property name in backward-compat rename map -sensord diff --git a/cspell.json b/cspell.json index 25580d202..2fdb5318a 100644 --- a/cspell.json +++ b/cspell.json @@ -2,10 +2,9 @@ "version": "0.2", "dictionaryDefinitions": [ { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "addWords": true }, - { "name": "cspell-ignore-words", "path": "./.cspell/cspell-ignore-words.txt", "noSuggest": true }, { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true } ], - "dictionaries": ["cspell-dict", "cspell-ignore-words"], + "dictionaries": ["cspell-dict"], "files": [ "src/handwritten/**/*.py", "src/codegen/utilities/**/*.py", From 096bbde79492c8e92c400bd07d871206a0606ce6 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 19:55:28 -0600 Subject: [PATCH 08/47] chore: add DAQmx abbreviations dictionary and deduplicate cspell-dict --- .cspell/cspell-daqmx-abbreviations.txt | 161 +++++++++++++++++++++++++ .cspell/cspell-dict.txt | 15 --- cspell.json | 3 +- 3 files changed, 163 insertions(+), 16 deletions(-) create mode 100644 .cspell/cspell-daqmx-abbreviations.txt diff --git a/.cspell/cspell-daqmx-abbreviations.txt b/.cspell/cspell-daqmx-abbreviations.txt new file mode 100644 index 000000000..bf51f180a --- /dev/null +++ b/.cspell/cspell-daqmx-abbreviations.txt @@ -0,0 +1,161 @@ +Accel # Accelerometer +Accur # Accuracy +Ack # Acknowledge +Adv # Advance +Alt # Altitude +Amp # Ampere +Amp # Amplifier +AI # Analog Input +AO # Analog Output +Anlg # Analog +Ang # Angle +Ang # Angular +Ant # Antenna +Atten # Attenuation +Attr # Attribute +Attrs # Attributes +Avail # Available +Avg # Average +Avgs # Averages +Bal # Balance +Bin # Binary +Brd # Board +Btm # Bottom +Cal # Calibration +Cap # Capacitor +Chan # Channel +Chans # Channels +Clk # Clock +Comm # Communicating +Comm # Communicator +Compen # Compensated +Compen # Compensation +Cmplt # Complete +Cond # Condition +Cfg # Configuration +Cfgs # Configurations +Cfg # Configure +Conn # Connect +Conn # Connected +Conn # Connecting +Conn # Connector +Const # Constant +ContPulseTrain # Continuous Pulse Train +Cont # Continuous +UTC # Coordinated Universal Time +Cnt # Count +CI # Counter Input +CtrOut # Counter Output +CO # Counter Output +Ctr # Counter +Iex # Current Excitation +Curr # Current +Cyc # Cycle +Detect # Detection +Dev # Device +Devs # Devices +Diff # Differential +DI # Digital Input +DO # Digital Output +Dig # Digital +Dir # Direction +Disp # Display +Dist # Distance +Div # Divide +Div # Divisor +Dyn # Dynamic +Eng # Engineering +Excit # Excitation +Expir # Expiration +Exp # Exponential +Ext # External +Fltr # Filter +FinitePulseTrain # Finite Pulse Train +Freq # Frequency +Gen # General +Gen # Generate +Gen # Generator +Gnf # Ground +HW # Hardware +HAE # Height Above Ellipsoid +Hyst # Hysteresis +Incr # Increment +Init # Initialize +Int # Internal +TAI # International Atomic Time +Interp # Interpolation +Interp # Interpretation +Inv # Invert +Latch # Latching +Lat # Latitude +Lvl # Level +Lin # Linear +Loc # Location +Long # Longitude +Map # Mapping +Max # Maximum +MSL # Mean Sea Level +Meas # Measurable +Meas # Measurement +Mech # Mechanism +Mem # Memory +Msg # Message +Meth # Method +Mic # Microphone +Min # Minimum +Multi # Multiple +Nav # Navigation +Nom # Nominal +NRSE # Non-Referenced Single-Ended +Num # Number +Op # Operation +outClk # Output Clock +Periph # Peripheral +Pos # Position +Pot # Potentiometer +Pwr # Power +Pwrln # Powerline +Prog # Programmed +Prog # Progress +Props # Properties +Quant # Quantity +RangeVals # RangeValues +Rng # Range +Rngs # Ranges +Rdy # Ready +Rec # Record +RefClk # Reference Clock +Ref # Reference +RSE # Referenced Single-Ended +Regen # Regeneration +Req # Request +Rev # Revolution +Samp # Sample +Sat # Satellite +Sep # Separation +Seq # Sequence +Sig # Signal +SW # Software +Src # Source +Srcs # Sources +Spec # Specification +Specs # Specifications +Sq # Square +Sync # Synchronization +Temp # Temperature +Term # Terminal +Terms # Terminals +Thrmstr # Thermistor +Thrmcpl # Thermocouple +Thresh # Threshold +Xfer # Transfer +Trans # Transition +Tri # Triangle +Trig # Trigger +Val # Value +Vals # Values +Vert # Vertical +Vibr # Vibration +Vex # Voltage Excitation +Wfm # Waveform +Win # Window diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index cc4bc3698..8ee603572 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -18,12 +18,10 @@ coeff coeffs RVDT overtemperature -NRSE retriggerable readall RTSI PICO -regen ACRMS SCXI forcebridge @@ -96,9 +94,6 @@ ylabel pykka # nidaqmx abbreviations -chan -chans -samp samps # codegen internals @@ -111,11 +106,7 @@ nicai # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) outp -rngs -srcs -xfer lvls -cfgs nums CAPI descr @@ -129,12 +120,6 @@ NISHAREDDIR typeshed # nidaqmx public API (compat-breaking names) -expir -excit -fltr -thrmcpl -thrmstr -anlg DAQError pretrig aognd diff --git a/cspell.json b/cspell.json index 2fdb5318a..60ed37884 100644 --- a/cspell.json +++ b/cspell.json @@ -2,9 +2,10 @@ "version": "0.2", "dictionaryDefinitions": [ { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "addWords": true }, + { "name": "cspell-daqmx-abbreviations", "path": "./.cspell/cspell-daqmx-abbreviations.txt", "noSuggest": true }, { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true } ], - "dictionaries": ["cspell-dict"], + "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations"], "files": [ "src/handwritten/**/*.py", "src/codegen/utilities/**/*.py", From 41addfa457cc0c20de87011a1758b9b56362c99c Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 20:20:45 -0600 Subject: [PATCH 09/47] chore: improve cspell configuration and dictionaries - Set noSuggest on all dictionaries so project-specific terms don't pollute suggestion lists - Add cspell-dict and cspell-daqmx-abbreviations to the Mako template override so abbreviations are recognized in templates - Merge duplicate entries in cspell-daqmx-abbreviations.txt (e.g. Conn # Connect / Connected / Connecting / Connector) - Add '# Real words' section header to cspell-dict.txt --- .cspell/cspell-daqmx-abbreviations.txt | 36 ++++++++------------------ .cspell/cspell-dict.txt | 1 + cspell.json | 4 +-- 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/.cspell/cspell-daqmx-abbreviations.txt b/.cspell/cspell-daqmx-abbreviations.txt index bf51f180a..e8753ed05 100644 --- a/.cspell/cspell-daqmx-abbreviations.txt +++ b/.cspell/cspell-daqmx-abbreviations.txt @@ -3,13 +3,11 @@ Accur # Accuracy Ack # Acknowledge Adv # Advance Alt # Altitude -Amp # Ampere -Amp # Amplifier +Amp # Ampere / Amplifier AI # Analog Input AO # Analog Output Anlg # Analog -Ang # Angle -Ang # Angular +Ang # Angle / Angular Ant # Antenna Atten # Attenuation Attr # Attribute @@ -26,19 +24,13 @@ Cap # Capacitor Chan # Channel Chans # Channels Clk # Clock -Comm # Communicating -Comm # Communicator -Compen # Compensated -Compen # Compensation +Comm # Communicating / Communicator +Compen # Compensated / Compensation Cmplt # Complete Cond # Condition -Cfg # Configuration +Cfg # Configuration / Configure Cfgs # Configurations -Cfg # Configure -Conn # Connect -Conn # Connected -Conn # Connecting -Conn # Connector +Conn # Connect / Connected / Connecting / Connector Const # Constant ContPulseTrain # Continuous Pulse Train Cont # Continuous @@ -61,8 +53,7 @@ Dig # Digital Dir # Direction Disp # Display Dist # Distance -Div # Divide -Div # Divisor +Div # Divide / Divisor Dyn # Dynamic Eng # Engineering Excit # Excitation @@ -72,9 +63,7 @@ Ext # External Fltr # Filter FinitePulseTrain # Finite Pulse Train Freq # Frequency -Gen # General -Gen # Generate -Gen # Generator +Gen # General / Generate / Generator Gnf # Ground HW # Hardware HAE # Height Above Ellipsoid @@ -83,8 +72,7 @@ Incr # Increment Init # Initialize Int # Internal TAI # International Atomic Time -Interp # Interpolation -Interp # Interpretation +Interp # Interpolation / Interpretation Inv # Invert Latch # Latching Lat # Latitude @@ -95,8 +83,7 @@ Long # Longitude Map # Mapping Max # Maximum MSL # Mean Sea Level -Meas # Measurable -Meas # Measurement +Meas # Measurable / Measurement Mech # Mechanism Mem # Memory Msg # Message @@ -115,8 +102,7 @@ Pos # Position Pot # Potentiometer Pwr # Power Pwrln # Powerline -Prog # Programmed -Prog # Progress +Prog # Programmed / Progress Props # Properties Quant # Quantity RangeVals # RangeValues diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 8ee603572..921c33862 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -1,3 +1,4 @@ +# Real words nidaqmx tdms yoctosecond diff --git a/cspell.json b/cspell.json index 60ed37884..027a80ce4 100644 --- a/cspell.json +++ b/cspell.json @@ -1,7 +1,7 @@ { "version": "0.2", "dictionaryDefinitions": [ - { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "addWords": true }, + { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "noSuggest": true }, { "name": "cspell-daqmx-abbreviations", "path": "./.cspell/cspell-daqmx-abbreviations.txt", "noSuggest": true }, { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true } ], @@ -24,7 +24,7 @@ { // Mako templates: activate the Python dictionary so Python identifiers in templates aren't flagged. "filename": "**/*.mako", - "dictionaries": ["python", "cspell-mako-keywords"] + "dictionaries": ["cspell-dict", "python", "cspell-mako-keywords", "cspell-daqmx-abbreviations"] } ] } From 9e51224dd8c57183754843372810347721f3d05f Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 20:44:59 -0600 Subject: [PATCH 10/47] chore: switch cspell to ignorePaths-only pattern and expand scope to docs - Replace files allowlist with ignorePaths blocklist and useGitignore: true - Add docs/**/*.rst to spell-check scope - Add .cspell/cspell-sphinx-directives.txt dictionary for Sphinx RST directives - Add *.rst override to apply Sphinx directives dictionary --- .cspell/cspell-sphinx-directives.txt | 8 +++++ cspell.json | 48 ++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 .cspell/cspell-sphinx-directives.txt diff --git a/.cspell/cspell-sphinx-directives.txt b/.cspell/cspell-sphinx-directives.txt new file mode 100644 index 000000000..0de4d4287 --- /dev/null +++ b/.cspell/cspell-sphinx-directives.txt @@ -0,0 +1,8 @@ +# Sphinx RST directives and options +automodule +toctree +currentmodule +genindex +modindex +undoc +bysource diff --git a/cspell.json b/cspell.json index 027a80ce4..a92835783 100644 --- a/cspell.json +++ b/cspell.json @@ -3,28 +3,58 @@ "dictionaryDefinitions": [ { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "noSuggest": true }, { "name": "cspell-daqmx-abbreviations", "path": "./.cspell/cspell-daqmx-abbreviations.txt", "noSuggest": true }, - { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true } + { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true }, + { "name": "cspell-sphinx-directives", "path": "./.cspell/cspell-sphinx-directives.txt", "noSuggest": true } ], "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations"], - "files": [ - "src/handwritten/**/*.py", - "src/codegen/utilities/**/*.py", - "src/codegen/templates/**/*.mako", - "tests/**/*.py", - "examples/**/*.py" - ], + "useGitignore": true, "ignorePaths": [ + // Entire trees - not spell-checked + "third_party/**", + "generated/**", + ".cspell/**", + ".github/**", + "docs/img/**", + "tests/test_assets/**", + // src/codegen - only utilities/ and templates/ are spell-checked "src/codegen/metadata/**", "src/codegen/properties/**", "src/codegen/functions/**", "src/codegen/protos/**", - "generated/**" + "src/codegen/*.py", + // docs - only .rst files are spell-checked + "docs/conf.py", + "docs/make.bat", + "docs/Makefile", + // Configuration and data file types + "*.md", + "*.toml", + "*.ini", + "*.lock", + "*.yml", + "*.yaml", + "*.json", + "*.txt", + "*.cfg", + "*.sample", + // Files without standard extensions + "LICENSE", + "CODEOWNERS", + ".gitignore", + ".gitmodules", + // Root-level .rst (not in docs/) + "README.rst" ], "overrides": [ { // Mako templates: activate the Python dictionary so Python identifiers in templates aren't flagged. "filename": "**/*.mako", "dictionaries": ["cspell-dict", "python", "cspell-mako-keywords", "cspell-daqmx-abbreviations"] + }, + { + // RST docs: add Sphinx directive vocabulary. + "filename": "**/*.rst", + "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "cspell-sphinx-directives"] } ] } From c9dccd3dcdfd898b1c02cf04458d4217b61361bd Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 21:20:26 -0600 Subject: [PATCH 11/47] chore: expand cspell scope to .md files and fix spelling errors - Add per-file dictionaries and overrides for CHANGELOG.md and CONTRIBUTING.md - Add .cspell/cspell-changelog-words.txt with historical identifiers and bot names - Add .cspell/cspell-contributing-words.txt with contribution workflow terms - Add package names to cspell-dict.txt (numpy, ctypes, pytest, matplotlib, pyplot) - Add HWCU and NIDAQ to cspell-dict.txt - Add bitfields plural form to cspell-dict.txt - Add backlinks to cspell-sphinx-directives.txt - Add python dictionary to .rst override for code examples - fix: correct domaindirectives typo in CHANGELOG.md --- .cspell/cspell-changelog-words.txt | 21 +++++++++++++++++++++ .cspell/cspell-contributing-words.txt | 6 ++++++ .cspell/cspell-dict.txt | 8 ++++++++ .cspell/cspell-sphinx-directives.txt | 1 + CHANGELOG.md | 2 +- cspell.json | 27 +++++++++++++++++---------- 6 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 .cspell/cspell-changelog-words.txt create mode 100644 .cspell/cspell-contributing-words.txt diff --git a/.cspell/cspell-changelog-words.txt b/.cspell/cspell-changelog-words.txt new file mode 100644 index 000000000..21766b8aa --- /dev/null +++ b/.cspell/cspell-changelog-words.txt @@ -0,0 +1,21 @@ +# Words specific to CHANGELOG.md +# DAQmx abbreviation constants (historical enum names split in v0.5.2) +AIADC +AIDC +AILVDT +AIRVDT +CITC +# Tool/package/project names +styleguide +pyproject +grpcdevice +virtualenvs +pynidaqmx +readinto +conv +libtime +# CI bot/username fragments +rdss +nidaqmxbot +# Historical broken enum name (renamed to A_AND_B in v1.0.0) +AAND diff --git a/.cspell/cspell-contributing-words.txt b/.cspell/cspell-contributing-words.txt new file mode 100644 index 000000000..7dfc9000e --- /dev/null +++ b/.cspell/cspell-contributing-words.txt @@ -0,0 +1,6 @@ +# Words specific to CONTRIBUTING.md +styleguide +mypy +pypi +pyproject +developercertificate diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 921c33862..17cbacc00 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -6,6 +6,7 @@ yoctoseconds unflatten timebase bitfield +bitfields DAQmx cDAQ LVDT @@ -37,8 +38,10 @@ subseconds EEPROM docstrings cdecl +HWCU # numpy +numpy allclose ascontiguousarray dtype @@ -63,6 +66,7 @@ bnptdms nptdms # ctypes (stdlib) +ctypes argtype argtypes byref @@ -70,6 +74,7 @@ ctypeslib varargs # pytest +pytest addoption callspec caplog @@ -88,6 +93,8 @@ dotenv localzone # matplotlib +matplotlib +pyplot xlabel ylabel @@ -122,6 +129,7 @@ typeshed # nidaqmx public API (compat-breaking names) DAQError +NIDAQ pretrig aognd zidx diff --git a/.cspell/cspell-sphinx-directives.txt b/.cspell/cspell-sphinx-directives.txt index 0de4d4287..b7c429794 100644 --- a/.cspell/cspell-sphinx-directives.txt +++ b/.cspell/cspell-sphinx-directives.txt @@ -6,3 +6,4 @@ genindex modindex undoc bysource +backlinks diff --git a/CHANGELOG.md b/CHANGELOG.md index 04686e79d..0fe8969ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -339,7 +339,7 @@ All notable changes to this project will be documented in this file. * Update setup.py description and fix issues 2, 3, 5, and 6 raised by Ed Page. * Splitting joined acronyms AIADC, AIDC, AILVDT, AIRVDT and CITC. * Adding link to LICENSE file. - * Updating README.rst file in source directory to eliminate Sphinx domaindirectives and add link to documentation on + * Updating README.rst file in source directory to eliminate Sphinx domain directives and add link to documentation on readthedocs. ## 0.5.0 diff --git a/cspell.json b/cspell.json index a92835783..37439bcbd 100644 --- a/cspell.json +++ b/cspell.json @@ -4,7 +4,9 @@ { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "noSuggest": true }, { "name": "cspell-daqmx-abbreviations", "path": "./.cspell/cspell-daqmx-abbreviations.txt", "noSuggest": true }, { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true }, - { "name": "cspell-sphinx-directives", "path": "./.cspell/cspell-sphinx-directives.txt", "noSuggest": true } + { "name": "cspell-sphinx-directives", "path": "./.cspell/cspell-sphinx-directives.txt", "noSuggest": true }, + { "name": "cspell-contributing-words", "path": "./.cspell/cspell-contributing-words.txt", "noSuggest": true }, + { "name": "cspell-changelog-words", "path": "./.cspell/cspell-changelog-words.txt", "noSuggest": true } ], "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations"], "useGitignore": true, @@ -26,8 +28,7 @@ "docs/conf.py", "docs/make.bat", "docs/Makefile", - // Configuration and data file types - "*.md", + // Configuration and data file types (not prose) "*.toml", "*.ini", "*.lock", @@ -38,12 +39,8 @@ "*.cfg", "*.sample", // Files without standard extensions - "LICENSE", - "CODEOWNERS", ".gitignore", - ".gitmodules", - // Root-level .rst (not in docs/) - "README.rst" + ".gitmodules" ], "overrides": [ { @@ -52,9 +49,19 @@ "dictionaries": ["cspell-dict", "python", "cspell-mako-keywords", "cspell-daqmx-abbreviations"] }, { - // RST docs: add Sphinx directive vocabulary. + // RST docs: add Sphinx directive vocabulary and Python identifiers for code examples. "filename": "**/*.rst", - "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "cspell-sphinx-directives"] + "dictionaries": ["cspell-dict", "python", "cspell-daqmx-abbreviations", "cspell-sphinx-directives"] + }, + { + // CONTRIBUTING.md: add contribution workflow terminology. + "filename": "**/CONTRIBUTING.md", + "dictionaries": ["cspell-dict", "cspell-contributing-words"] + }, + { + // CHANGELOG.md: add historical identifiers and project-specific terms. + "filename": "**/CHANGELOG.md", + "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "cspell-changelog-words"] } ] } From 94d4f44f5eb6025cbff20d6ba7e23a45a86d7977 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 21:32:22 -0600 Subject: [PATCH 12/47] chore: replace blanket extension exclusions with specific file paths in cspell --- cspell.json | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/cspell.json b/cspell.json index 37439bcbd..d16030aa9 100644 --- a/cspell.json +++ b/cspell.json @@ -28,16 +28,15 @@ "docs/conf.py", "docs/make.bat", "docs/Makefile", - // Configuration and data file types (not prose) - "*.toml", - "*.ini", - "*.lock", - "*.yml", - "*.yaml", - "*.json", - "*.txt", - "*.cfg", - "*.sample", + // Configuration and data files (not prose) + "cspell.json", + "tox.ini", + "tests/max_config/**", + ".env.sample", + ".readthedocs.yml", + "poetry.lock", + "poetry.toml", + "pyproject.toml", // Files without standard extensions ".gitignore", ".gitmodules" From a75777281b667273fe2ef2e21241550ab291bca0 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 21:35:01 -0600 Subject: [PATCH 13/47] chore: sort cspell ignorePaths in VS Code Explorer order --- cspell.json | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/cspell.json b/cspell.json index d16030aa9..68a66a51f 100644 --- a/cspell.json +++ b/cspell.json @@ -11,35 +11,30 @@ "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations"], "useGitignore": true, "ignorePaths": [ - // Entire trees - not spell-checked - "third_party/**", - "generated/**", ".cspell/**", ".github/**", "docs/img/**", - "tests/test_assets/**", - // src/codegen - only utilities/ and templates/ are spell-checked - "src/codegen/metadata/**", - "src/codegen/properties/**", - "src/codegen/functions/**", - "src/codegen/protos/**", - "src/codegen/*.py", - // docs - only .rst files are spell-checked "docs/conf.py", "docs/make.bat", "docs/Makefile", - // Configuration and data files (not prose) - "cspell.json", - "tox.ini", + "generated/**", + "src/codegen/functions/**", + "src/codegen/metadata/**", + "src/codegen/protos/**", + "src/codegen/properties/**", + "src/codegen/*.py", "tests/max_config/**", + "tests/test_assets/**", + "third_party/**", ".env.sample", + ".gitignore", + ".gitmodules", ".readthedocs.yml", + "cspell.json", "poetry.lock", "poetry.toml", "pyproject.toml", - // Files without standard extensions - ".gitignore", - ".gitmodules" + "tox.ini" ], "overrides": [ { From bbdf4c7ef85d01b35b879eb40aedffe2b995ea52 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 21:36:32 -0600 Subject: [PATCH 14/47] chore: spell-check .env.sample and add MBCS, multibyte to dictionary --- .cspell/cspell-dict.txt | 2 ++ cspell.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 17cbacc00..890f12fc6 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -39,6 +39,8 @@ EEPROM docstrings cdecl HWCU +MBCS +multibyte # numpy numpy diff --git a/cspell.json b/cspell.json index 68a66a51f..1e2842353 100644 --- a/cspell.json +++ b/cspell.json @@ -26,7 +26,6 @@ "tests/max_config/**", "tests/test_assets/**", "third_party/**", - ".env.sample", ".gitignore", ".gitmodules", ".readthedocs.yml", From 3a7d16485de4f95e865485bd7d7d672660303b43 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 21:41:32 -0600 Subject: [PATCH 15/47] chore: spell-check .gitignore --- .cspell/cspell-dict.txt | 5 +++++ cspell.json | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 890f12fc6..253719f8e 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -75,6 +75,11 @@ byref ctypeslib varargs +# Python tooling (directory/artifact names, not real words) +pycache +htmlcov +venv + # pytest pytest addoption diff --git a/cspell.json b/cspell.json index 1e2842353..c59a8da8e 100644 --- a/cspell.json +++ b/cspell.json @@ -26,7 +26,6 @@ "tests/max_config/**", "tests/test_assets/**", "third_party/**", - ".gitignore", ".gitmodules", ".readthedocs.yml", "cspell.json", From 8a8f88d24292bc0fa8dd0ad9e2a0385e000c28c5 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 21:43:00 -0600 Subject: [PATCH 16/47] chore: remove redundant comments from cspell overrides --- cspell.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cspell.json b/cspell.json index c59a8da8e..10f23fdbf 100644 --- a/cspell.json +++ b/cspell.json @@ -36,22 +36,18 @@ ], "overrides": [ { - // Mako templates: activate the Python dictionary so Python identifiers in templates aren't flagged. "filename": "**/*.mako", "dictionaries": ["cspell-dict", "python", "cspell-mako-keywords", "cspell-daqmx-abbreviations"] }, { - // RST docs: add Sphinx directive vocabulary and Python identifiers for code examples. "filename": "**/*.rst", "dictionaries": ["cspell-dict", "python", "cspell-daqmx-abbreviations", "cspell-sphinx-directives"] }, { - // CONTRIBUTING.md: add contribution workflow terminology. "filename": "**/CONTRIBUTING.md", "dictionaries": ["cspell-dict", "cspell-contributing-words"] }, { - // CHANGELOG.md: add historical identifiers and project-specific terms. "filename": "**/CHANGELOG.md", "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "cspell-changelog-words"] } From 3603c292bd6e22464454a11c79e0275f1de0001b Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 21:45:32 -0600 Subject: [PATCH 17/47] chore: use consistent dictionary order in cspell overrides --- cspell.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cspell.json b/cspell.json index 10f23fdbf..a291c038a 100644 --- a/cspell.json +++ b/cspell.json @@ -37,11 +37,11 @@ "overrides": [ { "filename": "**/*.mako", - "dictionaries": ["cspell-dict", "python", "cspell-mako-keywords", "cspell-daqmx-abbreviations"] + "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-mako-keywords"] }, { "filename": "**/*.rst", - "dictionaries": ["cspell-dict", "python", "cspell-daqmx-abbreviations", "cspell-sphinx-directives"] + "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-sphinx-directives"] }, { "filename": "**/CONTRIBUTING.md", From 86769b795a84a9b6136b9830ac7a2a6fc2f35281 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 22:20:14 -0600 Subject: [PATCH 18/47] chore: regenerate utils.py after cspell comment style fix --- generated/nidaqmx/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generated/nidaqmx/utils.py b/generated/nidaqmx/utils.py index 9524aac6c..819d565d4 100644 --- a/generated/nidaqmx/utils.py +++ b/generated/nidaqmx/utils.py @@ -10,7 +10,8 @@ from nidaqmx.grpc_session_options import GrpcSessionOptions # Method logic adapted from -# //Measurements/Infrastructure/dmxf/trunk/2.5/source/nimuck/parseUtilities.cpp # cspell:disable-line +# cspell:disable-next-line +# //Measurements/Infrastructure/dmxf/trunk/2.5/source/nimuck/parseUtilities.cpp _invalid_range_syntax_message = ( "Syntax for a range of objects in the input string is invalid.\n\n" From 9eddb7718151ee56a0fc3299bd007d8cff65cd2f Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 22:27:38 -0600 Subject: [PATCH 19/47] chore: run cspell in CI --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 902e548aa..7920f7cf0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,8 @@ jobs: install-args: "--all-extras --with examples" - name: Run Bandit security checks run: poetry run bandit -c pyproject.toml -r generated/nidaqmx + - name: Run cspell + run: npx cspell "**" --no-progress --quiet - name: Generate ni-daqmx files if: ${{ runner.os == 'Linux' && matrix.python-version == env.codegen-python-version }} run: | From ed9a81354f24acd3f765e4dc0f30a0e7842cc597 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 22:29:30 -0600 Subject: [PATCH 20/47] docs: document cspell as a required step in the contribution workflow --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fa0ede477..89165abd5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,8 @@ pass. conventions. If this reports errors, first run `poetry run ni-python-styleguide fix` in order to sort imports and format the code with Black, then manually fix any remaining errors. 10. Run `poetry run mypy` to statically type-check the updated code. -11. Send a GitHub Pull Request to the main repository's master branch. GitHub Pull Requests are the +11. Run `npx cspell "**" --no-progress` to check for spelling errors. This requires [Node.js](https://nodejs.org/) to be installed. +12. Send a GitHub Pull Request to the main repository's master branch. GitHub Pull Requests are the expected method of code collaboration on this project. # Testing From d6cf56fbf9c6d79f5d0fddf71237aef285b0a80a Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Thu, 5 Mar 2026 22:44:09 -0600 Subject: [PATCH 21/47] chore: consolidate cspell:ignore directives in test_internationalization.py --- tests/acceptance/test_internationalization.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/acceptance/test_internationalization.py b/tests/acceptance/test_internationalization.py index 9a8c55153..e7d578a58 100644 --- a/tests/acceptance/test_internationalization.py +++ b/tests/acceptance/test_internationalization.py @@ -1,7 +1,4 @@ -# cspell:ignore Gerät -# cspell:ignore appareil -# cspell:ignore prüfende Daten -# cspell:ignore Données +# cspell:ignore appareil Daten Données Gerät prüfende from __future__ import annotations import pathlib From 2aad1292a4fc0316174747b5d94c005cb760bc68 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Sat, 7 Mar 2026 21:27:21 -0600 Subject: [PATCH 22/47] chore: remove redundant bnptdms from dictionary cspell treats \b as a regex metacharacter, so r"\bnptdms\b" produces the token nptdms, which is already in the dictionary. The bnptdms entry was never needed. --- .cspell/cspell-dict.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 253719f8e..45af9b1c5 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -64,7 +64,6 @@ nitypes hightime # nptdms -bnptdms nptdms # ctypes (stdlib) From 0b65c735a96e68113ad5ff1c11c791a5fae1f584 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Sat, 7 Mar 2026 22:48:53 -0600 Subject: [PATCH 23/47] refactor: rename FULLSCALE_RAW_MAX/MIN to FULL_SCALE_RAW_MAX/MIN in test_in_stream --- tests/component/task/test_in_stream.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/component/task/test_in_stream.py b/tests/component/task/test_in_stream.py index 2d045eee8..f91eaa262 100644 --- a/tests/component/task/test_in_stream.py +++ b/tests/component/task/test_in_stream.py @@ -15,8 +15,8 @@ SINE_VOLTAGE_MIN = -2.5 SINE_RAW_MAX = 16383 SINE_RAW_MIN = -16384 -FULLSCALE_RAW_MAX = 32767 -FULLSCALE_RAW_MIN = -32768 +FULL_SCALE_RAW_MAX = 32767 +FULL_SCALE_RAW_MIN = -32768 @pytest.fixture() @@ -107,7 +107,7 @@ def test___valid_array___readinto___returns_valid_samples( ) -> None: # Initialize the array to full-scale readings to ensure it is overwritten. data = numpy.full( - ai_sine_task.number_of_channels * samples_to_read, FULLSCALE_RAW_MAX, dtype=numpy.int16 + ai_sine_task.number_of_channels * samples_to_read, FULL_SCALE_RAW_MAX, dtype=numpy.int16 ) with pytest.deprecated_call(): @@ -122,14 +122,14 @@ def test___odd_sized_array___readinto___returns_whole_samples_and_clears_padding ) -> None: _create_ai_sine_channels(task, sim_6363_device, number_of_channels=2) # Initialize the array to full-scale readings to ensure it is overwritten. - data = numpy.full(19, FULLSCALE_RAW_MIN, dtype=numpy.int16) + data = numpy.full(19, FULL_SCALE_RAW_MIN, dtype=numpy.int16) with pytest.deprecated_call(): samples_read = task.in_stream.readinto(data) assert samples_read == 9 assert (SINE_RAW_MIN <= data[:-1]).all() and (data[:-1] <= SINE_RAW_MAX).all() - assert data[-1] == 0 # not FULLSCALE_RAW_MIN + assert data[-1] == 0 # not FULL_SCALE_RAW_MIN def test___ai_finite_task___read_all___returns_valid_samples_shape_and_dtype( @@ -172,7 +172,7 @@ def test___valid_array___read_into___returns_valid_samples( ) -> None: # Initialize the array to full-scale readings to ensure it is overwritten. data = numpy.full( - ai_sine_task.number_of_channels * samples_to_read, FULLSCALE_RAW_MAX, dtype=numpy.int16 + ai_sine_task.number_of_channels * samples_to_read, FULL_SCALE_RAW_MAX, dtype=numpy.int16 ) samples_read = ai_sine_task.in_stream.read_into(data) @@ -186,13 +186,13 @@ def test___odd_sized_array___read_into___returns_whole_samples_and_clears_paddin ) -> None: _create_ai_sine_channels(task, sim_6363_device, number_of_channels=2) # Initialize the array to full-scale readings to ensure it is overwritten. - data = numpy.full(19, FULLSCALE_RAW_MIN, dtype=numpy.int16) + data = numpy.full(19, FULL_SCALE_RAW_MIN, dtype=numpy.int16) samples_read = task.in_stream.read_into(data) assert samples_read == 9 assert (SINE_RAW_MIN <= data[:-1]).all() and (data[:-1] <= SINE_RAW_MAX).all() - assert data[-1] == 0 # not FULLSCALE_RAW_MIN + assert data[-1] == 0 # not FULL_SCALE_RAW_MIN def test___valid_path___configure_logging___returns_assigned_values(ai_task: nidaqmx.Task): From 46cb5ae584a584faf9e6a01209ee7322cb49fda9 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Sat, 7 Mar 2026 22:49:38 -0600 Subject: [PATCH 24/47] chore: alphabetize cspell dictionary and annotate each entry with its origin --- .cspell/cspell-dict.txt | 292 +++++++++++++++++----------------------- 1 file changed, 125 insertions(+), 167 deletions(-) diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 45af9b1c5..5d46e926f 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -1,167 +1,125 @@ -# Real words -nidaqmx -tdms -yoctosecond -yoctoseconds -unflatten -timebase -bitfield -bitfields -DAQmx -cDAQ -LVDT -bitstream -overrange -CPLD -IEPE -PXIe -fullscale -coeff -coeffs -RVDT -overtemperature -retriggerable -readall -RTSI -PICO -ACRMS -SCXI -forcebridge -torquebridge -pressurebridge -MILLI -unreserve -unreserves -DKMS -subsecond -subseconds -EEPROM -docstrings -cdecl -HWCU -MBCS -multibyte - -# numpy -numpy -allclose -ascontiguousarray -dtype -frombuffer -iinfo -nbytes -ndarray -ndpointer -printoptions -tobytes -tolist -rtol - -# nitypes -nitypes - -# hightime -hightime - -# nptdms -nptdms - -# ctypes (stdlib) -ctypes -argtype -argtypes -byref -ctypeslib -varargs - -# Python tooling (directory/artifact names, not real words) -pycache -htmlcov -venv - -# pytest -pytest -addoption -callspec -caplog -fixturenames -getfixturevalue -metafunc -modifyitems -parametrizing -unraisable -unraisablehook - -# python-decouple / dotenv -dotenv - -# tzlocal -localzone - -# matplotlib -matplotlib -pyplot -xlabel -ylabel - -# pykka -pykka - -# nidaqmx abbreviations -samps - -# codegen internals -codegen -scrapigen - -# nidaqmx C library / header filenames (external) -nicaiu -nicai - -# NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) -outp -lvls -nums -CAPI -descr - -# Linux system tool names (external) -autoinstall -dpkg -insserv -chkconfig -NISHAREDDIR -typeshed - -# nidaqmx public API (compat-breaking names) -DAQError -NIDAQ -pretrig -aognd -zidx -APFI -hwteds -installdriver -AHIGH -TEDSAIRTD -CIGPS -TEDSAI -AIRTD -MIOAI -tedshwteds -MeasurementLink -forcelb -BHIGH -aignd -BBULK -acceld -voltaged - -# NI CVI calling convention macro (C interop comment) -CVICALLBACK - -# NI-DAQmx C API constant fragment -VERIF - -# Deprecated public property name in backward-compat rename map -sensord +acceld # NI-DAQmx public API (compatibility breaking name) +ACRMS # NI-DAQmx measurement type abbreviation (AC RMS) +addoption # Dependency: pytest +AHIGH # NI-DAQmx public API (compatibility breaking name) +aignd # NI-DAQmx public API (compatibility breaking name) +AIRTD # NI-DAQmx public API (compatibility breaking name) +allclose # Dependency: numpy +aognd # NI-DAQmx public API (compatibility breaking name) +APFI # NI-DAQmx public API (compatibility breaking name) +argtype # Standard library: ctypes +argtypes # Standard library: ctypes +ascontiguousarray # Dependency: numpy +autoinstall # Linux system tool names (external) +BBULK # NI-DAQmx public API (compatibility breaking name) +BHIGH # NI-DAQmx public API (compatibility breaking name) +bitfield # Real word +bitfields # Real word +bitstream # Real word +byref # Standard library: ctypes +callspec # Dependency: pytest +CAPI # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +caplog # Dependency: pytest +cDAQ # Initialism: CompactDAQ (NI hardware platform) +chkconfig # Linux system tool names (external) +CIGPS # NI-DAQmx public API (compatibility breaking name) +codegen # codegen internals +CPLD # Initialism: Complex Programmable Logic Device +ctypes # Standard library: ctypes +ctypeslib # Standard library: ctypes +cdecl # C calling convention name (used in codegen) +coeff # NI-DAQmx public API (compatibility breaking name) +coeffs # NI-DAQmx public API (compatibility breaking name) +CVICALLBACK # NI CVI calling convention macro (C interop comment) +DAQError # NI-DAQmx public API (compatibility breaking name) +DAQmx # Initialism: Data Acquisition Measurement Extensions +descr # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +DKMS # Initialism: Dynamic Kernel Module Support +docstrings # Python terminology +dotenv # Dependency: python-decouple / dotenv +dpkg # Linux system tool names (external) +dtype # Dependency: numpy +EEPROM # Initialism: Electrically Erasable Programmable Read-Only Memory +fixturenames # Dependency: pytest +forcebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) +forcelb # NI-DAQmx public API (compatibility breaking name) +frombuffer # Dependency: numpy +getfixturevalue # Dependency: pytest +hightime # Dependency: hightime +htmlcov # Python tooling (directory/artifact names, not real words) +HWCU # Initialism: Hardware Configuration Utility +hwteds # NI-DAQmx public API (compatibility breaking name) +IEPE # Initialism: Integrated Electronics Piezo-Electric +iinfo # Dependency: numpy +insserv # Linux system tool names (external) +installdriver # NI-DAQmx public API (compatibility breaking name) +localzone # Dependency: tzlocal +LVDT # Initialism: Linear Variable Differential Transformer +lvls # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +matplotlib # Dependency: matplotlib +MBCS # Initialism: Multi-Byte Character Set +MeasurementLink # NI product name +metafunc # Dependency: pytest +MILLI # Real word +MIOAI # NI-DAQmx public API (compatibility breaking name) +modifyitems # Dependency: pytest +multibyte # Real word +nbytes # Dependency: numpy +ndarray # Dependency: numpy +ndpointer # Dependency: numpy +nicai # NI-DAQmx C library / header filenames (external) +nicaiu # NI-DAQmx C library / header filenames (external) +NIDAQ # NI-DAQmx public API (compatibility breaking name) +nidaqmx # NI-DAQmx package name +NISHAREDDIR # NI Linux install directory environment variable +nitypes # Dependency: nitypes +nptdms # Dependency: nptdms +numpy # Dependency: numpy +nums # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +outp # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +overrange # Real word +overtemperature # Real word +parametrizing # Dependency: pytest +PICO # Real word +pressurebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) +pretrig # NI-DAQmx public API (compatibility breaking name) +printoptions # Dependency: numpy +PXIe # Initialism: PCI eXtensions for Instrumentation, Express variant +pycache # Python tooling (directory/artifact names, not real words) +pykka # Dependency: pykka +pyplot # Dependency: matplotlib +pytest # Dependency: pytest +readall # Real word +retriggerable # Real word +rtol # Dependency: numpy +RTSI # Initialism: Real-Time System Integration +RVDT # Initialism: Rotary Variable Differential Transformer +samps # NI-DAQmx public API (compatibility breaking name) +scrapigen # codegen internals +SCXI # Initialism: Signal Conditioning eXtensions for Instrumentation +sensord # Deprecated public property name in backward-compat rename map +subsecond # Real word +subseconds # Real word +TDMS # Initialism: Technical Data Management Streaming +TEDSAI # NI-DAQmx public API (compatibility breaking name) +TEDSAIRTD # NI-DAQmx public API (compatibility breaking name) +tedshwteds # NI-DAQmx public API (compatibility breaking name) +timebase # Real word +tobytes # Dependency: numpy +tolist # Dependency: numpy +torquebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) +typeshed # Python type stubs repository (mypy/pyright tooling) +unflatten # Real word +unraisable # Dependency: pytest +unraisablehook # Dependency: pytest +unreserve # Real word +unreserves # Real word +varargs # Standard library: ctypes +venv # Python tooling (directory/artifact names, not real words) +VERIF # NI-DAQmx public API (compatibility breaking name) +voltaged # NI-DAQmx public API (compatibility breaking name) +xlabel # Dependency: matplotlib +ylabel # Dependency: matplotlib +yoctosecond # Real word +yoctoseconds # Real word +zidx # NI-DAQmx public API (compatibility breaking name) From cc6040616978d89650e8f67323af42303abb099e Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Sun, 8 Mar 2026 07:03:53 -0500 Subject: [PATCH 25/47] chore: sort and annotate sphinx directives and mako keywords dictionaries --- .cspell/cspell-mako-keywords.txt | 9 ++++++--- .cspell/cspell-sphinx-directives.txt | 10 ++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.cspell/cspell-mako-keywords.txt b/.cspell/cspell-mako-keywords.txt index aebf8d7af..9d9a013a2 100644 --- a/.cspell/cspell-mako-keywords.txt +++ b/.cspell/cspell-mako-keywords.txt @@ -1,7 +1,10 @@ +# Mako template closing keywords for control structures (% endXXX markers). +# Mako closes each % control block with a matching % end line. +# All seven closing keywords are included; they are all used in src/codegen/templates/. +endblock +enddef endfor endif +endtry endwhile endwith -endtry -enddef -endblock diff --git a/.cspell/cspell-sphinx-directives.txt b/.cspell/cspell-sphinx-directives.txt index b7c429794..db70ba503 100644 --- a/.cspell/cspell-sphinx-directives.txt +++ b/.cspell/cspell-sphinx-directives.txt @@ -1,9 +1,11 @@ -# Sphinx RST directives and options +# Sphinx directive names and option values flagged by cspell in this project's .rst files. +# This is not an exhaustive list of Sphinx directives — only words that cspell does not +# recognize from its built-in dictionaries and that appear in docs/ are included here. automodule -toctree +backlinks +bysource currentmodule genindex modindex +toctree undoc -bysource -backlinks From d026f33cad4ee86373327336486ec8ce3438fad0 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Sun, 8 Mar 2026 07:29:46 -0500 Subject: [PATCH 26/47] chore: sort and annotate changelog and contributing dictionaries, add python dict to changelog override --- .cspell/cspell-changelog-words.txt | 32 ++++++++++----------------- .cspell/cspell-contributing-words.txt | 10 ++++----- cspell.json | 2 +- 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/.cspell/cspell-changelog-words.txt b/.cspell/cspell-changelog-words.txt index 21766b8aa..725f99219 100644 --- a/.cspell/cspell-changelog-words.txt +++ b/.cspell/cspell-changelog-words.txt @@ -1,21 +1,13 @@ # Words specific to CHANGELOG.md -# DAQmx abbreviation constants (historical enum names split in v0.5.2) -AIADC -AIDC -AILVDT -AIRVDT -CITC -# Tool/package/project names -styleguide -pyproject -grpcdevice -virtualenvs -pynidaqmx -readinto -conv -libtime -# CI bot/username fragments -rdss -nidaqmxbot -# Historical broken enum name (renamed to A_AND_B in v1.0.0) -AAND +AAND # NI-DAQmx discontinued enum constant +AIADC # NI-DAQmx discontinued enum constant +AIDC # NI-DAQmx discontinued enum constant +AILVDT # NI-DAQmx discontinued enum constant +AIRVDT # NI-DAQmx discontinued enum constant +CITC # NI-DAQmx discontinued enum constant +grpcdevice # ni.grpcdevice.v1.proto package name +libtime # NI-DAQmx project component name (lib_time module) +nidaqmxbot # CI bot username (rdss-nidaqmxbot) +pynidaqmx # former package name (conflicted with nidaqmx-python) +rdss # CI bot username prefix (rdss-nidaqmxbot) +styleguide # ni-python-styleguide linting tool diff --git a/.cspell/cspell-contributing-words.txt b/.cspell/cspell-contributing-words.txt index 7dfc9000e..addff81f2 100644 --- a/.cspell/cspell-contributing-words.txt +++ b/.cspell/cspell-contributing-words.txt @@ -1,6 +1,6 @@ # Words specific to CONTRIBUTING.md -styleguide -mypy -pypi -pyproject -developercertificate +developercertificate # Developer Certificate of Origin website +mypy # Python static type checker +pypi # Python Package Index +pyproject # pyproject.toml configuration filename +styleguide # ni-python-styleguide linting tool diff --git a/cspell.json b/cspell.json index a291c038a..60e34c0a3 100644 --- a/cspell.json +++ b/cspell.json @@ -49,7 +49,7 @@ }, { "filename": "**/CHANGELOG.md", - "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "cspell-changelog-words"] + "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-changelog-words"] } ] } From eb06e34b6ac7d69480bcd01b1f736c263a849e19 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Sun, 8 Mar 2026 07:50:31 -0500 Subject: [PATCH 27/47] chore: migrate changelog and contributing word lists to inline cspell ignores --- CHANGELOG.md | 7 +++++++ CONTRIBUTING.md | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fe8969ea..6ef20b862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ All notable changes to this project will be documented in this file. * ### Resolved Issues * [24: Support Waveform Reads/Writes](https://github.com/ni/nidaqmx-python/issues/24) * [820: Create a synchronization example for TDMS logging](https://github.com/ni/nidaqmx-python/issues/820) + * [862: docs tox env fails on rdss-nidaqmxbot-win-10-py32](https://github.com/ni/nidaqmx-python/issues/862) * ### Major Changes @@ -64,10 +65,12 @@ All notable changes to this project will be documented in this file. one for Python 3.9-3.12 (numpy>=1.22) and one for Python 3.13+ (numpy>=2.1). * The `nidaqmx` distribution package now specifies only a lower bound for `click`. * Clarify PyPy support and enable unit testing with PyPy. + * Adopt ni-python-styleguide for hand-written code. * Upgrade to Poetry 2.x and migrate `pyproject.toml` format. * Add support for Python 3.14. * Add https://github.com/ni/ni-apis as a submodule of nidaqmx-python. + * Add an optional dependency on `ni.grpcdevice.v1.proto`. * The internal `session_pb2` submodule has been moved to the shared package `ni.grpcdevice.v1.proto`. Installing the `nidaqmx` package's `grpc` extra will automatically install this package. * If you get `ModuleNotFoundError: No module named 'session_pb2'`, make sure you are installing the `nidaqmx` package's `grpc` extra. @@ -148,8 +151,10 @@ All notable changes to this project will be documented in this file. * Add support for DAQmx calibration info properties * Add support for WaitForValidTimestamp * Fix naming issues: + * Rename `ShuntCalSelect.AAND_B` to `A_AND_B`. * Automate Driver Install Experience within nidaqmx Module + * Update libtime to accept time before 1970 * ### Known Issues @@ -253,6 +258,7 @@ All notable changes to this project will be documented in this file. * ### Resolved Issues * [37: ai_raw example is bad](https://github.com/ni/nidaqmx-python/issues/37) * [54: Linux supported?](https://github.com/ni/nidaqmx-python/issues/54) + * [64: nidaqmx-python and pynidaqmx projects use the same package name](https://github.com/ni/nidaqmx-python/issues/64) * [65: ci_count_edges.py REQUIRES A START COMMAND](https://github.com/ni/nidaqmx-python/issues/65) * [100: How to clear task and create a new task with same name?](https://github.com/ni/nidaqmx-python/issues/100) @@ -337,6 +343,7 @@ All notable changes to this project will be documented in this file. ## 0.5.2 * Initial public release of nidaqmx * Update setup.py description and fix issues 2, 3, 5, and 6 raised by Ed Page. + * Splitting joined acronyms AIADC, AIDC, AILVDT, AIRVDT and CITC. * Adding link to LICENSE file. * Updating README.rst file in source directory to eliminate Sphinx domain directives and add link to documentation on diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 89165abd5..ef48866cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,11 @@ # Contributing to nidaqmx + + + + + + Contributions to **nidaqmx** are welcome from all! **nidaqmx** is managed via [git](https://git-scm.com), with the canonical upstream repository hosted From bcfe89f9985715a474e0c92a49fa3d4e21198ecf Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Mon, 9 Mar 2026 10:52:33 -0500 Subject: [PATCH 28/47] chore: extend cspell to codegen/generated files; fix typos Add .cspell/cspell-codegen-dict.txt with ~115 entries covering NI-DAQmx initialisms, abbreviations, compound identifiers, typos locked in public API names, and real domain words specific to codegen and generated source files. Update cspell.json: - Add cspell-codegen-dict dictionary definition - Remove broad generated/** and src/codegen/** ignore paths so these files are now spell-checked - Add generated/nidaqmx/_stubs/** back to ignorePaths (protobuf stubs are too noisy to check) - Add override applying cspell-codegen-dict to src/codegen/** and generated/** - Sort dictionaryDefinitions alphabetically - Order ignorePaths to match VSCode Explorer layout - Add ordering comments to both lists Fix typos in metadata source (src/codegen/metadata/attributes.py): - specfied -> specified - thermcouple -> thermocouple - thefilter -> the filter (two occurrences) These propagate into generated files via codegen; also fix them directly in the generated files that are already up to date. Minor code fixes: - src/codegen/generator.py: docstring "Codegenerator" -> "Code generator" - src/codegen/stub_generator.py: rename grpc_codegened_file_paths -> grpc_code_generated_file_paths --- .cspell/cspell-codegen-dict.txt | 112 ++++++++++++++++++ .cspell/cspell-dict.txt | 2 +- cspell.json | 26 ++-- generated/nidaqmx/task/_in_stream.py | 2 +- .../task/triggering/_reference_trigger.py | 2 +- src/codegen/generator.py | 2 +- src/codegen/metadata/attributes.py | 6 +- src/codegen/stub_generator.py | 8 +- 8 files changed, 139 insertions(+), 21 deletions(-) create mode 100644 .cspell/cspell-codegen-dict.txt diff --git a/.cspell/cspell-codegen-dict.txt b/.cspell/cspell-codegen-dict.txt new file mode 100644 index 000000000..ece2ee85f --- /dev/null +++ b/.cspell/cspell-codegen-dict.txt @@ -0,0 +1,112 @@ +AIAC # NI-DAQmx initialism; Analog Input Alternating Current +AIADC # NI-DAQmx initialism; Analog Input Analog-to-Digital Converter +AIDC # NI-DAQmx initialism; Analog Input Direct Current +AILVDT # NI-DAQmx initialism; Analog Input Linear Variable Differential Transformer +AIRTDA # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class A +AIRTDB # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class B +AIRTDC # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class C +AIRTDR0 # NI-DAQmx initialism; Analog Input Resistance Temperature Detector R0 (nominal resistance at 0 degrees C) +AIRVDT # NI-DAQmx initialism; Analog Input Rotary Variable Differential Transformer +AITEDS # NI-DAQmx initialism; Analog Input Transducer Electronic Data Sheet +AODAC # NI-DAQmx initialism; Analog Output Digital-to-Analog Converter +AOHW # NI-DAQmx initialism; Analog Output Hardware +ATTENTUATION # Typo; NI-DAQmx public API (compatibility breaking name) +autozero # Real word: Electronic instrumentation term +backplane # Real word: Digital electronics and computer engineering term +bandpass # Real word: Filter term +brickwall # Real word: Filter term +Butterworth # Real word: Scientist name; Butterworth filter +CALIBRATIONINFO # Typo; NI-DAQmx public API (compatibility breaking name) +Callendar # Real word: Physicist name; Callendar-Van Dusen equation +CERTITICATES # Typo; NI-DAQmx public API (compatibility breaking name) +CFGD # NI-DAQmx abbreviation; configured +CIHW # NI-DAQmx initialism; Counter Input Hardware +CITC # NI-DAQmx initialism; Counter Input Terminal Count +CIUTC # NI-DAQmx initialism; Counter Input Coordinated Universal Time +CLKS # NI-DAQmx abbreviation; clocks +COHW # NI-DAQmx initialism; Counter Output Hardware +COHWTSP # NI-DAQmx initialism; Counter Output Hardware Timed Single Point +CONV # NI-DAQmx abbreviation; convert +COULDNT # NI-DAQmx public API (compatibility breaking name) +CTRS # NI-DAQmx abbreviation; counters +deassert # Real word: Digital electronics and computer engineering term +deasserting # Real word: Digital electronics and computer engineering term +deasserts # Real word: Digital electronics and computer engineering term +deleters # Real word: Software term +DIFFT # NI-DAQmx abbreviation; different +DOESNT # NI-DAQmx public API (compatibility breaking name) +highpass # Real word: Filter term +hysts # NI-DAQmx abbreviation; hysteresis +IMMED # NI-DAQmx abbreviation; immediate +IRIG # Initialism: Inter-Range Instrumentation Group +IRIGB # NI-DAQmx initialism; IRIG-B +lowpass # Real word: Filter term +overcurrent # Real word: Electrical engineering term +overvoltage # Real word: Electrical engineering term +stopband # Real word: Filter term +ASYN # NI-DAQmx abbreviation; asynchronous +DSTAR # NI-DAQmx signal type; D* bus +Dusen # Real word: Physicist name; Van Dusen of Callendar-Van Dusen equation +ELEC # NI-DAQmx abbreviation; electrical +EXPORTSIGNAL # NI-DAQmx compound identifier +FREQOUT # NI-DAQmx abbreviation; frequency output +FREQUENCYWITH # NI-DAQmx compound identifier +globalvirtualchannels # NI-DAQmx compound identifier; global virtual channels +grpcdevice # NI package name; ni-grpcdevice +HDOP # GPS initialism; Horizontal Dilution of Precision +hshk # NI-DAQmx abbreviation; handshake +HWTSP # NI-DAQmx initialism; Hardware Timed Single Point +INVALIDC # Typo; NI-DAQmx public API (compatibility breaking name) +ISOC # NI-DAQmx abbreviation; isochronous +JUMPERED # Real word: Electronics term +LVTTL # Initialism: Low Voltage Transistor-Transistor Logic +MDNS # Initialism: Multicast DNS +micropascals # Real word: Unit of pressure +MIODAQ # NI-DAQmx product category; Multifunction I/O DAQ +MULT # NI-DAQmx abbreviation; multiple +MULTIDEVICE # NI-DAQmx compound identifier +nidevice # NI package name; ni-device-grpc +NIELVIS # NI product name; NI ELVIS +NONBUFFERED # NI-DAQmx compound identifier +NONPRINTABLE # Real word: Computing term +NOTKNOWN # NI-DAQmx public API (compatibility breaking name) +onbrd # NI-DAQmx abbreviation; onboard +OVERREAD # Real word: Data acquisition term +PDOP # GPS initialism; Position Dilution of Precision +PERSISTEDCHANNEL # NI-DAQmx compound identifier +PERSISTEDSCALE # NI-DAQmx compound identifier +PERSISTEDTASK # NI-DAQmx compound identifier +PHYSICALCHANNEL # NI-DAQmx compound identifier +POSSSIBLE # Typo; NI-DAQmx public API (compatibility breaking name) +powerline # Real word: Electrical engineering term +POWERUP # Real word: Electronics term +protoc # Tool name: protobuf compiler +PRPTY # NI-DAQmx abbreviation; property +pseudodifferential # Real word: Electronics measurement term +RANGEWITH # NI-DAQmx compound identifier +ratiometric # Real word: Electronics measurement term +RDMA # Initialism: Remote Direct Memory Access +reglitch # Real word: Electronics DAC term +reglitching # Real word: Electronics DAC term (gerund) +REPLUG # Real word: Hardware term +RQST # NI-DAQmx abbreviation; request +SCANLIST # NI-DAQmx compound identifier +SENSITIVIT # Typo; NI-DAQmx public API (compatibility breaking name) +sint # Protobuf type; signed integer +SMIO # NI-DAQmx initialism; Serial Memory I/O +SPECD # NI-DAQmx abbreviation; specified +Steinhart # Real word: Physicist name; Steinhart-Hart thermistor equation +SUBSYTEM # Typo; NI-DAQmx public API (compatibility breaking name) +tasktocopy # NI-DAQmx compound identifier; task to copy +tcpip # NI-DAQmx initialism; TCP/IP +timebases # Real word: Electronics term +TIMETRIGGERS # NI-DAQmx compound identifier +trigs # NI-DAQmx abbreviation; triggers +tristated # Real word: Electronics term +tristates # Real word: Electronics term (verb/noun) +ulonglong # C type: unsigned long long +UNAVAIL # NI-DAQmx abbreviation; unavailable +UNLOADABLE # Real word: Computing term +USBDAQ # NI-DAQmx compound identifier; USB DAQ +VCXO # Initialism: Voltage-Controlled Crystal Oscillator +VDOP # GPS initialism; Vertical Dilution of Precision diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 5d46e926f..6014a073f 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -18,7 +18,7 @@ bitfields # Real word bitstream # Real word byref # Standard library: ctypes callspec # Dependency: pytest -CAPI # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +CAPI # NI-DAQmx C API identifier fragment caplog # Dependency: pytest cDAQ # Initialism: CompactDAQ (NI hardware platform) chkconfig # Linux system tool names (external) diff --git a/cspell.json b/cspell.json index 60e34c0a3..14a510bc9 100644 --- a/cspell.json +++ b/cspell.json @@ -1,15 +1,20 @@ { "version": "0.2", + // Keep the following list of items in alphabetical order. "dictionaryDefinitions": [ - { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "noSuggest": true }, + { "name": "cspell-changelog-words", "path": "./.cspell/cspell-changelog-words.txt", "noSuggest": true }, + { "name": "cspell-codegen-dict", "path": "./.cspell/cspell-codegen-dict.txt", "noSuggest": true }, + { "name": "cspell-contributing-words", "path": "./.cspell/cspell-contributing-words.txt", "noSuggest": true }, { "name": "cspell-daqmx-abbreviations", "path": "./.cspell/cspell-daqmx-abbreviations.txt", "noSuggest": true }, + { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "noSuggest": true }, { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true }, - { "name": "cspell-sphinx-directives", "path": "./.cspell/cspell-sphinx-directives.txt", "noSuggest": true }, - { "name": "cspell-contributing-words", "path": "./.cspell/cspell-contributing-words.txt", "noSuggest": true }, - { "name": "cspell-changelog-words", "path": "./.cspell/cspell-changelog-words.txt", "noSuggest": true } + { "name": "cspell-sphinx-directives", "path": "./.cspell/cspell-sphinx-directives.txt", "noSuggest": true } ], "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations"], "useGitignore": true, + // Keep the following list of items in the order that they appear in VSCode + // Explorer (directories in alphabetical order, followed by top-level files + // in alphabetical order). "ignorePaths": [ ".cspell/**", ".github/**", @@ -17,21 +22,18 @@ "docs/conf.py", "docs/make.bat", "docs/Makefile", - "generated/**", - "src/codegen/functions/**", - "src/codegen/metadata/**", - "src/codegen/protos/**", - "src/codegen/properties/**", - "src/codegen/*.py", + "generated/nidaqmx/_stubs/**", "tests/max_config/**", "tests/test_assets/**", "third_party/**", ".gitmodules", ".readthedocs.yml", "cspell.json", + "cspell-output.txt", "poetry.lock", "poetry.toml", "pyproject.toml", + "spell-check-findings.md", "tox.ini" ], "overrides": [ @@ -50,6 +52,10 @@ { "filename": "**/CHANGELOG.md", "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-changelog-words"] + }, + { + "filename": ["src/codegen/**", "generated/**"], + "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-codegen-dict"] } ] } diff --git a/generated/nidaqmx/task/_in_stream.py b/generated/nidaqmx/task/_in_stream.py index eed1bd1f7..29d9d240c 100644 --- a/generated/nidaqmx/task/_in_stream.py +++ b/generated/nidaqmx/task/_in_stream.py @@ -621,7 +621,7 @@ def open_thrmcpl_chans(self): """ List[str]: Indicates a list of names of any virtual channels in the task for which the device(s) detected an open - thermcouple. You must read **open_thrmcpl_chans_exist** + thermocouple. You must read **open_thrmcpl_chans_exist** before you read this property. Otherwise, you will receive an error. """ diff --git a/generated/nidaqmx/task/triggering/_reference_trigger.py b/generated/nidaqmx/task/triggering/_reference_trigger.py index e253d5d96..c48d3c017 100644 --- a/generated/nidaqmx/task/triggering/_reference_trigger.py +++ b/generated/nidaqmx/task/triggering/_reference_trigger.py @@ -64,7 +64,7 @@ def anlg_edge_dig_fltr_enable(self): @property def anlg_edge_dig_fltr_min_pulse_width(self): """ - float: Specifies in seconds the minimum pulse width thefilter + float: Specifies in seconds the minimum pulse width the filter recognizes. """ diff --git a/src/codegen/generator.py b/src/codegen/generator.py index 449c510e0..dad46327e 100644 --- a/src/codegen/generator.py +++ b/src/codegen/generator.py @@ -1,4 +1,4 @@ -"""Codegenerator for generating DAQmx functions.""" +"""Code generator for generating DAQmx functions.""" import logging import os diff --git a/src/codegen/metadata/attributes.py b/src/codegen/metadata/attributes.py index 3ab32045f..4c8a5d7c6 100644 --- a/src/codegen/metadata/attributes.py +++ b/src/codegen/metadata/attributes.py @@ -23038,7 +23038,7 @@ ], 'name': 'AI_CONV_CLK_PULSE_WIDTH', 'python_data_type': 'float', - 'python_description': 'Specifies the width of an exported AI Convert Clock pulse, in units specfied with **ai_conv_clk_pulse_width_units**.', + 'python_description': 'Specifies the width of an exported AI Convert Clock pulse, in units specified with **ai_conv_clk_pulse_width_units**.', 'resettable': False, 'type': 'float64' }, @@ -26055,7 +26055,7 @@ 'name': 'OPEN_THRMCPL_CHANS', 'python_class_name': 'InStream', 'python_data_type': 'str', - 'python_description': 'Indicates a list of names of any virtual channels in the task for which the device(s) detected an open thermcouple. You must read **open_thrmcpl_chans_exist** before you read this property. Otherwise, you will receive an error.', + 'python_description': 'Indicates a list of names of any virtual channels in the task for which the device(s) detected an open thermocouple. You must read **open_thrmcpl_chans_exist** before you read this property. Otherwise, you will receive an error.', 'resettable': False, 'type': 'char[]' }, @@ -31891,7 +31891,7 @@ 'name': 'ANLG_EDGE_REF_TRIG_DIG_FLTR_MIN_PULSE_WIDTH', 'python_class_name': 'ReferenceTrigger', 'python_data_type': 'float', - 'python_description': 'Specifies in seconds the minimum pulse width thefilter recognizes.', + 'python_description': 'Specifies in seconds the minimum pulse width the filter recognizes.', 'python_name': 'anlg_edge_dig_fltr_min_pulse_width', 'resettable': True, 'type': 'float64' diff --git a/src/codegen/stub_generator.py b/src/codegen/stub_generator.py index 30f8ff8a9..e930f2b79 100644 --- a/src/codegen/stub_generator.py +++ b/src/codegen/stub_generator.py @@ -62,10 +62,10 @@ def fix_import_paths( ): """Fix import paths of generated files.""" print("Fixing import paths") - grpc_codegened_file_paths = list(stubs_path.rglob("*pb2*py")) - imports_to_fix = [path.stem for path in grpc_codegened_file_paths if path.parent == stubs_path] - grpc_codegened_file_paths.extend(stubs_path.rglob("*pb2*pyi")) - for path in grpc_codegened_file_paths: + grpc_code_generated_file_paths = list(stubs_path.rglob("*pb2*py")) + imports_to_fix = [path.stem for path in grpc_code_generated_file_paths if path.parent == stubs_path] + grpc_code_generated_file_paths.extend(stubs_path.rglob("*pb2*pyi")) + for path in grpc_code_generated_file_paths: print(f"Processing {path}") data = path.read_bytes() for name in imports_to_fix: From e4dfdbefff4bde830d22638a78a554a0833587e9 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Mon, 9 Mar 2026 11:21:59 -0500 Subject: [PATCH 29/47] chore: clean up and annotate cspell.json -> ignorePaths --- cspell.json | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/cspell.json b/cspell.json index 14a510bc9..25efef639 100644 --- a/cspell.json +++ b/cspell.json @@ -16,25 +16,23 @@ // Explorer (directories in alphabetical order, followed by top-level files // in alphabetical order). "ignorePaths": [ - ".cspell/**", - ".github/**", - "docs/img/**", - "docs/conf.py", - "docs/make.bat", - "docs/Makefile", - "generated/nidaqmx/_stubs/**", - "tests/max_config/**", - "tests/test_assets/**", - "third_party/**", - ".gitmodules", - ".readthedocs.yml", - "cspell.json", - "cspell-output.txt", - "poetry.lock", - "poetry.toml", - "pyproject.toml", - "spell-check-findings.md", - "tox.ini" + ".cspell/**", // dictionary source files; words here are not prose + ".github/**", // GitHub Actions workflows and issue templates + "docs/img/**", // binary image files + "docs/conf.py", // Sphinx config; extension names and config keys + "docs/make.bat", // Sphinx build script; not prose + "docs/Makefile", // Sphinx build script; not prose + "generated/nidaqmx/_stubs/**", // protobuf-generated stubs; too noisy to check + "tests/max_config/**", // NI MAX config files; NI-specific identifiers + "tests/test_assets/**", // test fixture files; not prose + "third_party/**", // third-party code we don't own or control + ".gitmodules", // git submodule config + ".readthedocs.yml", // ReadTheDocs config + "cspell.json", // this file; dictionary names would be flagged + "poetry.lock", // auto-generated lock file; hashes and package URLs + "poetry.toml", // Poetry config + "pyproject.toml", // project config; classifier strings and tool config + "tox.ini" // tox config ], "overrides": [ { From 90b4d7ba78a7daa51eb21c7dc321993cca2c9801 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Mon, 9 Mar 2026 12:56:54 -0500 Subject: [PATCH 30/47] chore: extend cspell coverage to pyproject.toml - Remove pyproject.toml from cspell.json ignorePaths - Add cspell override for pyproject.toml with [cspell-dict, cspell-daqmx-abbreviations, python] dictionaries; the python dictionary covers: mypy, pypy, grpcio, tzlocal, doctest, filterwarnings, xfail - Add // cspell:disable-line to the override's filename line in cspell.json to suppress pyproject in that string literal - Suppress maintainer names (Hindes, Maxx, Boehme, Keryan) using # cspell:disable / # cspell:enable around the maintainers block - Add # cspell:ignore addopts above [tool.pytest.ini_options].addopts - Add # cspell:ignore testpaths above [tool.pytest.ini_options].testpaths - Add grpcdevice and styleguide to .cspell/cspell-dict.txt - Remove grpcdevice from .cspell/cspell-changelog-words.txt - Remove styleguide from .cspell/cspell-changelog-words.txt and .cspell/cspell-contributing-words.txt - Remove from CONTRIBUTING.md - Remove and from CHANGELOG.md --- .cspell/cspell-changelog-words.txt | 2 -- .cspell/cspell-contributing-words.txt | 1 - .cspell/cspell-dict.txt | 2 ++ CHANGELOG.md | 2 -- CONTRIBUTING.md | 7 +++---- cspell.json | 8 ++++---- pyproject.toml | 4 ++++ 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.cspell/cspell-changelog-words.txt b/.cspell/cspell-changelog-words.txt index 725f99219..113b8fd89 100644 --- a/.cspell/cspell-changelog-words.txt +++ b/.cspell/cspell-changelog-words.txt @@ -5,9 +5,7 @@ AIDC # NI-DAQmx discontinued enum constant AILVDT # NI-DAQmx discontinued enum constant AIRVDT # NI-DAQmx discontinued enum constant CITC # NI-DAQmx discontinued enum constant -grpcdevice # ni.grpcdevice.v1.proto package name libtime # NI-DAQmx project component name (lib_time module) nidaqmxbot # CI bot username (rdss-nidaqmxbot) pynidaqmx # former package name (conflicted with nidaqmx-python) rdss # CI bot username prefix (rdss-nidaqmxbot) -styleguide # ni-python-styleguide linting tool diff --git a/.cspell/cspell-contributing-words.txt b/.cspell/cspell-contributing-words.txt index addff81f2..e8a6255a2 100644 --- a/.cspell/cspell-contributing-words.txt +++ b/.cspell/cspell-contributing-words.txt @@ -3,4 +3,3 @@ developercertificate # Developer Certificate of Origin website mypy # Python static type checker pypi # Python Package Index pyproject # pyproject.toml configuration filename -styleguide # ni-python-styleguide linting tool diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 6014a073f..c0403922c 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -45,6 +45,7 @@ forcebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filena forcelb # NI-DAQmx public API (compatibility breaking name) frombuffer # Dependency: numpy getfixturevalue # Dependency: pytest +grpcdevice # NI package name; ni-grpcdevice hightime # Dependency: hightime htmlcov # Python tooling (directory/artifact names, not real words) HWCU # Initialism: Hardware Configuration Utility @@ -100,6 +101,7 @@ SCXI # Initialism: Signal Conditioning eXtensions for Instrumentati sensord # Deprecated public property name in backward-compat rename map subsecond # Real word subseconds # Real word +styleguide # ni-python-styleguide linting tool TDMS # Initialism: Technical Data Management Streaming TEDSAI # NI-DAQmx public API (compatibility breaking name) TEDSAIRTD # NI-DAQmx public API (compatibility breaking name) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ef20b862..720ef3f1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,12 +65,10 @@ All notable changes to this project will be documented in this file. one for Python 3.9-3.12 (numpy>=1.22) and one for Python 3.13+ (numpy>=2.1). * The `nidaqmx` distribution package now specifies only a lower bound for `click`. * Clarify PyPy support and enable unit testing with PyPy. - * Adopt ni-python-styleguide for hand-written code. * Upgrade to Poetry 2.x and migrate `pyproject.toml` format. * Add support for Python 3.14. * Add https://github.com/ni/ni-apis as a submodule of nidaqmx-python. - * Add an optional dependency on `ni.grpcdevice.v1.proto`. * The internal `session_pb2` submodule has been moved to the shared package `ni.grpcdevice.v1.proto`. Installing the `nidaqmx` package's `grpc` extra will automatically install this package. * If you get `ModuleNotFoundError: No module named 'session_pb2'`, make sure you are installing the `nidaqmx` package's `grpc` extra. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef48866cb..9cafd8e6b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,6 @@ - Contributions to **nidaqmx** are welcome from all! @@ -57,7 +56,7 @@ requirements: - You can still run the tests without a physical X Series DAQ device, but some tests will be skipped. Before running the regression tests, import the appropriate NI MAX configuration files: -- ``tests\max_config\nidaqmxMaxConfig.ini``: Contains custom scales, global channels, simulated devices, +- ``tests\max_config\nidaqmxMaxConfig.ini``: Contains custom scales, global channels, simulated devices, and tasks used by many regression tests. - **Note:** On Linux, use ``tests\max_config\linux\nidaqmxMaxConfig.ini`` to avoid importing an unsupported device. - ``tests\max_config\examplesMaxConfig.ini``: Contains simulated devices used by the example programs. @@ -79,7 +78,7 @@ commands in the root of the distribution: ```sh $ poetry run tox ``` - + This requires you to have all the Python interpreters supported by **nidaqmx** installed on your machine. @@ -116,7 +115,7 @@ $ poetry run sphinx-build -b html docs docs\_build # Branching Policy -Active development for the next release occurs on the `master` branch. +Active development for the next release occurs on the `master` branch. During finalization, we create a release branch (e.g. `releases/1.2`) in order to control which changes target the imminent release vs. the next release after that. Changes that are intended for both the imminent release and subsequent releases diff --git a/cspell.json b/cspell.json index 25efef639..7b864b7f4 100644 --- a/cspell.json +++ b/cspell.json @@ -17,7 +17,6 @@ // in alphabetical order). "ignorePaths": [ ".cspell/**", // dictionary source files; words here are not prose - ".github/**", // GitHub Actions workflows and issue templates "docs/img/**", // binary image files "docs/conf.py", // Sphinx config; extension names and config keys "docs/make.bat", // Sphinx build script; not prose @@ -26,12 +25,9 @@ "tests/max_config/**", // NI MAX config files; NI-specific identifiers "tests/test_assets/**", // test fixture files; not prose "third_party/**", // third-party code we don't own or control - ".gitmodules", // git submodule config ".readthedocs.yml", // ReadTheDocs config - "cspell.json", // this file; dictionary names would be flagged "poetry.lock", // auto-generated lock file; hashes and package URLs "poetry.toml", // Poetry config - "pyproject.toml", // project config; classifier strings and tool config "tox.ini" // tox config ], "overrides": [ @@ -54,6 +50,10 @@ { "filename": ["src/codegen/**", "generated/**"], "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-codegen-dict"] + }, + { + "filename": "pyproject.toml", // cspell:disable-line + "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python"] } ] } diff --git a/pyproject.toml b/pyproject.toml index 82892425d..caa38172b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,11 +26,13 @@ classifiers = [ dynamic = ["dependencies"] readme = "README.rst" authors = [{name = "NI", email = "opensource@ni.com"}] +# cspell:disable maintainers = [ {name = "Zach Hindes", email = "zach.hindes@ni.com"}, {name = "Maxx Boehme", email = "maxx.boehme@ni.com"}, {name = "Brad Keryan", email = "brad.keryan@ni.com"}, ] +# cspell:enable requires-python = '>=3.9,<4.0' [project.urls] @@ -144,8 +146,10 @@ extend_exclude = ".tox,docs,generated,src/codegen/metadata,src/codegen/templates application-import-names = "nidaqmx" [tool.pytest.ini_options] +# cspell:ignore addopts addopts = "--doctest-modules --strict-markers" filterwarnings = ["always::ImportWarning", "always::ResourceWarning"] +# cspell:ignore testpaths testpaths = ["tests/acceptance", "tests/component", "tests/legacy", "tests/unit"] markers = [ # Defines custom markers used by nidaqmx tests. Prevents PytestUnknownMarkWarning. From c543b36a7b0893f280e3f5b48381c9d8fafa30fb Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Mon, 9 Mar 2026 23:46:23 -0500 Subject: [PATCH 31/47] chore: align ignorePaths comments in cspell.json --- cspell.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cspell.json b/cspell.json index 7b864b7f4..9c2a86c99 100644 --- a/cspell.json +++ b/cspell.json @@ -16,19 +16,19 @@ // Explorer (directories in alphabetical order, followed by top-level files // in alphabetical order). "ignorePaths": [ - ".cspell/**", // dictionary source files; words here are not prose - "docs/img/**", // binary image files - "docs/conf.py", // Sphinx config; extension names and config keys - "docs/make.bat", // Sphinx build script; not prose - "docs/Makefile", // Sphinx build script; not prose + ".cspell/**", // dictionary source files; words here are not prose + "docs/img/**", // binary image files + "docs/conf.py", // Sphinx config; extension names and config keys + "docs/make.bat", // Sphinx build script; not prose + "docs/Makefile", // Sphinx build script; not prose "generated/nidaqmx/_stubs/**", // protobuf-generated stubs; too noisy to check - "tests/max_config/**", // NI MAX config files; NI-specific identifiers - "tests/test_assets/**", // test fixture files; not prose - "third_party/**", // third-party code we don't own or control - ".readthedocs.yml", // ReadTheDocs config - "poetry.lock", // auto-generated lock file; hashes and package URLs - "poetry.toml", // Poetry config - "tox.ini" // tox config + "tests/max_config/**", // NI MAX config files; NI-specific identifiers + "tests/test_assets/**", // test fixture files; not prose + "third_party/**", // third-party code we don't own or control + ".readthedocs.yml", // ReadTheDocs config + "poetry.lock", // auto-generated lock file; hashes and package URLs + "poetry.toml", // Poetry config + "tox.ini" // tox config ], "overrides": [ { From 1424d7cc14a989560a727b73add454bfc5b83140 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Mon, 9 Mar 2026 23:53:54 -0500 Subject: [PATCH 32/47] fix: wrap long list comprehension in stub_generator.py --- src/codegen/stub_generator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/codegen/stub_generator.py b/src/codegen/stub_generator.py index e930f2b79..a56b4d331 100644 --- a/src/codegen/stub_generator.py +++ b/src/codegen/stub_generator.py @@ -63,7 +63,9 @@ def fix_import_paths( """Fix import paths of generated files.""" print("Fixing import paths") grpc_code_generated_file_paths = list(stubs_path.rglob("*pb2*py")) - imports_to_fix = [path.stem for path in grpc_code_generated_file_paths if path.parent == stubs_path] + imports_to_fix = [ + path.stem for path in grpc_code_generated_file_paths if path.parent == stubs_path + ] grpc_code_generated_file_paths.extend(stubs_path.rglob("*pb2*pyi")) for path in grpc_code_generated_file_paths: print(f"Processing {path}") From 09fea71b4daf76b9f035294c77d1134343c2a7f1 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 00:11:10 -0500 Subject: [PATCH 33/47] revert: undo _dotenv_path rename; add dotenvpath to cspell dict with TODO --- .cspell/cspell-dict.txt | 1 + .../nidaqmx/{_dotenv_path.py => _dotenvpath.py} | 0 generated/nidaqmx/_feature_toggles.py | 2 +- src/handwritten/{_dotenv_path.py => _dotenvpath.py} | 0 src/handwritten/_feature_toggles.py | 2 +- .../unit/{test_dotenv_path.py => test_dotenvpath.py} | 12 ++++++------ 6 files changed, 9 insertions(+), 8 deletions(-) rename generated/nidaqmx/{_dotenv_path.py => _dotenvpath.py} (100%) rename src/handwritten/{_dotenv_path.py => _dotenvpath.py} (100%) rename tests/unit/{test_dotenv_path.py => test_dotenvpath.py} (66%) diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index c0403922c..0317f4153 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -37,6 +37,7 @@ descr # NI-DAQmx C API identifier fragments (surface in tests/exampl DKMS # Initialism: Dynamic Kernel Module Support docstrings # Python terminology dotenv # Dependency: python-decouple / dotenv +dotenvpath # Typo - TODO - rename the files and make related changes dpkg # Linux system tool names (external) dtype # Dependency: numpy EEPROM # Initialism: Electrically Erasable Programmable Read-Only Memory diff --git a/generated/nidaqmx/_dotenv_path.py b/generated/nidaqmx/_dotenvpath.py similarity index 100% rename from generated/nidaqmx/_dotenv_path.py rename to generated/nidaqmx/_dotenvpath.py diff --git a/generated/nidaqmx/_feature_toggles.py b/generated/nidaqmx/_feature_toggles.py index a979188c7..db5e583cf 100644 --- a/generated/nidaqmx/_feature_toggles.py +++ b/generated/nidaqmx/_feature_toggles.py @@ -10,7 +10,7 @@ from decouple import AutoConfig, Undefined, undefined -from nidaqmx._dotenv_path import get_dotenv_search_path +from nidaqmx._dotenvpath import get_dotenv_search_path from nidaqmx.errors import FeatureNotSupportedError if TYPE_CHECKING: diff --git a/src/handwritten/_dotenv_path.py b/src/handwritten/_dotenvpath.py similarity index 100% rename from src/handwritten/_dotenv_path.py rename to src/handwritten/_dotenvpath.py diff --git a/src/handwritten/_feature_toggles.py b/src/handwritten/_feature_toggles.py index a979188c7..db5e583cf 100644 --- a/src/handwritten/_feature_toggles.py +++ b/src/handwritten/_feature_toggles.py @@ -10,7 +10,7 @@ from decouple import AutoConfig, Undefined, undefined -from nidaqmx._dotenv_path import get_dotenv_search_path +from nidaqmx._dotenvpath import get_dotenv_search_path from nidaqmx.errors import FeatureNotSupportedError if TYPE_CHECKING: diff --git a/tests/unit/test_dotenv_path.py b/tests/unit/test_dotenvpath.py similarity index 66% rename from tests/unit/test_dotenv_path.py rename to tests/unit/test_dotenvpath.py index 588558117..3856523b3 100644 --- a/tests/unit/test_dotenv_path.py +++ b/tests/unit/test_dotenvpath.py @@ -2,7 +2,7 @@ import pytest -from nidaqmx import _dotenv_path +from nidaqmx import _dotenvpath @pytest.mark.parametrize("dotenv_exists", [False, True]) @@ -15,20 +15,20 @@ def test___dotenv_exists_varies___has_dotenv_file___matches_dotenv_exists( for dir in subdirs: dir.mkdir() - assert _dotenv_path._has_dotenv_file(tmp_path) == dotenv_exists - assert all([_dotenv_path._has_dotenv_file(p) == dotenv_exists for p in subdirs]) + assert _dotenvpath._has_dotenv_file(tmp_path) == dotenv_exists + assert all([_dotenvpath._has_dotenv_file(p) == dotenv_exists for p in subdirs]) def test___get_caller_path___returns_this_modules_path() -> None: - assert _dotenv_path._get_caller_path() == Path(__file__) + assert _dotenvpath._get_caller_path() == Path(__file__) def test___get_package_path___returns_package_dir() -> None: - assert _dotenv_path._get_package_path() == Path(_dotenv_path.__file__).parent + assert _dotenvpath._get_package_path() == Path(_dotenvpath.__file__).parent def test___get_script_or_exe_path___returns_pytest_path() -> None: - path = _dotenv_path._get_script_or_exe_path() + path = _dotenvpath._get_script_or_exe_path() assert path is not None assert "pytest" in path.parts or "pytest.exe" in path.parts or "vscode_pytest" in path.parts From 37f709392558493a63fc9c66094075929ef7e5f3 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 00:37:15 -0500 Subject: [PATCH 34/47] refactor: rename cfunc to c_func in _lib.py for consistency with _library_interpreter.py --- generated/nidaqmx/_lib.py | 10 +++++----- src/handwritten/_lib.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/generated/nidaqmx/_lib.py b/generated/nidaqmx/_lib.py index acd49749b..87e390223 100644 --- a/generated/nidaqmx/_lib.py +++ b/generated/nidaqmx/_lib.py @@ -102,12 +102,12 @@ def __getattr__( # noqa: D105 - Missing docstring in magic method (auto-generat self, function ): try: - cfunc = getattr(self._library, function) - if not hasattr(cfunc, "arg_lock"): + c_func = getattr(self._library, function) + if not hasattr(c_func, "arg_lock"): with self._lib_lock: - if not hasattr(cfunc, "arg_lock"): - cfunc.arg_lock = threading.Lock() - return cfunc + if not hasattr(c_func, "arg_lock"): + c_func.arg_lock = threading.Lock() + return c_func except AttributeError: raise DaqFunctionNotSupportedError(_FUNCTION_NOT_SUPPORTED_MESSAGE.format(function)) diff --git a/src/handwritten/_lib.py b/src/handwritten/_lib.py index acd49749b..87e390223 100644 --- a/src/handwritten/_lib.py +++ b/src/handwritten/_lib.py @@ -102,12 +102,12 @@ def __getattr__( # noqa: D105 - Missing docstring in magic method (auto-generat self, function ): try: - cfunc = getattr(self._library, function) - if not hasattr(cfunc, "arg_lock"): + c_func = getattr(self._library, function) + if not hasattr(c_func, "arg_lock"): with self._lib_lock: - if not hasattr(cfunc, "arg_lock"): - cfunc.arg_lock = threading.Lock() - return cfunc + if not hasattr(c_func, "arg_lock"): + c_func.arg_lock = threading.Lock() + return c_func except AttributeError: raise DaqFunctionNotSupportedError(_FUNCTION_NOT_SUPPORTED_MESSAGE.format(function)) From aabe7031dc81d144b24f24bfc357a0ad0436dc76 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 01:00:53 -0500 Subject: [PATCH 35/47] chore: remove unused words from cspell-daqmx-abbreviations.txt --- .cspell/cspell-daqmx-abbreviations.txt | 137 +------------------------ 1 file changed, 4 insertions(+), 133 deletions(-) diff --git a/.cspell/cspell-daqmx-abbreviations.txt b/.cspell/cspell-daqmx-abbreviations.txt index e8753ed05..e7abaeec9 100644 --- a/.cspell/cspell-daqmx-abbreviations.txt +++ b/.cspell/cspell-daqmx-abbreviations.txt @@ -1,147 +1,18 @@ -Accel # Accelerometer -Accur # Accuracy -Ack # Acknowledge -Adv # Advance -Alt # Altitude -Amp # Ampere / Amplifier -AI # Analog Input -AO # Analog Output Anlg # Analog -Ang # Angle / Angular -Ant # Antenna Atten # Attenuation -Attr # Attribute -Attrs # Attributes -Avail # Available -Avg # Average -Avgs # Averages -Bal # Balance -Bin # Binary -Brd # Board -Btm # Bottom -Cal # Calibration -Cap # Capacitor -Chan # Channel Chans # Channels -Clk # Clock -Comm # Communicating / Communicator -Compen # Compensated / Compensation -Cmplt # Complete -Cond # Condition -Cfg # Configuration / Configure Cfgs # Configurations -Conn # Connect / Connected / Connecting / Connector -Const # Constant -ContPulseTrain # Continuous Pulse Train -Cont # Continuous -UTC # Coordinated Universal Time -Cnt # Count -CI # Counter Input -CtrOut # Counter Output -CO # Counter Output -Ctr # Counter -Iex # Current Excitation -Curr # Current -Cyc # Cycle -Detect # Detection -Dev # Device -Devs # Devices -Diff # Differential -DI # Digital Input -DO # Digital Output -Dig # Digital -Dir # Direction -Disp # Display -Dist # Distance -Div # Divide / Divisor -Dyn # Dynamic -Eng # Engineering +Cmplt # Complete +Compen # Compensated / Compensation Excit # Excitation Expir # Expiration -Exp # Exponential -Ext # External Fltr # Filter -FinitePulseTrain # Finite Pulse Train -Freq # Frequency -Gen # General / Generate / Generator -Gnf # Ground -HW # Hardware -HAE # Height Above Ellipsoid Hyst # Hysteresis -Incr # Increment -Init # Initialize -Int # Internal -TAI # International Atomic Time -Interp # Interpolation / Interpretation -Inv # Invert -Latch # Latching -Lat # Latitude -Lvl # Level -Lin # Linear -Loc # Location -Long # Longitude -Map # Mapping -Max # Maximum -MSL # Mean Sea Level -Meas # Measurable / Measurement -Mech # Mechanism -Mem # Memory -Msg # Message -Meth # Method -Mic # Microphone -Min # Minimum -Multi # Multiple -Nav # Navigation -Nom # Nominal NRSE # Non-Referenced Single-Ended -Num # Number -Op # Operation -outClk # Output Clock -Periph # Peripheral -Pos # Position -Pot # Potentiometer -Pwr # Power -Pwrln # Powerline -Prog # Programmed / Progress -Props # Properties -Quant # Quantity -RangeVals # RangeValues -Rng # Range -Rngs # Ranges -Rdy # Ready -Rec # Record -RefClk # Reference Clock -Ref # Reference -RSE # Referenced Single-Ended Regen # Regeneration -Req # Request -Rev # Revolution +Rngs # Ranges Samp # Sample -Sat # Satellite -Sep # Separation -Seq # Sequence -Sig # Signal -SW # Software -Src # Source Srcs # Sources -Spec # Specification -Specs # Specifications -Sq # Square -Sync # Synchronization -Temp # Temperature -Term # Terminal -Terms # Terminals -Thrmstr # Thermistor Thrmcpl # Thermocouple -Thresh # Threshold +Thrmstr # Thermistor Xfer # Transfer -Trans # Transition -Tri # Triangle -Trig # Trigger -Val # Value -Vals # Values -Vert # Vertical -Vibr # Vibration -Vex # Voltage Excitation -Wfm # Waveform -Win # Window From 8b46109531a8198b0c81c6bd7213301b22520a15 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 01:31:33 -0500 Subject: [PATCH 36/47] chore: consolidate NI-DAQmx words into cspell-daqmx-abbreviations.txt --- .cspell/cspell-codegen-dict.txt | 66 ------------ .cspell/cspell-daqmx-abbreviations.txt | 139 +++++++++++++++++++++---- .cspell/cspell-dict.txt | 37 ------- 3 files changed, 121 insertions(+), 121 deletions(-) diff --git a/.cspell/cspell-codegen-dict.txt b/.cspell/cspell-codegen-dict.txt index ece2ee85f..1e27a2f2c 100644 --- a/.cspell/cspell-codegen-dict.txt +++ b/.cspell/cspell-codegen-dict.txt @@ -1,112 +1,46 @@ -AIAC # NI-DAQmx initialism; Analog Input Alternating Current -AIADC # NI-DAQmx initialism; Analog Input Analog-to-Digital Converter -AIDC # NI-DAQmx initialism; Analog Input Direct Current -AILVDT # NI-DAQmx initialism; Analog Input Linear Variable Differential Transformer -AIRTDA # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class A -AIRTDB # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class B -AIRTDC # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class C -AIRTDR0 # NI-DAQmx initialism; Analog Input Resistance Temperature Detector R0 (nominal resistance at 0 degrees C) -AIRVDT # NI-DAQmx initialism; Analog Input Rotary Variable Differential Transformer -AITEDS # NI-DAQmx initialism; Analog Input Transducer Electronic Data Sheet -AODAC # NI-DAQmx initialism; Analog Output Digital-to-Analog Converter -AOHW # NI-DAQmx initialism; Analog Output Hardware -ATTENTUATION # Typo; NI-DAQmx public API (compatibility breaking name) autozero # Real word: Electronic instrumentation term backplane # Real word: Digital electronics and computer engineering term bandpass # Real word: Filter term brickwall # Real word: Filter term Butterworth # Real word: Scientist name; Butterworth filter -CALIBRATIONINFO # Typo; NI-DAQmx public API (compatibility breaking name) Callendar # Real word: Physicist name; Callendar-Van Dusen equation -CERTITICATES # Typo; NI-DAQmx public API (compatibility breaking name) -CFGD # NI-DAQmx abbreviation; configured -CIHW # NI-DAQmx initialism; Counter Input Hardware -CITC # NI-DAQmx initialism; Counter Input Terminal Count -CIUTC # NI-DAQmx initialism; Counter Input Coordinated Universal Time -CLKS # NI-DAQmx abbreviation; clocks -COHW # NI-DAQmx initialism; Counter Output Hardware -COHWTSP # NI-DAQmx initialism; Counter Output Hardware Timed Single Point -CONV # NI-DAQmx abbreviation; convert -COULDNT # NI-DAQmx public API (compatibility breaking name) -CTRS # NI-DAQmx abbreviation; counters deassert # Real word: Digital electronics and computer engineering term deasserting # Real word: Digital electronics and computer engineering term deasserts # Real word: Digital electronics and computer engineering term deleters # Real word: Software term -DIFFT # NI-DAQmx abbreviation; different -DOESNT # NI-DAQmx public API (compatibility breaking name) highpass # Real word: Filter term -hysts # NI-DAQmx abbreviation; hysteresis -IMMED # NI-DAQmx abbreviation; immediate IRIG # Initialism: Inter-Range Instrumentation Group -IRIGB # NI-DAQmx initialism; IRIG-B lowpass # Real word: Filter term overcurrent # Real word: Electrical engineering term overvoltage # Real word: Electrical engineering term stopband # Real word: Filter term -ASYN # NI-DAQmx abbreviation; asynchronous -DSTAR # NI-DAQmx signal type; D* bus Dusen # Real word: Physicist name; Van Dusen of Callendar-Van Dusen equation -ELEC # NI-DAQmx abbreviation; electrical -EXPORTSIGNAL # NI-DAQmx compound identifier -FREQOUT # NI-DAQmx abbreviation; frequency output -FREQUENCYWITH # NI-DAQmx compound identifier -globalvirtualchannels # NI-DAQmx compound identifier; global virtual channels grpcdevice # NI package name; ni-grpcdevice HDOP # GPS initialism; Horizontal Dilution of Precision -hshk # NI-DAQmx abbreviation; handshake -HWTSP # NI-DAQmx initialism; Hardware Timed Single Point -INVALIDC # Typo; NI-DAQmx public API (compatibility breaking name) -ISOC # NI-DAQmx abbreviation; isochronous JUMPERED # Real word: Electronics term LVTTL # Initialism: Low Voltage Transistor-Transistor Logic MDNS # Initialism: Multicast DNS micropascals # Real word: Unit of pressure -MIODAQ # NI-DAQmx product category; Multifunction I/O DAQ -MULT # NI-DAQmx abbreviation; multiple -MULTIDEVICE # NI-DAQmx compound identifier nidevice # NI package name; ni-device-grpc NIELVIS # NI product name; NI ELVIS -NONBUFFERED # NI-DAQmx compound identifier NONPRINTABLE # Real word: Computing term -NOTKNOWN # NI-DAQmx public API (compatibility breaking name) -onbrd # NI-DAQmx abbreviation; onboard OVERREAD # Real word: Data acquisition term PDOP # GPS initialism; Position Dilution of Precision -PERSISTEDCHANNEL # NI-DAQmx compound identifier -PERSISTEDSCALE # NI-DAQmx compound identifier -PERSISTEDTASK # NI-DAQmx compound identifier -PHYSICALCHANNEL # NI-DAQmx compound identifier -POSSSIBLE # Typo; NI-DAQmx public API (compatibility breaking name) powerline # Real word: Electrical engineering term POWERUP # Real word: Electronics term protoc # Tool name: protobuf compiler -PRPTY # NI-DAQmx abbreviation; property pseudodifferential # Real word: Electronics measurement term -RANGEWITH # NI-DAQmx compound identifier ratiometric # Real word: Electronics measurement term RDMA # Initialism: Remote Direct Memory Access reglitch # Real word: Electronics DAC term reglitching # Real word: Electronics DAC term (gerund) REPLUG # Real word: Hardware term -RQST # NI-DAQmx abbreviation; request -SCANLIST # NI-DAQmx compound identifier -SENSITIVIT # Typo; NI-DAQmx public API (compatibility breaking name) sint # Protobuf type; signed integer -SMIO # NI-DAQmx initialism; Serial Memory I/O -SPECD # NI-DAQmx abbreviation; specified Steinhart # Real word: Physicist name; Steinhart-Hart thermistor equation -SUBSYTEM # Typo; NI-DAQmx public API (compatibility breaking name) -tasktocopy # NI-DAQmx compound identifier; task to copy -tcpip # NI-DAQmx initialism; TCP/IP timebases # Real word: Electronics term -TIMETRIGGERS # NI-DAQmx compound identifier -trigs # NI-DAQmx abbreviation; triggers tristated # Real word: Electronics term tristates # Real word: Electronics term (verb/noun) ulonglong # C type: unsigned long long -UNAVAIL # NI-DAQmx abbreviation; unavailable UNLOADABLE # Real word: Computing term -USBDAQ # NI-DAQmx compound identifier; USB DAQ VCXO # Initialism: Voltage-Controlled Crystal Oscillator VDOP # GPS initialism; Vertical Dilution of Precision diff --git a/.cspell/cspell-daqmx-abbreviations.txt b/.cspell/cspell-daqmx-abbreviations.txt index e7abaeec9..7a7b86307 100644 --- a/.cspell/cspell-daqmx-abbreviations.txt +++ b/.cspell/cspell-daqmx-abbreviations.txt @@ -1,18 +1,121 @@ -Anlg # Analog -Atten # Attenuation -Chans # Channels -Cfgs # Configurations -Cmplt # Complete -Compen # Compensated / Compensation -Excit # Excitation -Expir # Expiration -Fltr # Filter -Hyst # Hysteresis -NRSE # Non-Referenced Single-Ended -Regen # Regeneration -Rngs # Ranges -Samp # Sample -Srcs # Sources -Thrmcpl # Thermocouple -Thrmstr # Thermistor -Xfer # Transfer +acceld # NI-DAQmx public API (compatibility breaking name) +ACRMS # NI-DAQmx measurement type abbreviation (AC RMS) +AHIGH # NI-DAQmx public API (compatibility breaking name) +AIAC # NI-DAQmx initialism; Analog Input Alternating Current +AIADC # NI-DAQmx initialism; Analog Input Analog-to-Digital Converter +AIDC # NI-DAQmx initialism; Analog Input Direct Current +aignd # NI-DAQmx public API (compatibility breaking name) +AILVDT # NI-DAQmx initialism; Analog Input Linear Variable Differential Transformer +AIRTD # NI-DAQmx public API (compatibility breaking name) +AIRTDA # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class A +AIRTDB # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class B +AIRTDC # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class C +AIRTDR0 # NI-DAQmx initialism; Analog Input Resistance Temperature Detector R0 (nominal resistance at 0 degrees C) +AIRVDT # NI-DAQmx initialism; Analog Input Rotary Variable Differential Transformer +AITEDS # NI-DAQmx initialism; Analog Input Transducer Electronic Data Sheet +Anlg # Analog +AODAC # NI-DAQmx initialism; Analog Output Digital-to-Analog Converter +aognd # NI-DAQmx public API (compatibility breaking name) +AOHW # NI-DAQmx initialism; Analog Output Hardware +APFI # NI-DAQmx public API (compatibility breaking name) +ASYN # NI-DAQmx abbreviation; asynchronous +Atten # Attenuation +ATTENTUATION # Typo; NI-DAQmx public API (compatibility breaking name) +BBULK # NI-DAQmx public API (compatibility breaking name) +BHIGH # NI-DAQmx public API (compatibility breaking name) +CALIBRATIONINFO # Typo; NI-DAQmx public API (compatibility breaking name) +CAPI # NI-DAQmx C API identifier fragment +CERTITICATES # Typo; NI-DAQmx public API (compatibility breaking name) +CFGD # NI-DAQmx abbreviation; configured +Cfgs # Configurations +Chans # Channels +CIGPS # NI-DAQmx public API (compatibility breaking name) +CIHW # NI-DAQmx initialism; Counter Input Hardware +CITC # NI-DAQmx initialism; Counter Input Terminal Count +CIUTC # NI-DAQmx initialism; Counter Input Coordinated Universal Time +CLKS # NI-DAQmx abbreviation; clocks +Cmplt # Complete +coeff # NI-DAQmx public API (compatibility breaking name) +coeffs # NI-DAQmx public API (compatibility breaking name) +COHW # NI-DAQmx initialism; Counter Output Hardware +COHWTSP # NI-DAQmx initialism; Counter Output Hardware Timed Single Point +Compen # Compensated / Compensation +CONV # NI-DAQmx abbreviation; convert +COULDNT # NI-DAQmx public API (compatibility breaking name) +CTRS # NI-DAQmx abbreviation; counters +DAQError # NI-DAQmx public API (compatibility breaking name) +descr # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +DIFFT # NI-DAQmx abbreviation; different +DOESNT # NI-DAQmx public API (compatibility breaking name) +DSTAR # NI-DAQmx signal type; D* bus +ELEC # NI-DAQmx abbreviation; electrical +Excit # Excitation +Expir # Expiration +EXPORTSIGNAL # NI-DAQmx compound identifier +Fltr # Filter +forcebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) +forcelb # NI-DAQmx public API (compatibility breaking name) +FREQOUT # NI-DAQmx abbreviation; frequency output +FREQUENCYWITH # NI-DAQmx compound identifier +globalvirtualchannels # NI-DAQmx compound identifier; global virtual channels +hshk # NI-DAQmx abbreviation; handshake +hwteds # NI-DAQmx public API (compatibility breaking name) +HWTSP # NI-DAQmx initialism; Hardware Timed Single Point +Hyst # Hysteresis +hysts # NI-DAQmx abbreviation; hysteresis +IMMED # NI-DAQmx abbreviation; immediate +installdriver # NI-DAQmx public API (compatibility breaking name) +INVALIDC # Typo; NI-DAQmx public API (compatibility breaking name) +IRIGB # NI-DAQmx initialism; IRIG-B +ISOC # NI-DAQmx abbreviation; isochronous +lvls # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +MIOAI # NI-DAQmx public API (compatibility breaking name) +MIODAQ # NI-DAQmx product category; Multifunction I/O DAQ +MULT # NI-DAQmx abbreviation; multiple +MULTIDEVICE # NI-DAQmx compound identifier +nicai # NI-DAQmx C library / header filenames (external) +nicaiu # NI-DAQmx C library / header filenames (external) +NIDAQ # NI-DAQmx public API (compatibility breaking name) +nidaqmx # NI-DAQmx package name +NONBUFFERED # NI-DAQmx compound identifier +NOTKNOWN # NI-DAQmx public API (compatibility breaking name) +NRSE # Non-Referenced Single-Ended +nums # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +onbrd # NI-DAQmx abbreviation; onboard +outp # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) +PERSISTEDCHANNEL # NI-DAQmx compound identifier +PERSISTEDSCALE # NI-DAQmx compound identifier +PERSISTEDTASK # NI-DAQmx compound identifier +PHYSICALCHANNEL # NI-DAQmx compound identifier +POSSSIBLE # Typo; NI-DAQmx public API (compatibility breaking name) +pressurebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) +pretrig # NI-DAQmx public API (compatibility breaking name) +PRPTY # NI-DAQmx abbreviation; property +RANGEWITH # NI-DAQmx compound identifier +Regen # Regeneration +Rngs # Ranges +RQST # NI-DAQmx abbreviation; request +Samp # Sample +samps # NI-DAQmx public API (compatibility breaking name) +SCANLIST # NI-DAQmx compound identifier +SENSITIVIT # Typo; NI-DAQmx public API (compatibility breaking name) +SMIO # NI-DAQmx initialism; Serial Memory I/O +SPECD # NI-DAQmx abbreviation; specified +Srcs # Sources +SUBSYTEM # Typo; NI-DAQmx public API (compatibility breaking name) +tasktocopy # NI-DAQmx compound identifier; task to copy +tcpip # NI-DAQmx initialism; TCP/IP +TEDSAI # NI-DAQmx public API (compatibility breaking name) +TEDSAIRTD # NI-DAQmx public API (compatibility breaking name) +tedshwteds # NI-DAQmx public API (compatibility breaking name) +Thrmcpl # Thermocouple +Thrmstr # Thermistor +TIMETRIGGERS # NI-DAQmx compound identifier +torquebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) +trigs # NI-DAQmx abbreviation; triggers +UNAVAIL # NI-DAQmx abbreviation; unavailable +USBDAQ # NI-DAQmx compound identifier; USB DAQ +VERIF # NI-DAQmx public API (compatibility breaking name) +voltaged # NI-DAQmx public API (compatibility breaking name) +Xfer # Transfer +zidx # NI-DAQmx public API (compatibility breaking name) diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-dict.txt index 0317f4153..235cdff38 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-dict.txt @@ -1,39 +1,24 @@ -acceld # NI-DAQmx public API (compatibility breaking name) -ACRMS # NI-DAQmx measurement type abbreviation (AC RMS) addoption # Dependency: pytest -AHIGH # NI-DAQmx public API (compatibility breaking name) -aignd # NI-DAQmx public API (compatibility breaking name) -AIRTD # NI-DAQmx public API (compatibility breaking name) allclose # Dependency: numpy -aognd # NI-DAQmx public API (compatibility breaking name) -APFI # NI-DAQmx public API (compatibility breaking name) argtype # Standard library: ctypes argtypes # Standard library: ctypes ascontiguousarray # Dependency: numpy autoinstall # Linux system tool names (external) -BBULK # NI-DAQmx public API (compatibility breaking name) -BHIGH # NI-DAQmx public API (compatibility breaking name) bitfield # Real word bitfields # Real word bitstream # Real word byref # Standard library: ctypes callspec # Dependency: pytest -CAPI # NI-DAQmx C API identifier fragment caplog # Dependency: pytest cDAQ # Initialism: CompactDAQ (NI hardware platform) chkconfig # Linux system tool names (external) -CIGPS # NI-DAQmx public API (compatibility breaking name) codegen # codegen internals CPLD # Initialism: Complex Programmable Logic Device ctypes # Standard library: ctypes ctypeslib # Standard library: ctypes cdecl # C calling convention name (used in codegen) -coeff # NI-DAQmx public API (compatibility breaking name) -coeffs # NI-DAQmx public API (compatibility breaking name) CVICALLBACK # NI CVI calling convention macro (C interop comment) -DAQError # NI-DAQmx public API (compatibility breaking name) DAQmx # Initialism: Data Acquisition Measurement Extensions -descr # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) DKMS # Initialism: Dynamic Kernel Module Support docstrings # Python terminology dotenv # Dependency: python-decouple / dotenv @@ -42,49 +27,35 @@ dpkg # Linux system tool names (external) dtype # Dependency: numpy EEPROM # Initialism: Electrically Erasable Programmable Read-Only Memory fixturenames # Dependency: pytest -forcebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) -forcelb # NI-DAQmx public API (compatibility breaking name) frombuffer # Dependency: numpy getfixturevalue # Dependency: pytest grpcdevice # NI package name; ni-grpcdevice hightime # Dependency: hightime htmlcov # Python tooling (directory/artifact names, not real words) HWCU # Initialism: Hardware Configuration Utility -hwteds # NI-DAQmx public API (compatibility breaking name) IEPE # Initialism: Integrated Electronics Piezo-Electric iinfo # Dependency: numpy insserv # Linux system tool names (external) -installdriver # NI-DAQmx public API (compatibility breaking name) localzone # Dependency: tzlocal LVDT # Initialism: Linear Variable Differential Transformer -lvls # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) matplotlib # Dependency: matplotlib MBCS # Initialism: Multi-Byte Character Set MeasurementLink # NI product name metafunc # Dependency: pytest MILLI # Real word -MIOAI # NI-DAQmx public API (compatibility breaking name) modifyitems # Dependency: pytest multibyte # Real word nbytes # Dependency: numpy ndarray # Dependency: numpy ndpointer # Dependency: numpy -nicai # NI-DAQmx C library / header filenames (external) -nicaiu # NI-DAQmx C library / header filenames (external) -NIDAQ # NI-DAQmx public API (compatibility breaking name) -nidaqmx # NI-DAQmx package name NISHAREDDIR # NI Linux install directory environment variable nitypes # Dependency: nitypes nptdms # Dependency: nptdms numpy # Dependency: numpy -nums # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) -outp # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) overrange # Real word overtemperature # Real word parametrizing # Dependency: pytest PICO # Real word -pressurebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) -pretrig # NI-DAQmx public API (compatibility breaking name) printoptions # Dependency: numpy PXIe # Initialism: PCI eXtensions for Instrumentation, Express variant pycache # Python tooling (directory/artifact names, not real words) @@ -96,7 +67,6 @@ retriggerable # Real word rtol # Dependency: numpy RTSI # Initialism: Real-Time System Integration RVDT # Initialism: Rotary Variable Differential Transformer -samps # NI-DAQmx public API (compatibility breaking name) scrapigen # codegen internals SCXI # Initialism: Signal Conditioning eXtensions for Instrumentation sensord # Deprecated public property name in backward-compat rename map @@ -104,13 +74,9 @@ subsecond # Real word subseconds # Real word styleguide # ni-python-styleguide linting tool TDMS # Initialism: Technical Data Management Streaming -TEDSAI # NI-DAQmx public API (compatibility breaking name) -TEDSAIRTD # NI-DAQmx public API (compatibility breaking name) -tedshwteds # NI-DAQmx public API (compatibility breaking name) timebase # Real word tobytes # Dependency: numpy tolist # Dependency: numpy -torquebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) typeshed # Python type stubs repository (mypy/pyright tooling) unflatten # Real word unraisable # Dependency: pytest @@ -119,10 +85,7 @@ unreserve # Real word unreserves # Real word varargs # Standard library: ctypes venv # Python tooling (directory/artifact names, not real words) -VERIF # NI-DAQmx public API (compatibility breaking name) -voltaged # NI-DAQmx public API (compatibility breaking name) xlabel # Dependency: matplotlib ylabel # Dependency: matplotlib yoctosecond # Real word yoctoseconds # Real word -zidx # NI-DAQmx public API (compatibility breaking name) From e2dd06d1856eeb781f857fdccaea9592882b18be Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 02:02:10 -0500 Subject: [PATCH 37/47] chore: reorganize cspell dictionaries by purpose --- .cspell/cspell-codegen-dict.txt | 46 ------------ ...ions.txt => cspell-daqmx-api-elements.txt} | 1 + ....txt => cspell-project-software-terms.txt} | 40 ++-------- .cspell/cspell-real-words.txt | 75 +++++++++++++++++++ cspell.json | 20 ++--- 5 files changed, 91 insertions(+), 91 deletions(-) delete mode 100644 .cspell/cspell-codegen-dict.txt rename .cspell/{cspell-daqmx-abbreviations.txt => cspell-daqmx-api-elements.txt} (98%) rename .cspell/{cspell-dict.txt => cspell-project-software-terms.txt} (61%) create mode 100644 .cspell/cspell-real-words.txt diff --git a/.cspell/cspell-codegen-dict.txt b/.cspell/cspell-codegen-dict.txt deleted file mode 100644 index 1e27a2f2c..000000000 --- a/.cspell/cspell-codegen-dict.txt +++ /dev/null @@ -1,46 +0,0 @@ -autozero # Real word: Electronic instrumentation term -backplane # Real word: Digital electronics and computer engineering term -bandpass # Real word: Filter term -brickwall # Real word: Filter term -Butterworth # Real word: Scientist name; Butterworth filter -Callendar # Real word: Physicist name; Callendar-Van Dusen equation -deassert # Real word: Digital electronics and computer engineering term -deasserting # Real word: Digital electronics and computer engineering term -deasserts # Real word: Digital electronics and computer engineering term -deleters # Real word: Software term -highpass # Real word: Filter term -IRIG # Initialism: Inter-Range Instrumentation Group -lowpass # Real word: Filter term -overcurrent # Real word: Electrical engineering term -overvoltage # Real word: Electrical engineering term -stopband # Real word: Filter term -Dusen # Real word: Physicist name; Van Dusen of Callendar-Van Dusen equation -grpcdevice # NI package name; ni-grpcdevice -HDOP # GPS initialism; Horizontal Dilution of Precision -JUMPERED # Real word: Electronics term -LVTTL # Initialism: Low Voltage Transistor-Transistor Logic -MDNS # Initialism: Multicast DNS -micropascals # Real word: Unit of pressure -nidevice # NI package name; ni-device-grpc -NIELVIS # NI product name; NI ELVIS -NONPRINTABLE # Real word: Computing term -OVERREAD # Real word: Data acquisition term -PDOP # GPS initialism; Position Dilution of Precision -powerline # Real word: Electrical engineering term -POWERUP # Real word: Electronics term -protoc # Tool name: protobuf compiler -pseudodifferential # Real word: Electronics measurement term -ratiometric # Real word: Electronics measurement term -RDMA # Initialism: Remote Direct Memory Access -reglitch # Real word: Electronics DAC term -reglitching # Real word: Electronics DAC term (gerund) -REPLUG # Real word: Hardware term -sint # Protobuf type; signed integer -Steinhart # Real word: Physicist name; Steinhart-Hart thermistor equation -timebases # Real word: Electronics term -tristated # Real word: Electronics term -tristates # Real word: Electronics term (verb/noun) -ulonglong # C type: unsigned long long -UNLOADABLE # Real word: Computing term -VCXO # Initialism: Voltage-Controlled Crystal Oscillator -VDOP # GPS initialism; Vertical Dilution of Precision diff --git a/.cspell/cspell-daqmx-abbreviations.txt b/.cspell/cspell-daqmx-api-elements.txt similarity index 98% rename from .cspell/cspell-daqmx-abbreviations.txt rename to .cspell/cspell-daqmx-api-elements.txt index 7a7b86307..a4152528b 100644 --- a/.cspell/cspell-daqmx-abbreviations.txt +++ b/.cspell/cspell-daqmx-api-elements.txt @@ -98,6 +98,7 @@ RQST # NI-DAQmx abbreviation; request Samp # Sample samps # NI-DAQmx public API (compatibility breaking name) SCANLIST # NI-DAQmx compound identifier +sensord # Deprecated public property name in backward-compat rename map SENSITIVIT # Typo; NI-DAQmx public API (compatibility breaking name) SMIO # NI-DAQmx initialism; Serial Memory I/O SPECD # NI-DAQmx abbreviation; specified diff --git a/.cspell/cspell-dict.txt b/.cspell/cspell-project-software-terms.txt similarity index 61% rename from .cspell/cspell-dict.txt rename to .cspell/cspell-project-software-terms.txt index 235cdff38..b46b278dc 100644 --- a/.cspell/cspell-dict.txt +++ b/.cspell/cspell-project-software-terms.txt @@ -4,88 +4,58 @@ argtype # Standard library: ctypes argtypes # Standard library: ctypes ascontiguousarray # Dependency: numpy autoinstall # Linux system tool names (external) -bitfield # Real word -bitfields # Real word -bitstream # Real word byref # Standard library: ctypes callspec # Dependency: pytest caplog # Dependency: pytest -cDAQ # Initialism: CompactDAQ (NI hardware platform) +cdecl # C calling convention name (used in codegen) chkconfig # Linux system tool names (external) codegen # codegen internals -CPLD # Initialism: Complex Programmable Logic Device ctypes # Standard library: ctypes ctypeslib # Standard library: ctypes -cdecl # C calling convention name (used in codegen) CVICALLBACK # NI CVI calling convention macro (C interop comment) -DAQmx # Initialism: Data Acquisition Measurement Extensions -DKMS # Initialism: Dynamic Kernel Module Support docstrings # Python terminology dotenv # Dependency: python-decouple / dotenv dotenvpath # Typo - TODO - rename the files and make related changes dpkg # Linux system tool names (external) dtype # Dependency: numpy -EEPROM # Initialism: Electrically Erasable Programmable Read-Only Memory fixturenames # Dependency: pytest frombuffer # Dependency: numpy getfixturevalue # Dependency: pytest grpcdevice # NI package name; ni-grpcdevice hightime # Dependency: hightime htmlcov # Python tooling (directory/artifact names, not real words) -HWCU # Initialism: Hardware Configuration Utility -IEPE # Initialism: Integrated Electronics Piezo-Electric iinfo # Dependency: numpy insserv # Linux system tool names (external) localzone # Dependency: tzlocal -LVDT # Initialism: Linear Variable Differential Transformer matplotlib # Dependency: matplotlib -MBCS # Initialism: Multi-Byte Character Set -MeasurementLink # NI product name metafunc # Dependency: pytest -MILLI # Real word modifyitems # Dependency: pytest -multibyte # Real word nbytes # Dependency: numpy ndarray # Dependency: numpy ndpointer # Dependency: numpy NISHAREDDIR # NI Linux install directory environment variable +nidevice # NI package name; ni-device-grpc nitypes # Dependency: nitypes nptdms # Dependency: nptdms numpy # Dependency: numpy -overrange # Real word -overtemperature # Real word parametrizing # Dependency: pytest -PICO # Real word printoptions # Dependency: numpy -PXIe # Initialism: PCI eXtensions for Instrumentation, Express variant +protoc # Tool name: protobuf compiler pycache # Python tooling (directory/artifact names, not real words) pykka # Dependency: pykka pyplot # Dependency: matplotlib pytest # Dependency: pytest -readall # Real word -retriggerable # Real word rtol # Dependency: numpy -RTSI # Initialism: Real-Time System Integration -RVDT # Initialism: Rotary Variable Differential Transformer scrapigen # codegen internals -SCXI # Initialism: Signal Conditioning eXtensions for Instrumentation -sensord # Deprecated public property name in backward-compat rename map -subsecond # Real word -subseconds # Real word styleguide # ni-python-styleguide linting tool -TDMS # Initialism: Technical Data Management Streaming -timebase # Real word +sint # Protobuf type; signed integer tobytes # Dependency: numpy tolist # Dependency: numpy typeshed # Python type stubs repository (mypy/pyright tooling) -unflatten # Real word unraisable # Dependency: pytest unraisablehook # Dependency: pytest -unreserve # Real word -unreserves # Real word +ulonglong # C type: unsigned long long varargs # Standard library: ctypes venv # Python tooling (directory/artifact names, not real words) xlabel # Dependency: matplotlib ylabel # Dependency: matplotlib -yoctosecond # Real word -yoctoseconds # Real word diff --git a/.cspell/cspell-real-words.txt b/.cspell/cspell-real-words.txt new file mode 100644 index 000000000..2ecdd6ecc --- /dev/null +++ b/.cspell/cspell-real-words.txt @@ -0,0 +1,75 @@ +autozero # Real word: Electronic instrumentation term +backplane # Real word: Digital electronics and computer engineering term +bandpass # Real word: Filter term +bitfield # Real word +bitfields # Real word +bitstream # Real word +brickwall # Real word: Filter term +Butterworth # Real word: Scientist name; Butterworth filter +cDAQ # Initialism: CompactDAQ (NI hardware platform) +Callendar # Real word: Physicist name; Callendar-Van Dusen equation +CPLD # Initialism: Complex Programmable Logic Device +DAQmx # Initialism: Data Acquisition Measurement Extensions +deassert # Real word: Digital electronics and computer engineering term +deasserting # Real word: Digital electronics and computer engineering term +deasserts # Real word: Digital electronics and computer engineering term +deleters # Real word: Software term +DKMS # Initialism: Dynamic Kernel Module Support +Dusen # Real word: Physicist name; Van Dusen of Callendar-Van Dusen equation +EEPROM # Initialism: Electrically Erasable Programmable Read-Only Memory +HDOP # GPS initialism; Horizontal Dilution of Precision +highpass # Real word: Filter term +HWCU # Initialism: Hardware Configuration Utility +IEPE # Initialism: Integrated Electronics Piezo-Electric +IRIG # Initialism: Inter-Range Instrumentation Group +JUMPERED # Real word: Electronics term +lowpass # Real word: Filter term +LVDT # Initialism: Linear Variable Differential Transformer +LVTTL # Initialism: Low Voltage Transistor-Transistor Logic +MBCS # Initialism: Multi-Byte Character Set +MDNS # Initialism: Multicast DNS +MeasurementLink # NI product name +micropascals # Real word: Unit of pressure +MILLI # Real word +multibyte # Real word +NIELVIS # NI product name; NI ELVIS +NONPRINTABLE # Real word: Computing term +overcurrent # Real word: Electrical engineering term +overrange # Real word +OVERREAD # Real word: Data acquisition term +overtemperature # Real word +overvoltage # Real word: Electrical engineering term +PDOP # GPS initialism; Position Dilution of Precision +PICO # Real word +powerline # Real word: Electrical engineering term +POWERUP # Real word: Electronics term +pseudodifferential # Real word: Electronics measurement term +PXIe # Initialism: PCI eXtensions for Instrumentation, Express variant +ratiometric # Real word: Electronics measurement term +RDMA # Initialism: Remote Direct Memory Access +readall # Real word +reglitch # Real word: Electronics DAC term +reglitching # Real word: Electronics DAC term (gerund) +REPLUG # Real word: Hardware term +retriggerable # Real word +RTSI # Initialism: Real-Time System Integration +RVDT # Initialism: Rotary Variable Differential Transformer +SCXI # Initialism: Signal Conditioning eXtensions for Instrumentation +Steinhart # Real word: Physicist name; Steinhart-Hart thermistor equation +stopband # Real word: Filter term +subsecond # Real word +subseconds # Real word +TDMS # Initialism: Technical Data Management Streaming +timebase # Real word +timebases # Real word: Electronics term +tristated # Real word: Electronics term +tristates # Real word: Electronics term (verb/noun) +unflatten # Real word +UNLOADABLE # Real word: Computing term +unreserve # Real word +unreserves # Real word +VCXO # Initialism: Voltage-Controlled Crystal Oscillator +VDOP # GPS initialism; Vertical Dilution of Precision +yoctosecond # Real word +yoctoseconds # Real word + diff --git a/cspell.json b/cspell.json index 9c2a86c99..e6b38025e 100644 --- a/cspell.json +++ b/cspell.json @@ -3,14 +3,14 @@ // Keep the following list of items in alphabetical order. "dictionaryDefinitions": [ { "name": "cspell-changelog-words", "path": "./.cspell/cspell-changelog-words.txt", "noSuggest": true }, - { "name": "cspell-codegen-dict", "path": "./.cspell/cspell-codegen-dict.txt", "noSuggest": true }, { "name": "cspell-contributing-words", "path": "./.cspell/cspell-contributing-words.txt", "noSuggest": true }, - { "name": "cspell-daqmx-abbreviations", "path": "./.cspell/cspell-daqmx-abbreviations.txt", "noSuggest": true }, - { "name": "cspell-dict", "path": "./.cspell/cspell-dict.txt", "noSuggest": true }, + { "name": "cspell-daqmx-api-elements", "path": "./.cspell/cspell-daqmx-api-elements.txt", "noSuggest": true }, + { "name": "cspell-real-words", "path": "./.cspell/cspell-real-words.txt", "noSuggest": true }, { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true }, + { "name": "cspell-project-software-terms", "path": "./.cspell/cspell-project-software-terms.txt", "noSuggest": true }, { "name": "cspell-sphinx-directives", "path": "./.cspell/cspell-sphinx-directives.txt", "noSuggest": true } ], - "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations"], + "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "cspell-project-software-terms"], "useGitignore": true, // Keep the following list of items in the order that they appear in VSCode // Explorer (directories in alphabetical order, followed by top-level files @@ -33,27 +33,27 @@ "overrides": [ { "filename": "**/*.mako", - "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-mako-keywords"] + "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python", "cspell-mako-keywords"] }, { "filename": "**/*.rst", - "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-sphinx-directives"] + "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python", "cspell-sphinx-directives"] }, { "filename": "**/CONTRIBUTING.md", - "dictionaries": ["cspell-dict", "cspell-contributing-words"] + "dictionaries": ["cspell-real-words", "cspell-contributing-words"] }, { "filename": "**/CHANGELOG.md", - "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-changelog-words"] + "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python", "cspell-changelog-words"] }, { "filename": ["src/codegen/**", "generated/**"], - "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python", "cspell-codegen-dict"] + "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python", "cspell-project-software-terms"] }, { "filename": "pyproject.toml", // cspell:disable-line - "dictionaries": ["cspell-dict", "cspell-daqmx-abbreviations", "python"] + "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python"] } ] } From 6b6aa54eb3b5a5530f5804ec6d0b090244367a9f Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 02:13:40 -0500 Subject: [PATCH 38/47] chore: move cspell:ignore comments inline in CONTRIBUTING.md --- CONTRIBUTING.md | 9 ++++----- cspell.json | 6 ++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9cafd8e6b..5dc934e38 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,9 @@ # Contributing to nidaqmx - - - - - Contributions to **nidaqmx** are welcome from all! **nidaqmx** is managed via [git](https://git-scm.com), with the canonical upstream repository hosted + on [GitHub](http://developercertificate.org/). **nidaqmx** follows a pull-request model for development. If you wish to contribute, you will need @@ -38,6 +34,7 @@ pass. 9. Run `poetry run ni-python-styleguide lint` to check that the updated code follows NI's Python coding conventions. If this reports errors, first run `poetry run ni-python-styleguide fix` in order to sort imports and format the code with Black, then manually fix any remaining errors. + 10. Run `poetry run mypy` to statically type-check the updated code. 11. Run `npx cspell "**" --no-progress` to check for spelling errors. This requires [Node.js](https://nodejs.org/) to be installed. 12. Send a GitHub Pull Request to the main repository's master branch. GitHub Pull Requests are the @@ -140,9 +137,11 @@ can be verified once that has been completed. * **Description:** Contents of the `CHANGELOG.md` for the version being released. Publishing a release automatically triggers the [publish.yml](./.github/workflows/publish.yml) + workflow, which checks and builds the package, requests approval to publish it using the `pypi` deployment environment, publishes the package to PyPI using [Trusted Publishing](https://docs.pypi.org/trusted-publishers/), and creates a PR to update the version of + **nidaqmx** in `pyproject.toml`. 6. GitHub contacts the approvers for the `pypi` deployment environment, who are currently the repo admins. One of them must approve the deployment for the publishing to proceed. diff --git a/cspell.json b/cspell.json index e6b38025e..0edb91556 100644 --- a/cspell.json +++ b/cspell.json @@ -2,8 +2,6 @@ "version": "0.2", // Keep the following list of items in alphabetical order. "dictionaryDefinitions": [ - { "name": "cspell-changelog-words", "path": "./.cspell/cspell-changelog-words.txt", "noSuggest": true }, - { "name": "cspell-contributing-words", "path": "./.cspell/cspell-contributing-words.txt", "noSuggest": true }, { "name": "cspell-daqmx-api-elements", "path": "./.cspell/cspell-daqmx-api-elements.txt", "noSuggest": true }, { "name": "cspell-real-words", "path": "./.cspell/cspell-real-words.txt", "noSuggest": true }, { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true }, @@ -41,11 +39,11 @@ }, { "filename": "**/CONTRIBUTING.md", - "dictionaries": ["cspell-real-words", "cspell-contributing-words"] + "dictionaries": ["cspell-real-words"] }, { "filename": "**/CHANGELOG.md", - "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python", "cspell-changelog-words"] + "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python"] }, { "filename": ["src/codegen/**", "generated/**"], From eafcb4c9313d05e9b31bcb6a14832329a2e5fe25 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 02:14:41 -0500 Subject: [PATCH 39/47] chore: delete cspell-changelog-words and cspell-contributing-words dictionaries --- .cspell/cspell-changelog-words.txt | 11 ----------- .cspell/cspell-contributing-words.txt | 5 ----- 2 files changed, 16 deletions(-) delete mode 100644 .cspell/cspell-changelog-words.txt delete mode 100644 .cspell/cspell-contributing-words.txt diff --git a/.cspell/cspell-changelog-words.txt b/.cspell/cspell-changelog-words.txt deleted file mode 100644 index 113b8fd89..000000000 --- a/.cspell/cspell-changelog-words.txt +++ /dev/null @@ -1,11 +0,0 @@ -# Words specific to CHANGELOG.md -AAND # NI-DAQmx discontinued enum constant -AIADC # NI-DAQmx discontinued enum constant -AIDC # NI-DAQmx discontinued enum constant -AILVDT # NI-DAQmx discontinued enum constant -AIRVDT # NI-DAQmx discontinued enum constant -CITC # NI-DAQmx discontinued enum constant -libtime # NI-DAQmx project component name (lib_time module) -nidaqmxbot # CI bot username (rdss-nidaqmxbot) -pynidaqmx # former package name (conflicted with nidaqmx-python) -rdss # CI bot username prefix (rdss-nidaqmxbot) diff --git a/.cspell/cspell-contributing-words.txt b/.cspell/cspell-contributing-words.txt deleted file mode 100644 index e8a6255a2..000000000 --- a/.cspell/cspell-contributing-words.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Words specific to CONTRIBUTING.md -developercertificate # Developer Certificate of Origin website -mypy # Python static type checker -pypi # Python Package Index -pyproject # pyproject.toml configuration filename From ec3ee758deaf69e3a36b57a384e2e6fcc1a8c7bc Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 02:17:09 -0500 Subject: [PATCH 40/47] chore: add python to global cspell dictionaries; remove redundant overrides --- cspell.json | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/cspell.json b/cspell.json index 0edb91556..eba15482a 100644 --- a/cspell.json +++ b/cspell.json @@ -8,7 +8,7 @@ { "name": "cspell-project-software-terms", "path": "./.cspell/cspell-project-software-terms.txt", "noSuggest": true }, { "name": "cspell-sphinx-directives", "path": "./.cspell/cspell-sphinx-directives.txt", "noSuggest": true } ], - "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "cspell-project-software-terms"], + "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "cspell-project-software-terms", "python"], "useGitignore": true, // Keep the following list of items in the order that they appear in VSCode // Explorer (directories in alphabetical order, followed by top-level files @@ -40,18 +40,6 @@ { "filename": "**/CONTRIBUTING.md", "dictionaries": ["cspell-real-words"] - }, - { - "filename": "**/CHANGELOG.md", - "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python"] - }, - { - "filename": ["src/codegen/**", "generated/**"], - "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python", "cspell-project-software-terms"] - }, - { - "filename": "pyproject.toml", // cspell:disable-line - "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python"] } ] } From e5ac3b8c634152788df78220ad4109eef90efe58 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 11:05:15 -0500 Subject: [PATCH 41/47] fixup! chore: Consolidate cspell dictionaries into one project dictionary Improve comments in cspell-daqmx-api-elements.txt for consistency: - Use specific comment taxonomy: abbreviation, unseparated words, unseparated initialisms, initialism, Typo, Deprecated - Move mioDAQ to cspell-real-words.txt - Move forcebridge/pressurebridge/torquebridge to cspell-project-software-terms.txt (typo: filenames should be PascalCase) - Move installdriver to cspell-project-software-terms.txt (CLI command) - Reclassify BBULK, COULDNT, DOESNT, DAQError, notKnown, zidx with accurate comments instead of 'compatibility breaking name' --- .cspell/cspell-daqmx-api-elements.txt | 235 +++++++++++----------- .cspell/cspell-project-software-terms.txt | 6 + .cspell/cspell-real-words.txt | 1 + 3 files changed, 121 insertions(+), 121 deletions(-) diff --git a/.cspell/cspell-daqmx-api-elements.txt b/.cspell/cspell-daqmx-api-elements.txt index a4152528b..fbdbbb4fb 100644 --- a/.cspell/cspell-daqmx-api-elements.txt +++ b/.cspell/cspell-daqmx-api-elements.txt @@ -1,122 +1,115 @@ -acceld # NI-DAQmx public API (compatibility breaking name) -ACRMS # NI-DAQmx measurement type abbreviation (AC RMS) -AHIGH # NI-DAQmx public API (compatibility breaking name) -AIAC # NI-DAQmx initialism; Analog Input Alternating Current -AIADC # NI-DAQmx initialism; Analog Input Analog-to-Digital Converter -AIDC # NI-DAQmx initialism; Analog Input Direct Current -aignd # NI-DAQmx public API (compatibility breaking name) -AILVDT # NI-DAQmx initialism; Analog Input Linear Variable Differential Transformer -AIRTD # NI-DAQmx public API (compatibility breaking name) -AIRTDA # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class A -AIRTDB # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class B -AIRTDC # NI-DAQmx initialism; Analog Input Resistance Temperature Detector, Class C -AIRTDR0 # NI-DAQmx initialism; Analog Input Resistance Temperature Detector R0 (nominal resistance at 0 degrees C) -AIRVDT # NI-DAQmx initialism; Analog Input Rotary Variable Differential Transformer -AITEDS # NI-DAQmx initialism; Analog Input Transducer Electronic Data Sheet -Anlg # Analog -AODAC # NI-DAQmx initialism; Analog Output Digital-to-Analog Converter -aognd # NI-DAQmx public API (compatibility breaking name) -AOHW # NI-DAQmx initialism; Analog Output Hardware -APFI # NI-DAQmx public API (compatibility breaking name) -ASYN # NI-DAQmx abbreviation; asynchronous -Atten # Attenuation -ATTENTUATION # Typo; NI-DAQmx public API (compatibility breaking name) -BBULK # NI-DAQmx public API (compatibility breaking name) -BHIGH # NI-DAQmx public API (compatibility breaking name) -CALIBRATIONINFO # Typo; NI-DAQmx public API (compatibility breaking name) -CAPI # NI-DAQmx C API identifier fragment -CERTITICATES # Typo; NI-DAQmx public API (compatibility breaking name) -CFGD # NI-DAQmx abbreviation; configured -Cfgs # Configurations -Chans # Channels -CIGPS # NI-DAQmx public API (compatibility breaking name) -CIHW # NI-DAQmx initialism; Counter Input Hardware -CITC # NI-DAQmx initialism; Counter Input Terminal Count -CIUTC # NI-DAQmx initialism; Counter Input Coordinated Universal Time -CLKS # NI-DAQmx abbreviation; clocks -Cmplt # Complete -coeff # NI-DAQmx public API (compatibility breaking name) -coeffs # NI-DAQmx public API (compatibility breaking name) -COHW # NI-DAQmx initialism; Counter Output Hardware -COHWTSP # NI-DAQmx initialism; Counter Output Hardware Timed Single Point -Compen # Compensated / Compensation -CONV # NI-DAQmx abbreviation; convert -COULDNT # NI-DAQmx public API (compatibility breaking name) -CTRS # NI-DAQmx abbreviation; counters -DAQError # NI-DAQmx public API (compatibility breaking name) -descr # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) -DIFFT # NI-DAQmx abbreviation; different -DOESNT # NI-DAQmx public API (compatibility breaking name) -DSTAR # NI-DAQmx signal type; D* bus -ELEC # NI-DAQmx abbreviation; electrical -Excit # Excitation -Expir # Expiration -EXPORTSIGNAL # NI-DAQmx compound identifier -Fltr # Filter -forcebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) -forcelb # NI-DAQmx public API (compatibility breaking name) -FREQOUT # NI-DAQmx abbreviation; frequency output -FREQUENCYWITH # NI-DAQmx compound identifier -globalvirtualchannels # NI-DAQmx compound identifier; global virtual channels -hshk # NI-DAQmx abbreviation; handshake -hwteds # NI-DAQmx public API (compatibility breaking name) -HWTSP # NI-DAQmx initialism; Hardware Timed Single Point -Hyst # Hysteresis -hysts # NI-DAQmx abbreviation; hysteresis -IMMED # NI-DAQmx abbreviation; immediate -installdriver # NI-DAQmx public API (compatibility breaking name) -INVALIDC # Typo; NI-DAQmx public API (compatibility breaking name) -IRIGB # NI-DAQmx initialism; IRIG-B -ISOC # NI-DAQmx abbreviation; isochronous -lvls # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) -MIOAI # NI-DAQmx public API (compatibility breaking name) -MIODAQ # NI-DAQmx product category; Multifunction I/O DAQ -MULT # NI-DAQmx abbreviation; multiple -MULTIDEVICE # NI-DAQmx compound identifier -nicai # NI-DAQmx C library / header filenames (external) -nicaiu # NI-DAQmx C library / header filenames (external) -NIDAQ # NI-DAQmx public API (compatibility breaking name) +acceld # Deprecated; see attribute_helpers.py +ACRMS # unseparated initialisms; AC RMS +AHigh # unseparated words; A high +AIAC # unseparated initialisms; AI AC +AIADC # unseparated initialisms; AI ADC +AIDC # unseparated initialisms; AI DC +AIGnd # unseparated words; AI ground +AILVDT # unseparated initialisms; AI LVDT +AIRTD # unseparated initialisms; AI RTD +AIRTDA # unseparated initialisms; AI RTD A +AIRTDB # unseparated initialisms; AI RTD B +AIRTDC # unseparated initialisms; AI RTD C +AIRTDR0 # unseparated initialisms; AI RTD R0 +AIRVDT # unseparated initialisms; AI RVDT +AITEDS # unseparated initialisms; AI TEDS +anlg # abbreviation; analog +AODAC # unseparated initialisms; AO DAC +AOGnd # unseparated words; AO ground +AOHW # unseparated initialisms; AO HW +APFI # initialism; Analog Programmable Function Interface +asyn # abbreviation; asynchronous +atten # abbreviation; attenuation +attentuation # Typo; should be: attenuation +BBULK # Typo; should be USB_BULK instead of US_BBULK +BHigh # unseparated words; B high +calibrationInfo # unseparated words +CAPI # unseparated words; C API +certiticates # Typo; should be: certificates +cfgd # abbreviation; configured +cfgs # abbreviation; configurations +chans # abbreviation; channels +CIGPS # unseparated initialisms; CI GPS +CIHW # unseparated initialisms; CI HW +CITC # unseparated initialisms; CI TC +CIUTC # unseparated initialisms; CI UTC +clks # abbreviation; clocks +cmplt # abbreviation; complete +coeff # abbreviation; coefficient +coeffs # abbreviation; coefficients +COHW # unseparated initialisms; CO HW +COHWTSP # unseparated initialisms; CO HWTSP +compen # abbreviation; compensated / compensation +conv # abbreviation; convert +couldnt # abbreviation; couldn't +ctrs # abbreviation; counters +DAQError # unseparated words +descr # abbreviation; description +difft # abbreviation; different +doesnt # abbreviation; doesn't +DSTAR # for further research; stands for differential star (PXIe trigger), but we also use D_STAR +elec # abbreviation; electrical +excit # abbreviation; excitation +expir # abbreviation; expiration +exportSignal # unseparated words +fltr # abbreviation; filter +forceLb # unseparated words; force in pounds +freqOut # abbreviation; frequency output +frequencyWith # unseparated words +globalVirtualChannels # unseparated words; global virtual channels +hshk # abbreviation; handshake +HWTEDS # unseparated initialisms; HW TEDS +HWTSP # initialism; Hardware-Timed Single Point +hyst # abbreviation; hysteresis +hysts # abbreviation; hysteresis +immed # abbreviation; immediate +invalidc # Typo; should be: INVALID_CDAQ_SYNC_PORT_CONNECTION_FORMAT +IRIGB # initialism; IRIG-B +isoc # abbreviation; isochronous +lvls # abbreviation; levels +MIOAI # unseparated initialisms; MIO AI +mult # abbreviation; multiple +multiDevice # unseparated words +NIDAQ # initialism; NI-DAQ (legacy product name) nidaqmx # NI-DAQmx package name -NONBUFFERED # NI-DAQmx compound identifier -NOTKNOWN # NI-DAQmx public API (compatibility breaking name) -NRSE # Non-Referenced Single-Ended -nums # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) -onbrd # NI-DAQmx abbreviation; onboard -outp # NI-DAQmx C API identifier fragments (surface in tests/examples but defined in excluded metadata) -PERSISTEDCHANNEL # NI-DAQmx compound identifier -PERSISTEDSCALE # NI-DAQmx compound identifier -PERSISTEDTASK # NI-DAQmx compound identifier -PHYSICALCHANNEL # NI-DAQmx compound identifier -POSSSIBLE # Typo; NI-DAQmx public API (compatibility breaking name) -pressurebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) -pretrig # NI-DAQmx public API (compatibility breaking name) -PRPTY # NI-DAQmx abbreviation; property -RANGEWITH # NI-DAQmx compound identifier -Regen # Regeneration -Rngs # Ranges -RQST # NI-DAQmx abbreviation; request -Samp # Sample -samps # NI-DAQmx public API (compatibility breaking name) -SCANLIST # NI-DAQmx compound identifier -sensord # Deprecated public property name in backward-compat rename map -SENSITIVIT # Typo; NI-DAQmx public API (compatibility breaking name) -SMIO # NI-DAQmx initialism; Serial Memory I/O -SPECD # NI-DAQmx abbreviation; specified -Srcs # Sources -SUBSYTEM # Typo; NI-DAQmx public API (compatibility breaking name) -tasktocopy # NI-DAQmx compound identifier; task to copy -tcpip # NI-DAQmx initialism; TCP/IP -TEDSAI # NI-DAQmx public API (compatibility breaking name) -TEDSAIRTD # NI-DAQmx public API (compatibility breaking name) -tedshwteds # NI-DAQmx public API (compatibility breaking name) -Thrmcpl # Thermocouple -Thrmstr # Thermistor -TIMETRIGGERS # NI-DAQmx compound identifier -torquebridge # NI-DAQmx bridge sensor type names (used in TEDS asset filenames) -trigs # NI-DAQmx abbreviation; triggers -UNAVAIL # NI-DAQmx abbreviation; unavailable -USBDAQ # NI-DAQmx compound identifier; USB DAQ -VERIF # NI-DAQmx public API (compatibility breaking name) -voltaged # NI-DAQmx public API (compatibility breaking name) -Xfer # Transfer -zidx # NI-DAQmx public API (compatibility breaking name) +nonBuffered # unseparated words +notKnown # unseparated words +NRSE # initialism; Non-Referenced Single-Ended +nums # abbreviation; numbers +onbrd # abbreviation; onboard +outp # abbreviation; output +persistedChannel # unseparated words +persistedScale # unseparated words +persistedTask # unseparated words +physicalChannel # unseparated words +posssible # Typo; should be: possible +pretrig # abbreviation; pre-trigger +prpty # abbreviation; property +rangeWith # unseparated words +regen # abbreviation; regeneration +rngs # abbreviation; ranges +rqst # abbreviation; request +samp # abbreviation; sample +samps # abbreviation; samples +scanList # unseparated words +sensord # Deprecated; see attribute_helpers.py +sensitivit # Typo; should be: sensitivity +SMIO # initialism; Serial Memory I/O +specd # abbreviation; specified +srcs # abbreviation; sources +subsytem # Typo; should be: subsystem +taskToCopy # unseparated words; task to copy +tcpip # initialism; TCP/IP +TEDSAI # unseparated initialisms; TEDS AI +TEDSAIRTD # unseparated initialisms; TEDS AI RTD +TEDSHWTEDS # unseparated initialisms; TEDS HWTEDS +thrmcpl # abbreviation; thermocouple +thrmstr # abbreviation; thermistor +timeTriggers # unseparated words +trigs # abbreviation; triggers +unavail # abbreviation; unavailable +USBDAQ # unseparated initialisms; USB DAQ +verif # abbreviation; verification +voltaged # Deprecated; see attribute_helpers.py +xfer # abbreviation; transfer +ZIdx # abbreviation; Z index diff --git a/.cspell/cspell-project-software-terms.txt b/.cspell/cspell-project-software-terms.txt index b46b278dc..ce110b4e0 100644 --- a/.cspell/cspell-project-software-terms.txt +++ b/.cspell/cspell-project-software-terms.txt @@ -19,6 +19,7 @@ dotenvpath # Typo - TODO - rename the files and make related changes dpkg # Linux system tool names (external) dtype # Dependency: numpy fixturenames # Dependency: pytest +forcebridge # Typo; filename should be PascalCase (ForceBridge) for consistency frombuffer # Dependency: numpy getfixturevalue # Dependency: pytest grpcdevice # NI package name; ni-grpcdevice @@ -26,6 +27,7 @@ hightime # Dependency: hightime htmlcov # Python tooling (directory/artifact names, not real words) iinfo # Dependency: numpy insserv # Linux system tool names (external) +installdriver # CLI command name and corresponding function localzone # Dependency: tzlocal matplotlib # Dependency: matplotlib metafunc # Dependency: pytest @@ -34,12 +36,15 @@ nbytes # Dependency: numpy ndarray # Dependency: numpy ndpointer # Dependency: numpy NISHAREDDIR # NI Linux install directory environment variable +nicai # NI-DAQmx C library filename (Windows DLL) +nicaiu # NI-DAQmx C library filename (Windows DLL, Unicode) nidevice # NI package name; ni-device-grpc nitypes # Dependency: nitypes nptdms # Dependency: nptdms numpy # Dependency: numpy parametrizing # Dependency: pytest printoptions # Dependency: numpy +pressurebridge # Typo; filename should be PascalCase (PressureBridge) for consistency protoc # Tool name: protobuf compiler pycache # Python tooling (directory/artifact names, not real words) pykka # Dependency: pykka @@ -50,6 +55,7 @@ scrapigen # codegen internals styleguide # ni-python-styleguide linting tool sint # Protobuf type; signed integer tobytes # Dependency: numpy +torquebridge # Typo; filename should be PascalCase (TorqueBridge) for consistency tolist # Dependency: numpy typeshed # Python type stubs repository (mypy/pyright tooling) unraisable # Dependency: pytest diff --git a/.cspell/cspell-real-words.txt b/.cspell/cspell-real-words.txt index 2ecdd6ecc..62c25d917 100644 --- a/.cspell/cspell-real-words.txt +++ b/.cspell/cspell-real-words.txt @@ -30,6 +30,7 @@ MBCS # Initialism: Multi-Byte Character Set MDNS # Initialism: Multicast DNS MeasurementLink # NI product name micropascals # Real word: Unit of pressure +mioDAQ # NI product category MILLI # Real word multibyte # Real word NIELVIS # NI product name; NI ELVIS From 010ec8bf3292a5e2556b1a17b19a9a4d4106a6ce Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 12:19:13 -0500 Subject: [PATCH 42/47] chore: rename TEDS asset files to PascalCase for consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit forcebridge.ted → ForceBridge.ted pressurebridge.ted → PressureBridge.ted torquebridge.ted → TorqueBridge.ted Update conftest.py fixtures and remove the words from the cspell dictionary. --- .cspell/cspell-project-software-terms.txt | 3 --- tests/conftest.py | 8 ++++---- .../teds/{forcebridge.ted => ForceBridge.ted} | Bin .../teds/{pressurebridge.ted => PressureBridge.ted} | Bin .../teds/{torquebridge.ted => TorqueBridge.ted} | Bin 5 files changed, 4 insertions(+), 7 deletions(-) rename tests/test_assets/teds/{forcebridge.ted => ForceBridge.ted} (100%) rename tests/test_assets/teds/{pressurebridge.ted => PressureBridge.ted} (100%) rename tests/test_assets/teds/{torquebridge.ted => TorqueBridge.ted} (100%) diff --git a/.cspell/cspell-project-software-terms.txt b/.cspell/cspell-project-software-terms.txt index ce110b4e0..be59a74b4 100644 --- a/.cspell/cspell-project-software-terms.txt +++ b/.cspell/cspell-project-software-terms.txt @@ -19,7 +19,6 @@ dotenvpath # Typo - TODO - rename the files and make related changes dpkg # Linux system tool names (external) dtype # Dependency: numpy fixturenames # Dependency: pytest -forcebridge # Typo; filename should be PascalCase (ForceBridge) for consistency frombuffer # Dependency: numpy getfixturevalue # Dependency: pytest grpcdevice # NI package name; ni-grpcdevice @@ -44,7 +43,6 @@ nptdms # Dependency: nptdms numpy # Dependency: numpy parametrizing # Dependency: pytest printoptions # Dependency: numpy -pressurebridge # Typo; filename should be PascalCase (PressureBridge) for consistency protoc # Tool name: protobuf compiler pycache # Python tooling (directory/artifact names, not real words) pykka # Dependency: pykka @@ -55,7 +53,6 @@ scrapigen # codegen internals styleguide # ni-python-styleguide linting tool sint # Protobuf type; signed integer tobytes # Dependency: numpy -torquebridge # Typo; filename should be PascalCase (TorqueBridge) for consistency tolist # Dependency: numpy typeshed # Python type stubs repository (mypy/pyright tooling) unraisable # Dependency: pytest diff --git a/tests/conftest.py b/tests/conftest.py index 9b28511ec..4393f5b46 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -642,13 +642,13 @@ def bridge_teds_file_path(teds_assets_directory: pathlib.Path) -> pathlib.Path: """Returns a TEDS file path.""" # Our normal bridge sensor TEDS file is incompatible with most devices. It # has a 1ohm bridge resistance. - return teds_assets_directory / "forcebridge.ted" + return teds_assets_directory / "ForceBridge.ted" @pytest.fixture def force_bridge_teds_file_path(teds_assets_directory: pathlib.Path) -> pathlib.Path: """Returns a TEDS file path.""" - return teds_assets_directory / "forcebridge.ted" + return teds_assets_directory / "ForceBridge.ted" @pytest.fixture @@ -684,13 +684,13 @@ def rvdt_teds_file_path(teds_assets_directory: pathlib.Path) -> pathlib.Path: @pytest.fixture def pressure_bridge_teds_file_path(teds_assets_directory: pathlib.Path) -> pathlib.Path: """Returns a TEDS file path.""" - return teds_assets_directory / "pressurebridge.ted" + return teds_assets_directory / "PressureBridge.ted" @pytest.fixture def torque_bridge_teds_file_path(teds_assets_directory: pathlib.Path) -> pathlib.Path: """Returns a TEDS file path.""" - return teds_assets_directory / "torquebridge.ted" + return teds_assets_directory / "TorqueBridge.ted" @pytest.fixture diff --git a/tests/test_assets/teds/forcebridge.ted b/tests/test_assets/teds/ForceBridge.ted similarity index 100% rename from tests/test_assets/teds/forcebridge.ted rename to tests/test_assets/teds/ForceBridge.ted diff --git a/tests/test_assets/teds/pressurebridge.ted b/tests/test_assets/teds/PressureBridge.ted similarity index 100% rename from tests/test_assets/teds/pressurebridge.ted rename to tests/test_assets/teds/PressureBridge.ted diff --git a/tests/test_assets/teds/torquebridge.ted b/tests/test_assets/teds/TorqueBridge.ted similarity index 100% rename from tests/test_assets/teds/torquebridge.ted rename to tests/test_assets/teds/TorqueBridge.ted From e992c62a88e640fee12a51ed4df1fface6b3600c Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 12:37:39 -0500 Subject: [PATCH 43/47] =?UTF-8?q?=EF=BB=BFchore:=20improve=20cspell-real-w?= =?UTF-8?q?ords.txt=20comments;=20correct=20SMIO=20expansion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove redundant "Real word:" and "Initialism:" prefixes from comments - Lowercase entries that are neither initialisms nor proper nouns - Add descriptions to bare entries - Standardize GPS initialism comments - Correct SMIO expansion: Serial Memory I/O -> Simultaneously-sampling Multifunction I/O --- .cspell/cspell-daqmx-api-elements.txt | 2 +- .cspell/cspell-real-words.txt | 144 +++++++++++++------------- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/.cspell/cspell-daqmx-api-elements.txt b/.cspell/cspell-daqmx-api-elements.txt index fbdbbb4fb..d586c04e1 100644 --- a/.cspell/cspell-daqmx-api-elements.txt +++ b/.cspell/cspell-daqmx-api-elements.txt @@ -94,7 +94,7 @@ samps # abbreviation; samples scanList # unseparated words sensord # Deprecated; see attribute_helpers.py sensitivit # Typo; should be: sensitivity -SMIO # initialism; Serial Memory I/O +SMIO # initialism; Simultaneously-sampling Multifunction I/O specd # abbreviation; specified srcs # abbreviation; sources subsytem # Typo; should be: subsystem diff --git a/.cspell/cspell-real-words.txt b/.cspell/cspell-real-words.txt index 62c25d917..e4ff1545c 100644 --- a/.cspell/cspell-real-words.txt +++ b/.cspell/cspell-real-words.txt @@ -1,76 +1,76 @@ -autozero # Real word: Electronic instrumentation term -backplane # Real word: Digital electronics and computer engineering term -bandpass # Real word: Filter term -bitfield # Real word -bitfields # Real word -bitstream # Real word -brickwall # Real word: Filter term -Butterworth # Real word: Scientist name; Butterworth filter -cDAQ # Initialism: CompactDAQ (NI hardware platform) -Callendar # Real word: Physicist name; Callendar-Van Dusen equation -CPLD # Initialism: Complex Programmable Logic Device -DAQmx # Initialism: Data Acquisition Measurement Extensions -deassert # Real word: Digital electronics and computer engineering term -deasserting # Real word: Digital electronics and computer engineering term -deasserts # Real word: Digital electronics and computer engineering term -deleters # Real word: Software term -DKMS # Initialism: Dynamic Kernel Module Support -Dusen # Real word: Physicist name; Van Dusen of Callendar-Van Dusen equation -EEPROM # Initialism: Electrically Erasable Programmable Read-Only Memory -HDOP # GPS initialism; Horizontal Dilution of Precision -highpass # Real word: Filter term -HWCU # Initialism: Hardware Configuration Utility -IEPE # Initialism: Integrated Electronics Piezo-Electric -IRIG # Initialism: Inter-Range Instrumentation Group -JUMPERED # Real word: Electronics term -lowpass # Real word: Filter term -LVDT # Initialism: Linear Variable Differential Transformer -LVTTL # Initialism: Low Voltage Transistor-Transistor Logic -MBCS # Initialism: Multi-Byte Character Set -MDNS # Initialism: Multicast DNS +autozero # Electronic instrumentation term +backplane # Digital electronics and computer engineering term +bandpass # Filter term +bitfield # Computing term; contiguous range of bits in a value +bitfields # Computing term; contiguous range of bits in a value +bitstream # Computing term; sequence of bits transmitted serially +brickwall # Filter term +Butterworth # Scientist name; Butterworth filter +cDAQ # CompactDAQ (NI hardware platform) +Callendar # Physicist name; Callendar-Van Dusen equation +CPLD # Complex Programmable Logic Device +DAQmx # Data Acquisition Measurement Extensions +deassert # Digital electronics and computer engineering term +deasserting # Digital electronics and computer engineering term +deasserts # Digital electronics and computer engineering term +deleters # Software term +DKMS # Dynamic Kernel Module Support +Dusen # Physicist name; Van Dusen of Callendar-Van Dusen equation +EEPROM # Electrically Erasable Programmable Read-Only Memory +HDOP # Horizontal Dilution of Precision (GPS) +highpass # Filter term +HWCU # Hardware Configuration Utility +IEPE # Integrated Electronics Piezo-Electric +IRIG # Inter-Range Instrumentation Group +jumpered # Electronics term +lowpass # Filter term +LVDT # Linear Variable Differential Transformer +LVTTL # Low Voltage Transistor-Transistor Logic +MBCS # Multi-Byte Character Set +MDNS # Multicast DNS MeasurementLink # NI product name -micropascals # Real word: Unit of pressure +micropascals # Unit of pressure mioDAQ # NI product category -MILLI # Real word -multibyte # Real word +milli # SI prefix +multibyte # Computing term; character encoding using multiple bytes NIELVIS # NI product name; NI ELVIS -NONPRINTABLE # Real word: Computing term -overcurrent # Real word: Electrical engineering term -overrange # Real word -OVERREAD # Real word: Data acquisition term -overtemperature # Real word -overvoltage # Real word: Electrical engineering term -PDOP # GPS initialism; Position Dilution of Precision -PICO # Real word -powerline # Real word: Electrical engineering term -POWERUP # Real word: Electronics term -pseudodifferential # Real word: Electronics measurement term -PXIe # Initialism: PCI eXtensions for Instrumentation, Express variant -ratiometric # Real word: Electronics measurement term -RDMA # Initialism: Remote Direct Memory Access -readall # Real word -reglitch # Real word: Electronics DAC term -reglitching # Real word: Electronics DAC term (gerund) -REPLUG # Real word: Hardware term -retriggerable # Real word -RTSI # Initialism: Real-Time System Integration -RVDT # Initialism: Rotary Variable Differential Transformer -SCXI # Initialism: Signal Conditioning eXtensions for Instrumentation -Steinhart # Real word: Physicist name; Steinhart-Hart thermistor equation -stopband # Real word: Filter term -subsecond # Real word -subseconds # Real word -TDMS # Initialism: Technical Data Management Streaming -timebase # Real word -timebases # Real word: Electronics term -tristated # Real word: Electronics term -tristates # Real word: Electronics term (verb/noun) -unflatten # Real word -UNLOADABLE # Real word: Computing term -unreserve # Real word -unreserves # Real word -VCXO # Initialism: Voltage-Controlled Crystal Oscillator -VDOP # GPS initialism; Vertical Dilution of Precision -yoctosecond # Real word -yoctoseconds # Real word +nonprintable # Computing term +overcurrent # Electrical engineering term +overrange # Measurement term; signal exceeding the measurable range +overread # Data acquisition term +overtemperature # Electrical/safety term; exceeding a temperature limit +overvoltage # Electrical engineering term +PDOP # Position Dilution of Precision (GPS) +pico # SI prefix +powerline # Electrical engineering term +powerup # Electronics term +pseudodifferential # Electronics measurement term +PXIe # PCI eXtensions for Instrumentation, Express variant +ratiometric # Electronics measurement term +RDMA # Remote Direct Memory Access +readall # Software term; read all available data +reglitch # Electronics DAC term +reglitching # Electronics DAC term (gerund) +replug # Hardware term +retriggerable # Electronics term; able to be triggered again before previous cycle ends +RTSI # Real-Time System Integration +RVDT # Rotary Variable Differential Transformer +SCXI # Signal Conditioning eXtensions for Instrumentation +Steinhart # Physicist name; Steinhart-Hart thermistor equation +stopband # Filter term +subsecond # Time measurement term; less than one second +subseconds # Time measurement term; less than one second +TDMS # Technical Data Management Streaming +timebase # Electronics term; reference clock signal +timebases # Electronics term +tristated # Electronics term +tristates # Electronics term (verb/noun) +unflatten # Software term; deserialize/reconstruct nested data +unloadable # Computing term +unreserve # Software term; release a reserved resource +unreserves # Software term; release a reserved resource +VCXO # Voltage-Controlled Crystal Oscillator +VDOP # Vertical Dilution of Precision (GPS) +yoctosecond # Unit of time; SI prefix +yoctoseconds # Unit of time; SI prefix From f59a2f72371abb0b8b37c5f37763711dc043b75b Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Tue, 10 Mar 2026 12:41:47 -0500 Subject: [PATCH 44/47] chore: use cspell-action instead of npx to run cspell --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7920f7cf0..e610f4afb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,10 @@ jobs: - name: Run Bandit security checks run: poetry run bandit -c pyproject.toml -r generated/nidaqmx - name: Run cspell - run: npx cspell "**" --no-progress --quiet + uses: streetsidesoftware/cspell-action@v8 + with: + incremental_files_only: false + check_dot_files: explicit - name: Generate ni-daqmx files if: ${{ runner.os == 'Linux' && matrix.python-version == env.codegen-python-version }} run: | From edaa5bb1aee087654ec9744770f2cca429e3e8ab Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Wed, 11 Mar 2026 21:30:56 -0500 Subject: [PATCH 45/47] =?UTF-8?q?=EF=BB=BFchore:=20move=20cspell=20config?= =?UTF-8?q?=20to=20.config/;=20simplify=20dictionary=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move cspell.json to .config/cspell.json - Move .cspell/ dictionary files to .config/cspell/, dropping the redundant "cspell-" prefix from each filename and dictionary name - Add globRoot: "${cwd}" so paths resolve correctly from the new location - Set noSuggest: false on real-words to enable spelling suggestions --- cspell.json => .config/cspell.json | 21 ++++++++++--------- .../cspell/daqmx-api-elements.txt | 0 .../cspell/mako-keywords.txt | 0 .../cspell/project-software-terms.txt | 0 .../cspell/real-words.txt | 0 .../cspell/sphinx-directives.txt | 0 6 files changed, 11 insertions(+), 10 deletions(-) rename cspell.json => .config/cspell.json (58%) rename .cspell/cspell-daqmx-api-elements.txt => .config/cspell/daqmx-api-elements.txt (100%) rename .cspell/cspell-mako-keywords.txt => .config/cspell/mako-keywords.txt (100%) rename .cspell/cspell-project-software-terms.txt => .config/cspell/project-software-terms.txt (100%) rename .cspell/cspell-real-words.txt => .config/cspell/real-words.txt (100%) rename .cspell/cspell-sphinx-directives.txt => .config/cspell/sphinx-directives.txt (100%) diff --git a/cspell.json b/.config/cspell.json similarity index 58% rename from cspell.json rename to .config/cspell.json index eba15482a..387add681 100644 --- a/cspell.json +++ b/.config/cspell.json @@ -1,20 +1,21 @@ { "version": "0.2", + "globRoot": "${cwd}", // Keep the following list of items in alphabetical order. "dictionaryDefinitions": [ - { "name": "cspell-daqmx-api-elements", "path": "./.cspell/cspell-daqmx-api-elements.txt", "noSuggest": true }, - { "name": "cspell-real-words", "path": "./.cspell/cspell-real-words.txt", "noSuggest": true }, - { "name": "cspell-mako-keywords", "path": "./.cspell/cspell-mako-keywords.txt", "noSuggest": true }, - { "name": "cspell-project-software-terms", "path": "./.cspell/cspell-project-software-terms.txt", "noSuggest": true }, - { "name": "cspell-sphinx-directives", "path": "./.cspell/cspell-sphinx-directives.txt", "noSuggest": true } + { "name": "daqmx-api-elements", "path": "./cspell/daqmx-api-elements.txt", "noSuggest": true }, + { "name": "real-words", "path": "./cspell/real-words.txt", "noSuggest": false }, + { "name": "mako-keywords", "path": "./cspell/mako-keywords.txt", "noSuggest": true }, + { "name": "project-software-terms", "path": "./cspell/project-software-terms.txt", "noSuggest": true }, + { "name": "sphinx-directives", "path": "./cspell/sphinx-directives.txt", "noSuggest": true } ], - "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "cspell-project-software-terms", "python"], + "dictionaries": ["real-words", "daqmx-api-elements", "project-software-terms", "python"], "useGitignore": true, // Keep the following list of items in the order that they appear in VSCode // Explorer (directories in alphabetical order, followed by top-level files // in alphabetical order). "ignorePaths": [ - ".cspell/**", // dictionary source files; words here are not prose + ".config/cspell/**", // dictionary source files; words here are not prose "docs/img/**", // binary image files "docs/conf.py", // Sphinx config; extension names and config keys "docs/make.bat", // Sphinx build script; not prose @@ -31,15 +32,15 @@ "overrides": [ { "filename": "**/*.mako", - "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python", "cspell-mako-keywords"] + "dictionaries": ["real-words", "daqmx-api-elements", "python", "mako-keywords"] }, { "filename": "**/*.rst", - "dictionaries": ["cspell-real-words", "cspell-daqmx-api-elements", "python", "cspell-sphinx-directives"] + "dictionaries": ["real-words", "daqmx-api-elements", "python", "sphinx-directives"] }, { "filename": "**/CONTRIBUTING.md", - "dictionaries": ["cspell-real-words"] + "dictionaries": ["real-words"] } ] } diff --git a/.cspell/cspell-daqmx-api-elements.txt b/.config/cspell/daqmx-api-elements.txt similarity index 100% rename from .cspell/cspell-daqmx-api-elements.txt rename to .config/cspell/daqmx-api-elements.txt diff --git a/.cspell/cspell-mako-keywords.txt b/.config/cspell/mako-keywords.txt similarity index 100% rename from .cspell/cspell-mako-keywords.txt rename to .config/cspell/mako-keywords.txt diff --git a/.cspell/cspell-project-software-terms.txt b/.config/cspell/project-software-terms.txt similarity index 100% rename from .cspell/cspell-project-software-terms.txt rename to .config/cspell/project-software-terms.txt diff --git a/.cspell/cspell-real-words.txt b/.config/cspell/real-words.txt similarity index 100% rename from .cspell/cspell-real-words.txt rename to .config/cspell/real-words.txt diff --git a/.cspell/cspell-sphinx-directives.txt b/.config/cspell/sphinx-directives.txt similarity index 100% rename from .cspell/cspell-sphinx-directives.txt rename to .config/cspell/sphinx-directives.txt From 015cfa0fb463c433b2b801186b9e059f028b1552 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Wed, 18 Mar 2026 06:47:43 -0500 Subject: [PATCH 46/47] docs: add 1.5.0 changelog section; mention cspell under Major Changes --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 720ef3f1a..96214c21f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog +* [1.5.0](#150) * [1.4.0](#140) * [1.3.0](#130) * [1.2.0](#120) @@ -25,6 +26,19 @@ All notable changes to this project will be documented in this file. +## 1.5.0 +* ### Merged Pull Requests + * [Full changelog: 1.4.0...1.5.0](https://github.com/ni/nidaqmx-python/compare/1.4.0...1.5.0) + +* ### Resolved Issues + * ... + +* ### Major Changes + * [cspell](https://cspell.org/) is now used for spell checking. + +* ### Known Issues + * ... + ## 1.4.0 * ### Merged Pull Requests * [Full changelog: 1.3.0...1.4.0](https://github.com/ni/nidaqmx-python/compare/1.3.0...1.4.0) From bc786ffdc212425821092568334a33f19e2bba47 Mon Sep 17 00:00:00 2001 From: Kosta Ilic Date: Wed, 18 Mar 2026 06:53:15 -0500 Subject: [PATCH 47/47] docs: incorporate 1.4.1 section and fix 1.5.0 PR link in changelog --- CHANGELOG.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96214c21f..72523f9f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog * [1.5.0](#150) +* [1.4.1](#141) * [1.4.0](#140) * [1.3.0](#130) * [1.2.0](#120) @@ -28,10 +29,10 @@ All notable changes to this project will be documented in this file. ## 1.5.0 * ### Merged Pull Requests - * [Full changelog: 1.4.0...1.5.0](https://github.com/ni/nidaqmx-python/compare/1.4.0...1.5.0) + * [Full changelog: 1.4.1...1.5.0](https://github.com/ni/nidaqmx-python/compare/1.4.1...1.5.0) * ### Resolved Issues - * ... + * [936: New example voltage_acq_int_clk_plot_wfm.py does not behave as expected](https://github.com/ni/nidaqmx-python/issues/936) * ### Major Changes * [cspell](https://cspell.org/) is now used for spell checking. @@ -39,6 +40,19 @@ All notable changes to this project will be documented in this file. * ### Known Issues * ... +## 1.4.1 +* ### Merged Pull Requests + * [Full changelog: 1.4.0...1.4.1](https://github.com/ni/nidaqmx-python/compare/1.4.0...1.4.1) + +* ### Resolved Issues + * ... + +* ### Major Changes + * Update installer metadata using DAQmx version 26.0.0 + +* ### Known Issues + * ... + ## 1.4.0 * ### Merged Pull Requests * [Full changelog: 1.3.0...1.4.0](https://github.com/ni/nidaqmx-python/compare/1.3.0...1.4.0)