Source code for rsrtx.Implementations.Trigger.Can.Symbolic.MsgValue

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Utilities import trim_str_response
from ..... import repcap


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

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

[docs] def set(self, message_name: str, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:CAN:SYMBolic:MSGValue`` \n Snippet: ``driver.trigger.can.symbolic.msgValue.set(message_name = 'abc', trigger = repcap.Trigger.Default)`` \n Sets the message to be triggered or searched for. The setting is used by symbolic trigger and symbolic search. Thus, you always trigger on and search for the same message if symbolic trigger and symbolic search is used at the same time. See also: method ``RsRtx.search.trigger.can.symbolic.msgValue.set()`` :param message_name: String with the symbolic message name :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.value_to_quoted_str(message_name) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) self._core.io.write(f'TRIGger{trigger_cmd_val}:CAN:SYMBolic:MSGValue {param}')
[docs] def get(self, trigger=repcap.Trigger.Default) -> str: """ ``TRIGger<*>:CAN:SYMBolic:MSGValue`` \n Snippet: ``value: str = driver.trigger.can.symbolic.msgValue.get(trigger = repcap.Trigger.Default)`` \n Sets the message to be triggered or searched for. The setting is used by symbolic trigger and symbolic search. Thus, you always trigger on and search for the same message if symbolic trigger and symbolic search is used at the same time. See also: method ``RsRtx.search.trigger.can.symbolic.msgValue.set()`` :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :return: message_name: String with the symbolic message name """ trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) response = self._core.io.query_str(f'TRIGger{trigger_cmd_val}:CAN:SYMBolic:MSGValue?') return trim_str_response(response)