Source code for rsrtx.Implementations.Bus.Cmsb.Result.State

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
from ..... import repcap


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

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

	# noinspection PyTypeChecker
[docs] def get(self, bus=repcap.Bus.Default, busResult=repcap.BusResult.Default) -> enums.BusCmsbResultState: """ ``BUS<*>:CMSB:RESult<*>:STATe`` \n Snippet: ``value: enums.BusCmsbResultState = driver.bus.cmsb.result.state.get(bus = repcap.Bus.Default, busResult = repcap.BusResult.Default)`` \n Returns the overall state of the frame: either OK or the relevant error condition. R&S RTO6-K510 marks each frame with a status that indicates whether the decode succeeded or not. :param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus') :param busResult: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Result') :return: state: OK | LENGth | UNKNown | INComplete | CRC | PARity \n - OK: The frame was decoded normally and conforms to the frame description. - LENGth: The length error indicates that the frame ended prematurely, or an array in the frame had too few elements. The amount of bits that the software expected (based upon the user's frame description) was not found before the frame was terminated. This might occur because a new frame synchronized, or a gap appeared between the bits. - UNKNown: Unknown error - INComplete: The frame ended prematurely because it extends past the end of the record. - CRC: Checksum error in cyclic redundancy check (error in data) - PARity: Parity bit error, indicating a transmission error (only available if a parity is configured) """ bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus) busResult_cmd_val = self._cmd_group.get_repcap_cmd_value(busResult, repcap.BusResult) response = self._core.io.query_str(f'BUS{bus_cmd_val}:CMSB:RESult{busResult_cmd_val}:STATe?') return Conversions.str_to_scalar_enum(response, enums.BusCmsbResultState)