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 display image to file. To set the output to file, use HCOPy:DESTination<m> with
parameter 'MMEM'.
:return: file_format: PNG | JPG | BMP | TIFF | PDF
"""
response = self._core.io.query_str_with_opc('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 display image to file. To set the output to file, use HCOPy:DESTination<m> with
parameter 'MMEM'.
:param file_format: PNG | JPG | BMP | TIFF | PDF
"""
param = Conversions.enum_scalar_to_str(file_format, enums.PictureFileFormat)
self._core.io.write_with_opc(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 printed on a white background. Screenshots are inverted per
default when you save using remote commands. Turn inversion off if you want the screen display in the screenshot.
See also: \n
- method ``RsRtx.hardCopy.wbkg()``
- 'White background'
:return: inverse_color: OFF | ON
"""
response = self._core.io.query_str_with_opc('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 printed on a white background. Screenshots are inverted per
default when you save using remote commands. Turn inversion off if you want the screen display in the screenshot.
See also: \n
- method ``RsRtx.hardCopy.wbkg()``
- 'White background'
:param inverse_color: OFF | ON
"""
param = Conversions.bool_to_str(inverse_color)
self._core.io.write_with_opc(f'HCOPy:DEVice:INVerse {param}')