from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
from ..... import repcap
# 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)
# noinspection PyTypeChecker
[docs]
def get(self, trigger=repcap.Trigger.Default) -> enums.HwAnalogSource:
"""
``TRIGger<*>:CDR:EYE:SOURce`` \n
Snippet: ``value: enums.HwAnalogSource = driver.trigger.cdr.eye.source.get(trigger = repcap.Trigger.Default)`` \n
Returns the channel signal that is used for clock recovery. You can set the source with method
``RsRtx.trigger.source.select.set()`` . The source cannot be changed if the serial pattern trigger is selected in the
trigger setup and the CDR is enabled. In this case, the instrument triggers on the recovered clock, trigger source and
CDR source are the same.
:param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger')
:return: analog_source: C1 | C2 | C3 | C4
"""
trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger)
response = self._core.io.query_str_with_opc(f'TRIGger{trigger_cmd_val}:CDR:EYE:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.HwAnalogSource)