from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal.Utilities import trim_str_response
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class IdCls:
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("id", core, parent)
[docs]
def get_part_number(self) -> str:
"""
``TRPRobe:ID:PARTnumber`` \n
Snippet: ``value: str = driver.trProbe.id.get_part_number()`` \n
Queries the R&S part number of the probe.
:return: part_number: Part number in a string.
"""
response = self._core.io.query_str_with_opc('TRPRobe:ID:PARTnumber?')
return trim_str_response(response)
[docs]
def get_pr_date(self) -> str:
"""
``TRPRobe:ID:PRDate`` \n
Snippet: ``value: str = driver.trProbe.id.get_pr_date()`` \n
Queries the production date of the probe.
:return: production_date: Date in a string.
"""
response = self._core.io.query_str_with_opc('TRPRobe:ID:PRDate?')
return trim_str_response(response)
[docs]
def get_sr_number(self) -> str:
"""
``TRPRobe:ID:SRNumber`` \n
Snippet: ``value: str = driver.trProbe.id.get_sr_number()`` \n
Queries the serial number of the probe.
:return: serial_no: Serial number in a string.
"""
response = self._core.io.query_str_with_opc('TRPRobe:ID:SRNumber?')
return trim_str_response(response)
[docs]
def get_sw_version(self) -> str:
"""
``TRPRobe:ID:SWVersion`` \n
Snippet: ``value: str = driver.trProbe.id.get_sw_version()`` \n
Queries the version of the probe firmware.
:return: software_version: Version number in a string.
"""
response = self._core.io.query_str_with_opc('TRPRobe:ID:SWVersion?')
return trim_str_response(response)