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

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 FlistCls:
	"""
	| Commands in total: 5
	| Subgroups: 0
	| Direct child commands: 5
	"""

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

[docs] def get_catalog(self) -> List[str]: """ ``[SOURce<HW>]:BB:DM:FLISt:CATalog`` \n Snippet: ``value: List[str] = driver.source.bb.dm.flist.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:FLISt:CATalog?') return Conversions.str_to_str_list(response)
[docs] def delete(self, filename: str) -> None: """ ``[SOURce<HW>]:BB:DM:FLISt:DELete`` \n Snippet: ``driver.source.bb.dm.flist.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:FLISt:DELete {param}')
[docs] def get_free(self) -> int: """ ``[SOURce<HW>]:BB:DM:FLISt:FREE`` \n Snippet: ``value: int = driver.source.bb.dm.flist.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:FLISt:FREE?') return Conversions.str_to_int(response)
[docs] def get_points(self) -> int: """ ``[SOURce<HW>]:BB:DM:FLISt:POINts`` \n Snippet: ``value: int = driver.source.bb.dm.flist.get_points()`` \n Queries the user modulation mapping/user filter list length. :return: points: integer Range: max """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:FLISt:POINts?') return Conversions.str_to_int(response)
[docs] def get_select(self) -> str: """ ``[SOURce<HW>]:BB:DM:FLISt:SELect`` \n Snippet: ``value: str = driver.source.bb.dm.flist.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:FLISt:SELect?') return trim_str_response(response)
[docs] def set_select(self, filename: str) -> None: """ ``[SOURce<HW>]:BB:DM:FLISt:SELect`` \n Snippet: ``driver.source.bb.dm.flist.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:FLISt:SELect {param}')