Source code for rsrtx.Implementations.Status.Questionable.AdcState

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions


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

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

[docs] def get_condition(self) -> int: """ ``STATus:QUEStionable:ADCState:CONDition`` \n Snippet: ``value: int = driver.status.questionable.adcState.get_condition()`` \n Returns the contents of the CONDition part of the status register to check for questionable instrument or measurement states. Reading the CONDition registers does not delete the contents. """ response = self._core.io.query_str('STATus:QUEStionable:ADCState:CONDition?') return Conversions.str_to_int(response)
[docs] def get_enable(self) -> int: """ ``STATus:QUEStionable:ADCState:ENABle`` \n Snippet: ``value: int = driver.status.questionable.adcState.get_enable()`` \n Sets the ENABle part that allows true conditions in the EVENt part to be reported in the summary bit. If a bit is set to 1 in the enable part and its associated event bit transitions to true, a positive transition occurs in the summary bit and is reported to the next higher level. :return: value: Bit mask in decimal representation """ response = self._core.io.query_str('STATus:QUEStionable:ADCState:ENABle?') return Conversions.str_to_int(response)
[docs] def set_enable(self, value: int) -> None: """ ``STATus:QUEStionable:ADCState:ENABle`` \n Snippet: ``driver.status.questionable.adcState.set_enable(value = 1)`` \n Sets the ENABle part that allows true conditions in the EVENt part to be reported in the summary bit. If a bit is set to 1 in the enable part and its associated event bit transitions to true, a positive transition occurs in the summary bit and is reported to the next higher level. :param value: Bit mask in decimal representation """ param = Conversions.decimal_value_to_str(value) self._core.io.write(f'STATus:QUEStionable:ADCState:ENABle {param}')
[docs] def get_event(self) -> int: """ ``STATus:QUEStionable:ADCState[:EVENt]`` \n Snippet: ``value: int = driver.status.questionable.adcState.get_event()`` \n Returns the contents of the EVENt part of the status register to check whether an event has occurred since the last reading. Reading an EVENt register deletes its contents. """ response = self._core.io.query_str('STATus:QUEStionable:ADCState:EVENt?') return Conversions.str_to_int(response)
[docs] def get_ntransition(self) -> int: """ ``STATus:QUEStionable:ADCState:NTRansition`` \n Snippet: ``value: int = driver.status.questionable.adcState.get_ntransition()`` \n Sets the negative transition filter. If a bit is set, a 1 to 0 transition in the corresponding bit of the condition register causes a 1 to be written in the corresponding bit of the event register. :return: value: Bit mask in decimal representation """ response = self._core.io.query_str('STATus:QUEStionable:ADCState:NTRansition?') return Conversions.str_to_int(response)
[docs] def set_ntransition(self, value: int) -> None: """ ``STATus:QUEStionable:ADCState:NTRansition`` \n Snippet: ``driver.status.questionable.adcState.set_ntransition(value = 1)`` \n Sets the negative transition filter. If a bit is set, a 1 to 0 transition in the corresponding bit of the condition register causes a 1 to be written in the corresponding bit of the event register. :param value: Bit mask in decimal representation """ param = Conversions.decimal_value_to_str(value) self._core.io.write(f'STATus:QUEStionable:ADCState:NTRansition {param}')
[docs] def get_ptransition(self) -> int: """ ``STATus:QUEStionable:ADCState:PTRansition`` \n Snippet: ``value: int = driver.status.questionable.adcState.get_ptransition()`` \n Sets the positive transition filter. If a bit is set, a 0 to 1 transition in the corresponding bit of the condition register causes a 1 to be written in the corresponding bit of the event register. :return: value: Bit mask in decimal representation """ response = self._core.io.query_str('STATus:QUEStionable:ADCState:PTRansition?') return Conversions.str_to_int(response)
[docs] def set_ptransition(self, value: int) -> None: """ ``STATus:QUEStionable:ADCState:PTRansition`` \n Snippet: ``driver.status.questionable.adcState.set_ptransition(value = 1)`` \n Sets the positive transition filter. If a bit is set, a 0 to 1 transition in the corresponding bit of the condition register causes a 1 to be written in the corresponding bit of the event register. :param value: Bit mask in decimal representation """ param = Conversions.decimal_value_to_str(value) self._core.io.write(f'STATus:QUEStionable:ADCState:PTRansition {param}')