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 EslopeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("eslope", core, parent)
[docs]
def set(self, edge: enums.Edge, software=repcap.Software.Default) -> None:
"""
``CDR:SOFTware<*>:ESLope`` \n
Snippet: ``driver.cdr.software.eslope.set(edge = enums.Edge.EITHer, software = repcap.Software.Default)`` \n
Selects the edges of the data stream that are used for the clock recovery.
The acquisition and average count has a double effect: \n
- Either: Both positive and negative edges are used.
- Positive or Negative: Only one edge direction is used. Use one of these settings if the other edge delivers unreliable results.
:param edge: POSitive | NEGative | EITHer
:param software: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Software')
"""
param = Conversions.enum_scalar_to_str(edge, enums.Edge)
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}:ESLope {param}')
# noinspection PyTypeChecker
[docs]
def get(self, software=repcap.Software.Default) -> enums.Edge:
"""
``CDR:SOFTware<*>:ESLope`` \n
Snippet: ``value: enums.Edge = driver.cdr.software.eslope.get(software = repcap.Software.Default)`` \n
Selects the edges of the data stream that are used for the clock recovery.
The acquisition and average count has a double effect: \n
- Either: Both positive and negative edges are used.
- Positive or Negative: Only one edge direction is used. Use one of these settings if the other edge delivers unreliable results.
:param software: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Software')
:return: edge: POSitive | NEGative | EITHer
"""
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}:ESLope?')
return Conversions.str_to_scalar_enum(response, enums.Edge)