Source code for RsCma.Implementations.Trigger.AfRf.Measurement.MultiEval.Oscilloscope.AudioInput
from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from ....... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class AudioInputCls:
"""AudioInput commands group definition. 8 total commands, 0 Subgroups, 8 group commands"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("audioInput", core, parent)
# noinspection PyTypeChecker
[docs] def get_source(self) -> enums.TriggerSourceAf:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:SOURce \n
Snippet: value: enums.TriggerSourceAf = driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.get_source() \n
Selects a trigger event source for the AF input path. \n
:return: trigger_source: AF1 | AF2 Connector AF1 IN or AF2 IN
"""
response = self._core.io.query_str('TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.TriggerSourceAf)
[docs] def set_source(self, trigger_source: enums.TriggerSourceAf) -> None:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:SOURce \n
Snippet: driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.set_source(trigger_source = enums.TriggerSourceAf.AF1) \n
Selects a trigger event source for the AF input path. \n
:param trigger_source: AF1 | AF2 Connector AF1 IN or AF2 IN
"""
param = Conversions.enum_scalar_to_str(trigger_source, enums.TriggerSourceAf)
self._core.io.write(f'TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:SOURce {param}')
# noinspection PyTypeChecker
[docs] def get_coupling(self) -> enums.TriggerCouplingAin:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:COUPling \n
Snippet: value: enums.TriggerCouplingAin = driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.get_coupling() \n
Couples the trigger settings for the AF input path to the trigger settings for another path. \n
:return: trigger_coupling: NONE | DEMod | SIN | VOIP No coupling, coupling to RF path, to SPDIF path, to VoIP path
"""
response = self._core.io.query_str('TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:COUPling?')
return Conversions.str_to_scalar_enum(response, enums.TriggerCouplingAin)
[docs] def set_coupling(self, trigger_coupling: enums.TriggerCouplingAin) -> None:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:COUPling \n
Snippet: driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.set_coupling(trigger_coupling = enums.TriggerCouplingAin.DEMod) \n
Couples the trigger settings for the AF input path to the trigger settings for another path. \n
:param trigger_coupling: NONE | DEMod | SIN | VOIP No coupling, coupling to RF path, to SPDIF path, to VoIP path
"""
param = Conversions.enum_scalar_to_str(trigger_coupling, enums.TriggerCouplingAin)
self._core.io.write(f'TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:COUPling {param}')
# noinspection PyTypeChecker
[docs] def get_state(self) -> enums.ArmedState:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:STATe \n
Snippet: value: enums.ArmedState = driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.get_state() \n
Queries the state of the trigger system. \n
:return: armed_state: OFF | ARMed | TRIGgered OFF The trigger system is disabled. The oscilloscope works as free-run measurement. ARMed The trigger system is armed and waits for a trigger event. TRIGgered A trigger event has occurred. The trigger system has not (yet) been rearmed.
"""
response = self._core.io.query_str('TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:STATe?')
return Conversions.str_to_scalar_enum(response, enums.ArmedState)
[docs] def get_enable(self) -> bool:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:ENABle \n
Snippet: value: bool = driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.get_enable() \n
No command help available \n
:return: enable: No help available
"""
response = self._core.io.query_str('TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:ENABle?')
return Conversions.str_to_bool(response)
[docs] def set_enable(self, enable: bool) -> None:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:ENABle \n
Snippet: driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.set_enable(enable = False) \n
No command help available \n
:param enable: No help available
"""
param = Conversions.bool_to_str(enable)
self._core.io.write(f'TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:ENABle {param}')
[docs] def get_offset(self) -> float:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:OFFSet \n
Snippet: value: float = driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.get_offset() \n
Defines a trigger offset, shifting the measured trace relative to the trigger event, so that the trace starts earlier.
The offset is specified as a percentage of the measurement time for a single trace. \n
:return: trigger_offset: Range: 0 % to 100 %, Unit: %
"""
response = self._core.io.query_str('TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:OFFSet?')
return Conversions.str_to_float(response)
[docs] def set_offset(self, trigger_offset: float) -> None:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:OFFSet \n
Snippet: driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.set_offset(trigger_offset = 1.0) \n
Defines a trigger offset, shifting the measured trace relative to the trigger event, so that the trace starts earlier.
The offset is specified as a percentage of the measurement time for a single trace. \n
:param trigger_offset: Range: 0 % to 100 %, Unit: %
"""
param = Conversions.decimal_value_to_str(trigger_offset)
self._core.io.write(f'TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:OFFSet {param}')
# noinspection PyTypeChecker
[docs] def get_slope(self) -> enums.SignalSlope:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:SLOPe \n
Snippet: value: enums.SignalSlope = driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.get_slope() \n
Selects whether the trigger event is generated by signals rising through the threshold or falling through the threshold. \n
:return: trigger_slope: REDGe | FEDGe REDGe Rising signal (rising edge) FEDGe Falling signal (falling edge)
"""
response = self._core.io.query_str('TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:SLOPe?')
return Conversions.str_to_scalar_enum(response, enums.SignalSlope)
[docs] def set_slope(self, trigger_slope: enums.SignalSlope) -> None:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:SLOPe \n
Snippet: driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.set_slope(trigger_slope = enums.SignalSlope.FEDGe) \n
Selects whether the trigger event is generated by signals rising through the threshold or falling through the threshold. \n
:param trigger_slope: REDGe | FEDGe REDGe Rising signal (rising edge) FEDGe Falling signal (falling edge)
"""
param = Conversions.enum_scalar_to_str(trigger_slope, enums.SignalSlope)
self._core.io.write(f'TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:SLOPe {param}')
# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.TriggerMode:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:MODE \n
Snippet: value: enums.TriggerMode = driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.get_mode() \n
Selects the repetition mode of the trigger system. \n
:return: trigger_mode: SINGle | NORMal | AUTO | FRUN
"""
response = self._core.io.query_str('TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:MODE?')
return Conversions.str_to_scalar_enum(response, enums.TriggerMode)
[docs] def set_mode(self, trigger_mode: enums.TriggerMode) -> None:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:MODE \n
Snippet: driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.set_mode(trigger_mode = enums.TriggerMode.AUTO) \n
Selects the repetition mode of the trigger system. \n
:param trigger_mode: SINGle | NORMal | AUTO | FRUN
"""
param = Conversions.enum_scalar_to_str(trigger_mode, enums.TriggerMode)
self._core.io.write(f'TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:MODE {param}')
[docs] def get_threshold(self) -> float:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:THReshold \n
Snippet: value: float = driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.get_threshold() \n
Defines the trigger threshold for the AF input path. \n
:return: threshold: Audio level threshold Range: -43 V to 43 V, Unit: V
"""
response = self._core.io.query_str('TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:THReshold?')
return Conversions.str_to_float(response)
[docs] def set_threshold(self, threshold: float) -> None:
"""SCPI: TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:THReshold \n
Snippet: driver.trigger.afRf.measurement.multiEval.oscilloscope.audioInput.set_threshold(threshold = 1.0) \n
Defines the trigger threshold for the AF input path. \n
:param threshold: Audio level threshold Range: -43 V to 43 V, Unit: V
"""
param = Conversions.decimal_value_to_str(threshold)
self._core.io.write(f'TRIGger:AFRF:MEASurement<Instance>:MEValuation:OSCilloscope:AIN:THReshold {param}')