from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SourceCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("source", core, parent)
[docs]
def set(self, source: enums.ReferenceSourceD) -> None:
"""
``TRIGger[:SEQuence]:SOURce`` \n
Snippet: ``driver.applications.k30NoiseFigure.trigger.sequence.source.set(source = enums.ReferenceSourceD.EXT2)`` \n
Selects the trigger source. For triggering with AF, AM, AMRelative, FM, and PM trigger sources to be successful, the
measurement time must cover at least 5 periods of the audio signal. For details on trigger sources, see 'Trigger Source'.
Note on external triggers: If a measurement is configured to wait for an external trigger signal in a remote control
program, remote control is blocked until the trigger is received and the program can continue. Make sure that this
situation is avoided in your remote control programs.
:param source: IMMediate Free Run EXTernal Trigger signal from the 'Trigger Input' connector. EXT2 Trigger signal from the 'Trigger Input/Output' connector. For FSW85 models, Trigger 2 is not available due to the second RF input connector on the front panel. The trigger signal is taken from the 'Trigger Input/Output' connector on the rear panel. Note: Connector must be configured for 'Input'. EXT3 Trigger signal from the 'TRIGGER 3 INPUT/ OUTPUT' connector. Note: Connector must be configured for 'Input'. RFPower First intermediate frequency (Frequency and time domain measurements only.) Not available for input from the optional 'Analog Baseband' interface. Not available for input from the optional 'Digital Baseband' interface. IFPower Second intermediate frequency Not available for input from the optional 'Digital Baseband' interface. For input from the optional 'Analog Baseband' interface, this parameter is interpreted as BBPower for compatibility reasons. IQPower Magnitude of sampled I/Q data For applications that process I/Q data, such as the I/Q Analyzer or optional applications. Not available for input from the optional 'Digital Baseband' interface. TIME Time interval BBPower Baseband power For input from the optional 'Analog Baseband' interface. For input from the optional 'Digital Baseband' interface. PSEN External power sensor AF AF power signal FM FM power signal AM corresponds to the RF power signal AMRelative corresponds to the AM signal PM PM power signal GP0 | GP1 | GP2 | GP3 | GP4 | GP5 For applications that process I/Q data, such as the I/Q Analyzer or optional applications, and only if the optional 'Digital Baseband' interface is available. Defines triggering of the measurement directly via the LVDS connector. The parameter specifies which general-purpose bit (0 to 5) provides the trigger data. The assignment of the general-purpose bits used by the Digital IQ trigger to the LVDS connector pins is provided in 'Digital I/Q'.
"""
param = Conversions.enum_scalar_to_str(source, enums.ReferenceSourceD)
self._core.io.write(f'TRIGger:SEQuence:SOURce {param}')
# noinspection PyTypeChecker
[docs]
def get(self) -> enums.ReferenceSourceD:
"""
``TRIGger[:SEQuence]:SOURce`` \n
Snippet: ``value: enums.ReferenceSourceD = driver.applications.k30NoiseFigure.trigger.sequence.source.get()`` \n
Selects the trigger source. For triggering with AF, AM, AMRelative, FM, and PM trigger sources to be successful, the
measurement time must cover at least 5 periods of the audio signal. For details on trigger sources, see 'Trigger Source'.
Note on external triggers: If a measurement is configured to wait for an external trigger signal in a remote control
program, remote control is blocked until the trigger is received and the program can continue. Make sure that this
situation is avoided in your remote control programs.
:return: source: IMMediate Free Run EXTernal Trigger signal from the 'Trigger Input' connector. EXT2 Trigger signal from the 'Trigger Input/Output' connector. For FSW85 models, Trigger 2 is not available due to the second RF input connector on the front panel. The trigger signal is taken from the 'Trigger Input/Output' connector on the rear panel. Note: Connector must be configured for 'Input'. EXT3 Trigger signal from the 'TRIGGER 3 INPUT/ OUTPUT' connector. Note: Connector must be configured for 'Input'. RFPower First intermediate frequency (Frequency and time domain measurements only.) Not available for input from the optional 'Analog Baseband' interface. Not available for input from the optional 'Digital Baseband' interface. IFPower Second intermediate frequency Not available for input from the optional 'Digital Baseband' interface. For input from the optional 'Analog Baseband' interface, this parameter is interpreted as BBPower for compatibility reasons. IQPower Magnitude of sampled I/Q data For applications that process I/Q data, such as the I/Q Analyzer or optional applications. Not available for input from the optional 'Digital Baseband' interface. TIME Time interval BBPower Baseband power For input from the optional 'Analog Baseband' interface. For input from the optional 'Digital Baseband' interface. PSEN External power sensor AF AF power signal FM FM power signal AM corresponds to the RF power signal AMRelative corresponds to the AM signal PM PM power signal GP0 | GP1 | GP2 | GP3 | GP4 | GP5 For applications that process I/Q data, such as the I/Q Analyzer or optional applications, and only if the optional 'Digital Baseband' interface is available. Defines triggering of the measurement directly via the LVDS connector. The parameter specifies which general-purpose bit (0 to 5) provides the trigger data. The assignment of the general-purpose bits used by the Digital IQ trigger to the LVDS connector pins is provided in 'Digital I/Q'.
"""
response = self._core.io.query_str(f'TRIGger:SEQuence:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.ReferenceSourceD)