from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TracesCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("traces", core, parent)
[docs]
def set(self, selection: enums.SelectionScope) -> None:
"""
``FORMat:DIMPort:TRACes`` \n
Snippet: ``driver.applications.k40PhaseNoise.formatPy.dimport.traces.set(selection = enums.SelectionScope.ALL)`` \n
Selects the data to be included in a data import file (see method ``RsFsw.massMemory.load.trace.set()`` ) . For details
on importing data see 'How to import traces'.
:param selection: SINGle | ALL SINGle Only a single trace is selected for import, namely the one specified by the method ``RsFsw.massMemory.load.trace.set()`` command. ALL Imports several traces at once, overwriting the existing trace data for any active trace in the result display with the same trace number. Data from the import file for currently not active traces is not imported. The trace parameter for the method ``RsFsw.massMemory.load.trace.set()`` command is ignored.
"""
param = Conversions.enum_scalar_to_str(selection, enums.SelectionScope)
self._core.io.write(f'FORMat:DIMPort:TRACes {param}')
# noinspection PyTypeChecker
[docs]
def get(self) -> enums.SelectionScope:
"""
``FORMat:DIMPort:TRACes`` \n
Snippet: ``value: enums.SelectionScope = driver.applications.k40PhaseNoise.formatPy.dimport.traces.get()`` \n
Selects the data to be included in a data import file (see method ``RsFsw.massMemory.load.trace.set()`` ) . For details
on importing data see 'How to import traces'.
:return: selection: SINGle | ALL SINGle Only a single trace is selected for import, namely the one specified by the method ``RsFsw.massMemory.load.trace.set()`` command. ALL Imports several traces at once, overwriting the existing trace data for any active trace in the result display with the same trace number. Data from the import file for currently not active traces is not imported. The trace parameter for the method ``RsFsw.massMemory.load.trace.set()`` command is ignored.
"""
response = self._core.io.query_str(f'FORMat:DIMPort:TRACes?')
return Conversions.str_to_scalar_enum(response, enums.SelectionScope)