Source code for rsmxo.Implementations.HardCopy.Device

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


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

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

	# noinspection PyTypeChecker
[docs] def get_language(self) -> enums.PictureFileFormat: """ ``HCOPy:DEVice:LANGuage`` \n Snippet: ``value: enums.PictureFileFormat = driver.hardCopy.device.get_language()`` \n Defines the file format for output of the screenshot to file. To set the output to file, use HCOPy:DESTination<m> with parameter MMEM. :return: file_format: PNG | JPG """ response = self._core.io.query_str('HCOPy:DEVice:LANGuage?') return Conversions.str_to_scalar_enum(response, enums.PictureFileFormat)
[docs] def set_language(self, file_format: enums.PictureFileFormat) -> None: """ ``HCOPy:DEVice:LANGuage`` \n Snippet: ``driver.hardCopy.device.set_language(file_format = enums.PictureFileFormat.BMP)`` \n Defines the file format for output of the screenshot to file. To set the output to file, use HCOPy:DESTination<m> with parameter MMEM. :param file_format: PNG | JPG """ param = Conversions.enum_scalar_to_str(file_format, enums.PictureFileFormat) self._core.io.write(f'HCOPy:DEVice:LANGuage {param}')
[docs] def get_inverse(self) -> bool: """ ``HCOPy:DEVice:INVerse`` \n Snippet: ``value: bool = driver.hardCopy.device.get_inverse()`` \n Inverts the colors of the output, i.e. a dark waveform is shown on a white background. See also method ``RsMxo.hardCopy.wbkg()`` and 'White background'. :return: inverse_color: OFF | ON """ response = self._core.io.query_str('HCOPy:DEVice:INVerse?') return Conversions.str_to_bool(response)
[docs] def set_inverse(self, inverse_color: bool) -> None: """ ``HCOPy:DEVice:INVerse`` \n Snippet: ``driver.hardCopy.device.set_inverse(inverse_color = False)`` \n Inverts the colors of the output, i.e. a dark waveform is shown on a white background. See also method ``RsMxo.hardCopy.wbkg()`` and 'White background'. :param inverse_color: OFF | ON """ param = Conversions.bool_to_str(inverse_color) self._core.io.write(f'HCOPy:DEVice:INVerse {param}')