from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal.Types import DataType
from ...Internal.ArgSingleList import ArgSingleList
from ...Internal.ArgSingle import ArgSingle
from ... import enums
from ... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class CouplingToOtherCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("couplingToOther", core, parent)
[docs]
def set(self, couple_to: enums.Channel, state: bool, channel=repcap.Channel.Default) -> None:
"""
``CHANnel<1..4>:CPLing`` \n
Snippet: ``driver.channel.couplingToOther.set(couple_to = enums.Channel.CHAN1, state = False, channel = repcap.Channel.Default)`` \n
Sets the vertical settings of the coupled channel to the values of the active channel.
:param couple_to: CHAN1 | C1 | CHAN2 | C2 | CHAN3 | C3 | CHAN4 | C4 \n
- CHAN1 = C1, CHAN2 = C2, CHAN3 = C3, CHAN4 = C4: Input channel that takes the vertical settings of CHANnelch.
:param state: OFF | ON
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('couple_to', couple_to, DataType.Enum, enums.Channel), ArgSingle('state', state, DataType.Boolean))
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
self._core.io.write_with_opc(f'CHANnel{channel_cmd_val}:CPLing {param}'.rstrip())