nidaqmx 1.4.0.dev0__tar.gz → 1.4.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/PKG-INFO +6 -5
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/README.rst +1 -1
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/__init__.py +2 -5
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_base_interpreter.py +8 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_dotenvpath.py +16 -1
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_feature_toggles.py +6 -10
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_grpc_interpreter.py +20 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_lib.py +1 -1
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_library_interpreter.py +24 -1
- nidaqmx-1.4.0.dev2/generated/nidaqmx/_stubs/nidaqmx_pb2.py +2368 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_stubs/nidaqmx_pb2.pyi +133 -1
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_stubs/nidaqmx_pb2_grpc.py +33 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_stubs/nidaqmx_pb2_grpc.pyi +18 -1
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/constants.py +7 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/physical_channel.py +2 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/system.py +6 -1
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/_in_stream.py +2 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/channels/_ai_channel.py +112 -8
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/collections/_ai_channel_collection.py +72 -1
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/pyproject.toml +26 -10
- nidaqmx-1.4.0.dev0/generated/nidaqmx/_stubs/nidaqmx_pb2.py +0 -2362
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/LICENSE +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/__main__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_bitfield_utils.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_grpc_time.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_install_daqmx.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_installer_metadata.json +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_lib_time.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_linux_installation_commands.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_stubs/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_stubs/data_moniker_pb2.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_stubs/data_moniker_pb2.pyi +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_stubs/data_moniker_pb2_grpc.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_stubs/data_moniker_pb2_grpc.pyi +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_time.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/_waveform_utils.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/error_codes.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/errors.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/grpc_session_options.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/scale.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_readers/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_readers/_analog_multi_channel_reader.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_readers/_analog_single_channel_reader.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_readers/_analog_unscaled_reader.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_readers/_channel_reader_base.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_readers/_counter_reader.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_readers/_digital_multi_channel_reader.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_readers/_digital_single_channel_reader.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_readers/_power_readers.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_writers/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_writers/_analog_multi_channel_writer.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_writers/_analog_single_channel_writer.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_writers/_analog_unscaled_writer.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_writers/_channel_writer_base.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_writers/_counter_writer.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_writers/_digital_multi_channel_writer.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/stream_writers/_digital_single_channel_writer.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/_collections/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/_collections/device_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/_collections/persisted_channel_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/_collections/persisted_scale_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/_collections/persisted_task_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/_collections/physical_channel_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/_watchdog_modules/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/_watchdog_modules/expiration_state.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/_watchdog_modules/expiration_states_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/device.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/storage/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/storage/persisted_channel.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/storage/persisted_scale.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/storage/persisted_task.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/system/watchdog.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/_export_signals.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/_out_stream.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/_task.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/_timing.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/channels/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/channels/_ao_channel.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/channels/_channel.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/channels/_ci_channel.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/channels/_co_channel.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/channels/_di_channel.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/channels/_do_channel.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/collections/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/collections/_ao_channel_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/collections/_channel_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/collections/_ci_channel_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/collections/_co_channel_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/collections/_di_channel_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/collections/_do_channel_collection.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/triggering/__init__.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/triggering/_arm_start_trigger.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/triggering/_handshake_trigger.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/triggering/_pause_trigger.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/triggering/_reference_trigger.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/triggering/_start_trigger.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/task/triggering/_triggers.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/types.py +0 -0
- {nidaqmx-1.4.0.dev0 → nidaqmx-1.4.0.dev2}/generated/nidaqmx/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: nidaqmx
|
|
3
|
-
Version: 1.4.0.
|
|
3
|
+
Version: 1.4.0.dev2
|
|
4
4
|
Summary: NI-DAQmx Python API
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: nidaqmx,nidaq,daqmx,daq
|
|
@@ -8,7 +8,7 @@ Author: NI
|
|
|
8
8
|
Author-email: opensource@ni.com
|
|
9
9
|
Maintainer: Zach Hindes
|
|
10
10
|
Maintainer-email: zach.hindes@ni.com
|
|
11
|
-
Requires-Python: >=3.
|
|
11
|
+
Requires-Python: >=3.9,<4.0
|
|
12
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
14
14
|
Classifier: Intended Audience :: Manufacturing
|
|
@@ -17,6 +17,7 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
17
17
|
Classifier: Operating System :: Microsoft :: Windows
|
|
18
18
|
Classifier: Operating System :: POSIX
|
|
19
19
|
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -33,8 +34,8 @@ Requires-Dist: grpcio (>=1.49.0,<2.0) ; extra == "grpc"
|
|
|
33
34
|
Requires-Dist: hightime (>=0.2.2)
|
|
34
35
|
Requires-Dist: ni-grpcdevice-v1-proto (>=1.0.0) ; extra == "grpc"
|
|
35
36
|
Requires-Dist: ni-protobuf-types (>=1.0.0) ; extra == "grpc"
|
|
36
|
-
Requires-Dist: nitypes (>=1.0.
|
|
37
|
-
Requires-Dist: numpy (>=1.22) ; python_version >= "3.
|
|
37
|
+
Requires-Dist: nitypes (>=1.0.1)
|
|
38
|
+
Requires-Dist: numpy (>=1.22) ; python_version >= "3.9" and python_version < "3.13"
|
|
38
39
|
Requires-Dist: numpy (>=2.1) ; python_version >= "3.13" and python_version < "4.0"
|
|
39
40
|
Requires-Dist: protobuf (>=4.21) ; extra == "grpc"
|
|
40
41
|
Requires-Dist: python-decouple (>=3.8)
|
|
@@ -102,7 +103,7 @@ system.
|
|
|
102
103
|
Python Version Support
|
|
103
104
|
----------------------
|
|
104
105
|
|
|
105
|
-
**nidaqmx** supports CPython 3.
|
|
106
|
+
**nidaqmx** supports CPython 3.9+.
|
|
106
107
|
|
|
107
108
|
**nidaqmx** supports PyPy3 for non-gRPC use cases. For the status of PyPy support for gRPC,
|
|
108
109
|
see `PyPy support (grpc/grpc#4221) <https://github.com/grpc/grpc/issues/4221>`_.
|
|
@@ -55,7 +55,7 @@ system.
|
|
|
55
55
|
Python Version Support
|
|
56
56
|
----------------------
|
|
57
57
|
|
|
58
|
-
**nidaqmx** supports CPython 3.
|
|
58
|
+
**nidaqmx** supports CPython 3.9+.
|
|
59
59
|
|
|
60
60
|
**nidaqmx** supports PyPy3 for non-gRPC use cases. For the status of PyPy support for gRPC,
|
|
61
61
|
see `PyPy support (grpc/grpc#4221) <https://github.com/grpc/grpc/issues/4221>`_.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""The NI-DAQmx API for Python."""
|
|
2
2
|
|
|
3
|
+
from importlib.metadata import version
|
|
4
|
+
|
|
3
5
|
from nidaqmx.errors import (
|
|
4
6
|
DaqError,
|
|
5
7
|
DaqReadError,
|
|
@@ -12,11 +14,6 @@ from nidaqmx.scale import Scale
|
|
|
12
14
|
from nidaqmx.task import Task
|
|
13
15
|
from nidaqmx.types import CtrFreq, CtrTick, CtrTime
|
|
14
16
|
|
|
15
|
-
try:
|
|
16
|
-
from importlib.metadata import version
|
|
17
|
-
except ImportError:
|
|
18
|
-
from importlib_metadata import version # type: ignore[no-redef]
|
|
19
|
-
|
|
20
17
|
__version__ = version(__name__)
|
|
21
18
|
|
|
22
19
|
__all__ = [ # noqa: F405 - 'errors' may be undefined, or defined from star imports: nidaqmx.grpc_session_options (auto-generated noqa)
|
|
@@ -229,6 +229,14 @@ class BaseInterpreter(abc.ABC):
|
|
|
229
229
|
voltage_excit_val, nominal_bridge_resistance, custom_scale_name):
|
|
230
230
|
raise NotImplementedError
|
|
231
231
|
|
|
232
|
+
@abc.abstractmethod
|
|
233
|
+
def create_ai_calculated_power_chan(
|
|
234
|
+
self, task, voltage_physical_channel, current_physical_channel,
|
|
235
|
+
name_to_assign_to_channel, terminal_config, voltage_min_val,
|
|
236
|
+
voltage_max_val, current_min_val, current_max_val, units,
|
|
237
|
+
shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name):
|
|
238
|
+
raise NotImplementedError
|
|
239
|
+
|
|
232
240
|
@abc.abstractmethod
|
|
233
241
|
def create_ai_charge_chan(
|
|
234
242
|
self, task, physical_channel, name_to_assign_to_channel,
|
|
@@ -45,12 +45,27 @@ def _get_caller_path() -> Path | None:
|
|
|
45
45
|
for frame, _ in traceback.walk_stack(inspect.currentframe()):
|
|
46
46
|
if frame.f_code.co_filename:
|
|
47
47
|
module_path = Path(frame.f_code.co_filename)
|
|
48
|
-
if module_path
|
|
48
|
+
if _exists(module_path) and not module_path.is_relative_to(package_path):
|
|
49
49
|
return module_path
|
|
50
50
|
|
|
51
51
|
return None
|
|
52
52
|
|
|
53
53
|
|
|
54
|
+
# Path.exists() throws OSError when the path has invalid file characters.
|
|
55
|
+
# https://github.com/python/cpython/issues/79487
|
|
56
|
+
if sys.version_info >= (3, 10):
|
|
57
|
+
|
|
58
|
+
def _exists(path: Path) -> bool:
|
|
59
|
+
return path.exists()
|
|
60
|
+
|
|
61
|
+
else:
|
|
62
|
+
|
|
63
|
+
def _exists(path: Path) -> bool:
|
|
64
|
+
import os
|
|
65
|
+
|
|
66
|
+
return os.path.exists(path)
|
|
67
|
+
|
|
68
|
+
|
|
54
69
|
def _get_package_path() -> Path:
|
|
55
70
|
"""Get the path of this package."""
|
|
56
71
|
module = sys.modules[__package__]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""nidaqmx feature toggles."""
|
|
2
2
|
|
|
3
|
+
# mypy: no-warn-unreachable
|
|
3
4
|
from __future__ import annotations
|
|
4
5
|
|
|
5
6
|
import functools
|
|
6
|
-
import sys
|
|
7
7
|
from collections.abc import Callable
|
|
8
8
|
from enum import Enum
|
|
9
9
|
from typing import TYPE_CHECKING, TypeVar
|
|
@@ -14,20 +14,13 @@ from nidaqmx._dotenvpath import get_dotenv_search_path
|
|
|
14
14
|
from nidaqmx.errors import FeatureNotSupportedError
|
|
15
15
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
17
|
-
from
|
|
18
|
-
|
|
19
|
-
if sys.version_info >= (3, 11):
|
|
20
|
-
from typing import Self
|
|
21
|
-
else:
|
|
22
|
-
from typing_extensions import Self
|
|
17
|
+
from typing_extensions import ParamSpec, Self
|
|
23
18
|
|
|
24
19
|
_P = ParamSpec("_P")
|
|
25
20
|
_T = TypeVar("_T")
|
|
26
21
|
|
|
27
22
|
_PREFIX = "NIDAQMX"
|
|
28
23
|
|
|
29
|
-
_config = AutoConfig(str(get_dotenv_search_path()))
|
|
30
|
-
|
|
31
24
|
if TYPE_CHECKING:
|
|
32
25
|
# Work around decouple's lack of type hints.
|
|
33
26
|
def _config(
|
|
@@ -36,6 +29,9 @@ if TYPE_CHECKING:
|
|
|
36
29
|
cast: Callable[[str], _T] | Undefined = undefined,
|
|
37
30
|
) -> _T: ...
|
|
38
31
|
|
|
32
|
+
else:
|
|
33
|
+
_config = AutoConfig(str(get_dotenv_search_path()))
|
|
34
|
+
|
|
39
35
|
|
|
40
36
|
# Based on the recipe at https://docs.python.org/3/howto/enum.html
|
|
41
37
|
class _OrderedEnum(Enum):
|
|
@@ -157,4 +153,4 @@ def requires_feature(
|
|
|
157
153
|
# Define feature toggle constants here:
|
|
158
154
|
# --------------------------------------
|
|
159
155
|
|
|
160
|
-
WAVEFORM_SUPPORT = FeatureToggle("WAVEFORM_SUPPORT", CodeReadiness.
|
|
156
|
+
WAVEFORM_SUPPORT = FeatureToggle("WAVEFORM_SUPPORT", CodeReadiness.RELEASE)
|
|
@@ -539,6 +539,26 @@ class GrpcStubInterpreter(BaseInterpreter):
|
|
|
539
539
|
nominal_bridge_resistance=nominal_bridge_resistance,
|
|
540
540
|
custom_scale_name=custom_scale_name))
|
|
541
541
|
|
|
542
|
+
def create_ai_calculated_power_chan(
|
|
543
|
+
self, task, voltage_physical_channel, current_physical_channel,
|
|
544
|
+
name_to_assign_to_channel, terminal_config, voltage_min_val,
|
|
545
|
+
voltage_max_val, current_min_val, current_max_val, units,
|
|
546
|
+
shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name):
|
|
547
|
+
response = self._invoke(
|
|
548
|
+
self._client.CreateAICalculatedPowerChan,
|
|
549
|
+
grpc_types.CreateAICalculatedPowerChanRequest(
|
|
550
|
+
task=task, voltage_physical_channel=voltage_physical_channel,
|
|
551
|
+
current_physical_channel=current_physical_channel,
|
|
552
|
+
name_to_assign_to_channel=name_to_assign_to_channel,
|
|
553
|
+
terminal_config_raw=terminal_config,
|
|
554
|
+
voltage_min_val=voltage_min_val,
|
|
555
|
+
voltage_max_val=voltage_max_val,
|
|
556
|
+
current_min_val=current_min_val,
|
|
557
|
+
current_max_val=current_max_val, units_raw=units,
|
|
558
|
+
shunt_resistor_loc_raw=shunt_resistor_loc,
|
|
559
|
+
ext_shunt_resistor_val=ext_shunt_resistor_val,
|
|
560
|
+
custom_scale_name=custom_scale_name))
|
|
561
|
+
|
|
542
562
|
def create_ai_charge_chan(
|
|
543
563
|
self, task, physical_channel, name_to_assign_to_channel,
|
|
544
564
|
terminal_config, min_val, max_val, units, custom_scale_name):
|
|
@@ -26,7 +26,7 @@ from nitypes.waveform.typing import ExtendedPropertyValue
|
|
|
26
26
|
from nitypes.waveform import AnalogWaveform, DigitalWaveform, SampleIntervalMode, Timing, ExtendedPropertyDictionary
|
|
27
27
|
|
|
28
28
|
if TYPE_CHECKING:
|
|
29
|
-
from
|
|
29
|
+
from typing_extensions import TypeAlias
|
|
30
30
|
|
|
31
31
|
_logger = logging.getLogger(__name__)
|
|
32
32
|
_was_runtime_environment_set = None
|
|
@@ -696,6 +696,29 @@ class LibraryInterpreter(BaseInterpreter):
|
|
|
696
696
|
voltage_excit_val, nominal_bridge_resistance, custom_scale_name)
|
|
697
697
|
self.check_for_error(error_code)
|
|
698
698
|
|
|
699
|
+
def create_ai_calculated_power_chan(
|
|
700
|
+
self, task, voltage_physical_channel, current_physical_channel,
|
|
701
|
+
name_to_assign_to_channel, terminal_config, voltage_min_val,
|
|
702
|
+
voltage_max_val, current_min_val, current_max_val, units,
|
|
703
|
+
shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name):
|
|
704
|
+
cfunc = lib_importer.windll.DAQmxCreateAICalculatedPowerChan
|
|
705
|
+
if cfunc.argtypes is None:
|
|
706
|
+
with cfunc.arglock:
|
|
707
|
+
if cfunc.argtypes is None:
|
|
708
|
+
cfunc.argtypes = [
|
|
709
|
+
lib_importer.task_handle, ctypes_byte_str,
|
|
710
|
+
ctypes_byte_str, ctypes_byte_str, ctypes.c_int,
|
|
711
|
+
ctypes.c_double, ctypes.c_double, ctypes.c_double,
|
|
712
|
+
ctypes.c_double, ctypes.c_int, ctypes.c_int,
|
|
713
|
+
ctypes.c_double, ctypes_byte_str]
|
|
714
|
+
|
|
715
|
+
error_code = cfunc(
|
|
716
|
+
task, voltage_physical_channel, current_physical_channel,
|
|
717
|
+
name_to_assign_to_channel, terminal_config, voltage_min_val,
|
|
718
|
+
voltage_max_val, current_min_val, current_max_val, units,
|
|
719
|
+
shunt_resistor_loc, ext_shunt_resistor_val, custom_scale_name)
|
|
720
|
+
self.check_for_error(error_code)
|
|
721
|
+
|
|
699
722
|
def create_ai_charge_chan(
|
|
700
723
|
self, task, physical_channel, name_to_assign_to_channel,
|
|
701
724
|
terminal_config, min_val, max_val, units, custom_scale_name):
|