from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal.Utilities import trim_str_response
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class EthernetCls:
"""
| Commands in total: 6
| Subgroups: 1
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ethernet", core, parent)
@property
def ipAddress(self):
"""
| Commands in total: 5
| Subgroups: 1
| Direct child commands: 4
"""
if not hasattr(self, '_ipAddress'):
from .IpAddress import IpAddressCls
self._ipAddress = IpAddressCls(self._core, self._cmd_group)
return self._ipAddress
[docs]
def get_hostname(self) -> str:
"""
``[SOURce<HW>]:BB:NR5G:HFB:ETHernet:HOSTname`` \n
Snippet: ``value: str = driver.source.bb.nr5G.hfb.ethernet.get_hostname()`` \n
Returns the hostname 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()`` ) .
:return: eth_hostname: string
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:NR5G:HFB:ETHernet:HOSTname?')
return trim_str_response(response)
def clone(self) -> 'EthernetCls':
"""
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 = EthernetCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group