Source code for rsrtx.Implementations.Search.Trigger.Can.Symbolic.SgeValue

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Types import DataType
from ......Internal.ArgSingleList import ArgSingleList
from ......Internal.ArgSingle import ArgSingle


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SgeValueCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, search_name: str, sign_enum_val: int) -> None: """ ``SEARch:TRIGger:CAN:SYMBolic:SGEValue`` \n Snippet: ``driver.search.trigger.can.symbolic.sgeValue.set(search_name = 'abc', sign_enum_val = 1)`` \n Sets a symbolic data value for signals with enumerated values. :param search_name: String that contains the search definition name :param sign_enum_val: Numeric value according to the value definition in the DBC file """ param = ArgSingleList().compose_cmd_string(ArgSingle('search_name', search_name, DataType.String), ArgSingle('sign_enum_val', sign_enum_val, DataType.Integer)) self._core.io.write(f'SEARch:TRIGger:CAN:SYMBolic:SGEValue {param}'.rstrip())
[docs] def get(self, search_name: str) -> int: """ ``SEARch:TRIGger:CAN:SYMBolic:SGEValue`` \n Snippet: ``value: int = driver.search.trigger.can.symbolic.sgeValue.get(search_name = 'abc')`` \n Sets a symbolic data value for signals with enumerated values. :param search_name: String that contains the search definition name :return: sign_enum_val: Numeric value according to the value definition in the DBC file """ param = Conversions.value_to_quoted_str(search_name) response = self._core.io.query_str(f'SEARch:TRIGger:CAN:SYMBolic:SGEValue? {param}') return Conversions.str_to_int(response)