from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from .......Internal.Utilities import trim_str_response
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SubnetCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("subnet", core, parent)
[docs]
def get_mask(self) -> str:
"""
``SYSTem:COMMunicate:BB<HW>:NETWork:[IPADdress]:SUBNet:MASK`` \n
Snippet: ``value: str = driver.system.communicate.bb.network.ipAddress.subnet.get_mask()`` \n
Sets the subnet mask.
:return: mask: string
"""
response = self._core.io.query_str('SYSTem:COMMunicate:BB<HwInstance>:NETWork:IPADdress:SUBNet:MASK?')
return trim_str_response(response)
[docs]
def set_mask(self, mask: str) -> None:
"""
``SYSTem:COMMunicate:BB<HW>:NETWork:[IPADdress]:SUBNet:MASK`` \n
Snippet: ``driver.system.communicate.bb.network.ipAddress.subnet.set_mask(mask = 'abc')`` \n
Sets the subnet mask.
:param mask: string
"""
param = Conversions.value_to_quoted_str(mask)
self._core.io.write(f'SYSTem:COMMunicate:BB<HwInstance>:NETWork:IPADdress:SUBNet:MASK {param}')