Source code for rsrtx.Implementations.Calculate.Math.Data.Header

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal.StructBase import StructBase
from .....Internal.ArgStruct import ArgStruct
from ..... import repcap


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

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

	# noinspection PyTypeChecker
[docs] class GetStruct(StructBase): """ Response structure. Fields: \n - 1 Start: float: No parameter help available - 2 Stop: float: No parameter help available - 3 Record_Length: int: No parameter help available - 4 Vals_Per_Smp: int: No parameter help available """ __meta_args_list = [ ArgStruct.scalar_float('Start'), ArgStruct.scalar_float('Stop'), ArgStruct.scalar_int('Record_Length'), ArgStruct.scalar_int('Vals_Per_Smp')] def __init__(self): StructBase.__init__(self, self) self.Start: float = None self.Stop: float = None self.Record_Length: int = None self.Vals_Per_Smp: int = None
[docs] def get(self, math=repcap.Math.Default) -> GetStruct: """ ``CALCulate:MATH<*>:DATA:HEADer`` \n Snippet: ``value: GetStruct = driver.calculate.math.data.header.get(math = repcap.Math.Default)`` \n Returns the header of math waveform data. The header contains attributes of the waveform. Position / Meaning / Example \n - 1 / XStart in s / 9.477E-008 = - 94,77 ns - 2 / XStop in s / 9.477E-008 = 94,77 ns - 3 / Record length of the waveform in Samples / 200000 - 4 / Number of values per sample interval. For most waveforms the result is 1, for peak detect and envelope waveforms it is 2. If the number is 2, the number of returned values is twice the number of samples (record length) . / 1 :param math: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Math') :return: structure: for return value, see the help for GetStruct structure arguments. """ math_cmd_val = self._cmd_group.get_repcap_cmd_value(math, repcap.Math) return self._core.io.query_struct(f'CALCulate:MATH{math_cmd_val}:DATA:HEADer?', self.__class__.GetStruct())