Source code for rsrtx.Implementations.Generator.Sync

from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SyncCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

	# noinspection PyTypeChecker
[docs] def get_combination(self) -> enums.GenSyncCombination: """ ``GENerator:SYNC[:COMBination]`` \n Snippet: ``value: enums.GenSyncCombination = driver.generator.sync.get_combination()`` \n Sets which signals generated from the waveform generator are synchronized. :return: combination: GEN12: Gen1 and Gen 2 GEN1PG/GEN2PG: Gen1/Gen 2 and Patt Gen GEN12PG: Gen1,Gen 2 and Patt Gen """ response = self._core.io.query_str('GENerator:SYNC:COMBination?') return Conversions.str_to_scalar_enum(response, enums.GenSyncCombination)
[docs] def set_combination(self, combination: enums.GenSyncCombination) -> None: """ ``GENerator:SYNC[:COMBination]`` \n Snippet: ``driver.generator.sync.set_combination(combination = enums.GenSyncCombination.G12PG)`` \n Sets which signals generated from the waveform generator are synchronized. :param combination: GEN12: Gen1 and Gen 2 GEN1PG/GEN2PG: Gen1/Gen 2 and Patt Gen GEN12PG: Gen1,Gen 2 and Patt Gen """ param = Conversions.enum_scalar_to_str(combination, enums.GenSyncCombination) self._core.io.write(f'GENerator:SYNC:COMBination {param}')