diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fc6bdc30..99b622c31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,8 @@ All notable changes to this project will be documented in this file. * ### Major Changes * Removed support for Python 3.9. - * (IN PROGRESS behind "WAVEFORM_SUPPORT" feature toggle) Added support for reading and writing Waveform data through gRPC using [NI gRPC Device Server](https://github.com/ni/grpc-device). + * Completed support for reading and writing Waveforms, and removed the WAVEFORM_SUPPORT feature toggle. + * Added support for reading and writing Waveform data through gRPC using [NI gRPC Device Server](https://github.com/ni/grpc-device). * ### Known Issues * ... diff --git a/examples/analog_in/voltage_acq_int_clk_plot_wfm.py b/examples/analog_in/voltage_acq_int_clk_plot_wfm.py index 913e40e5f..a87c6fc46 100644 --- a/examples/analog_in/voltage_acq_int_clk_plot_wfm.py +++ b/examples/analog_in/voltage_acq_int_clk_plot_wfm.py @@ -5,14 +5,10 @@ Run 'pip install matplotlib' to install the matplotlib module. """ -import os +import matplotlib.pyplot as plot -os.environ["NIDAQMX_ENABLE_WAVEFORM_SUPPORT"] = "1" - -import matplotlib.pyplot as plot # noqa: E402 # Must import after setting environment variable - -import nidaqmx # noqa: E402 -from nidaqmx.constants import READ_ALL_AVAILABLE, AcquisitionType # noqa: E402 +import nidaqmx +from nidaqmx.constants import READ_ALL_AVAILABLE, AcquisitionType with nidaqmx.Task() as task: task.ai_channels.add_ai_voltage_chan("Dev1/ai0") diff --git a/examples/analog_in/voltage_acq_int_clk_wfm.py b/examples/analog_in/voltage_acq_int_clk_wfm.py index e57fde512..7607aff2e 100644 --- a/examples/analog_in/voltage_acq_int_clk_wfm.py +++ b/examples/analog_in/voltage_acq_int_clk_wfm.py @@ -4,12 +4,8 @@ of data using the DAQ device's internal clock. """ -import os - -os.environ["NIDAQMX_ENABLE_WAVEFORM_SUPPORT"] = "1" - -import nidaqmx # noqa: E402 # Must import after setting environment variable -from nidaqmx.constants import AcquisitionType # noqa: E402 +import nidaqmx +from nidaqmx.constants import AcquisitionType with nidaqmx.Task() as task: task.ai_channels.add_ai_voltage_chan("Dev1/ai0") diff --git a/examples/analog_out/gen_voltage_wfm_int_clk.py b/examples/analog_out/gen_voltage_wfm_int_clk.py index 065deebb9..f55017b89 100644 --- a/examples/analog_out/gen_voltage_wfm_int_clk.py +++ b/examples/analog_out/gen_voltage_wfm_int_clk.py @@ -5,14 +5,10 @@ sample clock. """ -import os +from nitypes.waveform import AnalogWaveform -os.environ["NIDAQMX_ENABLE_WAVEFORM_SUPPORT"] = "1" - -from nitypes.waveform import AnalogWaveform # noqa: E402 - -import nidaqmx # noqa: E402 # Must import after setting environment variable -from nidaqmx.constants import AcquisitionType # noqa: E402 +import nidaqmx +from nidaqmx.constants import AcquisitionType with nidaqmx.Task() as task: total_samples = 1000 diff --git a/examples/digital_in/acq_dig_port_int_clk_wfm.py b/examples/digital_in/acq_dig_port_int_clk_wfm.py index a598856ef..feb752204 100644 --- a/examples/digital_in/acq_dig_port_int_clk_wfm.py +++ b/examples/digital_in/acq_dig_port_int_clk_wfm.py @@ -4,12 +4,8 @@ using the DAQ device's internal clock. """ -import os - -os.environ["NIDAQMX_ENABLE_WAVEFORM_SUPPORT"] = "1" - -import nidaqmx # noqa: E402 # Must import after setting environment variable -from nidaqmx.constants import ( # noqa: E402 +import nidaqmx +from nidaqmx.constants import ( READ_ALL_AVAILABLE, AcquisitionType, LineGrouping, diff --git a/examples/digital_out/cont_gen_dig_port_int_clk_wfm.py b/examples/digital_out/cont_gen_dig_port_int_clk_wfm.py index f3ed016c4..81ed643db 100644 --- a/examples/digital_out/cont_gen_dig_port_int_clk_wfm.py +++ b/examples/digital_out/cont_gen_dig_port_int_clk_wfm.py @@ -4,14 +4,10 @@ pattern using the DAQ device's clock. """ -import os +from nitypes.waveform import DigitalWaveform -os.environ["NIDAQMX_ENABLE_WAVEFORM_SUPPORT"] = "1" - -from nitypes.waveform import DigitalWaveform # noqa: E402 - -import nidaqmx # noqa: E402 # Must import after setting environment variable -from nidaqmx.constants import AcquisitionType, LineGrouping # noqa: E402 +import nidaqmx +from nidaqmx.constants import AcquisitionType, LineGrouping with nidaqmx.Task() as task: waveform = DigitalWaveform(sample_count=100, signal_count=16) diff --git a/examples/synchronization/multi_function/cont_ai_ci_tdms_sync.py b/examples/synchronization/multi_function/cont_ai_ci_tdms_sync.py index 4f8d89d47..87098feeb 100644 --- a/examples/synchronization/multi_function/cont_ai_ci_tdms_sync.py +++ b/examples/synchronization/multi_function/cont_ai_ci_tdms_sync.py @@ -25,8 +25,6 @@ ) from nidaqmx.stream_readers import AnalogMultiChannelReader, CounterReader -os.environ["NIDAQMX_ENABLE_WAVEFORM_SUPPORT"] = "1" - # Configuration SAMPLE_RATE = 1000 SAMPLES_PER_CHANNEL = 1000 diff --git a/generated/nidaqmx/_feature_toggles.py b/generated/nidaqmx/_feature_toggles.py index fa19c442e..ff8ce6235 100644 --- a/generated/nidaqmx/_feature_toggles.py +++ b/generated/nidaqmx/_feature_toggles.py @@ -156,5 +156,3 @@ def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _T: # -------------------------------------- # Define feature toggle constants here: # -------------------------------------- - -WAVEFORM_SUPPORT = FeatureToggle("WAVEFORM_SUPPORT", CodeReadiness.INCOMPLETE) diff --git a/generated/nidaqmx/stream_readers/_analog_multi_channel_reader.py b/generated/nidaqmx/stream_readers/_analog_multi_channel_reader.py index 22473b1ca..c5b2042c6 100644 --- a/generated/nidaqmx/stream_readers/_analog_multi_channel_reader.py +++ b/generated/nidaqmx/stream_readers/_analog_multi_channel_reader.py @@ -4,7 +4,6 @@ from nitypes.waveform import AnalogWaveform from nidaqmx import DaqError -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import READ_ALL_AVAILABLE, FillMode, ReallocationPolicy from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers._channel_reader_base import ChannelReaderBase @@ -137,7 +136,6 @@ def read_one_sample(self, data, timeout=10): self._handle, 1, timeout, FillMode.GROUP_BY_CHANNEL.value, data ) - @requires_feature(WAVEFORM_SUPPORT) def read_waveforms( self, waveforms: list[AnalogWaveform[numpy.float64]], diff --git a/generated/nidaqmx/stream_readers/_analog_single_channel_reader.py b/generated/nidaqmx/stream_readers/_analog_single_channel_reader.py index 0b1baca64..414a61c4c 100644 --- a/generated/nidaqmx/stream_readers/_analog_single_channel_reader.py +++ b/generated/nidaqmx/stream_readers/_analog_single_channel_reader.py @@ -4,7 +4,6 @@ from nitypes.waveform import AnalogWaveform from nidaqmx import DaqError -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import READ_ALL_AVAILABLE, FillMode, ReallocationPolicy from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers._channel_reader_base import ChannelReaderBase @@ -109,7 +108,6 @@ def read_one_sample(self, timeout=10): """ return self._interpreter.read_analog_scalar_f64(self._handle, timeout) - @requires_feature(WAVEFORM_SUPPORT) def read_waveform( self, waveform: AnalogWaveform[numpy.float64], diff --git a/generated/nidaqmx/stream_readers/_digital_multi_channel_reader.py b/generated/nidaqmx/stream_readers/_digital_multi_channel_reader.py index 7e898749e..3b9c5c421 100644 --- a/generated/nidaqmx/stream_readers/_digital_multi_channel_reader.py +++ b/generated/nidaqmx/stream_readers/_digital_multi_channel_reader.py @@ -5,7 +5,6 @@ from nitypes.waveform import DigitalWaveform from nidaqmx import DaqError -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import READ_ALL_AVAILABLE, FillMode, ReallocationPolicy from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers._channel_reader_base import ChannelReaderBase @@ -486,7 +485,6 @@ def read_one_sample_port_uint32(self, data, timeout=10): self._handle, 1, timeout, FillMode.GROUP_BY_CHANNEL.value, data ) - @requires_feature(WAVEFORM_SUPPORT) def read_waveforms( self, waveforms: list[DigitalWaveform[Any]], diff --git a/generated/nidaqmx/stream_readers/_digital_single_channel_reader.py b/generated/nidaqmx/stream_readers/_digital_single_channel_reader.py index 3b5d06cc7..b49e91d14 100644 --- a/generated/nidaqmx/stream_readers/_digital_single_channel_reader.py +++ b/generated/nidaqmx/stream_readers/_digital_single_channel_reader.py @@ -6,7 +6,6 @@ from nitypes.waveform import DigitalWaveform from nidaqmx import DaqError -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import READ_ALL_AVAILABLE, FillMode, ReallocationPolicy from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers._channel_reader_base import ChannelReaderBase @@ -393,7 +392,6 @@ def read_one_sample_port_uint32(self, timeout=10): """ # noqa: W505 - doc line too long (103 > 100 characters) (auto-generated noqa) return self._interpreter.read_digital_scalar_u32(self._handle, timeout) - @requires_feature(WAVEFORM_SUPPORT) def read_waveform( self, waveform: DigitalWaveform[Any], diff --git a/generated/nidaqmx/stream_writers/_analog_multi_channel_writer.py b/generated/nidaqmx/stream_writers/_analog_multi_channel_writer.py index b02ca7801..d43182c7c 100644 --- a/generated/nidaqmx/stream_writers/_analog_multi_channel_writer.py +++ b/generated/nidaqmx/stream_writers/_analog_multi_channel_writer.py @@ -5,7 +5,6 @@ from nitypes.waveform import AnalogWaveform -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import FillMode from nidaqmx.stream_writers._channel_writer_base import ( AUTO_START_UNSET, @@ -91,7 +90,6 @@ def write_one_sample(self, data, timeout=10): self._handle, 1, auto_start, timeout, FillMode.GROUP_BY_CHANNEL.value, data ) - @requires_feature(WAVEFORM_SUPPORT) def write_waveforms( self, waveforms: Sequence[AnalogWaveform[Any]], timeout: float = 10.0 ) -> int: diff --git a/generated/nidaqmx/stream_writers/_analog_single_channel_writer.py b/generated/nidaqmx/stream_writers/_analog_single_channel_writer.py index 01f9d52bd..7c04b7a5c 100644 --- a/generated/nidaqmx/stream_writers/_analog_single_channel_writer.py +++ b/generated/nidaqmx/stream_writers/_analog_single_channel_writer.py @@ -4,7 +4,6 @@ from nitypes.waveform import AnalogWaveform -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import FillMode from nidaqmx.stream_writers._channel_writer_base import ( AUTO_START_UNSET, @@ -82,7 +81,6 @@ def write_one_sample(self, data, timeout=10): return self._interpreter.write_analog_scalar_f64(self._handle, auto_start, timeout, data) - @requires_feature(WAVEFORM_SUPPORT) def write_waveform(self, waveform: AnalogWaveform[Any], timeout: float = 10.0) -> int: """Writes a waveform to a single analog output channel in a task. diff --git a/generated/nidaqmx/stream_writers/_digital_multi_channel_writer.py b/generated/nidaqmx/stream_writers/_digital_multi_channel_writer.py index 9b1f391f7..ed40eb6a0 100644 --- a/generated/nidaqmx/stream_writers/_digital_multi_channel_writer.py +++ b/generated/nidaqmx/stream_writers/_digital_multi_channel_writer.py @@ -5,7 +5,6 @@ from nitypes.waveform import DigitalWaveform -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import FillMode from nidaqmx.stream_writers._channel_writer_base import ( AUTO_START_UNSET, @@ -325,7 +324,6 @@ def write_one_sample_port_uint32(self, data, timeout=10): self._handle, 1, auto_start, timeout, FillMode.GROUP_BY_CHANNEL.value, data ) - @requires_feature(WAVEFORM_SUPPORT) def write_waveforms( self, waveforms: Sequence[DigitalWaveform[Any]], timeout: float = 10.0 ) -> int: diff --git a/generated/nidaqmx/stream_writers/_digital_single_channel_writer.py b/generated/nidaqmx/stream_writers/_digital_single_channel_writer.py index 631c25fba..809b15342 100644 --- a/generated/nidaqmx/stream_writers/_digital_single_channel_writer.py +++ b/generated/nidaqmx/stream_writers/_digital_single_channel_writer.py @@ -5,7 +5,6 @@ import numpy from nitypes.waveform import DigitalWaveform -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import FillMode from nidaqmx.stream_writers._channel_writer_base import ( AUTO_START_UNSET, @@ -285,7 +284,6 @@ def write_one_sample_port_uint32(self, data, timeout=10): return self._interpreter.write_digital_scalar_u32(self._handle, auto_start, timeout, data) - @requires_feature(WAVEFORM_SUPPORT) def write_waveform(self, waveform: DigitalWaveform[Any], timeout: float = 10.0) -> int: """Writes a waveform to a single digital output channel in a task. diff --git a/generated/nidaqmx/task/_task.py b/generated/nidaqmx/task/_task.py index 95b14bd9e..7ac70c2bf 100644 --- a/generated/nidaqmx/task/_task.py +++ b/generated/nidaqmx/task/_task.py @@ -10,7 +10,6 @@ from nitypes.waveform import AnalogWaveform, DigitalWaveform from nidaqmx import utils -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import ( READ_ALL_AVAILABLE, AcquisitionType, @@ -806,7 +805,6 @@ def _read_power( :samples_read ] - @requires_feature(WAVEFORM_SUPPORT) def read_waveform(self, number_of_samples_per_channel=READ_ALL_AVAILABLE, timeout=10.0): """Reads samples from the task or virtual channels you specify, and returns them as waveforms. @@ -1588,7 +1586,6 @@ def _is_waveform_data(self, data): isinstance(wf, DigitalWaveform) for wf in data ) - @requires_feature(WAVEFORM_SUPPORT) def write_waveform( self, waveforms: ( diff --git a/src/handwritten/_feature_toggles.py b/src/handwritten/_feature_toggles.py index fa19c442e..ff8ce6235 100644 --- a/src/handwritten/_feature_toggles.py +++ b/src/handwritten/_feature_toggles.py @@ -156,5 +156,3 @@ def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _T: # -------------------------------------- # Define feature toggle constants here: # -------------------------------------- - -WAVEFORM_SUPPORT = FeatureToggle("WAVEFORM_SUPPORT", CodeReadiness.INCOMPLETE) diff --git a/src/handwritten/stream_readers/_analog_multi_channel_reader.py b/src/handwritten/stream_readers/_analog_multi_channel_reader.py index 22473b1ca..c5b2042c6 100644 --- a/src/handwritten/stream_readers/_analog_multi_channel_reader.py +++ b/src/handwritten/stream_readers/_analog_multi_channel_reader.py @@ -4,7 +4,6 @@ from nitypes.waveform import AnalogWaveform from nidaqmx import DaqError -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import READ_ALL_AVAILABLE, FillMode, ReallocationPolicy from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers._channel_reader_base import ChannelReaderBase @@ -137,7 +136,6 @@ def read_one_sample(self, data, timeout=10): self._handle, 1, timeout, FillMode.GROUP_BY_CHANNEL.value, data ) - @requires_feature(WAVEFORM_SUPPORT) def read_waveforms( self, waveforms: list[AnalogWaveform[numpy.float64]], diff --git a/src/handwritten/stream_readers/_analog_single_channel_reader.py b/src/handwritten/stream_readers/_analog_single_channel_reader.py index 0b1baca64..414a61c4c 100644 --- a/src/handwritten/stream_readers/_analog_single_channel_reader.py +++ b/src/handwritten/stream_readers/_analog_single_channel_reader.py @@ -4,7 +4,6 @@ from nitypes.waveform import AnalogWaveform from nidaqmx import DaqError -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import READ_ALL_AVAILABLE, FillMode, ReallocationPolicy from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers._channel_reader_base import ChannelReaderBase @@ -109,7 +108,6 @@ def read_one_sample(self, timeout=10): """ return self._interpreter.read_analog_scalar_f64(self._handle, timeout) - @requires_feature(WAVEFORM_SUPPORT) def read_waveform( self, waveform: AnalogWaveform[numpy.float64], diff --git a/src/handwritten/stream_readers/_digital_multi_channel_reader.py b/src/handwritten/stream_readers/_digital_multi_channel_reader.py index 7e898749e..3b9c5c421 100644 --- a/src/handwritten/stream_readers/_digital_multi_channel_reader.py +++ b/src/handwritten/stream_readers/_digital_multi_channel_reader.py @@ -5,7 +5,6 @@ from nitypes.waveform import DigitalWaveform from nidaqmx import DaqError -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import READ_ALL_AVAILABLE, FillMode, ReallocationPolicy from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers._channel_reader_base import ChannelReaderBase @@ -486,7 +485,6 @@ def read_one_sample_port_uint32(self, data, timeout=10): self._handle, 1, timeout, FillMode.GROUP_BY_CHANNEL.value, data ) - @requires_feature(WAVEFORM_SUPPORT) def read_waveforms( self, waveforms: list[DigitalWaveform[Any]], diff --git a/src/handwritten/stream_readers/_digital_single_channel_reader.py b/src/handwritten/stream_readers/_digital_single_channel_reader.py index 3b5d06cc7..b49e91d14 100644 --- a/src/handwritten/stream_readers/_digital_single_channel_reader.py +++ b/src/handwritten/stream_readers/_digital_single_channel_reader.py @@ -6,7 +6,6 @@ from nitypes.waveform import DigitalWaveform from nidaqmx import DaqError -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import READ_ALL_AVAILABLE, FillMode, ReallocationPolicy from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers._channel_reader_base import ChannelReaderBase @@ -393,7 +392,6 @@ def read_one_sample_port_uint32(self, timeout=10): """ # noqa: W505 - doc line too long (103 > 100 characters) (auto-generated noqa) return self._interpreter.read_digital_scalar_u32(self._handle, timeout) - @requires_feature(WAVEFORM_SUPPORT) def read_waveform( self, waveform: DigitalWaveform[Any], diff --git a/src/handwritten/stream_writers/_analog_multi_channel_writer.py b/src/handwritten/stream_writers/_analog_multi_channel_writer.py index b02ca7801..d43182c7c 100644 --- a/src/handwritten/stream_writers/_analog_multi_channel_writer.py +++ b/src/handwritten/stream_writers/_analog_multi_channel_writer.py @@ -5,7 +5,6 @@ from nitypes.waveform import AnalogWaveform -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import FillMode from nidaqmx.stream_writers._channel_writer_base import ( AUTO_START_UNSET, @@ -91,7 +90,6 @@ def write_one_sample(self, data, timeout=10): self._handle, 1, auto_start, timeout, FillMode.GROUP_BY_CHANNEL.value, data ) - @requires_feature(WAVEFORM_SUPPORT) def write_waveforms( self, waveforms: Sequence[AnalogWaveform[Any]], timeout: float = 10.0 ) -> int: diff --git a/src/handwritten/stream_writers/_analog_single_channel_writer.py b/src/handwritten/stream_writers/_analog_single_channel_writer.py index 01f9d52bd..7c04b7a5c 100644 --- a/src/handwritten/stream_writers/_analog_single_channel_writer.py +++ b/src/handwritten/stream_writers/_analog_single_channel_writer.py @@ -4,7 +4,6 @@ from nitypes.waveform import AnalogWaveform -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import FillMode from nidaqmx.stream_writers._channel_writer_base import ( AUTO_START_UNSET, @@ -82,7 +81,6 @@ def write_one_sample(self, data, timeout=10): return self._interpreter.write_analog_scalar_f64(self._handle, auto_start, timeout, data) - @requires_feature(WAVEFORM_SUPPORT) def write_waveform(self, waveform: AnalogWaveform[Any], timeout: float = 10.0) -> int: """Writes a waveform to a single analog output channel in a task. diff --git a/src/handwritten/stream_writers/_digital_multi_channel_writer.py b/src/handwritten/stream_writers/_digital_multi_channel_writer.py index 9b1f391f7..ed40eb6a0 100644 --- a/src/handwritten/stream_writers/_digital_multi_channel_writer.py +++ b/src/handwritten/stream_writers/_digital_multi_channel_writer.py @@ -5,7 +5,6 @@ from nitypes.waveform import DigitalWaveform -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import FillMode from nidaqmx.stream_writers._channel_writer_base import ( AUTO_START_UNSET, @@ -325,7 +324,6 @@ def write_one_sample_port_uint32(self, data, timeout=10): self._handle, 1, auto_start, timeout, FillMode.GROUP_BY_CHANNEL.value, data ) - @requires_feature(WAVEFORM_SUPPORT) def write_waveforms( self, waveforms: Sequence[DigitalWaveform[Any]], timeout: float = 10.0 ) -> int: diff --git a/src/handwritten/stream_writers/_digital_single_channel_writer.py b/src/handwritten/stream_writers/_digital_single_channel_writer.py index 631c25fba..809b15342 100644 --- a/src/handwritten/stream_writers/_digital_single_channel_writer.py +++ b/src/handwritten/stream_writers/_digital_single_channel_writer.py @@ -5,7 +5,6 @@ import numpy from nitypes.waveform import DigitalWaveform -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import FillMode from nidaqmx.stream_writers._channel_writer_base import ( AUTO_START_UNSET, @@ -285,7 +284,6 @@ def write_one_sample_port_uint32(self, data, timeout=10): return self._interpreter.write_digital_scalar_u32(self._handle, auto_start, timeout, data) - @requires_feature(WAVEFORM_SUPPORT) def write_waveform(self, waveform: DigitalWaveform[Any], timeout: float = 10.0) -> int: """Writes a waveform to a single digital output channel in a task. diff --git a/src/handwritten/task/_task.py b/src/handwritten/task/_task.py index 95b14bd9e..7ac70c2bf 100644 --- a/src/handwritten/task/_task.py +++ b/src/handwritten/task/_task.py @@ -10,7 +10,6 @@ from nitypes.waveform import AnalogWaveform, DigitalWaveform from nidaqmx import utils -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, requires_feature from nidaqmx.constants import ( READ_ALL_AVAILABLE, AcquisitionType, @@ -806,7 +805,6 @@ def _read_power( :samples_read ] - @requires_feature(WAVEFORM_SUPPORT) def read_waveform(self, number_of_samples_per_channel=READ_ALL_AVAILABLE, timeout=10.0): """Reads samples from the task or virtual channels you specify, and returns them as waveforms. @@ -1588,7 +1586,6 @@ def _is_waveform_data(self, data): isinstance(wf, DigitalWaveform) for wf in data ) - @requires_feature(WAVEFORM_SUPPORT) def write_waveform( self, waveforms: ( diff --git a/tests/component/stream_readers/test_analog_multi_channel_reader.py b/tests/component/stream_readers/test_analog_multi_channel_reader.py index cb01f3d74..3a62300b5 100644 --- a/tests/component/stream_readers/test_analog_multi_channel_reader.py +++ b/tests/component/stream_readers/test_analog_multi_channel_reader.py @@ -11,7 +11,6 @@ import nidaqmx import nidaqmx.system -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from nidaqmx.constants import AcquisitionType, ReallocationPolicy, WaveformAttributeMode from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers import AnalogMultiChannelReader, DaqError @@ -77,23 +76,6 @@ def test___analog_multi_channel_reader___read_many_sample_with_wrong_dtype___rai assert "float64" in exc_info.value.args[0] -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___analog_multi_channel_reader___read_waveforms_feature_disabled___raises_feature_not_supported_error( - ai_multi_channel_task_with_timing: nidaqmx.Task, -) -> None: - reader = AnalogMultiChannelReader(ai_multi_channel_task_with_timing.in_stream) - num_channels = ai_multi_channel_task_with_timing.number_of_channels - samples_to_read = 10 - waveforms = [AnalogWaveform(samples_to_read) for _ in range(num_channels)] - - with pytest.raises(FeatureNotSupportedError) as exc_info: - reader.read_waveforms(waveforms) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___analog_multi_channel_reader___read_waveforms___returns_valid_waveforms( ai_multi_channel_task_with_timing: nidaqmx.Task, ) -> None: diff --git a/tests/component/stream_readers/test_analog_single_channel_reader.py b/tests/component/stream_readers/test_analog_single_channel_reader.py index d7e7c5c5a..c3612a475 100644 --- a/tests/component/stream_readers/test_analog_single_channel_reader.py +++ b/tests/component/stream_readers/test_analog_single_channel_reader.py @@ -11,7 +11,6 @@ import nidaqmx import nidaqmx.system -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from nidaqmx.constants import AcquisitionType, ReallocationPolicy, WaveformAttributeMode from nidaqmx.error_codes import DAQmxErrors from nidaqmx.stream_readers import AnalogSingleChannelReader, DaqError @@ -60,21 +59,6 @@ def test___analog_single_channel_reader___read_many_sample_with_wrong_dtype___ra assert "float64" in exc_info.value.args[0] -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___analog_single_channel_reader___read_waveform_feature_disabled___raises_feature_not_supported_error( - ai_single_channel_task_with_timing: nidaqmx.Task, -) -> None: - reader = AnalogSingleChannelReader(ai_single_channel_task_with_timing.in_stream) - waveform = AnalogWaveform(50) - - with pytest.raises(FeatureNotSupportedError) as exc_info: - reader.read_waveform(waveform) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___analog_single_channel_reader___read_waveform___returns_valid_waveform( ai_single_channel_task_with_timing: nidaqmx.Task, ) -> None: diff --git a/tests/component/stream_readers/test_digital_multi_channel_reader.py b/tests/component/stream_readers/test_digital_multi_channel_reader.py index 9d6569daf..6b2454056 100644 --- a/tests/component/stream_readers/test_digital_multi_channel_reader.py +++ b/tests/component/stream_readers/test_digital_multi_channel_reader.py @@ -11,7 +11,6 @@ import nidaqmx import nidaqmx.system -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from nidaqmx.constants import ( AcquisitionType, LineGrouping, @@ -312,21 +311,6 @@ def test___digital_multi_channel_reader___read_many_sample_port_uint32_with_wron assert "uint32" in exc_info.value.args[0] -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___digital_multi_channel_multi_line_reader___read_waveforms_feature_disabled___raises_feature_not_supported_error( - di_multi_chan_multi_line_timing_task: nidaqmx.Task, -) -> None: - reader = DigitalMultiChannelReader(di_multi_chan_multi_line_timing_task.in_stream) - waveforms = [DigitalWaveform(50) for _ in range(8)] - - with pytest.raises(FeatureNotSupportedError) as exc_info: - reader.read_waveforms(waveforms) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___digital_multi_channel_multi_line_reader___read_waveforms___returns_valid_waveforms( di_multi_chan_multi_line_timing_task: nidaqmx.Task, ) -> None: diff --git a/tests/component/stream_readers/test_digital_single_channel_reader.py b/tests/component/stream_readers/test_digital_single_channel_reader.py index 6745e9c2a..1257db2f3 100644 --- a/tests/component/stream_readers/test_digital_single_channel_reader.py +++ b/tests/component/stream_readers/test_digital_single_channel_reader.py @@ -11,7 +11,6 @@ import nidaqmx import nidaqmx.system -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from nidaqmx.constants import ( AcquisitionType, LineGrouping, @@ -198,21 +197,6 @@ def test___digital_single_channel_reader___read_many_sample_port_uint32_with_wro assert "uint32" in exc_info.value.args[0] -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___digital_single_line_reader___read_waveform_feature_disabled___raises_feature_not_supported_error( - di_single_line_timing_task: nidaqmx.Task, -) -> None: - reader = DigitalSingleChannelReader(di_single_line_timing_task.in_stream) - waveform = DigitalWaveform(50) - - with pytest.raises(FeatureNotSupportedError) as exc_info: - reader.read_waveform(waveform) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___digital_single_line_reader___read_waveform___returns_valid_waveform( di_single_line_timing_task: nidaqmx.Task, ) -> None: diff --git a/tests/component/stream_writers/test_analog_multi_channel_writer.py b/tests/component/stream_writers/test_analog_multi_channel_writer.py index ce444f571..00f4c362c 100644 --- a/tests/component/stream_writers/test_analog_multi_channel_writer.py +++ b/tests/component/stream_writers/test_analog_multi_channel_writer.py @@ -6,7 +6,6 @@ import pytest import nidaqmx -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from nidaqmx.stream_writers import AnalogMultiChannelWriter from tests.component._analog_utils import ( AO_VOLTAGE_EPSILON, @@ -87,25 +86,6 @@ def test___analog_multi_channel_writer___write_many_sample_with_wrong_dtype___ra assert "float64" in exc_info.value.args[0] -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___analog_multi_channel_writer___write_waveforms_feature_disabled___raises_feature_not_supported_error( - ao_multi_channel_task: nidaqmx.Task, -) -> None: - writer = AnalogMultiChannelWriter(ao_multi_channel_task.out_stream) - num_samples = 10 - waveforms = [ - _create_constant_waveform(num_samples), - _create_constant_waveform(num_samples), - ] - - with pytest.raises(FeatureNotSupportedError) as exc_info: - writer.write_waveforms(waveforms) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___analog_multi_channel_writer___write_waveforms___output_matches_final_values( ao_multi_channel_task: nidaqmx.Task, ai_multi_channel_loopback_task: nidaqmx.Task, diff --git a/tests/component/stream_writers/test_analog_single_channel_writer.py b/tests/component/stream_writers/test_analog_single_channel_writer.py index 0a05df259..5895985a8 100644 --- a/tests/component/stream_writers/test_analog_single_channel_writer.py +++ b/tests/component/stream_writers/test_analog_single_channel_writer.py @@ -6,11 +6,9 @@ import pytest import nidaqmx -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from nidaqmx.stream_writers import AnalogSingleChannelWriter from tests.component._analog_utils import ( AO_VOLTAGE_EPSILON, - _create_constant_waveform, _create_float32_ramp_waveform, _create_linear_ramp_waveform, _create_non_contiguous_waveform, @@ -61,21 +59,6 @@ def test___analog_single_channel_writer___write_many_sample_with_wrong_dtype___r assert "float64" in exc_info.value.args[0] -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___analog_single_channel_reader___read_waveform_feature_disabled___raises_feature_not_supported_error( - ao_single_channel_task: nidaqmx.Task, -) -> None: - writer = AnalogSingleChannelWriter(ao_single_channel_task.out_stream) - waveform = _create_constant_waveform(20) - - with pytest.raises(FeatureNotSupportedError) as exc_info: - writer.write_waveform(waveform) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___analog_single_channel_writer___write_waveform___output_matches_final_value( ao_single_channel_task: nidaqmx.Task, ai_single_channel_loopback_task: nidaqmx.Task, diff --git a/tests/component/stream_writers/test_digital_multi_channel_writer.py b/tests/component/stream_writers/test_digital_multi_channel_writer.py index 22c520c72..ef5a21258 100644 --- a/tests/component/stream_writers/test_digital_multi_channel_writer.py +++ b/tests/component/stream_writers/test_digital_multi_channel_writer.py @@ -9,7 +9,6 @@ import nidaqmx import nidaqmx.system -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from nidaqmx.constants import LineGrouping from nidaqmx.errors import DaqError from nidaqmx.stream_writers import DigitalMultiChannelWriter @@ -273,21 +272,6 @@ def test___digital_multi_channel_writer___write_many_sample_port_uint32_with_wro assert "uint32" in exc_info.value.args[0] -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___digital_multi_channel_writer___write_waveforms_feature_disabled___raises_feature_not_supported_error( - do_multi_channel_multi_line_task: nidaqmx.Task, -) -> None: - writer = DigitalMultiChannelWriter(do_multi_channel_multi_line_task.out_stream) - waveforms = [_create_digital_waveform_uint8(20), _create_digital_waveform_uint8(20)] - - with pytest.raises(FeatureNotSupportedError) as exc_info: - writer.write_waveforms(waveforms) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___digital_multi_channel_writer___write_waveforms_single_lines___outputs_match_final_values( do_multi_channel_multi_line_task: nidaqmx.Task, di_multi_line_loopback_task: nidaqmx.Task, diff --git a/tests/component/stream_writers/test_digital_single_channel_writer.py b/tests/component/stream_writers/test_digital_single_channel_writer.py index a786463c4..925d2cbb0 100644 --- a/tests/component/stream_writers/test_digital_single_channel_writer.py +++ b/tests/component/stream_writers/test_digital_single_channel_writer.py @@ -7,7 +7,6 @@ import pytest import nidaqmx -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from nidaqmx.errors import DaqError from nidaqmx.stream_writers import DigitalSingleChannelWriter from tests.component._digital_utils import ( @@ -191,21 +190,6 @@ def test___digital_single_channel_writer___write_many_sample_port_uint32_with_wr assert "uint32" in exc_info.value.args[0] -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___digital_single_channel_writer___write_waveform_feature_disabled___raises_feature_not_supported_error( - do_single_line_task: nidaqmx.Task, -) -> None: - writer = DigitalSingleChannelWriter(do_single_line_task.out_stream) - waveform = _create_digital_waveform_uint8(20) - - with pytest.raises(FeatureNotSupportedError) as exc_info: - writer.write_waveform(waveform) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___digital_single_channel_writer___write_waveform_single_line___outputs_match_final_values( do_single_line_task: nidaqmx.Task, di_single_line_loopback_task: nidaqmx.Task, diff --git a/tests/component/task/test_task_write_waveform_ao.py b/tests/component/task/test_task_write_waveform_ao.py index de5e6f90f..5bb9e1f63 100644 --- a/tests/component/task/test_task_write_waveform_ao.py +++ b/tests/component/task/test_task_write_waveform_ao.py @@ -4,7 +4,6 @@ import pytest import nidaqmx -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from tests.component._analog_utils import ( AO_VOLTAGE_EPSILON, _create_constant_waveform, @@ -18,20 +17,6 @@ ) -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___task___write_waveform_feature_disabled___raises_feature_not_supported_error( - ao_single_channel_task: nidaqmx.Task, -) -> None: - waveform = _create_constant_waveform(10) - - with pytest.raises(FeatureNotSupportedError) as exc_info: - ao_single_channel_task.write_waveform(waveform) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___task___write_linear_ramp_waveform___output_matches_final_value( ao_single_channel_task: nidaqmx.Task, ai_single_channel_loopback_task: nidaqmx.Task, @@ -167,23 +152,6 @@ def test___task___write_waveform_with_timing___all_samples_match_waveform_data( np.testing.assert_allclose(actual_values, waveform.scaled_data, atol=AO_VOLTAGE_EPSILON) -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___task___write_waveforms_feature_disabled___raises_feature_not_supported_error( - ao_multi_channel_task: nidaqmx.Task, -) -> None: - num_samples = 10 - waveforms = [ - _create_constant_waveform(num_samples), - _create_constant_waveform(num_samples), - ] - - with pytest.raises(FeatureNotSupportedError) as exc_info: - ao_multi_channel_task.write_waveform(waveforms) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - - def test___task___write_waveforms___output_matches_final_values( ao_multi_channel_task: nidaqmx.Task, ai_multi_channel_loopback_task: nidaqmx.Task, diff --git a/tests/component/task/test_task_write_waveform_do.py b/tests/component/task/test_task_write_waveform_do.py index b07d991ee..a1e38e8b6 100644 --- a/tests/component/task/test_task_write_waveform_do.py +++ b/tests/component/task/test_task_write_waveform_do.py @@ -4,7 +4,6 @@ import pytest import nidaqmx -from nidaqmx._feature_toggles import WAVEFORM_SUPPORT, FeatureNotSupportedError from nidaqmx.errors import DaqError from tests.component._digital_utils import ( _create_digital_waveform, @@ -18,20 +17,6 @@ ) -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___task___write_waveform_feature_disabled___raises_feature_not_supported_error( - do_single_line_task: nidaqmx.Task, -) -> None: - waveform = _create_digital_waveform_uint8(10) - - with pytest.raises(FeatureNotSupportedError) as exc_info: - do_single_line_task.write_waveform(waveform) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___task___write_waveform_single_line___outputs_match_final_values( do_single_line_task: nidaqmx.Task, di_single_line_loopback_task: nidaqmx.Task, @@ -305,20 +290,6 @@ def test___task___write_waveform_port_uint32___outputs_match_final_values( ) # TODO: AB#3178052 - change to _get_waveform_data() -@pytest.mark.disable_feature_toggle(WAVEFORM_SUPPORT) -def test___task___write_waveforms_feature_disabled___raises_feature_not_supported_error( - do_multi_channel_multi_line_task: nidaqmx.Task, -) -> None: - waveforms = [_create_digital_waveform_uint8(20), _create_digital_waveform_uint8(20)] - - with pytest.raises(FeatureNotSupportedError) as exc_info: - do_multi_channel_multi_line_task.write_waveform(waveforms) - - error_message = exc_info.value.args[0] - assert "WAVEFORM_SUPPORT feature is not supported" in error_message - assert "NIDAQMX_ENABLE_WAVEFORM_SUPPORT" in error_message - - def test___task___write_waveforms_single_lines___outputs_match_final_values( do_multi_channel_multi_line_task: nidaqmx.Task, di_multi_line_loopback_task: nidaqmx.Task,