Source code for RsSmw.Implementations.HardCopy

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class HardCopyCls:
	"""
	| Commands in total: 17
	| Subgroups: 4
	| Direct child commands: 2
	"""

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

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

	@property
	def file(self):
		"""
		| Commands in total: 12
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_file'):
			from .File import FileCls
			self._file = FileCls(self._core, self._cmd_group)
		return self._file

	@property
	def image(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_image'):
			from .Image import ImageCls
			self._image = ImageCls(self._core, self._cmd_group)
		return self._image

	@property
	def execute(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_execute'):
			from .Execute import ExecuteCls
			self._execute = ExecuteCls(self._core, self._cmd_group)
		return self._execute

[docs] def get_data(self) -> bytes: """ ``HCOPy:DATA`` \n Snippet: ``value: bytes = driver.hardCopy.get_data()`` \n Transfers the hard copy data directly as a NByte stream to the remote client. :return: data: block data """ response = self._core.io.query_bin_block('HCOPy:DATA?') return response
# noinspection PyTypeChecker
[docs] def get_region(self) -> enums.HardCopyRegion: """ ``HCOPy:REGion`` \n Snippet: ``value: enums.HardCopyRegion = driver.hardCopy.get_region()`` \n Selects the area to be copied. You can create a snapshot of the screen or an active dialog. :return: region: ALL | DIALog """ response = self._core.io.query_str('HCOPy:REGion?') return Conversions.str_to_scalar_enum(response, enums.HardCopyRegion)
[docs] def set_region(self, region: enums.HardCopyRegion) -> None: """ ``HCOPy:REGion`` \n Snippet: ``driver.hardCopy.set_region(region = enums.HardCopyRegion.ALL)`` \n Selects the area to be copied. You can create a snapshot of the screen or an active dialog. :param region: ALL | DIALog """ param = Conversions.enum_scalar_to_str(region, enums.HardCopyRegion) self._core.io.write(f'HCOPy:REGion {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