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 ResultsCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("results", core, parent)
[docs]
def set(self, results: enums.CdrResults, software=repcap.Software.Default) -> None:
"""
``CDR:SOFTware<*>:RESults`` \n
Snippet: ``driver.cdr.software.results.set(results = enums.CdrResults.AISYnc, software = repcap.Software.Default)`` \n
The PLL requires some time to synchronize to the phase of the data stream. You can select when the CDR algorithm returns
clock edges.
:param results: ALL | AISYnc \n
- ALL: All clock edges are used.
- AISYnc: The clock edges of the synchronization time are discarded; results are gathered after initial synchronization of the CDR. Thus, meaningful TIE measurement results can be obtained.
:param software: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Software')
"""
param = Conversions.enum_scalar_to_str(results, enums.CdrResults)
software_cmd_val = self._cmd_group.get_repcap_cmd_value(software, repcap.Software)
self._core.io.write_with_opc(f'CDR:SOFTware{software_cmd_val}:RESults {param}')
# noinspection PyTypeChecker
[docs]
def get(self, software=repcap.Software.Default) -> enums.CdrResults:
"""
``CDR:SOFTware<*>:RESults`` \n
Snippet: ``value: enums.CdrResults = driver.cdr.software.results.get(software = repcap.Software.Default)`` \n
The PLL requires some time to synchronize to the phase of the data stream. You can select when the CDR algorithm returns
clock edges.
:param software: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Software')
:return: results: ALL | AISYnc \n
- ALL: All clock edges are used.
- AISYnc: The clock edges of the synchronization time are discarded; results are gathered after initial synchronization of the CDR. Thus, meaningful TIE measurement results can be obtained.
"""
software_cmd_val = self._cmd_group.get_repcap_cmd_value(software, repcap.Software)
response = self._core.io.query_str_with_opc(f'CDR:SOFTware{software_cmd_val}:RESults?')
return Conversions.str_to_scalar_enum(response, enums.CdrResults)