diff --git a/build/helper/helper.py b/build/helper/helper.py index 83c3f005b..f78bdf741 100644 --- a/build/helper/helper.py +++ b/build/helper/helper.py @@ -42,7 +42,7 @@ def camelcase_to_snakecase(camelcase_string): '''Converts a camelCase string to lower_case_snake_case''' # https://stackoverflow.com/questions/1175208/elegant-python-function-to-convert-camelcase-to-snake-case s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', camelcase_string) - return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() + return re.sub('([a-z])([A-Z])', r'\1_\2', s1).lower() # TODO(marcoskirsch): not being used diff --git a/docs/nirfsg/class.rst b/docs/nirfsg/class.rst index 9d0012789..0400287c1 100644 --- a/docs/nirfsg/class.rst +++ b/docs/nirfsg/class.rst @@ -1113,12 +1113,12 @@ configure_output_enabled :type output_enabled: bool -configure_p2_p_endpoint_fullness_start_trigger ----------------------------------------------- +configure_p2p_endpoint_fullness_start_trigger +--------------------------------------------- .. py:currentmodule:: nirfsg.Session - .. py:method:: configure_p2_p_endpoint_fullness_start_trigger(p2p_endpoint_fullness_level) + .. py:method:: configure_p2p_endpoint_fullness_start_trigger(p2p_endpoint_fullness_level) Configures the Start Trigger to detect peer-to-peer endpoint fullness. @@ -1419,12 +1419,12 @@ configure_software_start_trigger -create_deembedding_sparameter_table_s2_p_file ---------------------------------------------- +create_deembedding_sparameter_table_s2p_file +-------------------------------------------- .. py:currentmodule:: nirfsg.Session - .. py:method:: create_deembedding_sparameter_table_s2_p_file(port, table_name, s2p_file_path, sparameter_orientation) + .. py:method:: create_deembedding_sparameter_table_s2p_file(port, table_name, s2p_file_path, sparameter_orientation) Creates an S-parameter de-embedding table for the port based on the specified S2P file. @@ -1601,6 +1601,82 @@ disable_start_trigger +error_message +------------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: error_message(error_code, error_message) + + Converts an error code returned by an NI-RFSG method into a user-readable string. + + **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 + + + + + + :param error_code: + + + Pass the status parameter that is returned from any NI-RFSG method. + + **Default Value** : 0 (VI_SUCCESS) + + + + + :type error_code: int + :param error_message: + + + Returns the user-readable message string that corresponds to the status code you specify. + + You must pass a ViChar array with at least 256 bytes to this parameter. + + + + + :type error_message: str + +error_query +----------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: error_query() + + Reads an error code and an error message from the instrument error queue. + + **Supported Devices** : PXI-5610, PXIe-5611, PXI/PXIe-5650/5651/5652, PXIe-5653, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5840/5841/5842/5860 + + + + + + :rtype: tuple (error_code, error_message) + + WHERE + + error_code (int): + + + Returns the error code read from the instrument error queue. + + + + + error_message (str): + + + Returns the error message string read from the instrument error message queue. + + You must pass a ViChar array with at least 256 bytes. + + + + + export_signal ------------- @@ -2118,6 +2194,184 @@ get_terminal_name +get_waveform_burst_start_locations +---------------------------------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: get_waveform_burst_start_locations(number_of_locations) + + Returns the burst start locations of the waveform stored in the NI-RFSG session. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + + + + .. tip:: This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].get_waveform_burst_start_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.get_waveform_burst_start_locations` + + + :param number_of_locations: + + + Specifies the size of the burst start locations array. + + + + + :type number_of_locations: int + + :rtype: tuple (locations, required_size) + + WHERE + + locations (array.array("d")): + + + Returns the burst start locations stored in the NI-RFSG session for the waveform that you specified in the :py:attr:`nirfsg.Session.CHANNEL_NAME` parameter. This value is expressed in samples. + + + + .. note:: One or more of the referenced properties are not in the Python API for this driver. + + + required_size (int): + + + Returns the required size for the output array if you pass NULL to :py:attr:`nirfsg.Session.LOCATIONS` parameter. + + + + .. note:: One or more of the referenced properties are not in the Python API for this driver. + + + +get_waveform_burst_stop_locations +--------------------------------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: get_waveform_burst_stop_locations(number_of_locations) + + Returns the burst stop locations of the waveform stored in the NI-RFSG session. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + + + + .. tip:: This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].get_waveform_burst_stop_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.get_waveform_burst_stop_locations` + + + :param number_of_locations: + + + Specifies the size of the burst start locations array. + + + + + :type number_of_locations: int + + :rtype: tuple (locations, required_size) + + WHERE + + locations (array.array("d")): + + + Returns the burst start locations stored in the NI-RFSG session for the waveform that you specified in the :py:attr:`nirfsg.Session.CHANNEL_NAME` parameter. This value is expressed in samples. + + + + .. note:: One or more of the referenced properties are not in the Python API for this driver. + + + required_size (int): + + + Returns the required size for the output array if you pass NULL to :py:attr:`nirfsg.Session.LOCATIONS` parameter. + + + + .. note:: One or more of the referenced properties are not in the Python API for this driver. + + + +get_waveform_marker_event_locations +----------------------------------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: get_waveform_marker_event_locations(number_of_locations) + + Returns the marker locations associated with the waveform and the marker stored in the NI-RFSG session. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + + + + .. tip:: This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].get_waveform_marker_event_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.get_waveform_marker_event_locations` + + + :param number_of_locations: + + + Specifies the size of the locations array. + + + + + :type number_of_locations: int + + :rtype: tuple (locations, required_size) + + WHERE + + locations (array.array("d")): + + + Returns the marker locations stored in the NI-RFSG database for the channel you specified in the :py:attr:`nirfsg.Session.CHANNEL_NAME` parameter. This value is expressed in samples. + + + + .. note:: One or more of the referenced properties are not in the Python API for this driver. + + + required_size (int): + + + Returns the required size for the output array if you pass NULL to **Locations** parameter. + + + + + initiate -------- @@ -2403,7 +2657,7 @@ reset Generally, calling this method instead of the :py:meth:`nirfsg.Session.reset_device` method is acceptable. The :py:meth:`nirfsg.Session.reset` method executes faster than the :py:meth:`nirfsg.Session.reset_device` method. - 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 :py:meth:`nirfsg.Session.reset_with_options` method, with **stepsToOmit** set to :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.ROUTES` . + 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 :py:meth:`nirfsg.Session.ResetWithOptions` method, with **stepsToOmit** set to :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.ROUTES` . **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 @@ -2495,58 +2749,45 @@ reset_with_defaults -reset_with_options ------------------- +revision_query +-------------- .. py:currentmodule:: nirfsg.Session - .. py:method:: reset_with_options(steps_to_omit) + .. py:method:: revision_query() - Resets all properties to default values and specifies steps to omit during the reset process, such as signal routes. + Returns the revision numbers of the NI-RFSG driver and the instrument firmware. - By default, this method exhibits the same behavior as :py:meth:`nirfsg.Session.reset`. You can specify steps to omit using the steps to omit parameter. For example, if you specify :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.ROUTES` for the :py:attr:`nirfsg.Session.STEPS_TO_OMIT` parameter, this method does not release signal routes during the reset process. + **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 - When routes of signals between two devices are released, they are released regardless of which device created the route. + - 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 method instead of :py:meth:`nirfsg.Session.reset`, with :py:attr:`nirfsg.Session.STEPS_TO_OMIT` set to :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.ROUTES`. - **Supported Devices** : PXIe-5644/5645/5646, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 - **Related Topics** + :rtype: tuple (instrument_driver_revision, firmware_revision) - `Triggers `_ + WHERE - `Events `_ + instrument_driver_revision (str): - - .. note:: One or more of the referenced properties are not in the Python API for this driver. + Returns the value of the :py:attr:`nirfsg.Session.specific_driver_revision` property in the form of a string. + You must pass a ViChar array with at least 256 bytes. + - :param steps_to_omit: + firmware_revision (str): - Specifies a list of steps to skip during the reset process. The default value is :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.NONE`, which specifies that no step is omitted during reset. **Defined Values** : - +-------------------------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Value | Description | - +===================================================================+=========+============================================================================================================================================================================================================+ - | :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.NONE` | 0 (0x0) | No step is omitted during reset. | - +-------------------------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.WAVEFORMS` | 1 (0x1) | Omits clearing waveforms. | - +-------------------------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.SCRIPTS` | 2 (0x2) | Omits clearing scripts. | - +-------------------------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.ROUTES` | 4 (0x4) | 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. | - +-------------------------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.DEEMBEDDING_TABLES` | 8 (0x8) | Omits deleting de-embedding tables. This step is valid only for the PXIe-5830/5831/5832/5840. | - +-------------------------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Returns the value of the :py:attr:`nirfsg.Session.instrument_firmware_revision` property in the form of a string. - .. note:: :py:data:`~nirfsg.ResetWithOptionsStepsToOmit.ROUTES` is not supported in external calibration or alignment sessions. + You must pass a ViChar array with at least 256 bytes. + + - :type steps_to_omit: :py:data:`nirfsg.ResetWithOptionsStepsToOmit` save_configurations_to_file --------------------------- @@ -2910,6 +3151,140 @@ set_arb_waveform_next_write_position :type offset: int +set_waveform_burst_start_locations +---------------------------------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: set_waveform_burst_start_locations(number_of_locations, locations) + + Configures the start location of the burst in samples where the burst refers to the active portion of a waveform. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + + + + .. tip:: This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].set_waveform_burst_start_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.set_waveform_burst_start_locations` + + + :param number_of_locations: + + + Specifies the size of the burst start locations array. + + + + + :type number_of_locations: int + :param locations: + + + Returns the burst start locations stored in the NI-RFSG session for the waveform that you specified in the :py:attr:`nirfsg.Session.CHANNEL_NAME` parameter. This value is expressed in samples. + + + + .. note:: One or more of the referenced properties are not in the Python API for this driver. + + + :type locations: array.array("d") + +set_waveform_burst_stop_locations +--------------------------------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: set_waveform_burst_stop_locations(number_of_locations, locations) + + Configures the stop location of the burst in samples where the burst refers to the active portion of a waveform. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + + + + .. tip:: This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].set_waveform_burst_stop_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.set_waveform_burst_stop_locations` + + + :param number_of_locations: + + + Specifies the size of the burst stop locations array. + + + + + :type number_of_locations: int + :param locations: + + + Specifies the burst stop locations, in samples, to store in the NI-RFSG session. + + + + + :type locations: array.array("d") + +set_waveform_marker_event_locations +----------------------------------- + + .. py:currentmodule:: nirfsg.Session + + .. py:method:: set_waveform_marker_event_locations(number_of_locations, locations) + + Configures the marker locations associated with waveform and marker in the NI-RFSG session. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + + + + .. tip:: This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].set_waveform_marker_event_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.set_waveform_marker_event_locations` + + + :param number_of_locations: + + + Specifies the size of the locations array. + + + + + :type number_of_locations: int + :param locations: + + + Specifies the marker location, in samples, to store in the NI-RFSG database. + + + + + :type locations: array.array("d") + unlock ------ @@ -2952,12 +3327,12 @@ wait_until_settled :type max_time_milliseconds: int -write_p2_p_endpoint_i16 ------------------------ +write_p2p_endpoint_i16 +---------------------- .. py:currentmodule:: nirfsg.Session - .. py:method:: write_p2_p_endpoint_i16(stream_endpoint, number_of_samples, endpoint_data) + .. py:method:: write_p2p_endpoint_i16(stream_endpoint, number_of_samples, endpoint_data) Writes an array of 16-bit integer data to the peer-to-peer endpoint. @@ -3005,7 +3380,7 @@ write_p2_p_endpoint_i16 - :type endpoint_data: list of int + :type endpoint_data: array.array("h") write_script ------------ @@ -7537,7 +7912,7 @@ instrument_firmware_revision **High-Level Methods**: - - :py:meth:`nirfsg.Session.RevisionQuery` + - :py:meth:`nirfsg.Session.revision_query` The following table lists the characteristics of this property. @@ -10823,7 +11198,7 @@ rf_blanking_source PXIe-5840/5841: RF blanking does not occur for frequencies below 120MHz. - For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any :py:meth:`nirfsg.Session.reset` or `niRFSA_reset `_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call :py:meth:`nirfsg.Session.reset_with_options` or `niRFSA_ResetWithOptions `_. Select **Routes** in the **steps to omit** parameter. + For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any :py:meth:`nirfsg.Session.reset` or `niRFSA_reset `_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call :py:meth:`nirfsg.Session.ResetWithOptions` or `niRFSA_ResetWithOptions `_. Select **Routes** in the **steps to omit** parameter. **Default Value:** "" (empty string) @@ -12508,7 +12883,7 @@ waveform_rf_blanking | :py:data:`~nirfsg.NIRFSG_VAL_MARKER0`, :py:data:`~nirfsg.NIRFSG_VAL_MARKER1`, :py:data:`~nirfsg.NIRFSG_VAL_MARKER2`, or :py:data:`~nirfsg.NIRFSG_VAL_MARKER3` | :py:data:`~nirfsg.RFBlanking.ENABLE` | Error is shown. | +---------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ - .. note:: For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any :py:meth:`nirfsg.Session.reset` or `niRFSA_reset `_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call :py:meth:`nirfsg.Session.reset_with_options` or `niRFSA_ResetWithOptions `_. Select **Routes** in the **steps to omit** parameter. + .. note:: For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any :py:meth:`nirfsg.Session.reset` or `niRFSA_reset `_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call :py:meth:`nirfsg.Session.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. @@ -12666,7 +13041,7 @@ write_waveform_burst_detection .. py:attribute:: write_waveform_burst_detection - Enables the detection of burst start and burst stop locations in the waveform. You can read the detected burst start and burst stop locations using :py:meth:`nirfsg.Session.GetWaveformBurstStartLocations` and :py:meth:`nirfsg.Session.GetWaveformBurstStopLocations` methods respectively. + Enables the detection of burst start and burst stop locations in the waveform. You can read the detected burst start and burst stop locations using :py:meth:`nirfsg.Session.get_waveform_burst_start_locations` and :py:meth:`nirfsg.Session.get_waveform_burst_stop_locations` methods respectively. **Default Value:** :py:data:`~nirfsg.WriteWaveformBurstDetection.DISABLE` @@ -12684,7 +13059,7 @@ write_waveform_burst_detection .. note:: - When you download a waveform using :py:meth:`nirfsg.Session.ReadAndDownloadWaveformFromFileTdms` method and if :py:attr:`nirfsg.Session.waveform_rf_blanking` property is enabled, you must set the :py:attr:`nirfsg.Session.write_waveform_burst_detection` property to :py:data:`~nirfsg.WriteWaveformBurstDetection.DISABLE`. - - For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any :py:meth:`nirfsg.Session.reset` or `niRFSA_reset `_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call :py:meth:`nirfsg.Session.reset_with_options` or `niRFSA_ResetWithOptions `_. Select **Routes** in the **steps to omit** parameter. + - For PXIe-5830/5831/5832: The RF Blanking reserves a PXI trigger line. If you are calling any :py:meth:`nirfsg.Session.reset` or `niRFSA_reset `_ on the same device, NI recommends calling it before committing blanking properties. Alternatively, you can call :py:meth:`nirfsg.Session.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. diff --git a/docs/nirfsg/enums.rst b/docs/nirfsg/enums.rst index e48744908..94bb59629 100644 --- a/docs/nirfsg/enums.rst +++ b/docs/nirfsg/enums.rst @@ -1318,10 +1318,6 @@ RFFilter - .. py:attribute:: RFFilter.CONFIGURATION_SETTLED_EVENT - - - .. py:attribute:: RFFilter.LO_FREQ_MOD_4000 diff --git a/generated/nirfsg/nirfsg/_library.py b/generated/nirfsg/nirfsg/_library.py index dcb195225..d675ae656 100644 --- a/generated/nirfsg/nirfsg/_library.py +++ b/generated/nirfsg/nirfsg/_library.py @@ -59,6 +59,8 @@ def __init__(self, ctypes_library): self.niRFSG_Disable_cfunc = None self.niRFSG_DisableScriptTrigger_cfunc = None self.niRFSG_DisableStartTrigger_cfunc = None + self.niRFSG_ErrorMessage_cfunc = None + self.niRFSG_ErrorQuery_cfunc = None self.niRFSG_ExportSignal_cfunc = None self.niRFSG_GetAllNamedWaveformNames_cfunc = None self.niRFSG_GetAllScriptNames_cfunc = None @@ -76,6 +78,9 @@ def __init__(self, ctypes_library): self.niRFSG_GetSelfCalibrationTemperature_cfunc = None self.niRFSG_GetStreamEndpointHandle_cfunc = None self.niRFSG_GetTerminalName_cfunc = None + self.niRFSG_GetWaveformBurstStartLocations_cfunc = None + self.niRFSG_GetWaveformBurstStopLocations_cfunc = None + self.niRFSG_GetWaveformMarkerEventLocations_cfunc = None self.niRFSG_InitWithOptions_cfunc = None self.niRFSG_Initiate_cfunc = None self.niRFSG_LoadConfigurationsFromFile_cfunc = None @@ -88,7 +93,7 @@ def __init__(self, ctypes_library): self.niRFSG_ResetAttribute_cfunc = None self.niRFSG_ResetDevice_cfunc = None self.niRFSG_ResetWithDefaults_cfunc = None - self.niRFSG_ResetWithOptions_cfunc = None + self.niRFSG_RevisionQuery_cfunc = None self.niRFSG_SaveConfigurationsToFile_cfunc = None self.niRFSG_SelectArbWaveform_cfunc = None self.niRFSG_SelfCal_cfunc = None @@ -102,6 +107,9 @@ def __init__(self, ctypes_library): self.niRFSG_SetAttributeViReal64_cfunc = None self.niRFSG_SetAttributeViSession_cfunc = None self.niRFSG_SetAttributeViString_cfunc = None + self.niRFSG_SetWaveformBurstStartLocations_cfunc = None + self.niRFSG_SetWaveformBurstStopLocations_cfunc = None + self.niRFSG_SetWaveformMarkerEventLocations_cfunc = None self.niRFSG_UnlockSession_cfunc = None self.niRFSG_WaitUntilSettled_cfunc = None self.niRFSG_WriteP2PEndpointI16_cfunc = None @@ -435,6 +443,22 @@ def niRFSG_DisableStartTrigger(self, vi): # noqa: N802 self.niRFSG_DisableStartTrigger_cfunc.restype = ViStatus # noqa: F405 return self.niRFSG_DisableStartTrigger_cfunc(vi) + def niRFSG_ErrorMessage(self, vi, error_code, error_message): # noqa: N802 + with self._func_lock: + if self.niRFSG_ErrorMessage_cfunc is None: + self.niRFSG_ErrorMessage_cfunc = self._get_library_function('niRFSG_ErrorMessage') + self.niRFSG_ErrorMessage_cfunc.argtypes = [ViSession, ViStatus, ctypes.POINTER(ViChar)] # noqa: F405 + self.niRFSG_ErrorMessage_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_ErrorMessage_cfunc(vi, error_code, error_message) + + def niRFSG_ErrorQuery(self, vi, error_code, error_message): # noqa: N802 + with self._func_lock: + if self.niRFSG_ErrorQuery_cfunc is None: + self.niRFSG_ErrorQuery_cfunc = self._get_library_function('niRFSG_ErrorQuery') + self.niRFSG_ErrorQuery_cfunc.argtypes = [ViSession, ctypes.POINTER(ViInt32), ctypes.POINTER(ViChar)] # noqa: F405 + self.niRFSG_ErrorQuery_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_ErrorQuery_cfunc(vi, error_code, error_message) + def niRFSG_ExportSignal(self, vi, signal, signal_identifier, output_terminal): # noqa: N802 with self._func_lock: if self.niRFSG_ExportSignal_cfunc is None: @@ -571,6 +595,30 @@ def niRFSG_GetTerminalName(self, vi, signal, signal_identifier, buffer_size, ter self.niRFSG_GetTerminalName_cfunc.restype = ViStatus # noqa: F405 return self.niRFSG_GetTerminalName_cfunc(vi, signal, signal_identifier, buffer_size, terminal_name) + def niRFSG_GetWaveformBurstStartLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802 + with self._func_lock: + if self.niRFSG_GetWaveformBurstStartLocations_cfunc is None: + self.niRFSG_GetWaveformBurstStartLocations_cfunc = self._get_library_function('niRFSG_GetWaveformBurstStartLocations') + self.niRFSG_GetWaveformBurstStartLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64), ctypes.POINTER(ViInt32)] # noqa: F405 + self.niRFSG_GetWaveformBurstStartLocations_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_GetWaveformBurstStartLocations_cfunc(vi, channel_name, number_of_locations, locations, required_size) + + def niRFSG_GetWaveformBurstStopLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802 + with self._func_lock: + if self.niRFSG_GetWaveformBurstStopLocations_cfunc is None: + self.niRFSG_GetWaveformBurstStopLocations_cfunc = self._get_library_function('niRFSG_GetWaveformBurstStopLocations') + self.niRFSG_GetWaveformBurstStopLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64), ctypes.POINTER(ViInt32)] # noqa: F405 + self.niRFSG_GetWaveformBurstStopLocations_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_GetWaveformBurstStopLocations_cfunc(vi, channel_name, number_of_locations, locations, required_size) + + def niRFSG_GetWaveformMarkerEventLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802 + with self._func_lock: + if self.niRFSG_GetWaveformMarkerEventLocations_cfunc is None: + self.niRFSG_GetWaveformMarkerEventLocations_cfunc = self._get_library_function('niRFSG_GetWaveformMarkerEventLocations') + self.niRFSG_GetWaveformMarkerEventLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64), ctypes.POINTER(ViInt32)] # noqa: F405 + self.niRFSG_GetWaveformMarkerEventLocations_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_GetWaveformMarkerEventLocations_cfunc(vi, channel_name, number_of_locations, locations, required_size) + def niRFSG_InitWithOptions(self, resource_name, id_query, reset_device, option_string, new_vi): # noqa: N802 with self._func_lock: if self.niRFSG_InitWithOptions_cfunc is None: @@ -667,13 +715,13 @@ def niRFSG_ResetWithDefaults(self, vi): # noqa: N802 self.niRFSG_ResetWithDefaults_cfunc.restype = ViStatus # noqa: F405 return self.niRFSG_ResetWithDefaults_cfunc(vi) - def niRFSG_ResetWithOptions(self, vi, steps_to_omit): # noqa: N802 + def niRFSG_RevisionQuery(self, vi, instrument_driver_revision, firmware_revision): # noqa: N802 with self._func_lock: - if self.niRFSG_ResetWithOptions_cfunc is None: - self.niRFSG_ResetWithOptions_cfunc = self._get_library_function('niRFSG_ResetWithOptions') - self.niRFSG_ResetWithOptions_cfunc.argtypes = [ViSession, ViUInt64] # noqa: F405 - self.niRFSG_ResetWithOptions_cfunc.restype = ViStatus # noqa: F405 - return self.niRFSG_ResetWithOptions_cfunc(vi, steps_to_omit) + if self.niRFSG_RevisionQuery_cfunc is None: + self.niRFSG_RevisionQuery_cfunc = self._get_library_function('niRFSG_RevisionQuery') + self.niRFSG_RevisionQuery_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ctypes.POINTER(ViChar)] # noqa: F405 + self.niRFSG_RevisionQuery_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_RevisionQuery_cfunc(vi, instrument_driver_revision, firmware_revision) def niRFSG_SaveConfigurationsToFile(self, vi, channel_name, file_path): # noqa: N802 with self._func_lock: @@ -779,6 +827,30 @@ def niRFSG_SetAttributeViString(self, vi, channel_name, attribute, value): # no self.niRFSG_SetAttributeViString_cfunc.restype = ViStatus # noqa: F405 return self.niRFSG_SetAttributeViString_cfunc(vi, channel_name, attribute, value) + def niRFSG_SetWaveformBurstStartLocations(self, vi, channel_name, number_of_locations, locations): # noqa: N802 + with self._func_lock: + if self.niRFSG_SetWaveformBurstStartLocations_cfunc is None: + self.niRFSG_SetWaveformBurstStartLocations_cfunc = self._get_library_function('niRFSG_SetWaveformBurstStartLocations') + self.niRFSG_SetWaveformBurstStartLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64)] # noqa: F405 + self.niRFSG_SetWaveformBurstStartLocations_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_SetWaveformBurstStartLocations_cfunc(vi, channel_name, number_of_locations, locations) + + def niRFSG_SetWaveformBurstStopLocations(self, vi, channel_name, number_of_locations, locations): # noqa: N802 + with self._func_lock: + if self.niRFSG_SetWaveformBurstStopLocations_cfunc is None: + self.niRFSG_SetWaveformBurstStopLocations_cfunc = self._get_library_function('niRFSG_SetWaveformBurstStopLocations') + self.niRFSG_SetWaveformBurstStopLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64)] # noqa: F405 + self.niRFSG_SetWaveformBurstStopLocations_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_SetWaveformBurstStopLocations_cfunc(vi, channel_name, number_of_locations, locations) + + def niRFSG_SetWaveformMarkerEventLocations(self, vi, channel_name, number_of_locations, locations): # noqa: N802 + with self._func_lock: + if self.niRFSG_SetWaveformMarkerEventLocations_cfunc is None: + self.niRFSG_SetWaveformMarkerEventLocations_cfunc = self._get_library_function('niRFSG_SetWaveformMarkerEventLocations') + self.niRFSG_SetWaveformMarkerEventLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64)] # noqa: F405 + self.niRFSG_SetWaveformMarkerEventLocations_cfunc.restype = ViStatus # noqa: F405 + return self.niRFSG_SetWaveformMarkerEventLocations_cfunc(vi, channel_name, number_of_locations, locations) + def niRFSG_UnlockSession(self, vi, caller_has_lock): # noqa: N802 with self._func_lock: if self.niRFSG_UnlockSession_cfunc is None: diff --git a/generated/nirfsg/nirfsg/_library_interpreter.py b/generated/nirfsg/nirfsg/_library_interpreter.py index 8626708e1..d105838d1 100644 --- a/generated/nirfsg/nirfsg/_library_interpreter.py +++ b/generated/nirfsg/nirfsg/_library_interpreter.py @@ -283,7 +283,7 @@ def configure_output_enabled(self, output_enabled): # noqa: N802 errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return - def configure_p2_p_endpoint_fullness_start_trigger(self, p2p_endpoint_fullness_level): # noqa: N802 + def configure_p2p_endpoint_fullness_start_trigger(self, p2p_endpoint_fullness_level): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 p2p_endpoint_fullness_level_ctype = _visatype.ViInt64(p2p_endpoint_fullness_level) # case S150 error_code = self._library.niRFSG_ConfigureP2PEndpointFullnessStartTrigger(vi_ctype, p2p_endpoint_fullness_level_ctype) @@ -340,7 +340,7 @@ def configure_software_start_trigger(self): # noqa: N802 errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return - def create_deembedding_sparameter_table_s2_p_file(self, port, table_name, s2p_file_path, sparameter_orientation): # noqa: N802 + def create_deembedding_sparameter_table_s2p_file(self, port, table_name, s2p_file_path, sparameter_orientation): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 port_ctype = ctypes.create_string_buffer(port.encode(self._encoding)) # case C020 table_name_ctype = ctypes.create_string_buffer(table_name.encode(self._encoding)) # case C020 @@ -383,6 +383,22 @@ def disable_start_trigger(self): # noqa: N802 errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return + def error_message(self, error_code, error_message): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + error_code_ctype = _visatype.ViStatus(error_code) # case S150 + error_message_ctype = ctypes.create_string_buffer(error_message.encode(self._encoding)) # case C020 + error_code = self._library.niRFSG_ErrorMessage(vi_ctype, error_code_ctype, error_message_ctype) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=True) + return + + def error_query(self): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + error_code_ctype = _visatype.ViInt32() # case S220 + error_message_ctype = (_visatype.ViChar * 256)() # case C070 + error_code = self._library.niRFSG_ErrorQuery(vi_ctype, None if error_code_ctype is None else (ctypes.pointer(error_code_ctype)), error_message_ctype) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) + return int(error_code_ctype.value), error_message_ctype.value.decode(self._encoding) + def export_signal(self, signal, signal_identifier, output_terminal): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 signal_ctype = _visatype.ViInt32(signal.value) # case S130 @@ -565,6 +581,42 @@ def get_terminal_name(self, signal, signal_identifier): # noqa: N802 errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return terminal_name_ctype.value.decode(self._encoding) + def get_waveform_burst_start_locations(self, channel_name, number_of_locations): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + channel_name_ctype = ctypes.create_string_buffer(channel_name.encode(self._encoding)) # case C010 + number_of_locations_ctype = _visatype.ViInt32(number_of_locations) # case S210 + locations_size = number_of_locations # case B600 + locations_array = array.array("d", [0]) * locations_size # case B600 + locations_ctype = _get_ctypes_pointer_for_buffer(value=locations_array, library_type=_visatype.ViReal64) # case B600 + required_size_ctype = _visatype.ViInt32() # case S220 + error_code = self._library.niRFSG_GetWaveformBurstStartLocations(vi_ctype, channel_name_ctype, number_of_locations_ctype, locations_ctype, None if required_size_ctype is None else (ctypes.pointer(required_size_ctype))) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) + return locations_array, int(required_size_ctype.value) + + def get_waveform_burst_stop_locations(self, channel_name, number_of_locations): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + channel_name_ctype = ctypes.create_string_buffer(channel_name.encode(self._encoding)) # case C010 + number_of_locations_ctype = _visatype.ViInt32(number_of_locations) # case S210 + locations_size = number_of_locations # case B600 + locations_array = array.array("d", [0]) * locations_size # case B600 + locations_ctype = _get_ctypes_pointer_for_buffer(value=locations_array, library_type=_visatype.ViReal64) # case B600 + required_size_ctype = _visatype.ViInt32() # case S220 + error_code = self._library.niRFSG_GetWaveformBurstStopLocations(vi_ctype, channel_name_ctype, number_of_locations_ctype, locations_ctype, None if required_size_ctype is None else (ctypes.pointer(required_size_ctype))) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) + return locations_array, int(required_size_ctype.value) + + def get_waveform_marker_event_locations(self, channel_name, number_of_locations): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + channel_name_ctype = ctypes.create_string_buffer(channel_name.encode(self._encoding)) # case C010 + number_of_locations_ctype = _visatype.ViInt32(number_of_locations) # case S210 + locations_size = number_of_locations # case B600 + locations_array = array.array("d", [0]) * locations_size # case B600 + locations_ctype = _get_ctypes_pointer_for_buffer(value=locations_array, library_type=_visatype.ViReal64) # case B600 + required_size_ctype = _visatype.ViInt32() # case S220 + error_code = self._library.niRFSG_GetWaveformMarkerEventLocations(vi_ctype, channel_name_ctype, number_of_locations_ctype, locations_ctype, None if required_size_ctype is None else (ctypes.pointer(required_size_ctype))) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) + return locations_array, int(required_size_ctype.value) + def init_with_options(self, resource_name, id_query, reset_device, option_string): # noqa: N802 resource_name_ctype = ctypes.create_string_buffer(resource_name.encode(self._encoding)) # case C020 id_query_ctype = _visatype.ViBoolean(id_query) # case S150 @@ -652,12 +704,13 @@ def reset_with_defaults(self): # noqa: N802 errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return - def reset_with_options(self, steps_to_omit): # noqa: N802 + def revision_query(self): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 - steps_to_omit_ctype = _visatype.ViUInt64(steps_to_omit.value) # case S130 - error_code = self._library.niRFSG_ResetWithOptions(vi_ctype, steps_to_omit_ctype) + instrument_driver_revision_ctype = (_visatype.ViChar * 256)() # case C070 + firmware_revision_ctype = (_visatype.ViChar * 256)() # case C070 + error_code = self._library.niRFSG_RevisionQuery(vi_ctype, instrument_driver_revision_ctype, firmware_revision_ctype) errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) - return + return instrument_driver_revision_ctype.value.decode(self._encoding), firmware_revision_ctype.value.decode(self._encoding) def save_configurations_to_file(self, channel_name, file_path): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 @@ -770,6 +823,36 @@ def set_attribute_vi_string(self, channel_name, attribute, value): # noqa: N802 errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return + def set_waveform_burst_start_locations(self, channel_name, number_of_locations, locations): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + channel_name_ctype = ctypes.create_string_buffer(channel_name.encode(self._encoding)) # case C010 + number_of_locations_ctype = _visatype.ViInt32(0 if locations is None else len(locations)) # case S160 + locations_array = _convert_to_array(value=locations, array_type="d") # case B550 + locations_ctype = _get_ctypes_pointer_for_buffer(value=locations_array, library_type=_visatype.ViReal64) # case B550 + error_code = self._library.niRFSG_SetWaveformBurstStartLocations(vi_ctype, channel_name_ctype, number_of_locations_ctype, locations_ctype) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) + return + + def set_waveform_burst_stop_locations(self, channel_name, number_of_locations, locations): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + channel_name_ctype = ctypes.create_string_buffer(channel_name.encode(self._encoding)) # case C010 + number_of_locations_ctype = _visatype.ViInt32(0 if locations is None else len(locations)) # case S160 + locations_array = _convert_to_array(value=locations, array_type="d") # case B550 + locations_ctype = _get_ctypes_pointer_for_buffer(value=locations_array, library_type=_visatype.ViReal64) # case B550 + error_code = self._library.niRFSG_SetWaveformBurstStopLocations(vi_ctype, channel_name_ctype, number_of_locations_ctype, locations_ctype) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) + return + + def set_waveform_marker_event_locations(self, channel_name, number_of_locations, locations): # noqa: N802 + vi_ctype = _visatype.ViSession(self._vi) # case S110 + channel_name_ctype = ctypes.create_string_buffer(channel_name.encode(self._encoding)) # case C010 + number_of_locations_ctype = _visatype.ViInt32(0 if locations is None else len(locations)) # case S160 + locations_array = _convert_to_array(value=locations, array_type="d") # case B550 + locations_ctype = _get_ctypes_pointer_for_buffer(value=locations_array, library_type=_visatype.ViReal64) # case B550 + error_code = self._library.niRFSG_SetWaveformMarkerEventLocations(vi_ctype, channel_name_ctype, number_of_locations_ctype, locations_ctype) + errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) + return + def unlock(self): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 error_code = self._library.niRFSG_UnlockSession(vi_ctype, None) @@ -783,11 +866,12 @@ def wait_until_settled(self, max_time_milliseconds): # noqa: N802 errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return - def write_p2_p_endpoint_i16(self, stream_endpoint, number_of_samples, endpoint_data): # noqa: N802 + def write_p2p_endpoint_i16(self, stream_endpoint, number_of_samples, endpoint_data): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 stream_endpoint_ctype = ctypes.create_string_buffer(stream_endpoint.encode(self._encoding)) # case C020 number_of_samples_ctype = _visatype.ViInt32(0 if endpoint_data is None else len(endpoint_data)) # case S160 - endpoint_data_ctype = _get_ctypes_pointer_for_buffer(value=endpoint_data, library_type=_visatype.ViInt16) # case B550 + endpoint_data_array = _convert_to_array(value=endpoint_data, array_type="h") # case B550 + endpoint_data_ctype = _get_ctypes_pointer_for_buffer(value=endpoint_data_array, library_type=_visatype.ViInt16) # case B550 error_code = self._library.niRFSG_WriteP2PEndpointI16(vi_ctype, stream_endpoint_ctype, number_of_samples_ctype, endpoint_data_ctype) errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return diff --git a/generated/nirfsg/nirfsg/enums.py b/generated/nirfsg/nirfsg/enums.py index 6d6fe66b4..7d316a441 100644 --- a/generated/nirfsg/nirfsg/enums.py +++ b/generated/nirfsg/nirfsg/enums.py @@ -566,7 +566,6 @@ class RFFilter(Enum): r''' yet to be defined ''' - CONFIGURATION_SETTLED_EVENT = 7 LO_FREQ_MOD_4000 = '1' r''' yet to be defined diff --git a/generated/nirfsg/nirfsg/session.py b/generated/nirfsg/nirfsg/session.py index 645ea429b..90f5e9f72 100644 --- a/generated/nirfsg/nirfsg/session.py +++ b/generated/nirfsg/nirfsg/session.py @@ -2598,7 +2598,7 @@ class _SessionBase(object): **High-Level Methods**: - - RevisionQuery + - revision_query ''' instrument_manufacturer = _attributes.AttributeViString(1050511) '''Type: str @@ -4341,7 +4341,7 @@ class _SessionBase(object): PXIe-5840/5841: RF blanking does not occur for frequencies below 120MHz. - 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 reset_with_options or `niRFSA_ResetWithOptions `_. Select **Routes** in the **steps to omit** parameter. + 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. **Default Value:** "" (empty string) @@ -5194,7 +5194,7 @@ class _SessionBase(object): | 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 reset_with_options or `niRFSA_ResetWithOptions `_. Select **Routes** in the **steps to omit** parameter. + 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. @@ -5267,7 +5267,7 @@ class _SessionBase(object): write_waveform_burst_detection = _attributes.AttributeEnum(_attributes.AttributeViInt32, enums.WriteWaveformBurstDetection, 1150273) '''Type: enums.WriteWaveformBurstDetection - Enables the detection of burst start and burst stop locations in the waveform. You can read the detected burst start and burst stop locations using GetWaveformBurstStartLocations and GetWaveformBurstStopLocations methods respectively. + Enables the detection of burst start and burst stop locations in the waveform. You can read the detected burst start and burst stop locations using get_waveform_burst_start_locations and get_waveform_burst_stop_locations methods respectively. **Default Value:** WriteWaveformBurstDetection.DISABLE @@ -5285,7 +5285,7 @@ class _SessionBase(object): 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. - - 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 reset_with_options or `niRFSA_ResetWithOptions `_. Select **Routes** in the **steps to omit** parameter. + - 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. @@ -5565,6 +5565,25 @@ def check_attribute_vi_string(self, attribute, value): ''' self._interpreter.check_attribute_vi_string(self._repeated_capability, attribute, value) + def error_message(self, error_code, error_message): + r'''error_message + + Converts an error code returned by an NI-RFSG method into a user-readable string. + + **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 + + Args: + error_code (int): Pass the status parameter that is returned from any NI-RFSG method. + + **Default Value** : 0 (VI_SUCCESS) + + error_message (str): Returns the user-readable message string that corresponds to the status code you specify. + + You must pass a ViChar array with at least 256 bytes to this parameter. + + ''' + self._interpreter.error_message(error_code, error_message) + @ivi_synchronized def _get_attribute_vi_boolean(self, attribute): r'''_get_attribute_vi_boolean @@ -5769,6 +5788,117 @@ def _get_attribute_vi_string(self, attribute): value = self._interpreter.get_attribute_vi_string(self._repeated_capability, attribute) return value + @ivi_synchronized + def get_waveform_burst_start_locations(self, number_of_locations): + r'''get_waveform_burst_start_locations + + Returns the burst start locations of the waveform stored in the NI-RFSG session. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + Tip: + This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].get_waveform_burst_start_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.get_waveform_burst_start_locations` + + Args: + number_of_locations (int): Specifies the size of the burst start locations array. + + + Returns: + locations (array.array("d")): Returns the burst start locations stored in the NI-RFSG session for the waveform that you specified in the CHANNEL_NAME parameter. This value is expressed in samples. + + Note: + One or more of the referenced properties are not in the Python API for this driver. + + required_size (int): Returns the required size for the output array if you pass NULL to LOCATIONS parameter. + + Note: + One or more of the referenced properties are not in the Python API for this driver. + + ''' + locations, required_size = self._interpreter.get_waveform_burst_start_locations(self._repeated_capability, number_of_locations) + return locations, required_size + + @ivi_synchronized + def get_waveform_burst_stop_locations(self, number_of_locations): + r'''get_waveform_burst_stop_locations + + Returns the burst stop locations of the waveform stored in the NI-RFSG session. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + Tip: + This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].get_waveform_burst_stop_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.get_waveform_burst_stop_locations` + + Args: + number_of_locations (int): Specifies the size of the burst start locations array. + + + Returns: + locations (array.array("d")): Returns the burst start locations stored in the NI-RFSG session for the waveform that you specified in the CHANNEL_NAME parameter. This value is expressed in samples. + + Note: + One or more of the referenced properties are not in the Python API for this driver. + + required_size (int): Returns the required size for the output array if you pass NULL to LOCATIONS parameter. + + Note: + One or more of the referenced properties are not in the Python API for this driver. + + ''' + locations, required_size = self._interpreter.get_waveform_burst_stop_locations(self._repeated_capability, number_of_locations) + return locations, required_size + + @ivi_synchronized + def get_waveform_marker_event_locations(self, number_of_locations): + r'''get_waveform_marker_event_locations + + Returns the marker locations associated with the waveform and the marker stored in the NI-RFSG session. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + Tip: + This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].get_waveform_marker_event_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.get_waveform_marker_event_locations` + + Args: + number_of_locations (int): Specifies the size of the locations array. + + + Returns: + locations (array.array("d")): Returns the marker locations stored in the NI-RFSG database for the channel you specified in the CHANNEL_NAME parameter. This value is expressed in samples. + + Note: + One or more of the referenced properties are not in the Python API for this driver. + + required_size (int): Returns the required size for the output array if you pass NULL to **Locations** parameter. + + ''' + locations, required_size = self._interpreter.get_waveform_marker_event_locations(self._repeated_capability, number_of_locations) + return locations, required_size + @ivi_synchronized def load_configurations_from_file(self, file_path): r'''load_configurations_from_file @@ -6158,6 +6288,90 @@ def _set_attribute_vi_string(self, attribute, value): ''' self._interpreter.set_attribute_vi_string(self._repeated_capability, attribute, value) + @ivi_synchronized + def set_waveform_burst_start_locations(self, number_of_locations, locations): + r'''set_waveform_burst_start_locations + + Configures the start location of the burst in samples where the burst refers to the active portion of a waveform. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + Tip: + This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].set_waveform_burst_start_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.set_waveform_burst_start_locations` + + Args: + number_of_locations (int): Specifies the size of the burst start locations array. + + locations (array.array("d")): Returns the burst start locations stored in the NI-RFSG session for the waveform that you specified in the CHANNEL_NAME parameter. This value is expressed in samples. + + Note: + One or more of the referenced properties are not in the Python API for this driver. + + ''' + self._interpreter.set_waveform_burst_start_locations(self._repeated_capability, number_of_locations, locations) + + @ivi_synchronized + def set_waveform_burst_stop_locations(self, number_of_locations, locations): + r'''set_waveform_burst_stop_locations + + Configures the stop location of the burst in samples where the burst refers to the active portion of a waveform. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + Tip: + This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].set_waveform_burst_stop_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.set_waveform_burst_stop_locations` + + Args: + number_of_locations (int): Specifies the size of the burst stop locations array. + + locations (array.array("d")): Specifies the burst stop locations, in samples, to store in the NI-RFSG session. + + ''' + self._interpreter.set_waveform_burst_stop_locations(self._repeated_capability, number_of_locations, locations) + + @ivi_synchronized + def set_waveform_marker_event_locations(self, number_of_locations, locations): + r'''set_waveform_marker_event_locations + + Configures the marker locations associated with waveform and marker in the NI-RFSG session. + + **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842 + + Tip: + This method can be called on specific channels within your :py:class:`nirfsg.Session` instance. + Use Python index notation on the repeated capabilities container channels to specify a subset, + and then call this method on the result. + + Example: :py:meth:`my_session.channels[ ... ].set_waveform_marker_event_locations` + + To call the method on all channels, you can call it directly on the :py:class:`nirfsg.Session`. + + Example: :py:meth:`my_session.set_waveform_marker_event_locations` + + Args: + number_of_locations (int): Specifies the size of the locations array. + + locations (array.array("d")): Specifies the marker location, in samples, to store in the NI-RFSG database. + + ''' + self._interpreter.set_waveform_marker_event_locations(self._repeated_capability, number_of_locations, locations) + def unlock(self): '''unlock @@ -6802,8 +7016,8 @@ def configure_output_enabled(self, output_enabled): self._interpreter.configure_output_enabled(output_enabled) @ivi_synchronized - def configure_p2_p_endpoint_fullness_start_trigger(self, p2p_endpoint_fullness_level): - r'''configure_p2_p_endpoint_fullness_start_trigger + def configure_p2p_endpoint_fullness_start_trigger(self, p2p_endpoint_fullness_level): + r'''configure_p2p_endpoint_fullness_start_trigger Configures the Start Trigger to detect peer-to-peer endpoint fullness. @@ -6824,7 +7038,7 @@ def configure_p2_p_endpoint_fullness_start_trigger(self, p2p_endpoint_fullness_l p2p_endpoint_fullness_level (int): Specifies the quantity of data in the FIFO endpoint that asserts the trigger. Units are samples per channel. The default value is -1, which allows NI-RFSG to select the appropriate fullness value. ''' - self._interpreter.configure_p2_p_endpoint_fullness_start_trigger(p2p_endpoint_fullness_level) + self._interpreter.configure_p2p_endpoint_fullness_start_trigger(p2p_endpoint_fullness_level) @ivi_synchronized def configure_power_level_type(self, power_level_type): @@ -7019,8 +7233,8 @@ def configure_software_start_trigger(self): self._interpreter.configure_software_start_trigger() @ivi_synchronized - def create_deembedding_sparameter_table_s2_p_file(self, port, table_name, s2p_file_path, sparameter_orientation): - r'''create_deembedding_sparameter_table_s2_p_file + def create_deembedding_sparameter_table_s2p_file(self, port, table_name, s2p_file_path, sparameter_orientation): + r'''create_deembedding_sparameter_table_s2p_file Creates an S-parameter de-embedding table for the port based on the specified S2P file. @@ -7054,7 +7268,7 @@ def create_deembedding_sparameter_table_s2_p_file(self, port, table_name, s2p_fi ''' if type(sparameter_orientation) is not enums.SparameterOrientation: raise TypeError('Parameter sparameter_orientation must be of type ' + str(enums.SparameterOrientation)) - self._interpreter.create_deembedding_sparameter_table_s2_p_file(port, table_name, s2p_file_path, sparameter_orientation) + self._interpreter.create_deembedding_sparameter_table_s2p_file(port, table_name, s2p_file_path, sparameter_orientation) @ivi_synchronized def delete_all_deembedding_tables(self): @@ -7128,6 +7342,25 @@ def disable_start_trigger(self): ''' self._interpreter.disable_start_trigger() + @ivi_synchronized + def error_query(self): + r'''error_query + + Reads an error code and an error message from the instrument error queue. + + **Supported Devices** : PXI-5610, PXIe-5611, PXI/PXIe-5650/5651/5652, PXIe-5653, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5840/5841/5842/5860 + + Returns: + error_code (int): Returns the error code read from the instrument error queue. + + error_message (str): Returns the error message string read from the instrument error message queue. + + You must pass a ViChar array with at least 256 bytes. + + ''' + error_code, error_message = self._interpreter.error_query() + return error_code, error_message + @ivi_synchronized def export_signal(self, signal, signal_identifier, output_terminal): r'''export_signal @@ -7742,7 +7975,7 @@ def reset(self): Generally, calling this method instead of the reset_device method is acceptable. The reset method executes faster than the reset_device method. - 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 . + 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 . **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 @@ -7788,51 +8021,25 @@ def reset_with_defaults(self): self._interpreter.reset_with_defaults() @ivi_synchronized - def reset_with_options(self, steps_to_omit): - r'''reset_with_options - - Resets all properties to default values and specifies steps to omit during the reset process, such as signal routes. - - By default, this method exhibits the same behavior as reset. You can specify steps to omit using the steps to omit parameter. For example, if you specify ResetWithOptionsStepsToOmit.ROUTES for the STEPS_TO_OMIT parameter, this method does not release signal routes during the reset process. - - When routes of signals between two devices are released, they are released regardless of which device created the route. - - 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 method instead of reset, with STEPS_TO_OMIT set to ResetWithOptionsStepsToOmit.ROUTES. + def revision_query(self): + r'''revision_query - **Supported Devices** : PXIe-5644/5645/5646, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 + Returns the revision numbers of the NI-RFSG driver and the instrument firmware. - **Related Topics** + **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 - `Triggers `_ + Returns: + instrument_driver_revision (str): Returns the value of the specific_driver_revision property in the form of a string. - `Events `_ + You must pass a ViChar array with at least 256 bytes. - Note: - One or more of the referenced properties are not in the Python API for this driver. + firmware_revision (str): Returns the value of the instrument_firmware_revision property in the form of a string. - Args: - steps_to_omit (enums.ResetWithOptionsStepsToOmit): Specifies a list of steps to skip during the reset process. The default value is ResetWithOptionsStepsToOmit.NONE, which specifies that no step is omitted during reset. **Defined Values** : - - +------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Value | Description | - +================================================+=========+============================================================================================================================================================================================================+ - | ResetWithOptionsStepsToOmit.NONE | 0 (0x0) | No step is omitted during reset. | - +------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ResetWithOptionsStepsToOmit.WAVEFORMS | 1 (0x1) | Omits clearing waveforms. | - +------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ResetWithOptionsStepsToOmit.SCRIPTS | 2 (0x2) | Omits clearing scripts. | - +------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ResetWithOptionsStepsToOmit.ROUTES | 4 (0x4) | 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. | - +------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ResetWithOptionsStepsToOmit.DEEMBEDDING_TABLES | 8 (0x8) | Omits deleting de-embedding tables. This step is valid only for the PXIe-5830/5831/5832/5840. | - +------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - - Note: ResetWithOptionsStepsToOmit.ROUTES is not supported in external calibration or alignment sessions. + You must pass a ViChar array with at least 256 bytes. ''' - if type(steps_to_omit) is not enums.ResetWithOptionsStepsToOmit: - raise TypeError('Parameter steps_to_omit must be of type ' + str(enums.ResetWithOptionsStepsToOmit)) - self._interpreter.reset_with_options(steps_to_omit) + instrument_driver_revision, firmware_revision = self._interpreter.revision_query() + return instrument_driver_revision, firmware_revision @ivi_synchronized def select_arb_waveform(self, name): @@ -8027,8 +8234,8 @@ def wait_until_settled(self, max_time_milliseconds): self._interpreter.wait_until_settled(max_time_milliseconds) @ivi_synchronized - def write_p2_p_endpoint_i16(self, stream_endpoint, number_of_samples, endpoint_data): - r'''write_p2_p_endpoint_i16 + def write_p2p_endpoint_i16(self, stream_endpoint, number_of_samples, endpoint_data): + r'''write_p2p_endpoint_i16 Writes an array of 16-bit integer data to the peer-to-peer endpoint. @@ -8051,10 +8258,10 @@ def write_p2_p_endpoint_i16(self, stream_endpoint, number_of_samples, endpoint_d number_of_samples (int): Specifies the number of samples to write into the endpoint FIFO. - endpoint_data (list of int): Specifies the array of data to write into the endpoint FIFO. The binary data is left-justified. + endpoint_data (array.array("h")): Specifies the array of data to write into the endpoint FIFO. The binary data is left-justified. ''' - self._interpreter.write_p2_p_endpoint_i16(stream_endpoint, number_of_samples, endpoint_data) + self._interpreter.write_p2p_endpoint_i16(stream_endpoint, number_of_samples, endpoint_data) @ivi_synchronized def write_script(self, script): diff --git a/generated/nirfsg/nirfsg/unit_tests/_mock_helper.py b/generated/nirfsg/nirfsg/unit_tests/_mock_helper.py index 14f91d423..7511a67de 100644 --- a/generated/nirfsg/nirfsg/unit_tests/_mock_helper.py +++ b/generated/nirfsg/nirfsg/unit_tests/_mock_helper.py @@ -99,6 +99,12 @@ def __init__(self): self._defaults['DisableScriptTrigger']['return'] = 0 self._defaults['DisableStartTrigger'] = {} self._defaults['DisableStartTrigger']['return'] = 0 + self._defaults['ErrorMessage'] = {} + self._defaults['ErrorMessage']['return'] = 0 + self._defaults['ErrorQuery'] = {} + self._defaults['ErrorQuery']['return'] = 0 + self._defaults['ErrorQuery']['errorCode'] = None + self._defaults['ErrorQuery']['errorMessage'] = None self._defaults['ExportSignal'] = {} self._defaults['ExportSignal']['return'] = 0 self._defaults['GetAllNamedWaveformNames'] = {} @@ -162,6 +168,18 @@ def __init__(self): self._defaults['GetTerminalName'] = {} self._defaults['GetTerminalName']['return'] = 0 self._defaults['GetTerminalName']['terminalName'] = None + self._defaults['GetWaveformBurstStartLocations'] = {} + self._defaults['GetWaveformBurstStartLocations']['return'] = 0 + self._defaults['GetWaveformBurstStartLocations']['locations'] = None + self._defaults['GetWaveformBurstStartLocations']['requiredSize'] = None + self._defaults['GetWaveformBurstStopLocations'] = {} + self._defaults['GetWaveformBurstStopLocations']['return'] = 0 + self._defaults['GetWaveformBurstStopLocations']['locations'] = None + self._defaults['GetWaveformBurstStopLocations']['requiredSize'] = None + self._defaults['GetWaveformMarkerEventLocations'] = {} + self._defaults['GetWaveformMarkerEventLocations']['return'] = 0 + self._defaults['GetWaveformMarkerEventLocations']['locations'] = None + self._defaults['GetWaveformMarkerEventLocations']['requiredSize'] = None self._defaults['InitWithOptions'] = {} self._defaults['InitWithOptions']['return'] = 0 self._defaults['InitWithOptions']['newVi'] = None @@ -192,8 +210,10 @@ def __init__(self): self._defaults['ResetDevice']['return'] = 0 self._defaults['ResetWithDefaults'] = {} self._defaults['ResetWithDefaults']['return'] = 0 - self._defaults['ResetWithOptions'] = {} - self._defaults['ResetWithOptions']['return'] = 0 + self._defaults['RevisionQuery'] = {} + self._defaults['RevisionQuery']['return'] = 0 + self._defaults['RevisionQuery']['instrumentDriverRevision'] = None + self._defaults['RevisionQuery']['firmwareRevision'] = None self._defaults['SaveConfigurationsToFile'] = {} self._defaults['SaveConfigurationsToFile']['return'] = 0 self._defaults['SelectArbWaveform'] = {} @@ -221,6 +241,12 @@ def __init__(self): self._defaults['SetAttributeViSession']['return'] = 0 self._defaults['SetAttributeViString'] = {} self._defaults['SetAttributeViString']['return'] = 0 + self._defaults['SetWaveformBurstStartLocations'] = {} + self._defaults['SetWaveformBurstStartLocations']['return'] = 0 + self._defaults['SetWaveformBurstStopLocations'] = {} + self._defaults['SetWaveformBurstStopLocations']['return'] = 0 + self._defaults['SetWaveformMarkerEventLocations'] = {} + self._defaults['SetWaveformMarkerEventLocations']['return'] = 0 self._defaults['UnlockSession'] = {} self._defaults['UnlockSession']['return'] = 0 self._defaults['UnlockSession']['callerHasLock'] = None @@ -454,6 +480,30 @@ def niRFSG_DisableStartTrigger(self, vi): # noqa: N802 return self._defaults['DisableStartTrigger']['return'] return self._defaults['DisableStartTrigger']['return'] + def niRFSG_ErrorMessage(self, vi, error_code, error_message): # noqa: N802 + if self._defaults['ErrorMessage']['return'] != 0: + return self._defaults['ErrorMessage']['return'] + return self._defaults['ErrorMessage']['return'] + + def niRFSG_ErrorQuery(self, vi, error_code, error_message): # noqa: N802 + if self._defaults['ErrorQuery']['return'] != 0: + return self._defaults['ErrorQuery']['return'] + # error_code + if self._defaults['ErrorQuery']['errorCode'] is None: + raise MockFunctionCallError("niRFSG_ErrorQuery", param='errorCode') + if error_code is not None: + error_code.contents.value = self._defaults['ErrorQuery']['errorCode'] + # error_message + if self._defaults['ErrorQuery']['errorMessage'] is None: + raise MockFunctionCallError("niRFSG_ErrorQuery", param='errorMessage') + test_value = self._defaults['ErrorQuery']['errorMessage'] + if type(test_value) is str: + test_value = test_value.encode('ascii') + assert len(error_message) >= len(test_value) + for i in range(len(test_value)): + error_message[i] = test_value[i] + return self._defaults['ErrorQuery']['return'] + def niRFSG_ExportSignal(self, vi, signal, signal_identifier, output_terminal): # noqa: N802 if self._defaults['ExportSignal']['return'] != 0: return self._defaults['ExportSignal']['return'] @@ -690,6 +740,69 @@ def niRFSG_GetTerminalName(self, vi, signal, signal_identifier, buffer_size, ter terminal_name.value = self._defaults['GetTerminalName']['terminalName'].encode('ascii') return self._defaults['GetTerminalName']['return'] + def niRFSG_GetWaveformBurstStartLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802 + if self._defaults['GetWaveformBurstStartLocations']['return'] != 0: + return self._defaults['GetWaveformBurstStartLocations']['return'] + # locations + if self._defaults['GetWaveformBurstStartLocations']['locations'] is None: + raise MockFunctionCallError("niRFSG_GetWaveformBurstStartLocations", param='locations') + test_value = self._defaults['GetWaveformBurstStartLocations']['locations'] + try: + locations_ref = locations.contents + except AttributeError: + locations_ref = locations + assert len(locations_ref) >= len(test_value) + for i in range(len(test_value)): + locations_ref[i] = test_value[i] + # required_size + if self._defaults['GetWaveformBurstStartLocations']['requiredSize'] is None: + raise MockFunctionCallError("niRFSG_GetWaveformBurstStartLocations", param='requiredSize') + if required_size is not None: + required_size.contents.value = self._defaults['GetWaveformBurstStartLocations']['requiredSize'] + return self._defaults['GetWaveformBurstStartLocations']['return'] + + def niRFSG_GetWaveformBurstStopLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802 + if self._defaults['GetWaveformBurstStopLocations']['return'] != 0: + return self._defaults['GetWaveformBurstStopLocations']['return'] + # locations + if self._defaults['GetWaveformBurstStopLocations']['locations'] is None: + raise MockFunctionCallError("niRFSG_GetWaveformBurstStopLocations", param='locations') + test_value = self._defaults['GetWaveformBurstStopLocations']['locations'] + try: + locations_ref = locations.contents + except AttributeError: + locations_ref = locations + assert len(locations_ref) >= len(test_value) + for i in range(len(test_value)): + locations_ref[i] = test_value[i] + # required_size + if self._defaults['GetWaveformBurstStopLocations']['requiredSize'] is None: + raise MockFunctionCallError("niRFSG_GetWaveformBurstStopLocations", param='requiredSize') + if required_size is not None: + required_size.contents.value = self._defaults['GetWaveformBurstStopLocations']['requiredSize'] + return self._defaults['GetWaveformBurstStopLocations']['return'] + + def niRFSG_GetWaveformMarkerEventLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802 + if self._defaults['GetWaveformMarkerEventLocations']['return'] != 0: + return self._defaults['GetWaveformMarkerEventLocations']['return'] + # locations + if self._defaults['GetWaveformMarkerEventLocations']['locations'] is None: + raise MockFunctionCallError("niRFSG_GetWaveformMarkerEventLocations", param='locations') + test_value = self._defaults['GetWaveformMarkerEventLocations']['locations'] + try: + locations_ref = locations.contents + except AttributeError: + locations_ref = locations + assert len(locations_ref) >= len(test_value) + for i in range(len(test_value)): + locations_ref[i] = test_value[i] + # required_size + if self._defaults['GetWaveformMarkerEventLocations']['requiredSize'] is None: + raise MockFunctionCallError("niRFSG_GetWaveformMarkerEventLocations", param='requiredSize') + if required_size is not None: + required_size.contents.value = self._defaults['GetWaveformMarkerEventLocations']['requiredSize'] + return self._defaults['GetWaveformMarkerEventLocations']['return'] + def niRFSG_InitWithOptions(self, resource_name, id_query, reset_device, option_string, new_vi): # noqa: N802 if self._defaults['InitWithOptions']['return'] != 0: return self._defaults['InitWithOptions']['return'] @@ -780,10 +893,28 @@ def niRFSG_ResetWithDefaults(self, vi): # noqa: N802 return self._defaults['ResetWithDefaults']['return'] return self._defaults['ResetWithDefaults']['return'] - def niRFSG_ResetWithOptions(self, vi, steps_to_omit): # noqa: N802 - if self._defaults['ResetWithOptions']['return'] != 0: - return self._defaults['ResetWithOptions']['return'] - return self._defaults['ResetWithOptions']['return'] + def niRFSG_RevisionQuery(self, vi, instrument_driver_revision, firmware_revision): # noqa: N802 + if self._defaults['RevisionQuery']['return'] != 0: + return self._defaults['RevisionQuery']['return'] + # instrument_driver_revision + if self._defaults['RevisionQuery']['instrumentDriverRevision'] is None: + raise MockFunctionCallError("niRFSG_RevisionQuery", param='instrumentDriverRevision') + test_value = self._defaults['RevisionQuery']['instrumentDriverRevision'] + if type(test_value) is str: + test_value = test_value.encode('ascii') + assert len(instrument_driver_revision) >= len(test_value) + for i in range(len(test_value)): + instrument_driver_revision[i] = test_value[i] + # firmware_revision + if self._defaults['RevisionQuery']['firmwareRevision'] is None: + raise MockFunctionCallError("niRFSG_RevisionQuery", param='firmwareRevision') + test_value = self._defaults['RevisionQuery']['firmwareRevision'] + if type(test_value) is str: + test_value = test_value.encode('ascii') + assert len(firmware_revision) >= len(test_value) + for i in range(len(test_value)): + firmware_revision[i] = test_value[i] + return self._defaults['RevisionQuery']['return'] def niRFSG_SaveConfigurationsToFile(self, vi, channel_name, file_path): # noqa: N802 if self._defaults['SaveConfigurationsToFile']['return'] != 0: @@ -855,6 +986,21 @@ def niRFSG_SetAttributeViString(self, vi, channel_name, attribute, value): # no return self._defaults['SetAttributeViString']['return'] return self._defaults['SetAttributeViString']['return'] + def niRFSG_SetWaveformBurstStartLocations(self, vi, channel_name, number_of_locations, locations): # noqa: N802 + if self._defaults['SetWaveformBurstStartLocations']['return'] != 0: + return self._defaults['SetWaveformBurstStartLocations']['return'] + return self._defaults['SetWaveformBurstStartLocations']['return'] + + def niRFSG_SetWaveformBurstStopLocations(self, vi, channel_name, number_of_locations, locations): # noqa: N802 + if self._defaults['SetWaveformBurstStopLocations']['return'] != 0: + return self._defaults['SetWaveformBurstStopLocations']['return'] + return self._defaults['SetWaveformBurstStopLocations']['return'] + + def niRFSG_SetWaveformMarkerEventLocations(self, vi, channel_name, number_of_locations, locations): # noqa: N802 + if self._defaults['SetWaveformMarkerEventLocations']['return'] != 0: + return self._defaults['SetWaveformMarkerEventLocations']['return'] + return self._defaults['SetWaveformMarkerEventLocations']['return'] + def niRFSG_UnlockSession(self, vi, caller_has_lock): # noqa: N802 if self._defaults['UnlockSession']['return'] != 0: return self._defaults['UnlockSession']['return'] @@ -967,6 +1113,10 @@ def set_side_effects_and_return_values(self, mock_library): mock_library.niRFSG_DisableScriptTrigger.return_value = 0 mock_library.niRFSG_DisableStartTrigger.side_effect = MockFunctionCallError("niRFSG_DisableStartTrigger") mock_library.niRFSG_DisableStartTrigger.return_value = 0 + mock_library.niRFSG_ErrorMessage.side_effect = MockFunctionCallError("niRFSG_ErrorMessage") + mock_library.niRFSG_ErrorMessage.return_value = 0 + mock_library.niRFSG_ErrorQuery.side_effect = MockFunctionCallError("niRFSG_ErrorQuery") + mock_library.niRFSG_ErrorQuery.return_value = 0 mock_library.niRFSG_ExportSignal.side_effect = MockFunctionCallError("niRFSG_ExportSignal") mock_library.niRFSG_ExportSignal.return_value = 0 mock_library.niRFSG_GetAllNamedWaveformNames.side_effect = MockFunctionCallError("niRFSG_GetAllNamedWaveformNames") @@ -1001,6 +1151,12 @@ def set_side_effects_and_return_values(self, mock_library): mock_library.niRFSG_GetStreamEndpointHandle.return_value = 0 mock_library.niRFSG_GetTerminalName.side_effect = MockFunctionCallError("niRFSG_GetTerminalName") mock_library.niRFSG_GetTerminalName.return_value = 0 + mock_library.niRFSG_GetWaveformBurstStartLocations.side_effect = MockFunctionCallError("niRFSG_GetWaveformBurstStartLocations") + mock_library.niRFSG_GetWaveformBurstStartLocations.return_value = 0 + mock_library.niRFSG_GetWaveformBurstStopLocations.side_effect = MockFunctionCallError("niRFSG_GetWaveformBurstStopLocations") + mock_library.niRFSG_GetWaveformBurstStopLocations.return_value = 0 + mock_library.niRFSG_GetWaveformMarkerEventLocations.side_effect = MockFunctionCallError("niRFSG_GetWaveformMarkerEventLocations") + mock_library.niRFSG_GetWaveformMarkerEventLocations.return_value = 0 mock_library.niRFSG_InitWithOptions.side_effect = MockFunctionCallError("niRFSG_InitWithOptions") mock_library.niRFSG_InitWithOptions.return_value = 0 mock_library.niRFSG_Initiate.side_effect = MockFunctionCallError("niRFSG_Initiate") @@ -1025,8 +1181,8 @@ def set_side_effects_and_return_values(self, mock_library): mock_library.niRFSG_ResetDevice.return_value = 0 mock_library.niRFSG_ResetWithDefaults.side_effect = MockFunctionCallError("niRFSG_ResetWithDefaults") mock_library.niRFSG_ResetWithDefaults.return_value = 0 - mock_library.niRFSG_ResetWithOptions.side_effect = MockFunctionCallError("niRFSG_ResetWithOptions") - mock_library.niRFSG_ResetWithOptions.return_value = 0 + mock_library.niRFSG_RevisionQuery.side_effect = MockFunctionCallError("niRFSG_RevisionQuery") + mock_library.niRFSG_RevisionQuery.return_value = 0 mock_library.niRFSG_SaveConfigurationsToFile.side_effect = MockFunctionCallError("niRFSG_SaveConfigurationsToFile") mock_library.niRFSG_SaveConfigurationsToFile.return_value = 0 mock_library.niRFSG_SelectArbWaveform.side_effect = MockFunctionCallError("niRFSG_SelectArbWaveform") @@ -1053,6 +1209,12 @@ def set_side_effects_and_return_values(self, mock_library): mock_library.niRFSG_SetAttributeViSession.return_value = 0 mock_library.niRFSG_SetAttributeViString.side_effect = MockFunctionCallError("niRFSG_SetAttributeViString") mock_library.niRFSG_SetAttributeViString.return_value = 0 + mock_library.niRFSG_SetWaveformBurstStartLocations.side_effect = MockFunctionCallError("niRFSG_SetWaveformBurstStartLocations") + mock_library.niRFSG_SetWaveformBurstStartLocations.return_value = 0 + mock_library.niRFSG_SetWaveformBurstStopLocations.side_effect = MockFunctionCallError("niRFSG_SetWaveformBurstStopLocations") + mock_library.niRFSG_SetWaveformBurstStopLocations.return_value = 0 + mock_library.niRFSG_SetWaveformMarkerEventLocations.side_effect = MockFunctionCallError("niRFSG_SetWaveformMarkerEventLocations") + mock_library.niRFSG_SetWaveformMarkerEventLocations.return_value = 0 mock_library.niRFSG_UnlockSession.side_effect = MockFunctionCallError("niRFSG_UnlockSession") mock_library.niRFSG_UnlockSession.return_value = 0 mock_library.niRFSG_WaitUntilSettled.side_effect = MockFunctionCallError("niRFSG_WaitUntilSettled") diff --git a/src/nirfsg/metadata/enums.py b/src/nirfsg/metadata/enums.py index 99484673f..f38c9fbbb 100644 --- a/src/nirfsg/metadata/enums.py +++ b/src/nirfsg/metadata/enums.py @@ -1176,10 +1176,6 @@ 'name': 'NIRFSG_VAL_HI_FREQ_MOD', 'value': '0' }, - { - 'name': 'NIRFSG_VAL_CONFIGURATION_SETTLED_EVENT', - 'value': 7 - }, { 'documentation': { 'description': 'yet to be defined' diff --git a/src/nirfsg/metadata/functions.py b/src/nirfsg/metadata/functions.py index 0c8ce855d..7af666fba 100644 --- a/src/nirfsg/metadata/functions.py +++ b/src/nirfsg/metadata/functions.py @@ -1930,6 +1930,112 @@ ], 'returns': 'ViStatus' }, + 'ErrorMessage': { + 'codegen_method': 'public', + 'documentation': { + 'description': ' \n\n Converts an error code returned by an NI-RFSG function into a user-readable string.\n\n **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\n ' + }, + 'included_in_proto': True, + 'is_error_handling': 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': ' The ViSession handle that you obtain from nirfsg_Init or nirfsg_InitWithOptions. The handle identifies a particular instrument session.\n\n You can pass VI_NULL for this parameter. Passing VI_NULL is useful when nirfsg_Init or nirfsg_InitWithOptions fails.\n\n **Default Value** : VI_NULL\n\n ' + }, + 'name': 'vi', + 'type': 'ViSession', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': ' Pass the status parameter that is returned from any NI-RFSG function.\n\n **Default Value** : 0 (VI_SUCCESS)\n\n ' + }, + 'name': 'errorCode', + 'type': 'ViStatus', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': ' Returns the user-readable message string that corresponds to the status code you specify.\n\n You must pass a ViChar array with at least 256 bytes to this parameter.\n\n ' + }, + 'name': 'errorMessage', + 'size': { + 'mechanism': 'fixed', + 'value': 256 + }, + 'type': 'ViChar[]', + 'use_array': False, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus', + 'use_session_lock': False + }, + 'ErrorQuery': { + 'codegen_method': 'public', + 'documentation': { + 'description': ' \n\n Reads an error code and an error message from the instrument error queue.\n\n **Supported Devices** : PXI-5610, PXIe-5611, PXI/PXIe-5650/5651/5652, PXIe-5653, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5840/5841/5842/5860\n ' + }, + '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': 'out', + 'documentation': { + 'description': 'Returns the error code read from the instrument error queue.' + }, + 'name': 'errorCode', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': ' Returns the error message string read from the instrument error message queue.\n\n You must pass a ViChar array with at least 256 bytes.\n ' + }, + 'name': 'errorMessage', + 'size': { + 'mechanism': 'fixed', + 'value': 256 + }, + 'type': 'ViChar[]', + 'use_array': False, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus' + }, 'ExportSignal': { 'codegen_method': 'public', 'documentation': { @@ -3258,6 +3364,222 @@ ], 'returns': 'ViStatus' }, + 'GetWaveformBurstStartLocations': { + 'codegen_method': 'public', + 'documentation': { + 'description': ' \n Returns the burst start locations of the waveform stored in the NI-RFSG session.\n\n **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842\n ' + }, + '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 waveform name and the marker name. Example: "waveform::waveform0/marker0"' + }, + 'name': 'channelName', + 'type': 'ViConstString', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the size of the burst start locations array.' + }, + 'name': 'numberOfLocations', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'Returns the burst start locations stored in the NI-RFSG session for the waveform that you specified in the NIRFSG_ATTR_CHANNEL_NAME parameter. This value is expressed in samples.' + }, + 'name': 'locations', + 'size': { + 'mechanism': 'passed-in', + 'value': 'numberOfLocations' + }, + 'type': 'ViReal64[]', + 'use_array': True, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'Returns the required size for the output array if you pass NULL to NIRFSG_ATTR_LOCATIONS parameter.' + }, + 'name': 'requiredSize', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus' + }, + 'GetWaveformBurstStopLocations': { + 'codegen_method': 'public', + 'documentation': { + 'description': ' \n\n Returns the burst stop locations of the waveform stored in the NI-RFSG session.\n\n **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842\n ' + }, + '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 waveform name and the marker name. Example: "waveform::waveform0/marker0"' + }, + 'name': 'channelName', + 'type': 'ViConstString', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the size of the burst start locations array.' + }, + 'name': 'numberOfLocations', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'Returns the burst start locations stored in the NI-RFSG session for the waveform that you specified in the NIRFSG_ATTR_CHANNEL_NAME parameter. This value is expressed in samples.' + }, + 'name': 'locations', + 'size': { + 'mechanism': 'passed-in', + 'value': 'numberOfLocations' + }, + 'type': 'ViReal64[]', + 'use_array': True, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'Returns the required size for the output array if you pass NULL to NIRFSG_ATTR_LOCATIONS parameter.' + }, + 'name': 'requiredSize', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus' + }, + 'GetWaveformMarkerEventLocations': { + 'codegen_method': 'public', + 'documentation': { + 'description': ' \n Returns the marker locations associated with the waveform and the marker stored in the NI-RFSG session.\n\n **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842\n ' + }, + '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 waveform name and the marker name.\n\n Example:\n\n "waveform::waveform0/marker0"\n ' + }, + 'name': 'channelName', + 'type': 'ViConstString', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the size of the locations array.' + }, + 'name': 'numberOfLocations', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'Returns the marker locations stored in the NI-RFSG database for the channel you specified in the NIRFSG_ATTR_CHANNEL_NAME parameter. This value is expressed in samples.' + }, + 'name': 'locations', + 'size': { + 'mechanism': 'passed-in', + 'value': 'numberOfLocations' + }, + 'type': 'ViReal64[]', + 'use_array': True, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': 'Returns the required size for the output array if you pass NULL to **Locations** parameter.' + }, + 'name': 'requiredSize', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus' + }, 'InitWithOptions': { 'codegen_method': 'private', 'documentation': { @@ -3812,10 +4134,10 @@ ], 'returns': 'ViStatus' }, - 'ResetWithOptions': { + 'RevisionQuery': { 'codegen_method': 'public', 'documentation': { - '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 `_\n\n `Events `_\n ' + 'description': ' \n\n Returns the revision numbers of the NI-RFSG driver and the instrument firmware.\n\n **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\n ' }, 'included_in_proto': True, 'method_templates': [ @@ -3838,46 +4160,30 @@ 'use_in_python_api': True }, { - 'direction': 'in', + 'direction': 'out', 'documentation': { - '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** :', - 'note': 'NIRFSG_VAL_RESET_WITH_OPTIONS_ROUTES is not supported in external calibration or alignment sessions.', - 'table_body': [ - [ - 'NIRFSG_VAL_RESET_WITH_OPTIONS_NONE', - '0 (0x0)', - 'No step is omitted during reset.' - ], - [ - 'NIRFSG_VAL_RESET_WITH_OPTIONS_WAVEFORMS', - '1 (0x1)', - 'Omits clearing waveforms.' - ], - [ - 'NIRFSG_VAL_RESET_WITH_OPTIONS_SCRIPTS', - '2 (0x2)', - 'Omits clearing scripts.' - ], - [ - 'NIRFSG_VAL_RESET_WITH_OPTIONS_ROUTES', - '4 (0x4)', - '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.' - ], - [ - 'NIRFSG_VAL_RESET_WITH_OPTIONS_DEEMBEDDING_TABLES', - '8 (0x8)', - 'Omits deleting de-embedding tables. This step is valid only for the PXIe-5830/5831/5832/5840.' - ] - ], - 'table_header': [ - 'Name', - 'Value', - 'Description' - ] + 'description': ' Returns the value of the NIRFSG_ATTR_SPECIFIC_DRIVER_REVISION attribute in the form of a string.\n\n You must pass a ViChar array with at least 256 bytes.\n\n ' }, - 'enum': 'ResetWithOptionsStepsToOmit', - 'name': 'stepsToOmit', - 'type': 'ViUInt64', + 'name': 'instrumentDriverRevision', + 'size': { + 'mechanism': 'fixed', + 'value': 256 + }, + 'type': 'ViChar[]', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'out', + 'documentation': { + 'description': ' Returns the value of the NIRFSG_ATTR_INSTRUMENT_FIRMWARE_REVISION attribute in the form of a string.\n\n You must pass a ViChar array with at least 256 bytes.\n\n ' + }, + 'name': 'firmwareRevision', + 'size': { + 'mechanism': 'fixed', + 'value': 256 + }, + 'type': 'ViChar[]', 'use_array': False, 'use_in_python_api': True } @@ -4695,6 +5001,192 @@ ], 'returns': 'ViStatus' }, + 'SetWaveformBurstStartLocations': { + 'codegen_method': 'public', + 'documentation': { + 'description': ' \n Configures the start location of the burst in samples where the burst refers to the active portion of a waveform.\n\n **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842\n ' + }, + '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 waveform name and the marker name. Example: "waveform::waveform0/marker0"' + }, + 'name': 'channelName', + 'type': 'ViConstString', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the size of the burst start locations array.' + }, + 'name': 'numberOfLocations', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': False + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Returns the burst start locations stored in the NI-RFSG session for the waveform that you specified in the NIRFSG_ATTR_CHANNEL_NAME parameter. This value is expressed in samples.' + }, + 'name': 'locations', + 'size': { + 'mechanism': 'passed-in', + 'value': 'numberOfLocations' + }, + 'type': 'ViReal64[]', + 'use_array': True, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus' + }, + 'SetWaveformBurstStopLocations': { + 'codegen_method': 'public', + 'documentation': { + 'description': ' \n\n Configures the stop location of the burst in samples where the burst refers to the active portion of a waveform.\n\n **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842\n ' + }, + '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 waveform name and the marker name.\n\n Example:\n\n "waveform::waveform0/marker0"\n ' + }, + 'name': 'channelName', + 'type': 'ViConstString', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the size of the burst stop locations array.' + }, + 'name': 'numberOfLocations', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': False + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the burst stop locations, in samples, to store in the NI-RFSG session.' + }, + 'name': 'locations', + 'size': { + 'mechanism': 'passed-in', + 'value': 'numberOfLocations' + }, + 'type': 'ViReal64[]', + 'use_array': True, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus' + }, + 'SetWaveformMarkerEventLocations': { + 'codegen_method': 'public', + 'documentation': { + 'description': ' \n\n Configures the marker locations associated with waveform and marker in the NI-RFSG session.\n\n **Supported Devices** : PXIe-5820/5830/5831/5832/5840/5841/5842\n ' + }, + '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 waveform name and the marker name.\n\n Example:\n\n "waveform::waveform0/marker0"\n ' + }, + 'name': 'channelName', + 'type': 'ViConstString', + 'use_array': False, + 'use_in_python_api': True + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the size of the locations array.' + }, + 'name': 'numberOfLocations', + 'type': 'ViInt32', + 'use_array': False, + 'use_in_python_api': False + }, + { + 'direction': 'in', + 'documentation': { + 'description': 'Specifies the marker location, in samples, to store in the NI-RFSG database.' + }, + 'name': 'locations', + 'size': { + 'mechanism': 'passed-in', + 'value': 'numberOfLocations' + }, + 'type': 'ViReal64[]', + 'use_array': True, + 'use_in_python_api': True + } + ], + 'returns': 'ViStatus' + }, 'UnlockSession': { 'codegen_method': 'public', 'documentation': { @@ -4825,12 +5317,13 @@ 'description': 'Specifies the array of data to write into the endpoint FIFO. The binary data is left-justified.' }, 'name': 'endpointData', + 'numpy': True, 'size': { 'mechanism': 'passed-in', 'value': 'numberOfSamples' }, 'type': 'ViInt16[]', - 'use_array': False, + 'use_array': True, 'use_in_python_api': True } ],