Source code for RsFsw.Implementations.MassMemory.Store.Tfactor

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal.Types import DataType
from ....Internal.StructBase import StructBase
from ....Internal.ArgStruct import ArgStruct
from ....Internal.ArgSingleList import ArgSingleList
from ....Internal.ArgSingle import ArgSingle
from .... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class TfactorCls: """Tfactor commands group definition. 1 total commands, 0 Subgroups, 1 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("tfactor", core, parent)
[docs] def set(self, filename: str, transd_name: str, store=repcap.Store.Default) -> None: """SCPI: MMEMory:STORe<n>:TFACtor \n Snippet: driver.massMemory.store.tfactor.set(filename = 'abc', transd_name = 'abc', store = repcap.Store.Default) \n Exports transducer factor data to an ASCII (CSV) file. For details on the file format see 'Reference: transducer factor file format'. \n :param filename: Name of the transducer factor to be exported. :param transd_name: Name of the transducer factor to be exported. :param store: optional repeated capability selector. Default value: Pos1 (settable in the interface 'Store') """ param = ArgSingleList().compose_cmd_string(ArgSingle('filename', filename, DataType.String), ArgSingle('transd_name', transd_name, DataType.String)) store_cmd_val = self._cmd_group.get_repcap_cmd_value(store, repcap.Store) self._core.io.write(f'MMEMory:STORe{store_cmd_val}:TFACtor {param}'.rstrip())
# noinspection PyTypeChecker
[docs] class TfactorStruct(StructBase): """Response structure. Fields: \n - Filename: str: Name of the transducer factor to be exported. - Transd_Name: str: Name of the transducer factor to be exported.""" __meta_args_list = [ ArgStruct.scalar_str('Filename'), ArgStruct.scalar_str('Transd_Name')] def __init__(self): StructBase.__init__(self, self) self.Filename: str = None self.Transd_Name: str = None
[docs] def get(self, store=repcap.Store.Default) -> TfactorStruct: """SCPI: MMEMory:STORe<n>:TFACtor \n Snippet: value: TfactorStruct = driver.massMemory.store.tfactor.get(store = repcap.Store.Default) \n Exports transducer factor data to an ASCII (CSV) file. For details on the file format see 'Reference: transducer factor file format'. \n :param store: optional repeated capability selector. Default value: Pos1 (settable in the interface 'Store') :return: structure: for return value, see the help for TfactorStruct structure arguments.""" store_cmd_val = self._cmd_group.get_repcap_cmd_value(store, repcap.Store) return self._core.io.query_struct(f'MMEMory:STORe{store_cmd_val}:TFACtor?', self.__class__.TfactorStruct())