from typing import List
from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class DataCls:
"""Data commands group definition. 4 total commands, 2 Subgroups, 2 group commands"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("data", core, parent)
@property
def data(self):
"""data commands group. 0 Sub-classes, 1 commands."""
if not hasattr(self, '_data'):
from .Data import DataCls
self._data = DataCls(self._core, self._cmd_group)
return self._data
@property
def points(self):
"""points commands group. 0 Sub-classes, 1 commands."""
if not hasattr(self, '_points'):
from .Points import PointsCls
self._points = PointsCls(self._core, self._cmd_group)
return self._points
[docs] def delete(self, file_path: str) -> None:
"""SCPI: DATA:DELete \n
Snippet: driver.data.delete(file_path = '1') \n
Removes a file from the specified directory. \n
:param file_path: No help available
"""
param = Conversions.value_to_quoted_str(file_path)
self._core.io.write(f'DATA:DELete {param}')
[docs] def get_list_py(self) -> List[str]:
"""SCPI: DATA:LIST \n
Snippet: value: List[str] = driver.data.get_list_py() \n
Queries all files in a specified directory. \n
:return: result: No help available
"""
response = self._core.io.query_str('DATA:LIST?')
return Conversions.str_to_str_list(response)