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 TerminateCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("terminate", core, parent)
[docs]
def set(self, interposer_termination: enums.DeembedInterposerTerm, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> None:
"""
``DEEMbedding<*>:COMPonent<*>:INTPoser:TERMinate`` \n
Snippet: ``driver.deembedding.component.intPoser.terminate.set(interposer_termination = enums.DeembedInterposerTerm.CTRL, deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n
Sets the port which is terminated at the interposer block: memory or controller port. The other port pair is exposed as
input to the next block.
:param interposer_termination: MEMory | CTRL
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
:param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component')
"""
param = Conversions.enum_scalar_to_str(interposer_termination, enums.DeembedInterposerTerm)
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component)
self._core.io.write_with_opc(f'DEEMbedding{deembedding_cmd_val}:COMPonent{component_cmd_val}:INTPoser:TERMinate {param}')
# noinspection PyTypeChecker
[docs]
def get(self, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> enums.DeembedInterposerTerm:
"""
``DEEMbedding<*>:COMPonent<*>:INTPoser:TERMinate`` \n
Snippet: ``value: enums.DeembedInterposerTerm = driver.deembedding.component.intPoser.terminate.get(deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n
Sets the port which is terminated at the interposer block: memory or controller port. The other port pair is exposed as
input to the next block.
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
:param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component')
"""
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component)
response = self._core.io.query_str_with_opc(f'DEEMbedding{deembedding_cmd_val}:COMPonent{component_cmd_val}:INTPoser:TERMinate?')
return Conversions.str_to_scalar_enum(response, enums.DeembedInterposerTerm)