from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Utilities import trim_str_response
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ReportCls:
"""
| Commands in total: 34
| Subgroups: 4
| Direct child commands: 8
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("report", core, parent)
@property
def file(self):
"""
| Commands in total: 4
| Subgroups: 1
| Direct child commands: 3
"""
if not hasattr(self, '_file'):
from .File import FileCls
self._file = FileCls(self._core, self._cmd_group)
return self._file
@property
def font(self):
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
if not hasattr(self, '_font'):
from .Font import FontCls
self._font = FontCls(self._core, self._cmd_group)
return self._font
@property
def test(self):
"""
| Commands in total: 11
| Subgroups: 6
| Direct child commands: 5
"""
if not hasattr(self, '_test'):
from .Test import TestCls
self._test = TestCls(self._core, self._cmd_group)
return self._test
@property
def content(self):
"""
| Commands in total: 8
| Subgroups: 0
| Direct child commands: 8
"""
if not hasattr(self, '_content'):
from .Content import ContentCls
self._content = ContentCls(self._core, self._cmd_group)
return self._content
# noinspection PyTypeChecker
[docs]
def get_paper_size(self) -> enums.PaperSize:
"""
``POWer:REPort:PAPersize`` \n
Snippet: ``value: enums.PaperSize = driver.power.report.get_paper_size()`` \n
Set the layout of your report.
:return: paper_size: A4 | USL
"""
response = self._core.io.query_str('POWer:REPort:PAPersize?')
return Conversions.str_to_scalar_enum(response, enums.PaperSize)
[docs]
def set_paper_size(self, paper_size: enums.PaperSize) -> None:
"""
``POWer:REPort:PAPersize`` \n
Snippet: ``driver.power.report.set_paper_size(paper_size = enums.PaperSize.A4)`` \n
Set the layout of your report.
:param paper_size: A4 | USL
"""
param = Conversions.enum_scalar_to_str(paper_size, enums.PaperSize)
self._core.io.write(f'POWer:REPort:PAPersize {param}')
[docs]
def get_invert(self) -> bool:
"""
``POWer:REPort:INVert`` \n
Snippet: ``value: bool = driver.power.report.get_invert()`` \n
Manage the selection of reports.
"""
response = self._core.io.query_str('POWer:REPort:INVert?')
return Conversions.str_to_bool(response)
[docs]
def set_invert(self, invert_screenshot_clr: bool) -> None:
"""
``POWer:REPort:INVert`` \n
Snippet: ``driver.power.report.set_invert(invert_screenshot_clr = False)`` \n
Manage the selection of reports.
:param invert_screenshot_clr: QUAL | RUSH | HARM | MODU | DONR | SLEW | SOA | TURN | SWIT | EFF | RIPP | TRANS | SPEC \n
- QUAL: Power Quality
- RUSH: Inrush Current
- HARM: Current Harmonic
- MODU: Modulation Analysis
- DONR: Dynamic ON Resistance
- SLEW: Slew Rate
- SOA: Safe Operating Area (S.O.A.)
- TURN: Turn On/Off
- SWIT: Switching Loss
- EFF: Power Efficiency
- RIPP: Ripple
- TRANS: Transient Response
- SPEC: Spectrum
"""
param = Conversions.bool_to_str(invert_screenshot_clr)
self._core.io.write(f'POWer:REPort:INVert {param}')
[docs]
def get_logo(self) -> str:
"""
``POWer:REPort:LOGO`` \n
Snippet: ``value: str = driver.power.report.get_logo()`` \n
Selects a path to a logo picture file.
"""
response = self._core.io.query_str('POWer:REPort:LOGO?')
return trim_str_response(response)
[docs]
def set_logo(self, logo_file: str) -> None:
"""
``POWer:REPort:LOGO`` \n
Snippet: ``driver.power.report.set_logo(logo_file = 'abc')`` \n
Selects a path to a logo picture file.
"""
param = Conversions.value_to_quoted_str(logo_file)
self._core.io.write(f'POWer:REPort:LOGO {param}')
[docs]
def get_dut(self) -> str:
"""
``POWer:REPort:DUT`` \n
Snippet: ``value: str = driver.power.report.get_dut()`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
response = self._core.io.query_str('POWer:REPort:DUT?')
return trim_str_response(response)
[docs]
def set_dut(self, dut: str) -> None:
"""
``POWer:REPort:DUT`` \n
Snippet: ``driver.power.report.set_dut(dut = 'abc')`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
param = Conversions.value_to_quoted_str(dut)
self._core.io.write(f'POWer:REPort:DUT {param}')
[docs]
def get_user(self) -> str:
"""
``POWer:REPort:USER`` \n
Snippet: ``value: str = driver.power.report.get_user()`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
response = self._core.io.query_str('POWer:REPort:USER?')
return trim_str_response(response)
[docs]
def set_user(self, user: str) -> None:
"""
``POWer:REPort:USER`` \n
Snippet: ``driver.power.report.set_user(user = 'abc')`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
param = Conversions.value_to_quoted_str(user)
self._core.io.write(f'POWer:REPort:USER {param}')
[docs]
def get_site(self) -> str:
"""
``POWer:REPort:SITE`` \n
Snippet: ``value: str = driver.power.report.get_site()`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
response = self._core.io.query_str('POWer:REPort:SITE?')
return trim_str_response(response)
[docs]
def set_site(self, site: str) -> None:
"""
``POWer:REPort:SITE`` \n
Snippet: ``driver.power.report.set_site(site = 'abc')`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
param = Conversions.value_to_quoted_str(site)
self._core.io.write(f'POWer:REPort:SITE {param}')
[docs]
def get_temperature(self) -> float:
"""
``POWer:REPort:TEMPerature`` \n
Snippet: ``value: float = driver.power.report.get_temperature()`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
response = self._core.io.query_str('POWer:REPort:TEMPerature?')
return Conversions.str_to_float(response)
[docs]
def set_temperature(self, temperature: float) -> None:
"""
``POWer:REPort:TEMPerature`` \n
Snippet: ``driver.power.report.set_temperature(temperature = 1.0)`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
param = Conversions.decimal_value_to_str(temperature)
self._core.io.write(f'POWer:REPort:TEMPerature {param}')
[docs]
def get_description(self) -> str:
"""
``POWer:REPort:DESCription`` \n
Snippet: ``value: str = driver.power.report.get_description()`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
response = self._core.io.query_str('POWer:REPort:DESCription?')
return trim_str_response(response)
[docs]
def set_description(self, description: str) -> None:
"""
``POWer:REPort:DESCription`` \n
Snippet: ``driver.power.report.set_description(description = 'abc')`` \n
The content of the strings is shown at the title page of a report if the title page is included in the report.
"""
param = Conversions.value_to_quoted_str(description)
self._core.io.write(f'POWer:REPort:DESCription {param}')
def clone(self) -> 'ReportCls':
"""
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 = ReportCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group