diff --git a/CHANGELOG.md b/CHANGELOG.md index f41b1b4bf..d6dd1d177 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1702,6 +1702,9 @@ #### [nirfsg] Unreleased - Added - Python 3.14 Support + - `get_script` and `delete_script` methods + - `SCRIPTS` added to enum `LoadOptions` + - `DO_NOT_DRIVE_SIGNAL` added to enum `PulseModulationSource` - Changed - Removed diff --git a/docs/nirfsg/class.rst b/docs/nirfsg/class.rst index ccbe8656f..4013cd025 100644 --- a/docs/nirfsg/class.rst +++ b/docs/nirfsg/class.rst @@ -1071,6 +1071,31 @@ delete_deembedding_table :type table_name: str +delete_script +------------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: delete_script(script_name) + + Deletes a specified script from the pool of currently defined scripts. The NI-RFSG device must be in the Configuration state before you call this method. + + **Supported Devices** :PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + + + + + :param script_name: + + + Specifies the name of the script to delete. This string is case-insensitive. + + + + + :type script_name: str + disable_script_trigger ---------------------- @@ -1342,6 +1367,41 @@ get_max_settable_power +get_script +---------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: get_script(script_name) + + Returns the content of specified script. + + **Supported Devices** :PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + + + + + :param script_name: + + + Specifies the name of the script. This string is case-insensitive. + + + + + :type script_name: str + + :rtype: str + :return: + + + Returns the script. + + + + + get_self_cal_last_date_and_time ------------------------------- @@ -2114,7 +2174,11 @@ self_cal - .. note:: If there is an existing NI-RFSA session open for the same PXIe-5820/5830/5831/5832/5840/5841/5842/5860 while this method runs, it may remain open but cannot be used for operations that access the hardware, for example niRFSA_Commit or niRFSA_Initiate. + .. note:: If there is an existing NI-RFSA session open for the same PXIe-5820/5830/5831/5832/5840/5841/5842/5860 while this method runs, it may remain open but cannot be used for operations that access the hardware, for example niRFSA_Commit or niRFSA_Initiate. For the existing open session to use the new self-calibration data, the session will need to be closed and reopened. + + **PXIe-5860** + + While this VI is running on one channel, if there are any existing NI-RFSG or NI-RFSA sessions open on the other channel, they may remain open but cannot be used for operations that access the hardware, for example niRFSG Commit or niRFSG Initiate or niRFSA Commit or niRFSA Initiate. For the existing open session to use the new self-calibration data, the session will need to be closed and reopened. diff --git a/docs/nirfsg/enums.rst b/docs/nirfsg/enums.rst index 16d8e17ad..8ed758c60 100644 --- a/docs/nirfsg/enums.rst +++ b/docs/nirfsg/enums.rst @@ -711,6 +711,16 @@ LoadOptions + .. py:attribute:: LoadOptions.SCRIPTS + + + + NI-RFSG skips loading the scripts to the session. + + + + + LoopBandwidth ------------- @@ -1136,6 +1146,16 @@ PulseModulationSource + .. py:attribute:: PulseModulationSource.DO_NOT_DRIVE_SIGNAL + + + + Do not drive pulse modulation. + + + + + RFBlanking ---------- diff --git a/generated/nirfsg/nirfsg/_library.py b/generated/nirfsg/nirfsg/_library.py index b808c7f40..fba0e06d9 100644 --- a/generated/nirfsg/nirfsg/_library.py +++ b/generated/nirfsg/nirfsg/_library.py @@ -44,6 +44,7 @@ def __init__(self, ctypes_library): self.niRFSG_CreateDeembeddingSparameterTableS2PFile_cfunc = None self.niRFSG_DeleteAllDeembeddingTables_cfunc = None self.niRFSG_DeleteDeembeddingTable_cfunc = None + self.niRFSG_DeleteScript_cfunc = None self.niRFSG_DisableScriptTrigger_cfunc = None self.niRFSG_DisableStartTrigger_cfunc = None self.niRFSG_ErrorMessage_cfunc = None @@ -60,6 +61,7 @@ def __init__(self, ctypes_library): self.niRFSG_GetError_cfunc = None self.niRFSG_GetExternalCalibrationLastDateAndTime_cfunc = None self.niRFSG_GetMaxSettablePower_cfunc = None + self.niRFSG_GetScript_cfunc = None self.niRFSG_GetSelfCalibrationDateAndTime_cfunc = None self.niRFSG_GetSelfCalibrationTemperature_cfunc = None self.niRFSG_GetTerminalName_cfunc = None @@ -301,6 +303,14 @@ def niRFSG_DeleteDeembeddingTable(self, vi, port, table_name): # noqa: N802 self.niRFSG_DeleteDeembeddingTable_cfunc.restype = ViStatus # noqa: F405 return self.niRFSG_DeleteDeembeddingTable_cfunc(vi, port, table_name) + def niRFSG_DeleteScript(self, vi, script_name): # noqa: N802 + with self._func_lock: + if self.niRFSG_DeleteScript_cfunc is None: + self.niRFSG_DeleteScript_cfunc = self._get_library_function('niRFSG_DeleteScript') + self.niRFSG_DeleteScript_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar)] # noqa: F405 + self.niRFSG_DeleteScript_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_DeleteScript_cfunc(vi, script_name) + def niRFSG_DisableScriptTrigger(self, vi, trigger_id): # noqa: N802 with self._func_lock: if self.niRFSG_DisableScriptTrigger_cfunc is None: @@ -429,6 +439,14 @@ def niRFSG_GetMaxSettablePower(self, vi, value): # noqa: N802 self.niRFSG_GetMaxSettablePower_cfunc.restype = ViStatus # noqa: F405 return self.niRFSG_GetMaxSettablePower_cfunc(vi, value) + def niRFSG_GetScript(self, vi, script_name, script, buffer_size, actual_buffer_size): # noqa: N802 + with self._func_lock: + if self.niRFSG_GetScript_cfunc is None: + self.niRFSG_GetScript_cfunc = self._get_library_function('niRFSG_GetScript') + self.niRFSG_GetScript_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViInt32)] # noqa: F405 + self.niRFSG_GetScript_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_GetScript_cfunc(vi, script_name, script, buffer_size, actual_buffer_size) + def niRFSG_GetSelfCalibrationDateAndTime(self, vi, module, year, month, day, hour, minute, second): # noqa: N802 with self._func_lock: if self.niRFSG_GetSelfCalibrationDateAndTime_cfunc is None: diff --git a/generated/nirfsg/nirfsg/_library_interpreter.py b/generated/nirfsg/nirfsg/_library_interpreter.py index 3e7979627..631766ffa 100644 --- a/generated/nirfsg/nirfsg/_library_interpreter.py +++ b/generated/nirfsg/nirfsg/_library_interpreter.py @@ -278,6 +278,13 @@ def delete_deembedding_table(self, port, table_name): # noqa: N802 errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return + def delete_script(self, script_name): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + script_name_ctype = ctypes.create_string_buffer(script_name.encode(self._encoding)) # case C020 + error_code = self._library.niRFSG_DeleteScript(vi_ctype, script_name_ctype) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) + return + def disable_script_trigger(self, trigger_id): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 trigger_id_ctype = ctypes.create_string_buffer(trigger_id.encode(self._encoding)) # case C010 @@ -438,6 +445,20 @@ def get_max_settable_power(self): # noqa: N802 errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return float(value_ctype.value) + def get_script(self, script_name): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + script_name_ctype = ctypes.create_string_buffer(script_name.encode(self._encoding)) # case C020 + script_ctype = None # case C090 + buffer_size_ctype = _visatype.ViInt32(0) # case S190 + actual_buffer_size_ctype = _visatype.ViInt32() # case S220 + error_code = self._library.niRFSG_GetScript(vi_ctype, script_name_ctype, script_ctype, buffer_size_ctype, None if actual_buffer_size_ctype is None else (ctypes.pointer(actual_buffer_size_ctype))) + errors.handle_error(self, error_code, ignore_warnings=True, is_error_handling=False) + buffer_size_ctype = _visatype.ViInt32(actual_buffer_size_ctype.value) # case S200 + script_ctype = (_visatype.ViChar * actual_buffer_size_ctype.value)() # case C100 + error_code = self._library.niRFSG_GetScript(vi_ctype, script_name_ctype, script_ctype, buffer_size_ctype, None if actual_buffer_size_ctype is None else (ctypes.pointer(actual_buffer_size_ctype))) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) + return script_ctype.value.decode(self._encoding) + def get_self_calibration_date_and_time(self, module): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 module_ctype = _visatype.ViInt32(module.value) # case S130 diff --git a/generated/nirfsg/nirfsg/enums.py b/generated/nirfsg/nirfsg/enums.py index 0629aa9fb..bfa5d6c6b 100644 --- a/generated/nirfsg/nirfsg/enums.py +++ b/generated/nirfsg/nirfsg/enums.py @@ -308,6 +308,10 @@ class LoadOptions(Enum): r''' NI-RFSG skips loading the waveform configurations to the session. ''' + SCRIPTS = 2 + r''' + NI-RFSG skips loading the scripts to the session. + ''' class LoopBandwidth(Enum): @@ -491,6 +495,10 @@ class PulseModulationSource(Enum): r''' The trigger is received from the Marker 3. ''' + DO_NOT_DRIVE_SIGNAL = '' + r''' + Do not drive pulse modulation. + ''' class RFBlanking(Enum): diff --git a/generated/nirfsg/nirfsg/session.py b/generated/nirfsg/nirfsg/session.py index ba1b46e7b..5770a5b90 100644 --- a/generated/nirfsg/nirfsg/session.py +++ b/generated/nirfsg/nirfsg/session.py @@ -6291,6 +6291,20 @@ def delete_deembedding_table(self, port, table_name): ''' self._interpreter.delete_deembedding_table(port, table_name) + @ivi_synchronized + def delete_script(self, script_name): + r'''delete_script + + Deletes a specified script from the pool of currently defined scripts. The NI-RFSG device must be in the Configuration state before you call this method. + + **Supported Devices** :PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + Args: + script_name (str): Specifies the name of the script to delete. This string is case-insensitive. + + ''' + self._interpreter.delete_script(script_name) + @ivi_synchronized def disable_start_trigger(self): r'''disable_start_trigger @@ -6502,6 +6516,25 @@ def get_max_settable_power(self): value = self._interpreter.get_max_settable_power() return value + @ivi_synchronized + def get_script(self, script_name): + r'''get_script + + Returns the content of specified script. + + **Supported Devices** :PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + + Args: + script_name (str): Specifies the name of the script. This string is case-insensitive. + + + Returns: + script (str): Returns the script. + + ''' + script = self._interpreter.get_script(script_name) + return script + @ivi_synchronized def _get_self_calibration_date_and_time(self, module): r'''_get_self_calibration_date_and_time @@ -6960,7 +6993,11 @@ def self_cal(self): **Supported Devices** : PXI-5610, PXIe-5653, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 - Note: If there is an existing NI-RFSA session open for the same PXIe-5820/5830/5831/5832/5840/5841/5842/5860 while this method runs, it may remain open but cannot be used for operations that access the hardware, for example niRFSA_Commit or niRFSA_Initiate. + Note: If there is an existing NI-RFSA session open for the same PXIe-5820/5830/5831/5832/5840/5841/5842/5860 while this method runs, it may remain open but cannot be used for operations that access the hardware, for example niRFSA_Commit or niRFSA_Initiate. For the existing open session to use the new self-calibration data, the session will need to be closed and reopened. + + **PXIe-5860** + + While this VI is running on one channel, if there are any existing NI-RFSG or NI-RFSA sessions open on the other channel, they may remain open but cannot be used for operations that access the hardware, for example niRFSG Commit or niRFSG Initiate or niRFSA Commit or niRFSA Initiate. For the existing open session to use the new self-calibration data, the session will need to be closed and reopened. ''' self._interpreter.self_cal() diff --git a/generated/nirfsg/nirfsg/unit_tests/_mock_helper.py b/generated/nirfsg/nirfsg/unit_tests/_mock_helper.py index ccd4d9dd7..cb54bf2e3 100644 --- a/generated/nirfsg/nirfsg/unit_tests/_mock_helper.py +++ b/generated/nirfsg/nirfsg/unit_tests/_mock_helper.py @@ -67,6 +67,8 @@ def __init__(self): self._defaults['DeleteAllDeembeddingTables']['return'] = 0 self._defaults['DeleteDeembeddingTable'] = {} self._defaults['DeleteDeembeddingTable']['return'] = 0 + self._defaults['DeleteScript'] = {} + self._defaults['DeleteScript']['return'] = 0 self._defaults['DisableScriptTrigger'] = {} self._defaults['DisableScriptTrigger']['return'] = 0 self._defaults['DisableStartTrigger'] = {} @@ -122,6 +124,10 @@ def __init__(self): self._defaults['GetMaxSettablePower'] = {} self._defaults['GetMaxSettablePower']['return'] = 0 self._defaults['GetMaxSettablePower']['value'] = None + self._defaults['GetScript'] = {} + self._defaults['GetScript']['return'] = 0 + self._defaults['GetScript']['actualBufferSize'] = None + self._defaults['GetScript']['script'] = None self._defaults['GetSelfCalibrationDateAndTime'] = {} self._defaults['GetSelfCalibrationDateAndTime']['return'] = 0 self._defaults['GetSelfCalibrationDateAndTime']['year'] = None @@ -369,6 +375,11 @@ def niRFSG_DeleteDeembeddingTable(self, vi, port, table_name): # noqa: N802 return self._defaults['DeleteDeembeddingTable']['return'] return self._defaults['DeleteDeembeddingTable']['return'] + def niRFSG_DeleteScript(self, vi, script_name): # noqa: N802 + if self._defaults['DeleteScript']['return'] != 0: + return self._defaults['DeleteScript']['return'] + return self._defaults['DeleteScript']['return'] + def niRFSG_DisableScriptTrigger(self, vi, trigger_id): # noqa: N802 if self._defaults['DisableScriptTrigger']['return'] != 0: return self._defaults['DisableScriptTrigger']['return'] @@ -574,6 +585,22 @@ def niRFSG_GetMaxSettablePower(self, vi, value): # noqa: N802 value.contents.value = self._defaults['GetMaxSettablePower']['value'] return self._defaults['GetMaxSettablePower']['return'] + def niRFSG_GetScript(self, vi, script_name, script, buffer_size, actual_buffer_size): # noqa: N802 + if self._defaults['GetScript']['return'] != 0: + return self._defaults['GetScript']['return'] + # actual_buffer_size + if self._defaults['GetScript']['actualBufferSize'] is None: + raise MockFunctionCallError("niRFSG_GetScript", param='actualBufferSize') + if actual_buffer_size is not None: + actual_buffer_size.contents.value = self._defaults['GetScript']['actualBufferSize'] + # script + if self._defaults['GetScript']['script'] is None: + raise MockFunctionCallError("niRFSG_GetScript", param='script') + if buffer_size.value == 0: + return len(self._defaults['GetScript']['script']) + script.value = self._defaults['GetScript']['script'].encode('ascii') + return self._defaults['GetScript']['return'] + def niRFSG_GetSelfCalibrationDateAndTime(self, vi, module, year, month, day, hour, minute, second): # noqa: N802 if self._defaults['GetSelfCalibrationDateAndTime']['return'] != 0: return self._defaults['GetSelfCalibrationDateAndTime']['return'] @@ -967,6 +994,8 @@ def set_side_effects_and_return_values(self, mock_library): mock_library.niRFSG_DeleteAllDeembeddingTables.return_value = 0 mock_library.niRFSG_DeleteDeembeddingTable.side_effect = MockFunctionCallError("niRFSG_DeleteDeembeddingTable") mock_library.niRFSG_DeleteDeembeddingTable.return_value = 0 + mock_library.niRFSG_DeleteScript.side_effect = MockFunctionCallError("niRFSG_DeleteScript") + mock_library.niRFSG_DeleteScript.return_value = 0 mock_library.niRFSG_DisableScriptTrigger.side_effect = MockFunctionCallError("niRFSG_DisableScriptTrigger") mock_library.niRFSG_DisableScriptTrigger.return_value = 0 mock_library.niRFSG_DisableStartTrigger.side_effect = MockFunctionCallError("niRFSG_DisableStartTrigger") @@ -999,6 +1028,8 @@ def set_side_effects_and_return_values(self, mock_library): mock_library.niRFSG_GetExternalCalibrationLastDateAndTime.return_value = 0 mock_library.niRFSG_GetMaxSettablePower.side_effect = MockFunctionCallError("niRFSG_GetMaxSettablePower") mock_library.niRFSG_GetMaxSettablePower.return_value = 0 + mock_library.niRFSG_GetScript.side_effect = MockFunctionCallError("niRFSG_GetScript") + mock_library.niRFSG_GetScript.return_value = 0 mock_library.niRFSG_GetSelfCalibrationDateAndTime.side_effect = MockFunctionCallError("niRFSG_GetSelfCalibrationDateAndTime") mock_library.niRFSG_GetSelfCalibrationDateAndTime.return_value = 0 mock_library.niRFSG_GetSelfCalibrationTemperature.side_effect = MockFunctionCallError("niRFSG_GetSelfCalibrationTemperature") diff --git a/src/nirfsg/metadata/attributes.py b/src/nirfsg/metadata/attributes.py index 5862b0cbe..102b759d5 100644 --- a/src/nirfsg/metadata/attributes.py +++ b/src/nirfsg/metadata/attributes.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-RFSG API metadata version 25.8.0d197 +# This file is generated from NI-RFSG API metadata version 26.3.0d9999 attributes = { 1050302: { 'access': 'read only', diff --git a/src/nirfsg/metadata/config.py b/src/nirfsg/metadata/config.py index a06f1ff8c..6f0e29f0e 100644 --- a/src/nirfsg/metadata/config.py +++ b/src/nirfsg/metadata/config.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-RFSG API metadata version 25.8.0d197 +# This file is generated from NI-RFSG API metadata version 26.3.0d9999 config = { - 'api_version': '25.8.0d197', + 'api_version': '26.3.0d9999', 'c_function_prefix': 'niRFSG_', 'close_function': 'close', 'context_manager_name': { diff --git a/src/nirfsg/metadata/enums.py b/src/nirfsg/metadata/enums.py index 4630293d4..b1c411b50 100644 --- a/src/nirfsg/metadata/enums.py +++ b/src/nirfsg/metadata/enums.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-RFSG API metadata version 25.8.0d197 +# This file is generated from NI-RFSG API metadata version 26.3.0d9999 enums = { 'AllowOutOfSpecificationUserSettings': { 'values': [ @@ -384,76 +384,61 @@ } ] }, - 'LoOutExportConfigureFromRfsaEnable': { + 'LoOutEnabled': { 'values': [ { 'documentation': { - 'description': 'Do not allow NI-RFSA to control the NI-RFSG local oscillator export.' + 'description': 'The local oscillator signal is present at the LO OUT front panel connector.' }, 'name': 'NIRFSG_VAL_DISABLE', 'value': 0 }, { 'documentation': { - 'description': 'Allow NI-RFSA to control the NI-RFSG local oscillator export.' + 'description': 'The local oscillator signal is not present at the LO OUT front panel connector..' }, 'name': 'NIRFSG_VAL_ENABLE', 'value': 1 } ] }, - 'LoPllFractionalModeEnabled': { + 'LoOutExportConfigureFromRfsaEnable': { 'values': [ { 'documentation': { - 'description': 'Disables fractional mode for the LO PLL.' + 'description': 'Do not allow NI-RFSA to control the NI-RFSG local oscillator export.' }, 'name': 'NIRFSG_VAL_DISABLE', 'value': 0 }, { 'documentation': { - 'description': 'Enables fractional mode for the LO PLL.' + 'description': 'Allow NI-RFSA to control the NI-RFSG local oscillator export.' }, 'name': 'NIRFSG_VAL_ENABLE', 'value': 1 } ] }, - 'LoadConfigurationResetOptions': { + 'LoPllFractionalModeEnabled': { 'values': [ { 'documentation': { - 'description': 'NI-RFSG skips resetting the waveform configurations.' - }, - 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_RESET_OPTIONS_SKIP_WAVEFORMS', - 'value': 1 - }, - { - 'documentation': { - 'description': 'NI-RFSG skips resetting the de-embedding tables.' - }, - 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_RESET_OPTIONS_SKIP_DEEMBEDDING_TABLES', - 'value': 8 - }, - { - 'documentation': { - 'description': 'NI-RFSG skips resetting the scripts.' + 'description': 'Disables fractional mode for the LO PLL.' }, - 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_RESET_OPTIONS_SKIP_SCRIPTS', - 'value': 2 + 'name': 'NIRFSG_VAL_DISABLE', + 'value': 0 }, { 'documentation': { - 'description': 'NI-RFSG resets all configurations.' + 'description': 'Enables fractional mode for the LO PLL.' }, - 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_RESET_OPTIONS_SKIP_NONE', - 'value': 0 + 'name': 'NIRFSG_VAL_ENABLE', + 'value': 1 } ] }, 'LoSource': { - 'codegen_method': 'public', 'values': [ { 'documentation': { @@ -492,6 +477,38 @@ } ] }, + 'LoadConfigurationResetOptions': { + 'values': [ + { + 'documentation': { + 'description': 'NI-RFSG skips resetting the waveform configurations.' + }, + 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_RESET_OPTIONS_SKIP_WAVEFORMS', + 'value': 1 + }, + { + 'documentation': { + 'description': 'NI-RFSG skips resetting the de-embedding tables.' + }, + 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_RESET_OPTIONS_SKIP_DEEMBEDDING_TABLES', + 'value': 8 + }, + { + 'documentation': { + 'description': 'NI-RFSG skips resetting the scripts.' + }, + 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_RESET_OPTIONS_SKIP_SCRIPTS', + 'value': 2 + }, + { + 'documentation': { + 'description': 'NI-RFSG resets all configurations.' + }, + 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_RESET_OPTIONS_SKIP_NONE', + 'value': 0 + } + ] + }, 'LoadOptions': { 'values': [ { @@ -507,6 +524,13 @@ }, 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_LOAD_OPTIONS_SKIP_WAVEFORMS', 'value': 1 + }, + { + 'documentation': { + 'description': 'NI-RFSG skips loading the scripts to the session.' + }, + 'name': 'RFSG_VAL_LOAD_CONFIGURATIONS_FROM_FILE_LOAD_OPTIONS_SKIP_SCRIPTS', + 'value': 2 } ] }, @@ -782,6 +806,7 @@ 'description': 'The trigger is received on the PULSE IN terminal. This value is valid on only the PXIe-5842.' }, 'name': 'NIRFSG_VAL_PULSE_IN_STR', + 'python_name': 'PULSE_IN', 'value': 'PulseIn' }, { @@ -789,6 +814,7 @@ 'description': 'The trigger is received from the Marker 0.' }, 'name': 'NIRFSG_VAL_MARKER0_STR', + 'python_name': 'MARKER0', 'value': 'Marker0' }, { @@ -796,6 +822,7 @@ 'description': 'The trigger is received from the Marker 1.' }, 'name': 'NIRFSG_VAL_MARKER1_STR', + 'python_name': 'MARKER1', 'value': 'Marker1' }, { @@ -803,6 +830,7 @@ 'description': 'The trigger is received from the Marker 2.' }, 'name': 'NIRFSG_VAL_MARKER2_STR', + 'python_name': 'MARKER2', 'value': 'Marker2' }, { @@ -810,7 +838,15 @@ 'description': 'The trigger is received from the Marker 3.' }, 'name': 'NIRFSG_VAL_MARKER3_STR', + 'python_name': 'MARKER3', 'value': 'Marker3' + }, + { + 'documentation': { + 'description': 'Do not drive pulse modulation.' + }, + 'name': 'NIRFSG_VAL_DO_NOT_DRIVE_SIGNAL', + 'value': '' } ] }, diff --git a/src/nirfsg/metadata/functions.py b/src/nirfsg/metadata/functions.py index c30d209fb..3ab6eadc2 100644 --- a/src/nirfsg/metadata/functions.py +++ b/src/nirfsg/metadata/functions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-RFSG API metadata version 25.8.0d197 +# This file is generated from NI-RFSG API metadata version 26.3.0d9999 functions = { 'Abort': { 'codegen_method': 'public', @@ -359,7 +359,9 @@ 'documentation': { 'description': 'Name of the stored waveform to delete.' }, - 'name': 'waveformName', + 'grpc_name': 'name', + 'name': 'name', + 'python_name': 'waveform_name', 'type': 'ViConstString', 'use_array': False, 'use_in_python_api': True @@ -631,9 +633,9 @@ 'documentation': { 'description': 'Specifies the Script Trigger to configure.' }, + 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'is_repeated_capability': True, 'name': 'triggerId', - 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'repeated_capability_type': 'script_triggers', 'type': 'ViConstString', 'use_array': False, @@ -644,8 +646,8 @@ 'documentation': { 'description': 'Specifies the source terminal for the digital edge Script Trigger. NI-RFSG sets the NIRFSG_ATTR_DIGITAL_EDGE_SCRIPT_TRIGGER_SOURCE attribute to this value.' }, - 'name': 'source', 'grpc_enum': 'TriggerSource', + 'name': 'source', 'type': 'ViConstString', 'use_array': False, 'use_in_python_api': True @@ -697,8 +699,8 @@ 'documentation': { 'description': 'Specifies the source terminal for the digital edge trigger. NI-RFSG sets the NIRFSG_ATTR_DIGITAL_EDGE_START_TRIGGER_SOURCE attribute to this value.' }, - 'name': 'source', 'grpc_enum': 'TriggerSource', + 'name': 'source', 'type': 'ViConstString', 'use_array': False, 'use_in_python_api': True @@ -749,9 +751,9 @@ 'documentation': { 'description': 'Specifies the Script Trigger to configure.' }, + 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'is_repeated_capability': True, 'name': 'triggerId', - 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'repeated_capability_type': 'script_triggers', 'type': 'ViConstString', 'use_array': False, @@ -938,9 +940,9 @@ 'documentation': { 'description': 'Specifies the Script Trigger to configure.' }, + 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'is_repeated_capability': True, 'name': 'triggerId', - 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'repeated_capability_type': 'script_triggers', 'type': 'ViConstString', 'use_array': False, @@ -1275,6 +1277,44 @@ ], 'returns': 'ViStatus' }, + 'DeleteScript': { + 'codegen_method': 'public', + 'documentation': { + 'description': '\nDeletes a specified script from the pool of currently defined scripts. The NI-RFSG device must be in the Configuration state before you call this function.\n\n**Supported Devices** :PXIe-5820/5830/5831/5832/5840/5841/5842/5860' + }, + 'included_in_proto': True, + 'method_templates': [ + { + 'documentation_filename': 'default_method', + 'library_interpreter_filename': 'default_method', + 'method_python_name_suffix': '', + 'session_filename': 'default_method' + } + ], + 'parameters': [ + { + 'direction': 'in', + 'documentation': { + '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.' + }, + 'name': 'vi', + 'type': 'ViSession', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the name of the script to delete. This string is case-insensitive.' + }, + 'name': 'scriptName', + 'type': 'ViConstString', + 'use_array': False, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus' + }, 'DisableScriptTrigger': { 'codegen_method': 'public', 'documentation': { @@ -1306,9 +1346,9 @@ 'documentation': { 'description': 'Specifies the Script trigger to configure.' }, + 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'is_repeated_capability': True, 'name': 'triggerId', - 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'repeated_capability_type': 'script_triggers', 'type': 'ViConstString', 'use_array': False, @@ -1720,8 +1760,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -1779,8 +1819,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -1838,8 +1878,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -1897,8 +1937,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -1956,8 +1996,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -2015,8 +2055,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -2346,12 +2386,12 @@ ], 'parameters': [ { + 'default_value': 'Module.PRIMARY_MODULE', 'direction': 'in', 'documentation': { 'description': 'Specifies from which stand-alone module to retrieve the last successful self-calibration date and time.' }, 'enum': 'Module', - 'default_value': 'Module.PRIMARY_MODULE', 'grpc_enum': None, 'name': 'module', 'type': 'ViInt32' @@ -2409,6 +2449,79 @@ ], 'returns': 'ViStatus' }, + 'GetScript': { + 'codegen_method': 'public', + 'documentation': { + 'description': '\nReturns the content of specified script.\n\n**Supported Devices** :PXIe-5820/5830/5831/5832/5840/5841/5842/5860' + }, + 'included_in_proto': True, + 'method_templates': [ + { + 'documentation_filename': 'default_method', + 'library_interpreter_filename': 'default_method', + 'method_python_name_suffix': '', + 'session_filename': 'default_method' + } + ], + 'parameters': [ + { + 'direction': 'in', + 'documentation': { + '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.' + }, + 'name': 'vi', + 'type': 'ViSession', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the name of the script. This string is case-insensitive.' + }, + 'name': 'scriptName', + 'type': 'ViConstString', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'Returns the script.' + }, + 'name': 'script', + 'size': { + 'mechanism': 'ivi-dance-with-a-twist', + 'value': 'bufferSize', + 'value_twist': 'actualBufferSize' + }, + 'type': 'ViChar[]', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Pass the number of bytes in the ViChar buffer you specify for the **waveformNames** parameter.\n\nIf you pass 0, you can pass VI_NULL for the **waveformNames** parameter.' + }, + 'name': 'bufferSize', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'Fetch the number of bytes needed to pass in the NIRFSG_ATTR_BUFFER_SIZE parameter.\n\nIt can be fetch by passing VI_NULL in the NIRFSG_ATTR_SCRIPT_NAMES parameter.' + }, + 'name': 'actualBufferSize', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus' + }, 'GetSelfCalibrationDateAndTime': { 'codegen_method': 'private', 'documentation': { @@ -2528,6 +2641,7 @@ 'use_in_python_api': True }, { + 'default_value': 'Module.PRIMARY_MODULE', 'direction': 'in', 'documentation': { 'description': 'Specifies from which stand-alone module to retrieve the last successful self-calibration temperature. \n **Default Value** : NIRFSG_VAL_PRIMARY_MODULE\n **Defined Values** :\n ', @@ -2555,7 +2669,6 @@ ] }, 'enum': 'Module', - 'default_value': 'Module.PRIMARY_MODULE', 'name': 'module', 'type': 'ViInt32', 'use_array': False, @@ -2700,8 +2813,8 @@ 'Description' ] }, - 'name': 'signalIdentifier', 'grpc_enum': 'SignalIdentifier', + 'name': 'signalIdentifier', 'type': 'ViConstString', 'use_array': False, 'use_in_python_api': True @@ -3055,8 +3168,8 @@ 'documentation': { 'description': 'Returns a ViSession handle that you use to identify the NI-RFSG device in all subsequent NI-RFSG function calls.' }, - 'name': 'newVi', 'grpc_name': 'vi', + 'name': 'newVi', 'type': 'ViSession', 'use_array': False, 'use_in_python_api': True @@ -3565,7 +3678,9 @@ 'documentation': { 'description': 'Specifies the name of the stored waveform to generate. This is a case-insensitive alphanumeric string that does not use reserved words. NI-RFSG sets the NIRFSG_ATTR_ARB_SELECTED_WAVEFORM attribute to this value.' }, - 'name': 'waveformName', + 'grpc_name': 'name', + 'name': 'name', + 'python_name': 'waveform_name', 'type': 'ViConstString', 'use_array': False, 'use_in_python_api': True @@ -3577,7 +3692,7 @@ 'codegen_method': 'public', 'documentation': { 'description': '\nPerforms an internal self-calibration on the device and associated modules that support self-calibration.\n\nIf the calibration is successful, new calibration data and constants are stored in the onboard nonvolatile memory of the module.\n\nThe PXIe-5841 maintains separate self-calibration data for both the PXIe-5841 standalone and when associated with the PXIe-5655. Use this function once for each intended configuration.\n\n**Supported Devices** : PXI-5610, PXIe-5653, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860', - 'note': 'If there is an existing NI-RFSA session open for the same PXIe-5820/5830/5831/5832/5840/5841/5842/5860 while this function runs, it may remain open but cannot be used for operations that access the hardware, for example niRFSA_Commit or niRFSA_Initiate.' + 'note': 'If there is an existing NI-RFSA session open for the same PXIe-5820/5830/5831/5832/5840/5841/5842/5860 while this function runs, it may remain open but cannot be used for operations that access the hardware, for example niRFSA_Commit or niRFSA_Initiate. For the existing open session to use the new self-calibration data, the session will need to be closed and reopened.\n\n**PXIe-5860**\n\nWhile this VI is running on one channel, if there are any existing NI-RFSG or NI-RFSA sessions open on the other channel, they may remain open but cannot be used for operations that access the hardware, for example niRFSG Commit or niRFSG Initiate or niRFSA Commit or niRFSA Initiate. For the existing open session to use the new self-calibration data, the session will need to be closed and reopened.' }, 'included_in_proto': True, 'method_templates': [ @@ -3721,100 +3836,6 @@ ], 'returns': 'ViStatus' }, - 'self_test': { - 'codegen_method': 'private', - 'documentation': { - 'description': '\nPerforms a self-test on the NI-RFSG device and returns the test results.\n\nThis function performs a simple series of tests to ensure that the NI-RFSG device is powered up and responding.\n\nThis function does not affect external I/O connections or connections between devices. Complete functional testing and calibration are not performed by this function. The NI-RFSG device must be in the Configuration state before you call this function.\n\n**Supported Devices** : PXI-5610, PXIe-5611, 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\n\n**Related Topics**\n\n`Device Warm-Up `_' - }, - 'included_in_proto': True, - 'parameters': [ - { - 'direction': 'in', - 'documentation': { - '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.' - }, - 'name': 'vi', - 'type': 'ViSession' - }, - { - 'direction': 'out', - 'documentation': { - 'description': 'This parameter contains the value returned from the NI-RFSG device self test.', - 'table_body': [ - [ - '0', - 'Self test passed' - ], - [ - '1', - 'Self test failed' - ] - ], - 'table_header': [ - 'Self-Test Code', - 'Description' - ] - }, - 'name': 'selfTestResult', - 'type': 'ViInt16' - }, - { - 'direction': 'out', - 'documentation': { - 'description': 'Returns the self-test response string from the NI-RFSG device. For an explanation of the string contents, refer to the **status** parameter of this function.\n\nYou must pass a ViChar array with at least 256 bytes.' - }, - 'name': 'selfTestMessage', - 'size': { - 'mechanism': 'fixed', - 'value': 256 - }, - 'type': 'ViChar[]' - } - ], - 'returns': 'ViStatus' - }, - 'fancy_self_test': { - 'codegen_method': 'python-only', - 'documentation': { - 'description': '\nPerforms a self-test on the NI-RFSG device and returns the test results.\n\nThis function performs a simple series of tests to ensure that the NI-RFSG device is powered up and responding.\n\nThis function does not affect external I/O connections or connections between devices. Complete functional testing and calibration are not performed by this function. The NI-RFSG device must be in the Configuration state before you call this function.\n\n**Supported Devices** : PXI-5610, PXIe-5611, 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\n\n**Related Topics**\n\n`Device Warm-Up `_', - 'table_body': [ - [ - '0', - 'Passed self-test' - ], - [ - '1', - 'Self-test failed' - ] - ], - 'table_header': [ - 'Self-Test Code', - 'Description' - ] - }, - 'grpc_name': 'FancySelfTest', - 'included_in_proto': True, - 'method_templates': [ - { - 'documentation_filename': 'default_method', - 'library_interpreter_filename': 'none', - 'method_python_name_suffix': '', - 'session_filename': 'fancy_self_test' - } - ], - 'parameters': [ - { - 'direction': 'in', - 'documentation': { - '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.' - }, - 'name': 'vi', - 'type': 'ViSession' - } - ], - 'python_name': 'self_test', - 'returns': 'ViStatus' - }, 'SendSoftwareEdgeTrigger': { 'codegen_method': 'public', 'documentation': { @@ -4027,8 +4048,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -4087,8 +4108,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -4147,8 +4168,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -4206,8 +4227,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -4266,8 +4287,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -4326,8 +4347,8 @@ 'documentation': { 'description': 'Pass the ID of an attribute.' }, - 'name': 'attribute', 'grpc_name': 'attribute_id', + 'name': 'attribute', 'type': 'ViAttr', 'use_array': False, 'use_in_python_api': True @@ -4615,7 +4636,7 @@ 'type': 'ViInt32', 'type_in_documentation': 'hightime.timedelta, datetime.timedelta, or int in milliseconds', 'use_array': False, - 'use_in_python_api': True + 'use_in_python_api': True } ], 'returns': 'ViStatus' @@ -4673,8 +4694,8 @@ 'documentation': { 'description': 'Specifies the array of data to load into the waveform. The array must have at least as many elements as the value in the **size_in_samples** parameter in the nirfsg_AllocateArbWaveform function.' }, - 'name': 'waveformDataArray', 'grpc_name': 'wfm_data', + 'name': 'waveformDataArray', 'numpy': True, 'size': { 'mechanism': 'len', @@ -4749,8 +4770,8 @@ 'documentation': { 'description': 'Specifies the array of data to load into the waveform. The array must have at least as many elements as the value in the **size_in_samples** parameter in the nirfsg_AllocateArbWaveform function.' }, - 'name': 'waveformDataArray', 'grpc_name': 'wfm_data', + 'name': 'waveformDataArray', 'numpy': True, 'size': { 'mechanism': 'len', @@ -4825,8 +4846,8 @@ 'documentation': { 'description': 'Specifies the array of data to load into the waveform. The array must have at least as many elements as the value in the **size_in_samples** parameter in the nirfsg_AllocateArbWaveform function.' }, - 'name': 'waveformDataArray', 'grpc_name': 'wfm_data', + 'name': 'waveformDataArray', 'numpy': True, 'size': { 'mechanism': 'len', @@ -4966,6 +4987,48 @@ 'returns': 'ViStatus', 'use_session_lock': False }, + 'fancy_self_test': { + 'codegen_method': 'python-only', + 'documentation': { + 'description': '\nPerforms a self-test on the NI-RFSG device and returns the test results.\n\nThis function performs a simple series of tests to ensure that the NI-RFSG device is powered up and responding.\n\nThis function does not affect external I/O connections or connections between devices. Complete functional testing and calibration are not performed by this function. The NI-RFSG device must be in the Configuration state before you call this function.\n\n**Supported Devices** : PXI-5610, PXIe-5611, 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\n\n**Related Topics**\n\n`Device Warm-Up `_', + 'table_body': [ + [ + '0', + 'Passed self-test' + ], + [ + '1', + 'Self-test failed' + ] + ], + 'table_header': [ + 'Self-Test Code', + 'Description' + ] + }, + 'grpc_name': 'FancySelfTest', + 'included_in_proto': True, + 'method_templates': [ + { + 'documentation_filename': 'default_method', + 'library_interpreter_filename': 'none', + 'method_python_name_suffix': '', + 'session_filename': 'fancy_self_test' + } + ], + 'parameters': [ + { + 'direction': 'in', + 'documentation': { + '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.' + }, + 'name': 'vi', + 'type': 'ViSession' + } + ], + 'python_name': 'self_test', + 'returns': 'ViStatus' + }, 'reset': { 'codegen_method': 'public', 'documentation': { @@ -4995,5 +5058,59 @@ } ], 'returns': 'ViStatus' + }, + 'self_test': { + 'codegen_method': 'private', + 'documentation': { + 'description': '\nPerforms a self-test on the NI-RFSG device and returns the test results.\n\nThis function performs a simple series of tests to ensure that the NI-RFSG device is powered up and responding.\n\nThis function does not affect external I/O connections or connections between devices. Complete functional testing and calibration are not performed by this function. The NI-RFSG device must be in the Configuration state before you call this function.\n\n**Supported Devices** : PXI-5610, PXIe-5611, 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\n\n**Related Topics**\n\n`Device Warm-Up `_' + }, + 'grpc_name': 'SelfTest', + 'included_in_proto': True, + 'method_name_for_documentation': 'self_test', + 'parameters': [ + { + 'direction': 'in', + 'documentation': { + '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.' + }, + 'name': 'vi', + 'type': 'ViSession' + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'This parameter contains the value returned from the NI-RFSG device self test.', + 'table_body': [ + [ + '0', + 'Self test passed' + ], + [ + '1', + 'Self test failed' + ] + ], + 'table_header': [ + 'Self-Test Code', + 'Description' + ] + }, + 'name': 'selfTestResult', + 'type': 'ViInt16' + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'Returns the self-test response string from the NI-RFSG device. For an explanation of the string contents, refer to the **status** parameter of this function.\n\nYou must pass a ViChar array with at least 256 bytes.' + }, + 'name': 'selfTestMessage', + 'size': { + 'mechanism': 'fixed', + 'value': 256 + }, + 'type': 'ViChar[]' + } + ], + 'returns': 'ViStatus' } } diff --git a/src/nirfsg/system_tests/test_system_nirfsg.py b/src/nirfsg/system_tests/test_system_nirfsg.py index 8bd3b7a78..073701c0e 100644 --- a/src/nirfsg/system_tests/test_system_nirfsg.py +++ b/src/nirfsg/system_tests/test_system_nirfsg.py @@ -350,6 +350,37 @@ def test_write_script_with_bad_script(self, rfsg_device_session): assert e.code == -1074101603 assert "A waveform matching the provided name does not exist in memory" in e.description + @pytest.mark.skipif(use_simulated_session is True, reason="Scripts not compiled on simulated device") + def test_get_script(self, rfsg_device_session): + rfsg_device_session.generation_mode = nirfsg.GenerationMode.SCRIPT + waveform_data = np.full(1000, 0.707 + 0.707j, dtype=np.complex64) + rfsg_device_session.write_arb_waveform('mywaveform1', waveform_data, False) + script_content = '''script myScript1 + repeat forever + generate mywaveform1 + end repeat + end script''' + rfsg_device_session.write_script(script_content) + retrieved_script = rfsg_device_session.get_script('myScript1') + assert retrieved_script == script_content + + @pytest.mark.skipif(use_simulated_session is True, reason="Scripts not compiled on simulated device") + def test_delete_script(self, rfsg_device_session): + rfsg_device_session.generation_mode = nirfsg.GenerationMode.SCRIPT + waveform_data = np.full(1000, 0.707 + 0.707j, dtype=np.complex64) + rfsg_device_session.write_arb_waveform('mywaveform1', waveform_data, False) + script = '''script myScript1 + repeat forever + generate mywaveform1 + end repeat + end script''' + rfsg_device_session.write_script(script) + script_exists = rfsg_device_session.check_if_script_exists('myScript1') + assert script_exists is True + rfsg_device_session.delete_script('myScript1') + script_exists = rfsg_device_session.check_if_script_exists('myScript1') + assert script_exists is False + def test_configure_software_trigger(self, rfsg_device_session): rfsg_device_session.configure_software_start_trigger() assert rfsg_device_session.start_trigger_type == nirfsg.StartTriggerType.SOFTWARE