Source code for RsSmbv.Implementations.Source.Pulm.Train

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 TrainCls:
	"""
	| Commands in total: 30
	| Subgroups: 5
	| Direct child commands: 3
	"""

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

	@property
	def dexchange(self):
		"""
		| Commands in total: 8
		| Subgroups: 2
		| Direct child commands: 2
		"""
		if not hasattr(self, '_dexchange'):
			from .Dexchange import DexchangeCls
			self._dexchange = DexchangeCls(self._core, self._cmd_group)
		return self._dexchange

	@property
	def hopping(self):
		"""
		| Commands in total: 13
		| Subgroups: 5
		| Direct child commands: 3
		"""
		if not hasattr(self, '_hopping'):
			from .Hopping import HoppingCls
			self._hopping = HoppingCls(self._core, self._cmd_group)
		return self._hopping

	@property
	def offTime(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_offTime'):
			from .OffTime import OffTimeCls
			self._offTime = OffTimeCls(self._core, self._cmd_group)
		return self._offTime

	@property
	def ontime(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_ontime'):
			from .Ontime import OntimeCls
			self._ontime = OntimeCls(self._core, self._cmd_group)
		return self._ontime

	@property
	def repetition(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_repetition'):
			from .Repetition import RepetitionCls
			self._repetition = RepetitionCls(self._core, self._cmd_group)
		return self._repetition

[docs] def get_catalog(self) -> List[str]: """ ``[SOURce<HW>]:PULM:TRAin:CATalog`` \n Snippet: ``value: List[str] = driver.source.pulm.train.get_catalog()`` \n Queries the available pulse train files in the specified directory. :return: catalog: string List of list filenames, separated by commas """ response = self._core.io.query_str('SOURce<HwInstance>:PULM:TRAin:CATalog?') return Conversions.str_to_str_list(response)
[docs] def delete(self, filename: str) -> None: """ ``[SOURce<HW>]:PULM:TRAin:DELete`` \n Snippet: ``driver.source.pulm.train.delete(filename = 'abc')`` \n Deletes the specified pulse train file. Refer to 'Accessing files in the default or in a specified directory' for general information on file handling in the default and in a specific directory. :param filename: string Filename or complete file path; file extension is optional. """ param = Conversions.value_to_quoted_str(filename) self._core.io.write(f'SOURce<HwInstance>:PULM:TRAin:DELete {param}')
[docs] def get_select(self) -> str: """ ``[SOURce<HW>]:PULM:TRAin:SELect`` \n Snippet: ``value: str = driver.source.pulm.train.get_select()`` \n Selects or creates a data list in pulse train mode. If the list with the selected name does not exist, a new list is created. :return: filename: string Filename or complete file path; file extension can be omitted. """ response = self._core.io.query_str('SOURce<HwInstance>:PULM:TRAin:SELect?') return trim_str_response(response)
[docs] def set_select(self, filename: str) -> None: """ ``[SOURce<HW>]:PULM:TRAin:SELect`` \n Snippet: ``driver.source.pulm.train.set_select(filename = 'abc')`` \n Selects or creates a data list in pulse train mode. If the list with the selected name does not exist, a new list is created. :param filename: string Filename or complete file path; file extension can be omitted. """ param = Conversions.value_to_quoted_str(filename) self._core.io.write(f'SOURce<HwInstance>:PULM:TRAin:SELect {param}')
def clone(self) -> 'TrainCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = TrainCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group