diff --git a/CHANGELOG.md b/CHANGELOG.md index c3563df42..f249d0bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [nifgen (NI-FGEN)](#nifgen-ni-fgen) - [nimodinst (NI-ModInst)](#nimodinst-ni-modinst) - [nirfsg (NI-RFSG)](#nirfsg-ni-rfsg) +- [nirfsg (NI-RFSG)](#nirfsg-ni-rfsg) - [niscope (NI-SCOPE)](#niscope-ni-scope) - [nise (NI Switch Executive)](#nise-ni-switch-executive) - [niswitch (NI-SWITCH)](#niswitch-ni-switch) diff --git a/build/helper/__init__.py b/build/helper/__init__.py index f6d8dbcfa..1e00a3d9f 100644 --- a/build/helper/__init__.py +++ b/build/helper/__init__.py @@ -51,6 +51,7 @@ from build.helper.metadata_filters import filter_library_functions # noqa: F401 from build.helper.metadata_filters import filter_parameters # noqa: F401 from build.helper.metadata_filters import filter_public_functions # noqa: F401 +from build.helper.metadata_filters import filter_rep_cap_supported_attributes from build.helper.metadata_find import find_custom_type # noqa: F401 from build.helper.metadata_find import find_session_handle_parameter # noqa: F401 diff --git a/build/helper/metadata_add_all.py b/build/helper/metadata_add_all.py index ed9d836b6..21e621597 100644 --- a/build/helper/metadata_add_all.py +++ b/build/helper/metadata_add_all.py @@ -12,6 +12,7 @@ from .helper import get_python_type_for_api_type from .metadata_filters import filter_codegen_attributes from .metadata_filters import filter_codegen_functions +from .metadata_filters import filter_rep_cap_supported_attributes from .metadata_find import find_custom_type from .metadata_find import find_size_parameter from .metadata_merge_dicts import merge_helper @@ -721,6 +722,9 @@ def add_all_config_metadata(config): if 'uses_nitclk' not in config: config['uses_nitclk'] = False + if 'repeated_capability_object_type' not in config: + config['repeated_capability_object_type'] = {'python': 'session'} + return config diff --git a/build/helper/metadata_filters.py b/build/helper/metadata_filters.py index 3a4d5bb1c..680d9591b 100644 --- a/build/helper/metadata_filters.py +++ b/build/helper/metadata_filters.py @@ -450,4 +450,14 @@ def filter_codegen_enums(enums): '''Returns enum metadata only for those enums to be included in codegen''' return {k: v for k, v in enums.items() if v['codegen_method'] != 'no'} +def filter_rep_cap_supported_attributes(attributes, rep_cap_name): + '''Returns attribute metadata only for those attributes that support the specified repeated capability. + Args: + attributes: Dictionary of attribute metadata. + rep_cap_name: The name of the repeated capability to filter by. + + Returns: + Dictionary of attributes that support the specified repeated capability. + ''' + return {k: v for k, v in attributes.items() if rep_cap_name in v.get('supported_rep_caps', [])} diff --git a/build/templates/session.py.mako b/build/templates/session.py.mako index df755677b..c4e7aad08 100644 --- a/build/templates/session.py.mako +++ b/build/templates/session.py.mako @@ -88,9 +88,87 @@ class _Lock(object): def __exit__(self, exc_type, exc_value, traceback): self._session.unlock() - % endif % if len(config['repeated_capabilities']) > 0: + +% if config['repeated_capability_object_type']['python'] == 'custom': +# Dynamically handle repeated capabilities +% for rep_cap in config['repeated_capabilities']: + +class _RepeatedCapability${rep_cap['python_name'].capitalize()}(object): + % for attribute in helper.sorted_attrs(helper.filter_rep_cap_supported_attributes(attributes, rep_cap['python_name'])): +<% +helper.add_attribute_rep_cap_tip(attributes[attribute], config) +%>\ + % if attributes[attribute]['enum']: + % if helper.enum_uses_converter(enums[attributes[attribute]['enum']]): + ${attributes[attribute]['python_name']} = _attributes.AttributeEnumWithConverter(_attributes.AttributeEnum(_attributes.Attribute${attributes[attribute]['type']}, enums.${enums[attributes[attribute]['enum']]['python_name']}, ${attribute}), _converters.${enums[attributes[attribute]['enum']]['enum_to_converted_value_function_name']}, _converters.${enums[attributes[attribute]['enum']]['converted_value_to_enum_function_name']}) + % else: + ${attributes[attribute]['python_name']} = _attributes.AttributeEnum(_attributes.Attribute${attributes[attribute]['type']}, enums.${enums[attributes[attribute]['enum']]['python_name']}, ${attribute}) + % endif + % else: + ${attributes[attribute]['python_name']} = _attributes.${attributes[attribute]['attribute_class']}(${attribute}) + % endif +% if 'documentation' in attributes[attribute] and len(helper.get_documentation_for_node_docstring(attributes[attribute], config, indent=4).strip()) > 0: + '''Type: ${attributes[attribute]['type_in_documentation']} + + ${helper.get_documentation_for_node_docstring(attributes[attribute], config, indent=4)} + ''' +% endif +% endfor + def __init__(self, session, repeated_capability_list): + object.__setattr__(self, '_session', session) + object.__setattr__(self, '_repeated_capability_list', repeated_capability_list) + object.__setattr__(self, '_prefix', '${rep_cap["prefix"]}') + object.__setattr__(self, '_current_repeated_capability_list', repeated_capability_list if len(repeated_capability_list) > 0 else ['']) + object.__setattr__(self, '_separator', '') + + def __setattr__(self, key, value): + if key not in dir(self): + raise AttributeError("'{0}' object has no attribute '{1}'".format(type(self).__name__, key)) + object.__setattr__(self, key, value) + + def __getitem__(self, repeated_capability): + '''Set/get properties or call methods with a repeated capability (i.e. channels)''' + rep_caps_list = _converters.convert_repeated_capabilities(repeated_capability, self._prefix) + complete_rep_cap_list = [ + current_rep_cap + self._separator + rep_cap + for current_rep_cap in self._current_repeated_capability_list + for rep_cap in rep_caps_list + ] + object.__setattr__(self, '_current_repeated_capability_list', complete_rep_cap_list) + self._current_repeated_capability_list = complete_rep_cap_list + + return self + + def _get_attribute_vi_real64(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_real64(repeated_capability, attribute) + return value + + def _set_attribute_vi_real64(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_real64(repeated_capability, attribute, value) + + def _get_attribute_vi_int32(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_int32(repeated_capability, attribute) + return value + + def _set_attribute_vi_int32(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_int32(repeated_capability, attribute, value) + + def _get_attribute_vi_string(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_string(repeated_capability, attribute) + return value + + def _set_attribute_vi_string(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_string(repeated_capability, attribute, value) +% endfor +% else: class _RepeatedCapabilities(object): def __init__(self, session, prefix, current_repeated_capability_list): self._session = session @@ -126,6 +204,7 @@ class _NoChannel(object): def __exit__(self, exc_type, exc_value, traceback): self._session._repeated_capability = self._repeated_capability_cache +% endif % endif @@ -137,6 +216,11 @@ class _SessionBase(object): % for attribute in helper.sorted_attrs(helper.filter_codegen_attributes(attributes)): <% +# Skip attributes with repeated capability expansion set to "custom" +if 'repeated_capability_type' in attributes[attribute]: + rep_cap_type = attributes[attribute]['repeated_capability_type'] + if any(rep_cap.get('python_name') == rep_cap_type and config['repeated_capability_object_type'] == 'custom' for rep_cap in config['repeated_capabilities']): + continue helper.add_attribute_rep_cap_tip(attributes[attribute], config) %>\ %if attributes[attribute]['enum']: @@ -178,9 +262,13 @@ constructor_params = helper.filter_parameters(init_function['parameters'], helpe % if len(config['repeated_capabilities']) > 0: # Instantiate any repeated capability objects -% for rep_cap in config['repeated_capabilities']: +% for rep_cap in config['repeated_capabilities']: +% if config['repeated_capability_object_type']['python'] == 'custom': + self.${rep_cap['python_name']} = _RepeatedCapability${rep_cap['python_name'].capitalize()}(self, repeated_capability_list) +% else: self.${rep_cap['python_name']} = _RepeatedCapabilities(self, '${rep_cap["prefix"]}', repeated_capability_list) -% endfor +% endif +% endfor % endif # Finally, set _is_frozen to True which is used to prevent clients from accidentally adding diff --git a/generated/nidmm/nidmm/session.py b/generated/nidmm/nidmm/session.py index 2d04e204e..51257c1a7 100644 --- a/generated/nidmm/nidmm/session.py +++ b/generated/nidmm/nidmm/session.py @@ -50,7 +50,6 @@ def __enter__(self): def __exit__(self, exc_type, exc_value, traceback): self._session.unlock() - class _SessionBase(object): '''Base class for all NI-DMM sessions.''' diff --git a/generated/nirfsg/nirfsg/session.py b/generated/nirfsg/nirfsg/session.py index c81c41bad..149469728 100644 --- a/generated/nirfsg/nirfsg/session.py +++ b/generated/nirfsg/nirfsg/session.py @@ -52,41 +52,1096 @@ def __exit__(self, exc_type, exc_value, traceback): self._session.unlock() -class _RepeatedCapabilities(object): - def __init__(self, session, prefix, current_repeated_capability_list): - self._session = session - self._prefix = prefix - # We need at least one element. If we get an empty list, make the one element an empty string - self._current_repeated_capability_list = current_repeated_capability_list if len(current_repeated_capability_list) > 0 else [''] - # Now we know there is at lease one entry, so we look if it is an empty string or not - self._separator = '/' if len(self._current_repeated_capability_list[0]) > 0 else '' +# Dynamically handle repeated capabilities + +class _RepeatedCapabilityMarkers(object): + exported_marker_event_output_terminal = _attributes.AttributeEnum(_attributes.AttributeViString, enums.MarkerEventExportOutputTerm, 1150064) + '''Type: enums.MarkerEventExportOutputTerm + + Specifies the destination terminal for exporting the Marker Event. To set this property, the NI-RFSG device must be in the Configuration state. + + **Supported Devices:** PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + **Related Topics** + + `Marker Events `_ + + `PFI Lines `_ + + `PXI Trigger Lines `_ + + **High-Level Methods**: + + - export_signal + + **Defined Values**: + + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | Name | Value | Description | + +===========================================+=============+=================================================================================================================================+ + | MarkerEventExportOutputTerm.DO_NOT_EXPORT | | The signal is not exported. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PFI0 | PFI0 | The signal is exported to the PFI 0 connector. For the PXIe-5841 with PXIe-5655, the signal is exported to the PXIe-5841 PFI 0. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PFI1 | PFI1 | The signal is exported to the PFI 1 connector. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PFI4 | PFI4 | The signal is exported to the PFI 4 connector. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PFI5 | PFI5 | The signal is exported to the PFI 5 connector. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PXI_TRIG0 | PXI_Trig0 | The trigger is received on PXI trigger line 0. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PXI_TRIG1 | PXI_Trig1 | The trigger is received on PXI trigger line 1. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PXI_TRIG2 | PXI_Trig2 | The trigger is received on PXI trigger line 2. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PXI_TRIG3 | PXI_Trig3 | The trigger is received on PXI trigger line 3. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PXI_TRIG4 | PXI_Trig4 | The trigger is received on PXI trigger line 4. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PXI_TRIG5 | PXI_Trig5 | The trigger is received on PXI trigger line 5. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PXI_TRIG6 | PXI_Trig6 | The trigger is received on PXI trigger line 6. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.PXIE_DSTARC | PXIe_DStarC | The signal is exported to the PXIe DStar C trigger line. This value is valid on only the PXIe-5820/5830/5831/5832/5840/5841. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.DIO0 | DIO/PFI0 | The trigger is received on PFI0 from the front panel DIO terminal. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.DIO1 | DIO/PFI1 | The trigger is received on PFI1 from the front panel DIO terminal. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.DIO2 | DIO/PFI2 | The trigger is received on PFI2 from the front panel DIO terminal. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.DIO3 | DIO/PFI3 | The trigger is received on PFI3 from the front panel DIO terminal. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.DIO4 | DIO/PFI4 | The trigger is received on PFI4 from the front panel DIO terminal. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.DIO5 | DIO/PFI5 | The trigger is received on PFI5 from the front panel DIO terminal. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.DIO6 | DIO/PFI6 | The trigger is received on PFI6 from the front panel DIO terminal. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | MarkerEventExportOutputTerm.DIO7 | DIO/PFI7 | The trigger is received on PFI7 from the front panel DIO terminal. | + +-------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + + Note: + One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. + + Tip: + This property can be set/get on specific markers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container markers to specify a subset. + + Example: :py:attr:`my_session.markers[ ... ].exported_marker_event_output_terminal` + + To set/get on all markers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.exported_marker_event_output_terminal` + ''' + marker_event_output_behavior = _attributes.AttributeEnum(_attributes.AttributeViInt32, enums.MarkerEventOutputBehavior, 1150206) + '''Type: enums.MarkerEventOutputBehavior + + Specifies the output behavior for the Marker Event. To set this property, the NI-RFSG device must be in the Configuration state. + + **Default Value:** MarkerEventOutputBehavior.PULSE + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842 + + **Related Topics** + + `Marker Events `_ + + **Defined Values**: + + +----------------------------------+----------------+-------------------------------------------------------+ + | Name | Value | Description | + +==================================+================+=======================================================+ + | MarkerEventOutputBehavior.PULSE | 23000 (0x59d8) | Specifies the Marker Event output behavior as pulse. | + +----------------------------------+----------------+-------------------------------------------------------+ + | MarkerEventOutputBehavior.TOGGLE | 23001 (0x59d9) | Specifies the Marker Event output behavior as toggle. | + +----------------------------------+----------------+-------------------------------------------------------+ + + Tip: + This property can be set/get on specific markers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container markers to specify a subset. + + Example: :py:attr:`my_session.markers[ ... ].marker_event_output_behavior` + + To set/get on all markers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.marker_event_output_behavior` + ''' + marker_event_pulse_width = _attributes.AttributeViReal64(1150207) + '''Type: float + + Specifies the pulse width value for the Marker Event. Use the marker_event_pulse_width_units property to set the units for the pulse width value. This property is valid only when the marker_event_output_behavior property is set to MarkerEventOutputBehavior.PULSE. + + To set this property, the NI-RFSG device must be in the Configuration state. + + **Default Value:** 200 ns + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842 + + **Related Topics** + + `Marker Events `_ + + Tip: + This property can be set/get on specific markers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container markers to specify a subset. + + Example: :py:attr:`my_session.markers[ ... ].marker_event_pulse_width` + + To set/get on all markers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.marker_event_pulse_width` + ''' + marker_event_pulse_width_units = _attributes.AttributeEnum(_attributes.AttributeViInt32, enums.MarkerEventPulseWidthUnits, 1150208) + '''Type: enums.MarkerEventPulseWidthUnits + + Specifies the pulse width units for the Marker Event. This property is valid only when the marker_event_output_behavior property is set to MarkerEventOutputBehavior.PULSE. + + To set this property, the NI-RFSG device must be in the Configuration state. + + **Default Value:** MarkerEventPulseWidthUnits.SECONDS + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842 + + **Related Topics** + + `Marker Events `_ + + **Defined Values**: + + +----------------------------------+----------------+-------------------------------------------------------+ + | Name | Value | Description | + +==================================+================+=======================================================+ + | MarkerEventOutputBehavior.PULSE | 23000 (0x59d8) | Specifies the Marker Event output behavior as pulse. | + +----------------------------------+----------------+-------------------------------------------------------+ + | MarkerEventOutputBehavior.TOGGLE | 23001 (0x59d9) | Specifies the Marker Event output behavior as toggle. | + +----------------------------------+----------------+-------------------------------------------------------+ + + Tip: + This property can be set/get on specific markers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container markers to specify a subset. + + Example: :py:attr:`my_session.markers[ ... ].marker_event_pulse_width_units` + + To set/get on all markers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.marker_event_pulse_width_units` + ''' + marker_event_terminal_name = _attributes.AttributeViString(1150115) + '''Type: str + + Returns the name of the fully qualified signal name as a string. + + **Default Values**: + + PXI-5670/5671, PXIe-5672/5673/5673E: /*AWGName*/Marker *X* Event, where *AWGName* is the name of your associated AWG module in MAX and *X* is Marker Event 0 through 3. + + PXIe-5830/5831/5832: /*BasebandModule*/ao/0/Marker *X* Event, where *BasebandModule* is the name of the baseband module of your device in MAX and *X* is Marker Event 0 through 3. + + PXIe-5820/5840/5841: /*ModuleName*/ao/0/Marker *X* Event, where *ModuleName* is the name of your device in MAX and *X* is Marker Event 0 through 3. + + **Supported Devices:** PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842 + + **Related Topics** + + `Events `_ + + `Syntax for Terminal Names `_ + + **High-Level Methods**: + + - GetTerminalName + + Tip: + This property can be set/get on specific markers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container markers to specify a subset. + + Example: :py:attr:`my_session.markers[ ... ].marker_event_terminal_name` + + To set/get on all markers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.marker_event_terminal_name` + ''' + marker_event_toggle_initial_state = _attributes.AttributeEnum(_attributes.AttributeViInt32, enums.MarkerEventToggleInitialState, 1150209) + '''Type: enums.MarkerEventToggleInitialState + + Specifies the initial state for the Marker Event when the marker_event_output_behavior property is set to MarkerEventOutputBehavior.TOGGLE. + + To set this property, the NI-RFSG device must be in the Configuration state. + + **Default Value:** MarkerEventToggleInitialState.LOW + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842 + + **Related Topics** + + `Marker Events `_ + + **Defined Values**: + + +------------------------------------+----------------+----------------------------------------------------------------------------------+ + | Name | Value | Description | + +====================================+================+==================================================================================+ + | MarkerEventToggleInitialState.HIGH | 21001 (0x5209) | Specifies the initial state of the Marker Event toggle behavior as digital high. | + +------------------------------------+----------------+----------------------------------------------------------------------------------+ + | MarkerEventToggleInitialState.LOW | 21000 (0x5208) | Specifies the initial state of the Marker Event toggle behavior as digital low. | + +------------------------------------+----------------+----------------------------------------------------------------------------------+ + + Tip: + This property can be set/get on specific markers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container markers to specify a subset. + + Example: :py:attr:`my_session.markers[ ... ].marker_event_toggle_initial_state` + + To set/get on all markers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.marker_event_toggle_initial_state` + ''' + def __init__(self, session, repeated_capability_list): + object.__setattr__(self, '_session', session) + object.__setattr__(self, '_repeated_capability_list', repeated_capability_list) + object.__setattr__(self, '_prefix', 'marker') + object.__setattr__(self, '_current_repeated_capability_list', repeated_capability_list if len(repeated_capability_list) > 0 else ['']) + object.__setattr__(self, '_separator', '') + + def __setattr__(self, key, value): + if key not in dir(self): + raise AttributeError("'{0}' object has no attribute '{1}'".format(type(self).__name__, key)) + object.__setattr__(self, key, value) + + def __getitem__(self, repeated_capability): + '''Set/get properties or call methods with a repeated capability (i.e. channels)''' + rep_caps_list = _converters.convert_repeated_capabilities(repeated_capability, self._prefix) + complete_rep_cap_list = [ + current_rep_cap + self._separator + rep_cap + for current_rep_cap in self._current_repeated_capability_list + for rep_cap in rep_caps_list + ] + object.__setattr__(self, '_current_repeated_capability_list', complete_rep_cap_list) + self._current_repeated_capability_list = complete_rep_cap_list + + return self + + def _get_attribute_vi_real64(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_real64(repeated_capability, attribute) + return value + + def _set_attribute_vi_real64(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_real64(repeated_capability, attribute, value) + + def _get_attribute_vi_int32(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_int32(repeated_capability, attribute) + return value + + def _set_attribute_vi_int32(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_int32(repeated_capability, attribute, value) + + def _get_attribute_vi_string(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_string(repeated_capability, attribute) + return value + + def _set_attribute_vi_string(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_string(repeated_capability, attribute, value) + +class _RepeatedCapabilityScript_triggers(object): + digital_edge_script_trigger_edge = _attributes.AttributeEnum(_attributes.AttributeViInt32, enums.ScriptTrigDigEdgeEdge, 1150021) + '''Type: enums.ScriptTrigDigEdgeEdge + + Specifies the active edge for the Script Trigger. This property is used when the script_trigger_type property is set to digital edge. To set the digital_edge_script_trigger_edge property, the NI-RFSG device must be in the Configuration state. + + **Default Value:** ScriptTrigDigEdgeEdge.RISING + + **Supported Devices:** PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + **Related Topics** + + `Script Trigger `_ + + `Digital Edge Trigger `_ + + **High-Level Methods**: + + - configure_digital_edge_script_trigger + + **Defined Values**: + + +-------------------------------+---------+-------------------------------------------------------------------------------+ + | Name | Value | Description | + +===============================+=========+===============================================================================+ + | ScriptTrigDigEdgeEdge.FALLING | 1 (0x1) | Asserts the trigger when the signal transitions from high level to low level. | + +-------------------------------+---------+-------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeEdge.RISING | 0 (0x0) | Asserts the trigger when the signal transitions from low level to high level. | + +-------------------------------+---------+-------------------------------------------------------------------------------+ + + Note: + One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. + + Tip: + This property can be set/get on specific script_triggers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container script_triggers to specify a subset. + + Example: :py:attr:`my_session.script_triggers[ ... ].digital_edge_script_trigger_edge` + + To set/get on all script_triggers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.digital_edge_script_trigger_edge` + ''' + digital_edge_script_trigger_source = _attributes.AttributeEnum(_attributes.AttributeViString, enums.ScriptTrigDigEdgeSource, 1150020) + '''Type: enums.ScriptTrigDigEdgeSource + + Specifies the source terminal for the Script Trigger. This property is used when the script_trigger_type property is set to digital edge. To set this property, the NI-RFSG device must be in the Configuration state. + + **Supported Devices:** PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + **Related Topics** + + `Script Trigger `_ + + `PFI Lines `_ + + `PXI Trigger Lines `_ + + **High-Level Methods**: + + - configure_digital_edge_script_trigger + + **Defined Values**: + + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Value | Description | + +=============================================+=============+=========================================================================================================================================+ + | ScriptTrigDigEdgeSource.PFI0 | PFI0 | The trigger is received on PFI 0. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PFI1 | PFI1 | The trigger is received on PFI 1. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PFI2 | PFI2 | The trigger is received on PFI 2. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PFI3 | PFI3 | The trigger is received on PFI 3. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXI_STAR | PXI_Star | The trigger is received on the PXI star trigger line. This value is not valid for the PXIe-5644/5645/5646. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXI_TRIG0 | PXI_Trig0 | The trigger is received on PXI trigger line 0. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXI_TRIG1 | PXI_Trig1 | The trigger is received on PXI trigger line 1. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXI_TRIG2 | PXI_Trig2 | The trigger is received on PXI trigger line 2. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXI_TRIG3 | PXI_Trig3 | The trigger is received on PXI trigger line 3. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXI_TRIG4 | PXI_Trig4 | The trigger is received on PXI trigger line 4. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXI_TRIG5 | PXI_Trig5 | The trigger is received on PXI trigger line 5. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXI_TRIG6 | PXI_Trig6 | The trigger is received on PXI trigger line 6. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXI_TRIG7 | PXI_Trig7 | The trigger is received on PXI trigger line 7. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PXIE_DSTARB | PXIe_DStarB | The trigger is received on the PXIe DStar B trigger line. This value is valid on only the PXIe-5820/5830/5831/5832/5840/5841/5842/5860. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.PULSE_IN | PulseIn | The trigger is received on the PULSE IN terminal. This value is valid on only the PXIe-5842. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.DIO0 | DIO/PFI0 | The trigger is received on PFI0 from the front panel DIO terminal. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.DIO1 | DIO/PFI1 | The trigger is received on PFI1 from the front panel DIO terminal. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.DIO2 | DIO/PFI2 | The trigger is received on PFI2 from the front panel DIO terminal. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.DIO3 | DIO/PFI3 | The trigger is received on PFI3 from the front panel DIO terminal. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.DIO4 | DIO/PFI4 | The trigger is received on PFI4 from the front panel DIO terminal. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.DIO5 | DIO/PFI5 | The trigger is received on PFI5 from the front panel DIO terminal. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.DIO6 | DIO/PFI6 | The trigger is received on PFI6 from the front panel DIO terminal. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.DIO7 | DIO/PFI7 | The trigger is received on PFI7 from the front panel DIO terminal. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigEdgeSource.SYNC_SCRIPT_TRIGGER | Sync_Script | The trigger is received on the Sync Script trigger line. This value is valid on only the PXIe-5644/5645/5646. | + +---------------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + + Note: + One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. + + Tip: + This property can be set/get on specific script_triggers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container script_triggers to specify a subset. + + Example: :py:attr:`my_session.script_triggers[ ... ].digital_edge_script_trigger_source` + + To set/get on all script_triggers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.digital_edge_script_trigger_source` + ''' + digital_level_script_trigger_active_level = _attributes.AttributeEnum(_attributes.AttributeViInt32, enums.ScriptTrigDigLevelActiveLevel, 1150055) + '''Type: enums.ScriptTrigDigLevelActiveLevel + + Specifies the active level for the Script Trigger. This property is used when the script_trigger_type property is set to ScriptTrigType.DIGITAL_LEVEL. + + **Default Value:** ScriptTrigDigLevelActiveLevel.HIGH + + **Supported Devices:** PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + + + **Related Topics** + + `Script Trigger `_ + + `Digital Level Trigger `_ + + **Defined Values**: + + +------------------------------------+---------------+--------------------------------------------------+ + | Name | Value | Description | + +====================================+===============+==================================================+ + | ScriptTrigDigLevelActiveLevel.HIGH | 9000 (0x2328) | Trigger when the digital trigger signal is high. | + +------------------------------------+---------------+--------------------------------------------------+ + | ScriptTrigDigLevelActiveLevel.LOW | 9001 (0x2329) | Trigger when the digital trigger signal is low. | + +------------------------------------+---------------+--------------------------------------------------+ + + Tip: + This property can be set/get on specific script_triggers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container script_triggers to specify a subset. + + Example: :py:attr:`my_session.script_triggers[ ... ].digital_level_script_trigger_active_level` + + To set/get on all script_triggers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.digital_level_script_trigger_active_level` + ''' + digital_level_script_trigger_source = _attributes.AttributeEnum(_attributes.AttributeViString, enums.ScriptTrigDigLevelSource, 1150054) + '''Type: enums.ScriptTrigDigLevelSource + + Specifies the source terminal for the Script Trigger. This property is used when the script_trigger_type property is set to ScriptTrigType.DIGITAL_LEVEL. The digital_level_script_trigger_source property is not case-sensitive. + + To set the digital_level_script_trigger_source property, the NI-RFSG device must be in the Configuration state. + + **Supported Devices:** PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + **Related Topics** + + `Script Trigger `_ + + `PFI Lines `_ + + `PXI Trigger Lines `_ + + **Defined Values**: + + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Value | Description | + +======================================+=============+=========================================================================================================================================+ + | ScriptTrigDigLevelSource.PFI0 | PFI0 | The trigger is received on PFI 0. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PFI1 | PFI1 | The trigger is received on PFI 1. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PFI2 | PFI2 | The trigger is received on PFI 2. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PFI3 | PFI3 | The trigger is received on PFI 3. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXI_STAR | PXI_Star | The trigger is received on the PXI star trigger line. This value is not valid for the PXIe-5644/5645/5646. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXI_TRIG0 | PXI_Trig0 | The trigger is received on PXI trigger line 0. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXI_TRIG1 | PXI_Trig1 | The trigger is received on PXI trigger line 1. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXI_TRIG2 | PXI_Trig2 | The trigger is received on PXI trigger line 2. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXI_TRIG3 | PXI_Trig3 | The trigger is received on PXI trigger line 3. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXI_TRIG4 | PXI_Trig4 | The trigger is received on PXI trigger line 4. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXI_TRIG5 | PXI_Trig5 | The trigger is received on PXI trigger line 5. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXI_TRIG6 | PXI_Trig6 | The trigger is received on PXI trigger line 6. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXI_TRIG7 | PXI_Trig7 | The trigger is received on PXI trigger line 7. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PXIE_DSTARB | PXIe_DStarB | The trigger is received on the PXIe DStar B trigger line. This value is valid on only the PXIe-5820/5830/5831/5832/5840/5841/5842/5860. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.PULSE_IN | PulseIn | The trigger is received on the PULSE IN terminal. This value is valid on only the PXIe-5842. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.DIO0 | DIO/PFI0 | The trigger is received on PFI0 from the front panel DIO terminal. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.DIO1 | DIO/PFI1 | The trigger is received on PFI1 from the front panel DIO terminal. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.DIO2 | DIO/PFI2 | The trigger is received on PFI2 from the front panel DIO terminal. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.DIO3 | DIO/PFI3 | The trigger is received on PFI3 from the front panel DIO terminal. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.DIO4 | DIO/PFI4 | The trigger is received on PFI4 from the front panel DIO terminal. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.DIO5 | DIO/PFI5 | The trigger is received on PFI5 from the front panel DIO terminal. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.DIO6 | DIO/PFI6 | The trigger is received on PFI6 from the front panel DIO terminal. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigDigLevelSource.DIO7 | DIO/PFI7 | The trigger is received on PFI7 from the front panel DIO terminal. | + +--------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + + Note: + One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. + + Tip: + This property can be set/get on specific script_triggers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container script_triggers to specify a subset. + + Example: :py:attr:`my_session.script_triggers[ ... ].digital_level_script_trigger_source` + + To set/get on all script_triggers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.digital_level_script_trigger_source` + ''' + exported_script_trigger_output_terminal = _attributes.AttributeEnum(_attributes.AttributeViString, enums.ScriptTrigExportOutputTerm, 1150022) + '''Type: enums.ScriptTrigExportOutputTerm + + Specifies the destination terminal for exporting the Script Trigger. To set this property, the NI-RFSG device must be in the Configuration state. + + **Supported Devices:** PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + **Related Topics** + + `Script Trigger `_ —Refer to this topic for information about trigger delay. + + `PFI Lines `_ + + `PXI Trigger Lines `_ + + **High-Level Methods**: + + - export_signal + + **Defined Values**: + + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | Name | Value | Description | + +==========================================+=============+=================================================================================================================================+ + | ScriptTrigExportOutputTerm.DO_NOT_EXPORT | | The signal is not exported. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PFI0 | PFI0 | The signal is exported to the PFI 0 connector. For the PXIe-5841 with PXIe-5655, the signal is exported to the PXIe-5841 PFI 0. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PFI1 | PFI1 | The signal is exported to the PFI 1 connector. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PFI4 | PFI4 | The signal is exported to the PFI 4 connector. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PFI5 | PFI5 | The signal is exported to the PFI 5 connector. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PXI_TRIG0 | PXI_Trig0 | The trigger is received on PXI trigger line 0. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PXI_TRIG1 | PXI_Trig1 | The trigger is received on PXI trigger line 1. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PXI_TRIG2 | PXI_Trig2 | The trigger is received on PXI trigger line 2. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PXI_TRIG3 | PXI_Trig3 | The trigger is received on PXI trigger line 3. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PXI_TRIG4 | PXI_Trig4 | The trigger is received on PXI trigger line 4. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PXI_TRIG5 | PXI_Trig5 | The trigger is received on PXI trigger line 5. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PXI_TRIG6 | PXI_Trig6 | The trigger is received on PXI trigger line 6. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.PXIE_DSTARC | PXIe_DStarC | The signal is exported to the PXIe DStar C trigger line. This value is valid on only the PXIe-5820/5830/5831/5832/5840/5841. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.DIO0 | DIO/PFI0 | The trigger is received on PFI0 from the front panel DIO terminal. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.DIO1 | DIO/PFI1 | The trigger is received on PFI1 from the front panel DIO terminal. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.DIO2 | DIO/PFI2 | The trigger is received on PFI2 from the front panel DIO terminal. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.DIO3 | DIO/PFI3 | The trigger is received on PFI3 from the front panel DIO terminal. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.DIO4 | DIO/PFI4 | The trigger is received on PFI4 from the front panel DIO terminal. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.DIO5 | DIO/PFI5 | The trigger is received on PFI5 from the front panel DIO terminal. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.DIO6 | DIO/PFI6 | The trigger is received on PFI6 from the front panel DIO terminal. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigExportOutputTerm.DIO7 | DIO/PFI7 | The trigger is received on PFI7 from the front panel DIO terminal. | + +------------------------------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------+ + + Note: + One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. + + Tip: + This property can be set/get on specific script_triggers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container script_triggers to specify a subset. + + Example: :py:attr:`my_session.script_triggers[ ... ].exported_script_trigger_output_terminal` + + To set/get on all script_triggers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.exported_script_trigger_output_terminal` + ''' + script_trigger_terminal_name = _attributes.AttributeViString(1150116) + '''Type: str + + Returns the name of the fully qualified signal name as a string. + + **Default Values**: + + PXI-5670/5671, PXIe-5672/5673/5673E: /*AWGName*/ScriptTrigger *X*, where *AWGName* is the name of your associated AWG module in MAX and *X* is Script Trigger 0 through 3. + + PXIe-5830/5831/5832: /*BasebandModule*/ao/0/ScriptTrigger *X*, where *BasebandModule* is the name of the baseband module of your device in MAX and *X* is Script Trigger 0 through 3. + + PXIe-5820/5840/5841/5842: /*ModuleName*/ao/0/ScriptTrigger *X*, where *ModuleName* is the name of your device in MAX and *X* is Script Trigger 0 through 3. + + PXIe-5860: /*ModuleName*/ao/*ChannelNumber*/ScriptTrigger *X*, where *ModuleName* is the name of your device in MAX, *ChannelNumber* is the channel number (0 or 1), and *X* is Script Trigger 0 through 3. + + **Supported Devices:** PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + **Related Topics** + + `Triggers `_ + + `Syntax for Terminal Names `_ + + **High-Level Methods**: + + - GetTerminalName + + Tip: + This property can be set/get on specific script_triggers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container script_triggers to specify a subset. + + Example: :py:attr:`my_session.script_triggers[ ... ].script_trigger_terminal_name` + + To set/get on all script_triggers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.script_trigger_terminal_name` + ''' + script_trigger_type = _attributes.AttributeEnum(_attributes.AttributeViInt32, enums.ScriptTrigType, 1150019) + '''Type: enums.ScriptTrigType + + Specifies the Script Trigger type. Depending upon the value of this property, more properties may be needed to fully configure the trigger. To set this property, the NI-RFSG device must be in the Configuration state. + + **Default Value:** ScriptTrigType.NONE + + **Supported Devices:** PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + **Related Topics** + + `Script Trigger `_ + + `Trigger Types `_ + + **High-Level Methods**: + + - configure_digital_edge_script_trigger + + **Defined Values**: + + +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Value | Description | + +==============================+=======================================================================================================================================================================================================================================================================+ + | ScriptTrigType.NONE | No trigger is configured. Signal generation starts immediately. | + +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigType.DIGITAL_EDGE | The data operation does not start until a digital edge is detected. The source of the digital edge is specified with the digital_edge_start_trigger_source property, and the active edge is specified with the digital_edge_start_trigger_edge property. | + +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigType.DIGITAL_LEVEL | The data operation does not start until the digital level is detected. The source of the digital level is specified in the digital_level_script_trigger_source property, and the active level is specified in the digital_level_script_trigger_active_level property. | + +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ScriptTrigType.SOFTWARE | The data operation does not start until a software trigger occurs. You can create a software event by calling the send_software_edge_trigger method. | + +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + Note: + One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. + + Tip: + This property can be set/get on specific script_triggers within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container script_triggers to specify a subset. + + Example: :py:attr:`my_session.script_triggers[ ... ].script_trigger_type` + + To set/get on all script_triggers, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.script_trigger_type` + ''' + def __init__(self, session, repeated_capability_list): + object.__setattr__(self, '_session', session) + object.__setattr__(self, '_repeated_capability_list', repeated_capability_list) + object.__setattr__(self, '_prefix', 'scripttrigger') + object.__setattr__(self, '_current_repeated_capability_list', repeated_capability_list if len(repeated_capability_list) > 0 else ['']) + object.__setattr__(self, '_separator', '') + + def __setattr__(self, key, value): + if key not in dir(self): + raise AttributeError("'{0}' object has no attribute '{1}'".format(type(self).__name__, key)) + object.__setattr__(self, key, value) + + def __getitem__(self, repeated_capability): + '''Set/get properties or call methods with a repeated capability (i.e. channels)''' + rep_caps_list = _converters.convert_repeated_capabilities(repeated_capability, self._prefix) + complete_rep_cap_list = [ + current_rep_cap + self._separator + rep_cap + for current_rep_cap in self._current_repeated_capability_list + for rep_cap in rep_caps_list + ] + object.__setattr__(self, '_current_repeated_capability_list', complete_rep_cap_list) + self._current_repeated_capability_list = complete_rep_cap_list + + return self + + def _get_attribute_vi_real64(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_real64(repeated_capability, attribute) + return value + + def _set_attribute_vi_real64(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_real64(repeated_capability, attribute, value) + + def _get_attribute_vi_int32(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_int32(repeated_capability, attribute) + return value + + def _set_attribute_vi_int32(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_int32(repeated_capability, attribute, value) + + def _get_attribute_vi_string(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_string(repeated_capability, attribute) + return value + + def _set_attribute_vi_string(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_string(repeated_capability, attribute, value) + +class _RepeatedCapabilityWaveform(object): + waveform_iq_rate = _attributes.AttributeViReal64(1150263) + '''Type: float + + Specifies the I/Q rate of the waveform. To set this property, the NI-RFSG device must be in the Configuration state. + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + **Related Topics** + + `Streaming `_ + + `Assigning Properties or Properties to a Waveform `_—Refer to this topic for more information about using this property to associate an I/Q rate with a waveform. + + `Digital Upconverter `_ + + Tip: + This property can be set/get on specific waveform within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container waveform to specify a subset. + + Example: :py:attr:`my_session.waveform[ ... ].waveform_iq_rate` + + To set/get on all waveform, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.waveform_iq_rate` + ''' + waveform_papr = _attributes.AttributeViReal64(1150266) + '''Type: float + + Specifies the peak-to-average power ratio (PAPR). + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + Tip: + This property can be set/get on specific waveform within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container waveform to specify a subset. + + Example: :py:attr:`my_session.waveform[ ... ].waveform_papr` + + To set/get on all waveform, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.waveform_papr` + ''' + waveform_rf_blanking = _attributes.AttributeEnum(_attributes.AttributeViInt32, enums.RFBlanking, 1150278) + '''Type: enums.RFBlanking + + **Defined Values**: + + Name (Value): Description + + RFBlanking.DISABLE (0): RF blanking is disabled. + + RFBlanking.ENABLE (1): RF blanking is enabled. + + **Default Value:** RFBlanking.DISABLE + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842 + + **Related Topics** + + `Marker Events `_ + + Enables or disables RF blanking. + + +-----------------------------------------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------------------+ + | rf_blanking_source | waveform_rf_blanking | Behaviour | + +===================================================================================+======================+===========================================================================================================+ + | "" (empty string) | RFBlanking.DISABLE | No blanking performed. | + +-----------------------------------------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------------------+ + | "" (empty string) | RFBlanking.ENABLE | Blanking performed based on burst start and stop values and blanking source set to private marker. | + +-----------------------------------------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------------------+ + | NIRFSG_VAL_MARKER0, NIRFSG_VAL_MARKER1, NIRFSG_VAL_MARKER2, or NIRFSG_VAL_MARKER3 | RFBlanking.DISABLE | Blanking performed based on the marker locations for the marker that the user set in the blanking source. | + +-----------------------------------------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------------------+ + | NIRFSG_VAL_MARKER0, NIRFSG_VAL_MARKER1, NIRFSG_VAL_MARKER2, or NIRFSG_VAL_MARKER3 | RFBlanking.ENABLE | Error is shown. | + +-----------------------------------------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------------------+ + + Note: For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any reset or `niRFSA_reset `_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call ResetWithOptions or `niRFSA_ResetWithOptions `_. Select **Routes** in the **steps to omit** parameter. + + Note: + One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. + + Tip: + This property can be set/get on specific waveform within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container waveform to specify a subset. + + Example: :py:attr:`my_session.waveform[ ... ].waveform_rf_blanking` + + To set/get on all waveform, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.waveform_rf_blanking` + ''' + waveform_runtime_scaling = _attributes.AttributeViReal64(1150265) + '''Type: float + + Specifies the waveform runtime scaling. The waveform runtime scaling is applied to the waveform data before any other signal processing. + + **Units**: dB + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842/5860, PXIe-5841 with PXIe-5655 + + Tip: + This property can be set/get on specific waveform within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container waveform to specify a subset. + + Example: :py:attr:`my_session.waveform[ ... ].waveform_runtime_scaling` + + To set/get on all waveform, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.waveform_runtime_scaling` + ''' + waveform_signal_bandwidth = _attributes.AttributeViReal64(1150264) + '''Type: float + + Specifies the bandwidth of the arbitrary signal. This value must be less than or equal to (0.8× iq_rate). + + **Units**: hertz (Hz) + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + Tip: + This property can be set/get on specific waveform within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container waveform to specify a subset. + + Example: :py:attr:`my_session.waveform[ ... ].waveform_signal_bandwidth` + + To set/get on all waveform, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.waveform_signal_bandwidth` + ''' + waveform_waveform_size = _attributes.AttributeViInt32(1150297) + '''Type: int + + Specifies the size of the waveform specified by an active channel. + + **Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5841 with PXIe-5655/5842/5860 + + Tip: + This property can be set/get on specific waveform within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container waveform to specify a subset. + + Example: :py:attr:`my_session.waveform[ ... ].waveform_waveform_size` + + To set/get on all waveform, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.waveform_waveform_size` + ''' + def __init__(self, session, repeated_capability_list): + object.__setattr__(self, '_session', session) + object.__setattr__(self, '_repeated_capability_list', repeated_capability_list) + object.__setattr__(self, '_prefix', 'waveform::') + object.__setattr__(self, '_current_repeated_capability_list', repeated_capability_list if len(repeated_capability_list) > 0 else ['']) + object.__setattr__(self, '_separator', '') + + def __setattr__(self, key, value): + if key not in dir(self): + raise AttributeError("'{0}' object has no attribute '{1}'".format(type(self).__name__, key)) + object.__setattr__(self, key, value) def __getitem__(self, repeated_capability): '''Set/get properties or call methods with a repeated capability (i.e. channels)''' rep_caps_list = _converters.convert_repeated_capabilities(repeated_capability, self._prefix) - complete_rep_cap_list = [current_rep_cap + self._separator + rep_cap for current_rep_cap in self._current_repeated_capability_list for rep_cap in rep_caps_list] + complete_rep_cap_list = [ + current_rep_cap + self._separator + rep_cap + for current_rep_cap in self._current_repeated_capability_list + for rep_cap in rep_caps_list + ] + object.__setattr__(self, '_current_repeated_capability_list', complete_rep_cap_list) + self._current_repeated_capability_list = complete_rep_cap_list - return _SessionBase( - repeated_capability_list=complete_rep_cap_list, - all_channels_in_session=self._session._all_channels_in_session, - interpreter=self._session._interpreter, - freeze_it=True - ) + return self + def _get_attribute_vi_real64(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_real64(repeated_capability, attribute) + return value -# This is a very simple context manager we can use when we need to set/get attributes -# or call functions from _SessionBase that require no channels. It is tied to the specific -# implementation of _SessionBase and how repeated capabilities are handled. -class _NoChannel(object): - def __init__(self, session): - self._session = session + def _set_attribute_vi_real64(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_real64(repeated_capability, attribute, value) - def __enter__(self): - self._repeated_capability_cache = self._session._repeated_capability - self._session._repeated_capability = '' + def _get_attribute_vi_int32(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_int32(repeated_capability, attribute) + return value - def __exit__(self, exc_type, exc_value, traceback): - self._session._repeated_capability = self._repeated_capability_cache + def _set_attribute_vi_int32(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_int32(repeated_capability, attribute, value) + + def _get_attribute_vi_string(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_string(repeated_capability, attribute) + return value + + def _set_attribute_vi_string(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_string(repeated_capability, attribute, value) + +class _RepeatedCapabilityDeembedding_port(object): + deembedding_compensation_gain = _attributes.AttributeViReal64(1150289) + '''Type: float + + Returns the de-embedding gain applied to compensate for the mismatch on the specified port. If de-embedding is enabled, NI-RFSG uses the returned compensation gain to remove the effects of the external network between the instrument and the DUT. + + **Supported Devices**: PXIe-5830/5831/5832/5840/5841/5842/5860 + + Tip: + This property can be set/get on specific deembedding_port within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container deembedding_port to specify a subset. + + Example: :py:attr:`my_session.deembedding_port[ ... ].deembedding_compensation_gain` + + To set/get on all deembedding_port, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.deembedding_compensation_gain` + ''' + deembedding_selected_table = _attributes.AttributeViString(1150253) + '''Type: str + + Selects the de-embedding table to apply to the measurements on the specified port. + + To use this property, you must use the channelName parameter of the _set_attribute_vi_string method to specify the name of the port to configure for de-embedding. + + If de-embedding is enabled, NI-RFSG uses the specified table to remove the effects of the external network between the instrument and the DUT. + + Use the create deembedding sparameter table array method to create tables. + + **Supported Devices**: PXIe-5830/5831/5832/5840/5841/5842/5860 + + Tip: + This property can be set/get on specific deembedding_port within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container deembedding_port to specify a subset. + + Example: :py:attr:`my_session.deembedding_port[ ... ].deembedding_selected_table` + + To set/get on all deembedding_port, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.deembedding_selected_table` + ''' + deembedding_type = _attributes.AttributeEnum(_attributes.AttributeViInt32, enums.DeembeddingTypeAttrVals, 1150252) + '''Type: enums.DeembeddingTypeAttrVals + + Specifies the type of de-embedding to apply to measurements on the specified port. + + To use this property, you must use the channelName parameter of the _set_attribute_vi_int32 method to specify the name of the port to configure for de-embedding. + + If you set this property to DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_SCALAR or DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_VECTOR, NI-RFSG adjusts the instrument settings and the returned data to remove the effects of the external network between the instrument and the DUT. + + **Default Value**: DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_SCALAR + + **Valid Values for PXIe-5830/5832/5840/5841/5842/5860** : DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_SCALAR or DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_NONE + + **Valid Values for PXIe-5831** DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_SCALAR, DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_VECTOR, or DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_NONE. DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_VECTOR is only supported for TRX Ports in a Semiconductor Test System (STS). + + **Supported Devices**: PXIe-5830/5831/5832/5840/5841/5842/5860 + + **Defined Values**: + + +-------------------------------------------------+----------------+------------------------------------------------------------------------+ + | Name | Value | Description | + +=================================================+================+========================================================================+ + | DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_NONE | 25000 (0x61a8) | De-embedding is not applied to the measurement. | + +-------------------------------------------------+----------------+------------------------------------------------------------------------+ + | DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_SCALAR | 25001 (0x61a9) | De-embeds the measurement using only the gain term. | + +-------------------------------------------------+----------------+------------------------------------------------------------------------+ + | DeembeddingTypeAttrVals.DEEMBEDDING_TYPE_VECTOR | 25002 (0x61aa) | De-embeds the measurement using the gain term and the reflection term. | + +-------------------------------------------------+----------------+------------------------------------------------------------------------+ + + Tip: + This property can be set/get on specific deembedding_port within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container deembedding_port to specify a subset. + + Example: :py:attr:`my_session.deembedding_port[ ... ].deembedding_type` + + To set/get on all deembedding_port, you can call the property directly on the :py:class:`nirfsg.Session`. + + Example: :py:attr:`my_session.deembedding_type` + ''' + def __init__(self, session, repeated_capability_list): + object.__setattr__(self, '_session', session) + object.__setattr__(self, '_repeated_capability_list', repeated_capability_list) + object.__setattr__(self, '_prefix', '') + object.__setattr__(self, '_current_repeated_capability_list', repeated_capability_list if len(repeated_capability_list) > 0 else ['']) + object.__setattr__(self, '_separator', '') + + def __setattr__(self, key, value): + if key not in dir(self): + raise AttributeError("'{0}' object has no attribute '{1}'".format(type(self).__name__, key)) + object.__setattr__(self, key, value) + + def __getitem__(self, repeated_capability): + '''Set/get properties or call methods with a repeated capability (i.e. channels)''' + rep_caps_list = _converters.convert_repeated_capabilities(repeated_capability, self._prefix) + complete_rep_cap_list = [ + current_rep_cap + self._separator + rep_cap + for current_rep_cap in self._current_repeated_capability_list + for rep_cap in rep_caps_list + ] + object.__setattr__(self, '_current_repeated_capability_list', complete_rep_cap_list) + self._current_repeated_capability_list = complete_rep_cap_list + + return self + + def _get_attribute_vi_real64(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_real64(repeated_capability, attribute) + return value + + def _set_attribute_vi_real64(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_real64(repeated_capability, attribute, value) + + def _get_attribute_vi_int32(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_int32(repeated_capability, attribute) + return value + + def _set_attribute_vi_int32(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_int32(repeated_capability, attribute, value) + + def _get_attribute_vi_string(self, attribute): + repeated_capability = ','.join(self._current_repeated_capability_list) + value = self._session._interpreter.get_attribute_vi_string(repeated_capability, attribute) + return value + + def _set_attribute_vi_string(self, attribute, value): + repeated_capability = ','.join(self._current_repeated_capability_list) + self._session._interpreter.set_attribute_vi_string(repeated_capability, attribute, value) class _SessionBase(object): @@ -5415,10 +6470,10 @@ def __init__(self, repeated_capability_list, all_channels_in_session, interprete self._param_list = ', '.join(param_list) # Instantiate any repeated capability objects - self.markers = _RepeatedCapabilities(self, 'marker', repeated_capability_list) - self.script_triggers = _RepeatedCapabilities(self, 'scripttrigger', repeated_capability_list) - self.waveform = _RepeatedCapabilities(self, 'waveform::', repeated_capability_list) - self.deembedding_port = _RepeatedCapabilities(self, '', repeated_capability_list) + self.markers = _RepeatedCapabilityMarkers(self, repeated_capability_list) + self.script_triggers = _RepeatedCapabilityScript_triggers(self, repeated_capability_list) + self.waveform = _RepeatedCapabilityWaveform(self, repeated_capability_list) + self.deembedding_port = _RepeatedCapabilityDeembedding_port(self, repeated_capability_list) # Finally, set _is_frozen to True which is used to prevent clients from accidentally adding # members when trying to set a property with a typo. diff --git a/src/nifake/metadata/attributes.py b/src/nifake/metadata/attributes.py index 92c59e145..b78d82bb0 100644 --- a/src/nifake/metadata/attributes.py +++ b/src/nifake/metadata/attributes.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-FAKE API metadata version 24.8.0f100 +# This file is generated from NI-FAKE API metadata version 25.5.0d9999 attributes = { 1000000: { 'access': 'read-write', diff --git a/src/nifake/metadata/config.py b/src/nifake/metadata/config.py index cad911ac9..d43b263ef 100644 --- a/src/nifake/metadata/config.py +++ b/src/nifake/metadata/config.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-FAKE API metadata version 24.8.0f100 +# This file is generated from NI-FAKE API metadata version 25.5.0d9999 config = { - 'api_version': '24.8.0f100', + 'api_version': '25.5.0d9999', 'c_function_prefix': 'niFake_', 'close_function': 'close', 'context_manager_name': { @@ -30,6 +30,9 @@ } ], 'driver_name': 'NI-FAKE', + 'enable_warning_events': { + 'python': True + }, 'enum_whitelist_suffix': [ '_POINT_FIVE' ], @@ -72,6 +75,9 @@ 'python_name': 'instruments' } ], + 'repeated_capability_object_type': { + 'python': 'session' + }, 'session_class_description': 'An NI-FAKE session to a fake MI driver whose sole purpose is to test nimi-python code generation', 'session_handle_parameter_name': 'vi', 'uses_nitclk': True diff --git a/src/nifake/metadata/enums.py b/src/nifake/metadata/enums.py index 97ebe3add..f3e05575a 100644 --- a/src/nifake/metadata/enums.py +++ b/src/nifake/metadata/enums.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-FAKE API metadata version 24.8.0f100 +# This file is generated from NI-FAKE API metadata version 25.5.0d9999 enums = { 'AltColor': { 'values': [ diff --git a/src/nifake/metadata/functions.py b/src/nifake/metadata/functions.py index 24d8ebd8c..8f06bc400 100644 --- a/src/nifake/metadata/functions.py +++ b/src/nifake/metadata/functions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-FAKE API metadata version 24.8.0f100 +# This file is generated from NI-FAKE API metadata version 25.5.0d9999 functions = { 'Abort': { 'codegen_method': 'public', diff --git a/src/nirfsg/metadata/config.py b/src/nirfsg/metadata/config.py index a4b234007..0349e3f91 100644 --- a/src/nirfsg/metadata/config.py +++ b/src/nirfsg/metadata/config.py @@ -39,6 +39,9 @@ } }, 'module_name': 'nirfsg', + 'repeated_capability_object_type': { + 'python': 'custom' + }, 'repeated_capabilities': [ { 'prefix': 'marker',