Source code for RsSmw.Implementations.Source.Bb.Dm.Clist

from typing import List

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


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

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

[docs] def get_catalog(self) -> List[str]: """ ``[SOURce<HW>]:BB:DM:CLISt:CATalog`` \n Snippet: ``value: List[str] = driver.source.bb.dm.clist.get_catalog()`` \n Reads out the list of files present in the default directory. List type / Command / File extension \n - Data list / ...:DLISt... / dm_iqd - Control list / ...:CLISt... / dm_iqc - User filter files / ...:FLISt... / vaf - User mapping lists / ...:MLISt... / vam See also 'Handling files in the default or in a specified directory'. :return: catalog: 'filename1,filename2,...' Returns a string of filenames separated by commas. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:CLISt:CATalog?') return Conversions.str_to_str_list(response)
[docs] def copy(self, filename: str) -> None: """ ``[SOURce<HW>]:BB:DM:CLISt:COPY`` \n Snippet: ``driver.source.bb.dm.clist.copy(filename = 'abc')`` \n Copies the selected data list (dm_iqd) / control list (dm_iqc) as a new list with name specified by <Filename>. If a list with the specified name exists, it is overwritten. If it does not yet exist, it is created. The source file has to be available in the default directory. See also 'Handling files in the default or in a specified directory'. :param filename: string """ param = Conversions.value_to_quoted_str(filename) self._core.io.write(f'SOURce<HwInstance>:BB:DM:CLISt:COPY {param}')
[docs] def set_data(self, data: str) -> None: """ ``[SOURce<HW>]:BB:DM:CLISt:DATA`` \n Snippet: ``driver.source.bb.dm.clist.set_data(data = 'abc')`` \n Sends the data to the currently selected control list. If the list already contains data, it is overwritten. This command only writes data into the data section of the file. The values for the control signals are sent, arranged in an 8-bit value as defined in Table 'Contents of a control lists'. Contents of a control lists Signal / Order / Decimal value of bits \n - Marker 1 Marker 2 Marker 3 / LSB / 1 2 4 - Burst / LSB / 16 - LevAtt1 / LSB / 32 - CWMod / LSB / 64 - Hop / MSB / 128 The data can also be sent as a binary block. Each binary block is a 2-byte value, in which the 16 bits represent the binary values (16-bit unsigned integer, 2 bytes, LSB first) . When binary data transmission is in use, use the command SYSTem:COMMunicate:GPIB:LTERminator EOI to set the termination character mode to 'EOI control data message only' so that a random LF in the data sequence is not interpreted as End, thereby prematurely terminating the data transmission. The command ...LTER STAN resets the mode. According to the specifications, the byte sequence is defined as 'most significant byte first'. Tip: Control lists are created in binary format. Use an ASCII format to create a waveform file with R&S WinIQSIM2. See also 'Creating control lists with tag file format'. The command ``*RST`` has no effect on data lists. :param data: string """ param = Conversions.value_to_quoted_str(data) self._core.io.write(f'SOURce<HwInstance>:BB:DM:CLISt:DATA {param}')
[docs] def delete(self, filename: str) -> None: """ ``[SOURce<HW>]:BB:DM:CLISt:DELete`` \n Snippet: ``driver.source.bb.dm.clist.delete(filename = 'abc')`` \n Deletes the specified list from the default directory or from the directory specified with the complete file path. See also 'Handling files in the default or in a specified directory'. List type / Command / File extension \n - Data list / ...:DLISt... / dm_iqd - Control list / ...:CLISt... / dm_iqc - User standard / ...:ULISt... / dm_stu - User filter files / ...:FLISt... / vaf - User mapping lists / ...:MLISt... / vam :param filename: string """ param = Conversions.value_to_quoted_str(filename) self._core.io.write(f'SOURce<HwInstance>:BB:DM:CLISt:DELete {param}')
[docs] def get_free(self) -> int: """ ``[SOURce<HW>]:BB:DM:CLISt:FREE`` \n Snippet: ``value: int = driver.source.bb.dm.clist.get_free()`` \n Queries the list free memory. List type / Command / File extension \n - Data list / ...:DLISt... / dm_iqd - Control list / ...:CLISt... / dm_iqc - User filter files / ...:FLISt... / vaf - User mapping lists / ...:MLISt... / vam :return: free: integer Range: 0 to INT_MAX """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:CLISt:FREE?') return Conversions.str_to_int(response)
[docs] def get_points(self) -> int: """ ``[SOURce<HW>]:BB:DM:CLISt:POINts`` \n Snippet: ``value: int = driver.source.bb.dm.clist.get_points()`` \n Queries the number of lines (2 bytes) in the currently selected list. :return: points: integer Range: 0 to INT_MAX """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:CLISt:POINts?') return Conversions.str_to_int(response)
[docs] def get_select(self) -> str: """ ``[SOURce<HW>]:BB:DM:CLISt:SELect`` \n Snippet: ``value: str = driver.source.bb.dm.clist.get_select()`` \n Selects the specified list file from the default directory or in the directory specified with the complete file path. See also method ``RsSmw.massMemory.current_directory()`` . If a list with the specified name does not yet exist, it is created. The file extension can be omitted. See also 'Handling files in the default or in a specified directory'. List type / Command / File extension \n - Data list / ...:DLISt... / dm_iqd - Control list / ...:CLISt... / dm_iqc - User standard / ...:ULISt... / dm_stu - User filter files / ...:FLISt... / vaf - User mapping lists / ...:MLISt... / vam """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:CLISt:SELect?') return trim_str_response(response)
[docs] def set_select(self, filename: str) -> None: """ ``[SOURce<HW>]:BB:DM:CLISt:SELect`` \n Snippet: ``driver.source.bb.dm.clist.set_select(filename = 'abc')`` \n Selects the specified list file from the default directory or in the directory specified with the complete file path. See also method ``RsSmw.massMemory.current_directory()`` . If a list with the specified name does not yet exist, it is created. The file extension can be omitted. See also 'Handling files in the default or in a specified directory'. List type / Command / File extension \n - Data list / ...:DLISt... / dm_iqd - Control list / ...:CLISt... / dm_iqc - User standard / ...:ULISt... / dm_stu - User filter files / ...:FLISt... / vaf - User mapping lists / ...:MLISt... / vam :param filename: list name """ param = Conversions.value_to_quoted_str(filename) self._core.io.write(f'SOURce<HwInstance>:BB:DM:CLISt:SELect {param}')
[docs] def get_tag(self) -> str: """ ``[SOURce<HW>]:BB:DM:CLISt:TAG`` \n Snippet: ``value: str = driver.source.bb.dm.clist.get_tag()`` \n Queries the content of the specified tag in the selected file. :return: tag: control list,tag name For a description of the available tag formats, see 'Tags for waveforms, data and control lists'. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:CLISt:TAG?') return trim_str_response(response)