Source code for RsFsw.Implementations.FormatPy.Data

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


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

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

[docs] def set(self, data_format: enums.DataFormat) -> None: """ ``FORMat[:DATA]`` \n Snippet: ``driver.formatPy.data.set(data_format = enums.DataFormat.ASCii)`` \n Selects the data format that is used for transmission of trace data from the FSW to the controlling computer. Note that the command has no effect for data that you send to the FSW. The FSW automatically recognizes the data it receives, regardless of the format. For details on data formats, see 'Formats for returned values: ASCII format and binary format'. """ param = Conversions.enum_scalar_to_str(data_format, enums.DataFormat) self._core.io.write_with_opc(f'FORMat:DATA {param}')
# noinspection PyTypeChecker
[docs] def get(self) -> enums.DataFormat: """ ``FORMat[:DATA]`` \n Snippet: ``value: enums.DataFormat = driver.formatPy.data.get()`` \n Selects the data format that is used for transmission of trace data from the FSW to the controlling computer. Note that the command has no effect for data that you send to the FSW. The FSW automatically recognizes the data it receives, regardless of the format. For details on data formats, see 'Formats for returned values: ASCII format and binary format'. """ response = self._core.io.query_str_with_opc(f'FORMat:DATA?') return Conversions.str_to_scalar_enum(response, enums.DataFormat)