Source code for RsSmw.Implementations.Source.Bb.Dvb.Dvbh.Hp.Data

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


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

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

[docs] def get_dselection(self) -> str: """ ``[SOURce<HW>]:BB:DVB:DVBH:[HP]:DATA:DSELection`` \n Snippet: ``value: str = driver.source.bb.dvb.dvbh.hp.data.get_dselection()`` \n Selects an existing TS file from the default directory or from the specific directory. TS files are files with extension gts, ts, or trp. Refer to 'Accessing Files in the Default or Specified Directory' for general information on file handling in the default and in a specific directory. :return: dselection: string Filename incl. file extension or complete file path """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DVB:DVBH:HP:DATA:DSELection?') return trim_str_response(response)
[docs] def set_dselection(self, dselection: str) -> None: """ ``[SOURce<HW>]:BB:DVB:DVBH:[HP]:DATA:DSELection`` \n Snippet: ``driver.source.bb.dvb.dvbh.hp.data.set_dselection(dselection = 'abc')`` \n Selects an existing TS file from the default directory or from the specific directory. TS files are files with extension gts, ts, or trp. Refer to 'Accessing Files in the Default or Specified Directory' for general information on file handling in the default and in a specific directory. :param dselection: string Filename incl. file extension or complete file path """ param = Conversions.value_to_quoted_str(dselection) self._core.io.write(f'SOURce<HwInstance>:BB:DVB:DVBH:HP:DATA:DSELection {param}')
# noinspection PyTypeChecker
[docs] def get_value(self) -> enums.DvbDataSour: """ ``[SOURce<HW>]:BB:DVB:DVBH:[HP]:DATA`` \n Snippet: ``value: enums.DvbDataSour = driver.source.bb.dvb.dvbh.hp.data.get_value()`` \n Selects the data source to be used. :return: data: PAC0 | PAC1 | PN15 | PN23 | DLISt ZERO Internal 0 is used. ONE Internal 1 is used. PN15/23 Internally generated PRBS data as per CCITT with period lengths between (29-1 and 223-1) . DLISt Internal data from a TS file is used. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DVB:DVBH:HP:DATA?') return Conversions.str_to_scalar_enum(response, enums.DvbDataSour)
[docs] def set_value(self, data: enums.DvbDataSour) -> None: """ ``[SOURce<HW>]:BB:DVB:DVBH:[HP]:DATA`` \n Snippet: ``driver.source.bb.dvb.dvbh.hp.data.set_value(data = enums.DvbDataSour.DLISt)`` \n Selects the data source to be used. :param data: PAC0 | PAC1 | PN15 | PN23 | DLISt ZERO Internal 0 is used. ONE Internal 1 is used. PN15/23 Internally generated PRBS data as per CCITT with period lengths between (29-1 and 223-1) . DLISt Internal data from a TS file is used. """ param = Conversions.enum_scalar_to_str(data, enums.DvbDataSour) self._core.io.write(f'SOURce<HwInstance>:BB:DVB:DVBH:HP:DATA {param}')