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 ExportCls:
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("export", core, parent)
[docs]
def save(self, opc_timeout_ms: int = -1) -> None:
"""
``RASTer:EXPort:SAVE`` \n
Snippet: ``driver.raster.export.save()`` \n
Saves the raster image to the file specified with method ``RsRtx.raster.export.path()`` .
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'RASTer:EXPort:SAVE', opc_timeout_ms)
[docs]
def get_path(self) -> str:
"""
``RASTer:EXPort:PATH`` \n
Snippet: ``value: str = driver.raster.export.get_path()`` \n
Sets the file name, file format and path of the image file.
"""
response = self._core.io.query_str_with_opc('RASTer:EXPort:PATH?')
return trim_str_response(response)
[docs]
def set_path(self, image_path: str) -> None:
"""
``RASTer:EXPort:PATH`` \n
Snippet: ``driver.raster.export.set_path(image_path = 'abc')`` \n
Sets the file name, file format and path of the image file.
:param image_path: String with path and file name with extension .png or .jpg.
"""
param = Conversions.value_to_quoted_str(image_path)
self._core.io.write_with_opc(f'RASTer:EXPort:PATH {param}')