Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,917 changes: 709 additions & 1,208 deletions docs/nirfsg/class.rst

Large diffs are not rendered by default.

463 changes: 113 additions & 350 deletions docs/nirfsg/enums.rst

Large diffs are not rendered by default.

44 changes: 35 additions & 9 deletions docs/nirfsg/rep_caps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ script_triggers
passes a string of :python:`'scripttrigger0, scripttrigger1, scripttrigger2'` to the set attribute function.


waveform
--------
waveforms
---------

.. py:attribute:: nirfsg.Session.waveform[]
.. py:attribute:: nirfsg.Session.waveforms[]

If no prefix is added to the items in the parameter, the correct prefix will be added when
the driver function call is made.

.. code:: python

session.waveform['0-2'].channel_enabled = True
session.waveforms['0-2'].channel_enabled = True

passes a string of :python:`'waveform::0, waveform::1, waveform::2'` to the set attribute function.

Expand All @@ -96,21 +96,47 @@ waveform

.. code:: python

session.waveform['waveform::0-waveform::2'].channel_enabled = True
session.waveforms['waveform::0-waveform::2'].channel_enabled = True

passes a string of :python:`'waveform::0, waveform::1, waveform::2'` to the set attribute function.


deembedding_port
----------------
ports
-----

.. py:attribute:: nirfsg.Session.deembedding_port[]
.. py:attribute:: nirfsg.Session.ports[]

.. code:: python

session.deembedding_port['0-2'].channel_enabled = True
session.ports['0-2'].channel_enabled = True

passes a string of :python:`'0, 1, 2'` to the set attribute function.


lo_channels
-----------

.. py:attribute:: nirfsg.Session.lo_channels[]

If no prefix is added to the items in the parameter, the correct prefix will be added when
the driver function call is made.

.. code:: python

session.lo_channels['0-2'].channel_enabled = True

passes a string of :python:`'LO0, LO1, LO2'` to the set attribute function.

If an invalid repeated capability is passed to the driver, the driver will return an error.

You can also explicitly use the prefix as part of the parameter, but it must be the correct prefix
for the specific repeated capability.

.. code:: python

session.lo_channels['LO0-LO2'].channel_enabled = True

passes a string of :python:`'LO0, LO1, LO2'` to the set attribute function.



72 changes: 9 additions & 63 deletions generated/nirfsg/nirfsg/_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,9 @@ def __init__(self, ctypes_library):
self.niRFSG_ConfigureDigitalEdgeStartTrigger_cfunc = None
self.niRFSG_ConfigureDigitalLevelScriptTrigger_cfunc = None
self.niRFSG_ConfigureDigitalModulationUserDefinedWaveform_cfunc = None
self.niRFSG_ConfigureGenerationMode_cfunc = None
self.niRFSG_ConfigureOutputEnabled_cfunc = None
self.niRFSG_ConfigureP2PEndpointFullnessStartTrigger_cfunc = None
self.niRFSG_ConfigurePowerLevelType_cfunc = None
self.niRFSG_ConfigurePxiChassisClk10_cfunc = None
self.niRFSG_ConfigureRF_cfunc = None
self.niRFSG_ConfigureRefClock_cfunc = None
self.niRFSG_ConfigureSignalBandwidth_cfunc = None
self.niRFSG_ConfigureSoftwareScriptTrigger_cfunc = None
self.niRFSG_ConfigureSoftwareStartTrigger_cfunc = None
self.niRFSG_CreateDeembeddingSparameterTableS2PFile_cfunc = None
Expand All @@ -77,7 +72,6 @@ def __init__(self, ctypes_library):
self.niRFSG_GetMaxSettablePower_cfunc = None
self.niRFSG_GetSelfCalibrationDateAndTime_cfunc = None
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
Expand All @@ -93,6 +87,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
Expand All @@ -115,7 +110,6 @@ def __init__(self, ctypes_library):
self.niRFSG_WriteArbWaveformComplexF32_cfunc = None
self.niRFSG_WriteArbWaveformComplexF64_cfunc = None
self.niRFSG_WriteArbWaveformComplexI16_cfunc = None
self.niRFSG_WriteP2PEndpointI16_cfunc = None
self.niRFSG_WriteScript_cfunc = None
self.niRFSG_close_cfunc = None
self.niRFSG_reset_cfunc = None
Expand Down Expand Up @@ -319,38 +313,6 @@ def niRFSG_ConfigureDigitalModulationUserDefinedWaveform(self, vi, number_of_sam
self.niRFSG_ConfigureDigitalModulationUserDefinedWaveform_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_ConfigureDigitalModulationUserDefinedWaveform_cfunc(vi, number_of_samples, user_defined_waveform)

def niRFSG_ConfigureGenerationMode(self, vi, generation_mode): # noqa: N802
with self._func_lock:
if self.niRFSG_ConfigureGenerationMode_cfunc is None:
self.niRFSG_ConfigureGenerationMode_cfunc = self._get_library_function('niRFSG_ConfigureGenerationMode')
self.niRFSG_ConfigureGenerationMode_cfunc.argtypes = [ViSession, ViInt32] # noqa: F405
self.niRFSG_ConfigureGenerationMode_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_ConfigureGenerationMode_cfunc(vi, generation_mode)

def niRFSG_ConfigureOutputEnabled(self, vi, output_enabled): # noqa: N802
with self._func_lock:
if self.niRFSG_ConfigureOutputEnabled_cfunc is None:
self.niRFSG_ConfigureOutputEnabled_cfunc = self._get_library_function('niRFSG_ConfigureOutputEnabled')
self.niRFSG_ConfigureOutputEnabled_cfunc.argtypes = [ViSession, ViBoolean] # noqa: F405
self.niRFSG_ConfigureOutputEnabled_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_ConfigureOutputEnabled_cfunc(vi, output_enabled)

def niRFSG_ConfigureP2PEndpointFullnessStartTrigger(self, vi, p2p_endpoint_fullness_level): # noqa: N802
with self._func_lock:
if self.niRFSG_ConfigureP2PEndpointFullnessStartTrigger_cfunc is None:
self.niRFSG_ConfigureP2PEndpointFullnessStartTrigger_cfunc = self._get_library_function('niRFSG_ConfigureP2PEndpointFullnessStartTrigger')
self.niRFSG_ConfigureP2PEndpointFullnessStartTrigger_cfunc.argtypes = [ViSession, ViInt64] # noqa: F405
self.niRFSG_ConfigureP2PEndpointFullnessStartTrigger_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_ConfigureP2PEndpointFullnessStartTrigger_cfunc(vi, p2p_endpoint_fullness_level)

def niRFSG_ConfigurePowerLevelType(self, vi, power_level_type): # noqa: N802
with self._func_lock:
if self.niRFSG_ConfigurePowerLevelType_cfunc is None:
self.niRFSG_ConfigurePowerLevelType_cfunc = self._get_library_function('niRFSG_ConfigurePowerLevelType')
self.niRFSG_ConfigurePowerLevelType_cfunc.argtypes = [ViSession, ViInt32] # noqa: F405
self.niRFSG_ConfigurePowerLevelType_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_ConfigurePowerLevelType_cfunc(vi, power_level_type)

def niRFSG_ConfigurePxiChassisClk10(self, vi, pxi_clk10_source): # noqa: N802
with self._func_lock:
if self.niRFSG_ConfigurePxiChassisClk10_cfunc is None:
Expand All @@ -375,14 +337,6 @@ def niRFSG_ConfigureRefClock(self, vi, ref_clock_source, ref_clock_rate): # noq
self.niRFSG_ConfigureRefClock_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_ConfigureRefClock_cfunc(vi, ref_clock_source, ref_clock_rate)

def niRFSG_ConfigureSignalBandwidth(self, vi, signal_bandwidth): # noqa: N802
with self._func_lock:
if self.niRFSG_ConfigureSignalBandwidth_cfunc is None:
self.niRFSG_ConfigureSignalBandwidth_cfunc = self._get_library_function('niRFSG_ConfigureSignalBandwidth')
self.niRFSG_ConfigureSignalBandwidth_cfunc.argtypes = [ViSession, ViReal64] # noqa: F405
self.niRFSG_ConfigureSignalBandwidth_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_ConfigureSignalBandwidth_cfunc(vi, signal_bandwidth)

def niRFSG_ConfigureSoftwareScriptTrigger(self, vi, trigger_id): # noqa: N802
with self._func_lock:
if self.niRFSG_ConfigureSoftwareScriptTrigger_cfunc is None:
Expand Down Expand Up @@ -583,14 +537,6 @@ def niRFSG_GetSelfCalibrationTemperature(self, vi, module, temperature): # noqa
self.niRFSG_GetSelfCalibrationTemperature_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_GetSelfCalibrationTemperature_cfunc(vi, module, temperature)

def niRFSG_GetStreamEndpointHandle(self, vi, stream_endpoint, reader_handle): # noqa: N802
with self._func_lock:
if self.niRFSG_GetStreamEndpointHandle_cfunc is None:
self.niRFSG_GetStreamEndpointHandle_cfunc = self._get_library_function('niRFSG_GetStreamEndpointHandle')
self.niRFSG_GetStreamEndpointHandle_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ctypes.POINTER(ViUInt32)] # noqa: F405
self.niRFSG_GetStreamEndpointHandle_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_GetStreamEndpointHandle_cfunc(vi, stream_endpoint, reader_handle)

def niRFSG_GetTerminalName(self, vi, signal, signal_identifier, buffer_size, terminal_name): # noqa: N802
with self._func_lock:
if self.niRFSG_GetTerminalName_cfunc is None:
Expand Down Expand Up @@ -711,6 +657,14 @@ 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
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)

def niRFSG_RevisionQuery(self, vi, instrument_driver_revision, firmware_revision): # noqa: N802
with self._func_lock:
if self.niRFSG_RevisionQuery_cfunc is None:
Expand Down Expand Up @@ -887,14 +841,6 @@ def niRFSG_WriteArbWaveformComplexI16(self, vi, waveform_name, number_of_samples
self.niRFSG_WriteArbWaveformComplexI16_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_WriteArbWaveformComplexI16_cfunc(vi, waveform_name, number_of_samples, waveform_data_array)

def niRFSG_WriteP2PEndpointI16(self, vi, stream_endpoint, number_of_samples, endpoint_data): # noqa: N802
with self._func_lock:
if self.niRFSG_WriteP2PEndpointI16_cfunc is None:
self.niRFSG_WriteP2PEndpointI16_cfunc = self._get_library_function('niRFSG_WriteP2PEndpointI16')
self.niRFSG_WriteP2PEndpointI16_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViInt16)] # noqa: F405
self.niRFSG_WriteP2PEndpointI16_cfunc.restype = ViStatus # noqa: F405
return self.niRFSG_WriteP2PEndpointI16_cfunc(vi, stream_endpoint, number_of_samples, endpoint_data)

def niRFSG_WriteScript(self, vi, script): # noqa: N802
with self._func_lock:
if self.niRFSG_WriteScript_cfunc is None:
Expand Down
66 changes: 10 additions & 56 deletions generated/nirfsg/nirfsg/_library_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def configure_deembedding_table_interpolation_spline(self, port, table_name): #

def configure_digital_edge_script_trigger(self, trigger_id, source, edge): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
trigger_id_ctype = ctypes.create_string_buffer(trigger_id.encode(self._encoding)) # case C020
trigger_id_ctype = ctypes.create_string_buffer(trigger_id.encode(self._encoding)) # case C010
source_ctype = ctypes.create_string_buffer(source.encode(self._encoding)) # case C020
edge_ctype = _visatype.ViInt32(edge.value) # case S130
error_code = self._library.niRFSG_ConfigureDigitalEdgeScriptTrigger(vi_ctype, trigger_id_ctype, source_ctype, edge_ctype)
Expand Down Expand Up @@ -275,34 +275,6 @@ def configure_digital_modulation_user_defined_waveform(self, number_of_samples,
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

def configure_generation_mode(self, generation_mode): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
generation_mode_ctype = _visatype.ViInt32(generation_mode.value) # case S130
error_code = self._library.niRFSG_ConfigureGenerationMode(vi_ctype, generation_mode_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

def configure_output_enabled(self, output_enabled): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
output_enabled_ctype = _visatype.ViBoolean(output_enabled) # case S150
error_code = self._library.niRFSG_ConfigureOutputEnabled(vi_ctype, output_enabled_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

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)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

def configure_power_level_type(self, power_level_type): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
power_level_type_ctype = _visatype.ViInt32(power_level_type.value) # case S130
error_code = self._library.niRFSG_ConfigurePowerLevelType(vi_ctype, power_level_type_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

def configure_pxi_chassis_clk10(self, pxi_clk10_source): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
pxi_clk10_source_ctype = ctypes.create_string_buffer(pxi_clk10_source.encode(self._encoding)) # case C020
Expand All @@ -326,16 +298,9 @@ def configure_ref_clock(self, ref_clock_source, ref_clock_rate): # noqa: N802
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

def configure_signal_bandwidth(self, signal_bandwidth): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
signal_bandwidth_ctype = _visatype.ViReal64(signal_bandwidth) # case S150
error_code = self._library.niRFSG_ConfigureSignalBandwidth(vi_ctype, signal_bandwidth_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

def configure_software_script_trigger(self, trigger_id): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
trigger_id_ctype = ctypes.create_string_buffer(trigger_id.encode(self._encoding)) # case C020
trigger_id_ctype = ctypes.create_string_buffer(trigger_id.encode(self._encoding)) # case C010
error_code = self._library.niRFSG_ConfigureSoftwareScriptTrigger(vi_ctype, trigger_id_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return
Expand Down Expand Up @@ -378,7 +343,7 @@ def disable(self): # noqa: N802

def disable_script_trigger(self, trigger_id): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
trigger_id_ctype = ctypes.create_string_buffer(trigger_id.encode(self._encoding)) # case C020
trigger_id_ctype = ctypes.create_string_buffer(trigger_id.encode(self._encoding)) # case C010
error_code = self._library.niRFSG_DisableScriptTrigger(vi_ctype, trigger_id_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return
Expand Down Expand Up @@ -565,14 +530,6 @@ def get_self_calibration_temperature(self, module): # noqa: N802
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return float(temperature_ctype.value)

def get_stream_endpoint_handle(self, stream_endpoint): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
stream_endpoint_ctype = ctypes.create_string_buffer(stream_endpoint.encode(self._encoding)) # case C020
reader_handle_ctype = _visatype.ViUInt32() # case S220
error_code = self._library.niRFSG_GetStreamEndpointHandle(vi_ctype, stream_endpoint_ctype, None if reader_handle_ctype is None else (ctypes.pointer(reader_handle_ctype)))
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return int(reader_handle_ctype.value)

def get_terminal_name(self, signal, signal_identifier): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
signal_ctype = _visatype.ViInt32(signal.value) # case S130
Expand Down Expand Up @@ -713,6 +670,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
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)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

def revision_query(self): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
instrument_driver_revision_ctype = (_visatype.ViChar * 256)() # case C070
Expand Down Expand Up @@ -901,16 +865,6 @@ def write_arb_waveform_complex_i16(self, waveform_name, waveform_data_array): #
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

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_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

def write_script(self, script): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
script_ctype = ctypes.create_string_buffer(script.encode(self._encoding)) # case C020
Expand Down
Loading