Source code for rsrtx.Implementations.HardCopy

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 HardCopyCls:
	"""
	| Commands in total: 11
	| Subgroups: 5
	| Direct child commands: 4
	"""

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

	@property
	def immediate(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_immediate'):
			from .Immediate import ImmediateCls
			self._immediate = ImmediateCls(self._core, self._cmd_group)
		return self._immediate

	@property
	def stabs(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_stabs'):
			from .Stabs import StabsCls
			self._stabs = StabsCls(self._core, self._cmd_group)
		return self._stabs

	@property
	def page(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_page'):
			from .Page import PageCls
			self._page = PageCls(self._core, self._cmd_group)
		return self._page

	@property
	def device(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_device'):
			from .Device import DeviceCls
			self._device = DeviceCls(self._core, self._cmd_group)
		return self._device

	@property
	def cmap(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_cmap'):
			from .Cmap import CmapCls
			self._cmap = CmapCls(self._core, self._cmd_group)
		return self._cmap

[docs] def get_destination(self) -> str: """ ``HCOPy:DESTination`` \n Snippet: ``value: str = driver.hardCopy.get_destination()`` \n Selects the output medium: file, printer or clipboard. :return: medium: String parameter \n - MMEM: Directs the display image to a file. The MMEMory:NAME command defines the file name. The file format is defined with HCOPy:DEVicem:LANGuage. - SYST:COMM:CLIP: Directs the hardcopy to the clipboard. """ response = self._core.io.query_str_with_opc('HCOPy:DESTination?') return trim_str_response(response)
[docs] def set_destination(self, medium: str) -> None: """ ``HCOPy:DESTination`` \n Snippet: ``driver.hardCopy.set_destination(medium = 'abc')`` \n Selects the output medium: file, printer or clipboard. :param medium: String parameter \n - MMEM: Directs the display image to a file. The MMEMory:NAME command defines the file name. The file format is defined with HCOPy:DEVicem:LANGuage. - SYST:COMM:CLIP: Directs the hardcopy to the clipboard. """ param = Conversions.value_to_quoted_str(medium) self._core.io.write_with_opc(f'HCOPy:DESTination {param}')
[docs] def get_wbkg(self) -> bool: """ ``HCOPy:WBKG`` \n Snippet: ``value: bool = driver.hardCopy.get_wbkg()`` \n Inverts the background color. So you can print waveforms with normal waveform collors on white background. If both method ``RsRtx.hardCopy.wbkg()`` and method ``RsRtx.hardCopy.device.inverse()`` are ON, the instrument inverts the background twice, and it appears black. See also: 'White background'. :return: white_background: OFF | ON """ response = self._core.io.query_str_with_opc('HCOPy:WBKG?') return Conversions.str_to_bool(response)
[docs] def set_wbkg(self, white_background: bool) -> None: """ ``HCOPy:WBKG`` \n Snippet: ``driver.hardCopy.set_wbkg(white_background = False)`` \n Inverts the background color. So you can print waveforms with normal waveform collors on white background. If both method ``RsRtx.hardCopy.wbkg()`` and method ``RsRtx.hardCopy.device.inverse()`` are ON, the instrument inverts the background twice, and it appears black. See also: 'White background'. :param white_background: OFF | ON """ param = Conversions.bool_to_str(white_background) self._core.io.write_with_opc(f'HCOPy:WBKG {param}')
[docs] def get_ssd(self) -> bool: """ ``HCOPy:SSD`` \n Snippet: ``value: bool = driver.hardCopy.get_ssd()`` \n Enables or disables the display of open dialogs in screenshots. Use this command if you want to document settings in screenshots. """ response = self._core.io.query_str_with_opc('HCOPy:SSD?') return Conversions.str_to_bool(response)
[docs] def set_ssd(self, shw_set_dialog: bool) -> None: """ ``HCOPy:SSD`` \n Snippet: ``driver.hardCopy.set_ssd(shw_set_dialog = False)`` \n Enables or disables the display of open dialogs in screenshots. Use this command if you want to document settings in screenshots. :param shw_set_dialog: OFF | ON """ param = Conversions.bool_to_str(shw_set_dialog) self._core.io.write_with_opc(f'HCOPy:SSD {param}')
[docs] def get_isba(self) -> bool: """ ``HCOPy:ISBA`` \n Snippet: ``value: bool = driver.hardCopy.get_isba()`` \n If the value is set to OFF, the screenshot shows only the diagram area, without the signal bar. """ response = self._core.io.query_str_with_opc('HCOPy:ISBA?') return Conversions.str_to_bool(response)
[docs] def set_isba(self, include_sign_bar: bool) -> None: """ ``HCOPy:ISBA`` \n Snippet: ``driver.hardCopy.set_isba(include_sign_bar = False)`` \n If the value is set to OFF, the screenshot shows only the diagram area, without the signal bar. """ param = Conversions.bool_to_str(include_sign_bar) self._core.io.write_with_opc(f'HCOPy:ISBA {param}')
def clone(self) -> 'HardCopyCls': """ 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 = HardCopyCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group