from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PkeyCls:
"""
| Commands in total: 4
| Subgroups: 1
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("pkey", core, parent)
@property
def tduration(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_tduration'):
from .Tduration import TdurationCls
self._tduration = TdurationCls(self._core, self._cmd_group)
return self._tduration
[docs]
def get_nt_day(self) -> int:
"""
``[SOURce<HW>]:BB:GNSS:GALileo:OSNMa:PKEY:NTDay`` \n
Snippet: ``value: int = driver.source.bb.gnss.galileo.osnma.pkey.get_nt_day()`` \n
Sets the number of Public key transitions per day.
:return: trans_per_day: integer Range: 1 to 24
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:GNSS:GALileo:OSNMa:PKEY:NTDay?')
return Conversions.str_to_int(response)
[docs]
def set_nt_day(self, trans_per_day: int) -> None:
"""
``[SOURce<HW>]:BB:GNSS:GALileo:OSNMa:PKEY:NTDay`` \n
Snippet: ``driver.source.bb.gnss.galileo.osnma.pkey.set_nt_day(trans_per_day = 1)`` \n
Sets the number of Public key transitions per day.
:param trans_per_day: integer Range: 1 to 24
"""
param = Conversions.decimal_value_to_str(trans_per_day)
self._core.io.write(f'SOURce<HwInstance>:BB:GNSS:GALileo:OSNMa:PKEY:NTDay {param}')
[docs]
def get_to_midnight(self) -> int:
"""
``[SOURce<HW>]:BB:GNSS:GALileo:OSNMa:PKEY:TOMidnight`` \n
Snippet: ``value: int = driver.source.bb.gnss.galileo.osnma.pkey.get_to_midnight()`` \n
Sets a time offset of the Public key transitions per day.
:return: time_offset: integer Range: 0 to 86400
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:GNSS:GALileo:OSNMa:PKEY:TOMidnight?')
return Conversions.str_to_int(response)
[docs]
def set_to_midnight(self, time_offset: int) -> None:
"""
``[SOURce<HW>]:BB:GNSS:GALileo:OSNMa:PKEY:TOMidnight`` \n
Snippet: ``driver.source.bb.gnss.galileo.osnma.pkey.set_to_midnight(time_offset = 1)`` \n
Sets a time offset of the Public key transitions per day.
:param time_offset: integer Range: 0 to 86400
"""
param = Conversions.decimal_value_to_str(time_offset)
self._core.io.write(f'SOURce<HwInstance>:BB:GNSS:GALileo:OSNMa:PKEY:TOMidnight {param}')
def clone(self) -> 'PkeyCls':
"""
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 = PkeyCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group