Source code for rsrtx.Implementations.Channel.Efrontend.Connection.Config

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal.Types import DataType
from .....Internal.StructBase import StructBase
from .....Internal.ArgStruct import ArgStruct
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle
from ..... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ConfigCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("config", core, parent)

[docs] def set(self, type_py: str, ip_address_or_name: str, identifier: str=None, channel=repcap.Channel.Default) -> None: """ ``CHANnel<*>:EFRontend:CONNection:CONFig`` \n Snippet: ``driver.channel.efrontend.connection.config.set(type_py = 'abc', ip_address_or_name = 'abc', identifier = 'abc', channel = repcap.Channel.Default)`` \n Defines the connection of the indicated frontend: type of the frontend and the IP address or host name. Optionally, the identifier string can be used. :param type_py: String with the type of the connected frontend. For a list of available type strings, use method ``RsRtx.channel.efrontend.typePy.listPy.get()``. :param ip_address_or_name: String with the IP address or host name of the connected frontend. :param identifier: IDN string of the connected frontend :param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel') """ param = ArgSingleList().compose_cmd_string(ArgSingle('type_py', type_py, DataType.String), ArgSingle('ip_address_or_name', ip_address_or_name, DataType.String), ArgSingle('identifier', identifier, DataType.String, None, is_optional=True)) channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) self._core.io.write_with_opc(f'CHANnel{channel_cmd_val}:EFRontend:CONNection:CONFig {param}'.rstrip())
# noinspection PyTypeChecker
[docs] class ConfigStruct(StructBase): """ Response structure. Fields: \n - 1 Type_Py: str: String with the type of the connected frontend. For a list of available type strings, use method ``RsRtx.channel.efrontend.typePy.listPy.get()``. - 2 Ip_Address_Or_Name: str: String with the IP address or host name of the connected frontend. - 3 Identifier: str: IDN string of the connected frontend """ __meta_args_list = [ ArgStruct.scalar_str('Type_Py'), ArgStruct.scalar_str('Ip_Address_Or_Name'), ArgStruct.scalar_str('Identifier')] def __init__(self): StructBase.__init__(self, self) self.Type_Py: str = None self.Ip_Address_Or_Name: str = None self.Identifier: str = None
[docs] def get(self, channel=repcap.Channel.Default) -> ConfigStruct: """ ``CHANnel<*>:EFRontend:CONNection:CONFig`` \n Snippet: ``value: ConfigStruct = driver.channel.efrontend.connection.config.get(channel = repcap.Channel.Default)`` \n Defines the connection of the indicated frontend: type of the frontend and the IP address or host name. Optionally, the identifier string can be used. :param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel') :return: structure: for return value, see the help for ConfigStruct structure arguments. """ channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) return self._core.io.query_struct_with_opc(f'CHANnel{channel_cmd_val}:EFRontend:CONNection:CONFig?', self.__class__.ConfigStruct())