Source code for RsSmw.Implementations.System.Time.Zone

from typing import List

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 ZoneCls:
	"""
	| Commands in total: 2
	| Subgroups: 0
	| Direct child commands: 2
	"""

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

[docs] def get_catalog(self) -> List[str]: """ ``SYSTem:TIME:ZONE:CATalog`` \n Snippet: ``value: List[str] = driver.system.time.zone.get_catalog()`` \n Querys the list of available timezones. """ response = self._core.io.query_str('SYSTem:TIME:ZONE:CATalog?') return Conversions.str_to_str_list(response)
[docs] def get_value(self) -> str: """ ``SYSTem:TIME:ZONE`` \n Snippet: ``value: str = driver.system.time.zone.get_value()`` \n Sets the timezone. You can query the list of the available timezones with method ``RsSmw.system.time.zone.catalog()`` . :return: time_zone: string """ response = self._core.io.query_str('SYSTem:TIME:ZONE?') return trim_str_response(response)
[docs] def set_value(self, time_zone: str) -> None: """ ``SYSTem:TIME:ZONE`` \n Snippet: ``driver.system.time.zone.set_value(time_zone = 'abc')`` \n Sets the timezone. You can query the list of the available timezones with method ``RsSmw.system.time.zone.catalog()`` . :param time_zone: string """ param = Conversions.value_to_quoted_str(time_zone) self._core.io.write(f'SYSTem:TIME:ZONE {param}')