Source code for RsSmw.Implementations.Diagnostic.Service

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

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

[docs] def get_sfunction(self) -> str: """ ``DIAGnostic<HW>:SERVice:SFUNction`` \n Snippet: ``value: str = driver.diagnostic.service.get_sfunction()`` \n No help available """ response = self._core.io.query_str('DIAGnostic<HwInstance>:SERVice:SFUNction?') return trim_str_response(response)
[docs] def set_sfunction(self, direct_string: str) -> None: """ ``DIAGnostic<HW>:SERVice:SFUNction`` \n Snippet: ``driver.diagnostic.service.set_sfunction(direct_string = 'abc')`` \n No help available """ param = Conversions.value_to_quoted_str(direct_string) self._core.io.write(f'DIAGnostic<HwInstance>:SERVice:SFUNction {param}')
[docs] def get_value(self) -> bool: """ ``DIAGnostic:SERVice`` \n Snippet: ``value: bool = driver.diagnostic.service.get_value()`` \n No help available """ response = self._core.io.query_str('DIAGnostic:SERVice?') return Conversions.str_to_bool(response)
[docs] def set_value(self, service: bool) -> None: """ ``DIAGnostic:SERVice`` \n Snippet: ``driver.diagnostic.service.set_value(service = False)`` \n No help available """ param = Conversions.bool_to_str(service) self._core.io.write(f'DIAGnostic:SERVice {param}')