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 PsOneCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("psOne", core, parent)
[docs]
def set(self, sparam_plot_selection_1: enums.SparamPlotSelection, lane=repcap.Lane.Default, component=repcap.Component.Default) -> None:
"""
``LANE<*>:EMBedding:COMPonent<*>:PSONe`` \n
Snippet: ``driver.lane.embedding.component.psOne.set(sparam_plot_selection_1 = enums.SparamPlotSelection.S11, lane = repcap.Lane.Default, component = repcap.Component.Default)`` \n
Selects the plot one.
:param sparam_plot_selection_1: S11 | S12 | S13 | S14 | S21 | S22 | S23 | S24 | S31 | S32 | S33 | S34 | S41 | S42 | S43 | S44
:param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane')
:param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component')
"""
param = Conversions.enum_scalar_to_str(sparam_plot_selection_1, enums.SparamPlotSelection)
lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane)
component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component)
self._core.io.write_with_opc(f'LANE{lane_cmd_val}:EMBedding:COMPonent{component_cmd_val}:PSONe {param}')
# noinspection PyTypeChecker
[docs]
def get(self, lane=repcap.Lane.Default, component=repcap.Component.Default) -> enums.SparamPlotSelection:
"""
``LANE<*>:EMBedding:COMPonent<*>:PSONe`` \n
Snippet: ``value: enums.SparamPlotSelection = driver.lane.embedding.component.psOne.get(lane = repcap.Lane.Default, component = repcap.Component.Default)`` \n
Selects the plot one.
:param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane')
:param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component')
"""
lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane)
component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component)
response = self._core.io.query_str_with_opc(f'LANE{lane_cmd_val}:EMBedding:COMPonent{component_cmd_val}:PSONe?')
return Conversions.str_to_scalar_enum(response, enums.SparamPlotSelection)