Skip to content

Commit b2dc8c7

Browse files
updated metadata after resolving conflicts
1 parent 7a59f4e commit b2dc8c7

File tree

6 files changed

+54
-370
lines changed

6 files changed

+54
-370
lines changed

docs/nirfsg/class.rst

Lines changed: 10 additions & 286 deletions
Large diffs are not rendered by default.

generated/nirfsg/nirfsg/_library.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def __init__(self, ctypes_library):
7777
self.niRFSG_GetSelfCalibrationDateAndTime_cfunc = None
7878
self.niRFSG_GetSelfCalibrationTemperature_cfunc = None
7979
self.niRFSG_GetStreamEndpointHandle_cfunc = None
80+
self.niRFSG_GetTerminalName_cfunc = None
8081
self.niRFSG_GetWaveformBurstStartLocations_cfunc = None
8182
self.niRFSG_GetWaveformBurstStopLocations_cfunc = None
8283
self.niRFSG_GetWaveformMarkerEventLocations_cfunc = None
@@ -586,6 +587,14 @@ def niRFSG_GetStreamEndpointHandle(self, vi, stream_endpoint, reader_handle): #
586587
self.niRFSG_GetStreamEndpointHandle_cfunc.restype = ViStatus # noqa: F405
587588
return self.niRFSG_GetStreamEndpointHandle_cfunc(vi, stream_endpoint, reader_handle)
588589

590+
def niRFSG_GetTerminalName(self, vi, signal, signal_identifier, buffer_size, terminal_name): # noqa: N802
591+
with self._func_lock:
592+
if self.niRFSG_GetTerminalName_cfunc is None:
593+
self.niRFSG_GetTerminalName_cfunc = self._get_library_function('niRFSG_GetTerminalName')
594+
self.niRFSG_GetTerminalName_cfunc.argtypes = [ViSession, ViInt32, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViChar)] # noqa: F405
595+
self.niRFSG_GetTerminalName_cfunc.restype = ViStatus # noqa: F405
596+
return self.niRFSG_GetTerminalName_cfunc(vi, signal, signal_identifier, buffer_size, terminal_name)
597+
589598
def niRFSG_GetWaveformBurstStartLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802
590599
with self._func_lock:
591600
if self.niRFSG_GetWaveformBurstStartLocations_cfunc is None:
@@ -706,14 +715,6 @@ def niRFSG_ResetWithDefaults(self, vi): # noqa: N802
706715
self.niRFSG_ResetWithDefaults_cfunc.restype = ViStatus # noqa: F405
707716
return self.niRFSG_ResetWithDefaults_cfunc(vi)
708717

709-
def niRFSG_ResetWithOptions(self, vi, steps_to_omit): # noqa: N802
710-
with self._func_lock:
711-
if self.niRFSG_ResetWithOptions_cfunc is None:
712-
self.niRFSG_ResetWithOptions_cfunc = self._get_library_function('niRFSG_ResetWithOptions')
713-
self.niRFSG_ResetWithOptions_cfunc.argtypes = [ViSession, ViUInt64] # noqa: F405
714-
self.niRFSG_ResetWithOptions_cfunc.restype = ViStatus # noqa: F405
715-
return self.niRFSG_ResetWithOptions_cfunc(vi, steps_to_omit)
716-
717718
def niRFSG_RevisionQuery(self, vi, instrument_driver_revision, firmware_revision): # noqa: N802
718719
with self._func_lock:
719720
if self.niRFSG_RevisionQuery_cfunc is None:

generated/nirfsg/nirfsg/_library_interpreter.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,20 @@ def get_stream_endpoint_handle(self, stream_endpoint): # noqa: N802
567567
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
568568
return int(reader_handle_ctype.value)
569569

570+
def get_terminal_name(self, signal, signal_identifier): # noqa: N802
571+
vi_ctype = _visatype.ViSession(self._vi) # case S110
572+
signal_ctype = _visatype.ViInt32(signal.value) # case S130
573+
signal_identifier_ctype = ctypes.create_string_buffer(signal_identifier.encode(self._encoding)) # case C020
574+
buffer_size_ctype = _visatype.ViInt32() # case S170
575+
terminal_name_ctype = None # case C050
576+
error_code = self._library.niRFSG_GetTerminalName(vi_ctype, signal_ctype, signal_identifier_ctype, buffer_size_ctype, terminal_name_ctype)
577+
errors.handle_error(self, error_code, ignore_warnings=True, is_error_handling=False)
578+
buffer_size_ctype = _visatype.ViInt32(error_code) # case S180
579+
terminal_name_ctype = (_visatype.ViChar * buffer_size_ctype.value)() # case C060
580+
error_code = self._library.niRFSG_GetTerminalName(vi_ctype, signal_ctype, signal_identifier_ctype, buffer_size_ctype, terminal_name_ctype)
581+
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
582+
return terminal_name_ctype.value.decode(self._encoding)
583+
570584
def get_waveform_burst_start_locations(self, channel_name, number_of_locations): # noqa: N802
571585
vi_ctype = _visatype.ViSession(self._vi) # case S110
572586
channel_name_ctype = ctypes.create_string_buffer(channel_name.encode(self._encoding)) # case C010

generated/nirfsg/nirfsg/session.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4341,7 +4341,7 @@ class _SessionBase(object):
43414341

43424342
PXIe-5840/5841: RF blanking does not occur for frequencies below 120MHz.
43434343

4344-
For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any reset or `niRFSA_reset <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_reset.html>`_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call reset_with_options or `niRFSA_ResetWithOptions <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_resetwithoptions.html>`_. Select **Routes** in the **steps to omit** parameter.
4344+
For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any reset or `niRFSA_reset <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_reset.html>`_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call ResetWithOptions or `niRFSA_ResetWithOptions <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_resetwithoptions.html>`_. Select **Routes** in the **steps to omit** parameter.
43454345

43464346
**Default Value:** "" (empty string)
43474347

@@ -5194,7 +5194,7 @@ class _SessionBase(object):
51945194
| NIRFSG_VAL_MARKER0, NIRFSG_VAL_MARKER1, NIRFSG_VAL_MARKER2, or NIRFSG_VAL_MARKER3 | RFBlanking.ENABLE | Error is shown. |
51955195
+-----------------------------------------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------------------+
51965196

5197-
Note: For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any reset or `niRFSA_reset <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_reset.html>`_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call reset_with_options or `niRFSA_ResetWithOptions <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_resetwithoptions.html>`_. Select **Routes** in the **steps to omit** parameter.
5197+
Note: For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any reset or `niRFSA_reset <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_reset.html>`_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call ResetWithOptions or `niRFSA_ResetWithOptions <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_resetwithoptions.html>`_. Select **Routes** in the **steps to omit** parameter.
51985198

51995199
Note:
52005200
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.
@@ -5285,7 +5285,7 @@ class _SessionBase(object):
52855285

52865286
Note: - When you download a waveform using ReadAndDownloadWaveformFromFileTdms method and if waveform_rf_blanking property is enabled, you must set the write_waveform_burst_detection property to WriteWaveformBurstDetection.DISABLE.
52875287

5288-
- For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any reset or `niRFSA_reset <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_reset.html>`_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call reset_with_options or `niRFSA_ResetWithOptions <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_resetwithoptions.html>`_. Select **Routes** in the **steps to omit** parameter.
5288+
- For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any reset or `niRFSA_reset <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_reset.html>`_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call ResetWithOptions or `niRFSA_ResetWithOptions <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/cvinirfsa_resetwithoptions.html>`_. Select **Routes** in the **steps to omit** parameter.
52895289

52905290
Note:
52915291
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.
@@ -7975,7 +7975,7 @@ def reset(self):
79757975

79767976
Generally, calling this method instead of the reset_device method is acceptable. The reset method executes faster than the reset_device method.
79777977

7978-
To avoid resetting routes on the PXIe-5644/5645/5646 and PXIe-5820/5830/5831/5832/5840/5841/5842/5860 that are in use by NI-RFSA sessions, NI recommends using the reset_with_options method, with **stepsToOmit** set to ResetWithOptionsStepsToOmit.ROUTES .
7978+
To avoid resetting routes on the PXIe-5644/5645/5646 and PXIe-5820/5830/5831/5832/5840/5841/5842/5860 that are in use by NI-RFSA sessions, NI recommends using the ResetWithOptions method, with **stepsToOmit** set to ResetWithOptionsStepsToOmit.ROUTES .
79797979

79807980
**Supported Devices** : PXI-5610, PXIe-5611, PXIe-5644/5645/5646, PXI/PXIe-5650/5651/5652, PXIe-5653/5654/5654 with PXIe-5696, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860
79817981

@@ -8041,6 +8041,7 @@ def revision_query(self):
80418041
instrument_driver_revision, firmware_revision = self._interpreter.revision_query()
80428042
return instrument_driver_revision, firmware_revision
80438043

8044+
@ivi_synchronized
80448045
def select_arb_waveform(self, name):
80458046
r'''select_arb_waveform
80468047

generated/nirfsg/nirfsg/unit_tests/_mock_helper.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ def __init__(self):
165165
self._defaults['GetStreamEndpointHandle'] = {}
166166
self._defaults['GetStreamEndpointHandle']['return'] = 0
167167
self._defaults['GetStreamEndpointHandle']['readerHandle'] = None
168+
self._defaults['GetTerminalName'] = {}
169+
self._defaults['GetTerminalName']['return'] = 0
170+
self._defaults['GetTerminalName']['terminalName'] = None
168171
self._defaults['GetWaveformBurstStartLocations'] = {}
169172
self._defaults['GetWaveformBurstStartLocations']['return'] = 0
170173
self._defaults['GetWaveformBurstStartLocations']['locations'] = None
@@ -726,6 +729,17 @@ def niRFSG_GetStreamEndpointHandle(self, vi, stream_endpoint, reader_handle): #
726729
reader_handle.contents.value = self._defaults['GetStreamEndpointHandle']['readerHandle']
727730
return self._defaults['GetStreamEndpointHandle']['return']
728731

732+
def niRFSG_GetTerminalName(self, vi, signal, signal_identifier, buffer_size, terminal_name): # noqa: N802
733+
if self._defaults['GetTerminalName']['return'] != 0:
734+
return self._defaults['GetTerminalName']['return']
735+
# terminal_name
736+
if self._defaults['GetTerminalName']['terminalName'] is None:
737+
raise MockFunctionCallError("niRFSG_GetTerminalName", param='terminalName')
738+
if buffer_size.value == 0:
739+
return len(self._defaults['GetTerminalName']['terminalName'])
740+
terminal_name.value = self._defaults['GetTerminalName']['terminalName'].encode('ascii')
741+
return self._defaults['GetTerminalName']['return']
742+
729743
def niRFSG_GetWaveformBurstStartLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802
730744
if self._defaults['GetWaveformBurstStartLocations']['return'] != 0:
731745
return self._defaults['GetWaveformBurstStartLocations']['return']
@@ -1135,6 +1149,8 @@ def set_side_effects_and_return_values(self, mock_library):
11351149
mock_library.niRFSG_GetSelfCalibrationTemperature.return_value = 0
11361150
mock_library.niRFSG_GetStreamEndpointHandle.side_effect = MockFunctionCallError("niRFSG_GetStreamEndpointHandle")
11371151
mock_library.niRFSG_GetStreamEndpointHandle.return_value = 0
1152+
mock_library.niRFSG_GetTerminalName.side_effect = MockFunctionCallError("niRFSG_GetTerminalName")
1153+
mock_library.niRFSG_GetTerminalName.return_value = 0
11381154
mock_library.niRFSG_GetWaveformBurstStartLocations.side_effect = MockFunctionCallError("niRFSG_GetWaveformBurstStartLocations")
11391155
mock_library.niRFSG_GetWaveformBurstStartLocations.return_value = 0
11401156
mock_library.niRFSG_GetWaveformBurstStopLocations.side_effect = MockFunctionCallError("niRFSG_GetWaveformBurstStopLocations")

src/nirfsg/metadata/functions.py

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -4134,78 +4134,6 @@
41344134
],
41354135
'returns': 'ViStatus'
41364136
},
4137-
'ResetWithOptions': {
4138-
'codegen_method': 'public',
4139-
'documentation': {
4140-
'description': ' \n Resets all properties to default values and specifies steps to omit during the reset process, such as signal routes.\n\n By default, this function exhibits the same behavior as nirfsg_Reset. You can specify steps to omit using the steps to omit parameter. For example, if you specify NIRFSG_VAL_RESET_WITH_OPTIONS_ROUTES for the NIRFSG_ATTR_STEPS_TO_OMIT parameter, this function does not release signal routes during the reset process.\n\n When routes of signals between two devices are released, they are released regardless of which device created the route.\n\n To avoid resetting routes on PXIe-5820/5830/5831/5832/5840/5841/5842/5860 that are in use by NI-RFSA sessions, NI recommends using this function instead of nirfsg_Reset, with NIRFSG_ATTR_STEPS_TO_OMIT set to NIRFSG_VAL_RESET_WITH_OPTIONS_ROUTES.\n\n **Supported Devices** : PXIe-5644/5645/5646, PXIe-5820/5830/5831/5832/5840/5841/5842/5860\n\n **Related Topics**\n\n `Triggers <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/triggers.html>`_\n\n `Events <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/events.html>`_\n '
4141-
},
4142-
'included_in_proto': True,
4143-
'method_templates': [
4144-
{
4145-
'documentation_filename': 'default_method',
4146-
'library_interpreter_filename': 'default_method',
4147-
'method_python_name_suffix': '',
4148-
'session_filename': 'default_method'
4149-
}
4150-
],
4151-
'parameters': [
4152-
{
4153-
'direction': 'in',
4154-
'documentation': {
4155-
'description': 'Identifies your instrument session. The ViSession handle is obtained from the nirfsg_Init function or the nirfsg_InitWithOptions function and identifies a particular instrument session.'
4156-
},
4157-
'name': 'vi',
4158-
'type': 'ViSession',
4159-
'use_array': False,
4160-
'use_in_python_api': True
4161-
},
4162-
{
4163-
'direction': 'in',
4164-
'documentation': {
4165-
'description': 'Specifies a list of steps to skip during the reset process. The default value is NIRFSG_VAL_RESET_WITH_OPTIONS_NONE, which specifies that no step is omitted during reset. **Defined Values** :',
4166-
'note': 'NIRFSG_VAL_RESET_WITH_OPTIONS_ROUTES is not supported in external calibration or alignment sessions.',
4167-
'table_body': [
4168-
[
4169-
'NIRFSG_VAL_RESET_WITH_OPTIONS_NONE',
4170-
'0 (0x0)',
4171-
'No step is omitted during reset.'
4172-
],
4173-
[
4174-
'NIRFSG_VAL_RESET_WITH_OPTIONS_WAVEFORMS',
4175-
'1 (0x1)',
4176-
'Omits clearing waveforms.'
4177-
],
4178-
[
4179-
'NIRFSG_VAL_RESET_WITH_OPTIONS_SCRIPTS',
4180-
'2 (0x2)',
4181-
'Omits clearing scripts.'
4182-
],
4183-
[
4184-
'NIRFSG_VAL_RESET_WITH_OPTIONS_ROUTES',
4185-
'4 (0x4)',
4186-
'Omits the routing reset step. Routing is preserved after a reset. However, routing related properties are reset to default, and routing is released if the default properties are committed after a reset.'
4187-
],
4188-
[
4189-
'NIRFSG_VAL_RESET_WITH_OPTIONS_DEEMBEDDING_TABLES',
4190-
'8 (0x8)',
4191-
'Omits deleting de-embedding tables. This step is valid only for the PXIe-5830/5831/5832/5840.'
4192-
]
4193-
],
4194-
'table_header': [
4195-
'Name',
4196-
'Value',
4197-
'Description'
4198-
]
4199-
},
4200-
'enum': 'ResetWithOptionsStepsToOmit',
4201-
'name': 'stepsToOmit',
4202-
'type': 'ViUInt64',
4203-
'use_array': False,
4204-
'use_in_python_api': True
4205-
}
4206-
],
4207-
'returns': 'ViStatus'
4208-
},
42094137
'RevisionQuery': {
42104138
'codegen_method': 'public',
42114139
'documentation': {

0 commit comments

Comments
 (0)