Source code for RsSmw.Implementations.Source.Bb.Nr5G.Hfb.Ethernet.IpAddress

from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
from ........ import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class IpAddressCls:
	"""
	| Commands in total: 5
	| Subgroups: 1
	| Direct child commands: 4
	"""

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

	@property
	def subnet(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_subnet'):
			from .Subnet import SubnetCls
			self._subnet = SubnetCls(self._core, self._cmd_group)
		return self._subnet

	# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.EthernetMode: """ ``[SOURce<HW>]:BB:NR5G:HFB:ETHernet:IPADdress:MODE`` \n Snippet: ``value: enums.EthernetMode = driver.source.bb.nr5G.hfb.ethernet.ipAddress.get_mode()`` \n Shows the type of IP address that real-time feedback uses. Prerequisites for this command \n - Select Ethernet feedback mode (method ``RsSmw.source.bb.nr5G.hfb.mode()`` ) . :return: eth_mode: STAT Static IP address. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:NR5G:HFB:ETHernet:IPADdress:MODE?') return Conversions.str_to_scalar_enum(response, enums.EthernetMode)
[docs] def get_port(self) -> int: """ ``[SOURce<HW>]:BB:NR5G:HFB:ETHernet:IPADdress:PORT`` \n Snippet: ``value: int = driver.source.bb.nr5G.hfb.ethernet.ipAddress.get_port()`` \n Defines the network port that real-time feedback uses. Prerequisites for this command \n - Select Ethernet feedback mode (method ``RsSmw.source.bb.nr5G.hfb.mode()`` ) . """ response = self._core.io.query_str('SOURce<HwInstance>:BB:NR5G:HFB:ETHernet:IPADdress:PORT?') return Conversions.str_to_int(response)
# noinspection PyTypeChecker
[docs] def get_protocol(self) -> enums.NetProtocol: """ ``[SOURce<HW>]:BB:NR5G:HFB:ETHernet:IPADdress:PROTocol`` \n Snippet: ``value: enums.NetProtocol = driver.source.bb.nr5G.hfb.ethernet.ipAddress.get_protocol()`` \n Shows the type of IP protocol that real-time feedback uses. Prerequisites for this command \n - Select Ethernet feedback mode (method ``RsSmw.source.bb.nr5G.hfb.mode()`` ) . :return: eth_protocol: TCP TCP protocol. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:NR5G:HFB:ETHernet:IPADdress:PROTocol?') return Conversions.str_to_scalar_enum(response, enums.NetProtocol)
[docs] def get_value(self) -> bytes: """ ``[SOURce<HW>]:BB:NR5G:HFB:ETHernet:IPADdress`` \n Snippet: ``value: bytes = driver.source.bb.nr5G.hfb.ethernet.ipAddress.get_value()`` \n Defines the IP address of the baseband board that real-time feedback uses. Prerequisites for this command \n - Select Ethernet feedback mode (method ``RsSmw.source.bb.nr5G.hfb.mode()`` ) . """ response = self._core.io.query_bin_block('SOURce<HwInstance>:BB:NR5G:HFB:ETHernet:IPADdress?') return response
def clone(self) -> 'IpAddressCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = IpAddressCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group