Source code for rsrtx.rsrtx

from typing import ClassVar, List

from .Internal.Core import Core
from .Internal.InstrumentErrors import RsInstrException
from .Internal.CommandsGroup import CommandsGroup
from .Internal.VisaSession import VisaSession
from datetime import datetime, timedelta


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs] class RsRtx: """ | Commands in total: 4915 | Subgroups: 58 | Direct child commands: 1 """ _driver_options = "SupportedInstrModels = RTO/RTP, SupportedIdnPatterns = RTP/RTO, SimulationIdnString = 'Rohde&Schwarz,RTP,100001,5.55.0.0097'" # noinspection PyClassVar _global_logging_relative_timestamp: ClassVar[datetime] = None _global_logging_target_stream: ClassVar = None def __init__(self, resource_name: str, id_query: bool= True, reset: bool=False, options: str=None, direct_session: object=None): r""" Initializes new RsRtx session. \n Parameter options tokens examples: - ``Simulate=True`` - starts the session in simulation mode. Default: ``False`` - ``SelectVisa=socket`` - uses no VISA implementation for socket connections - you do not need any VISA-C installation - ``SelectVisa=rs`` - prefers usage of RohdeSchwarz VISA - ``SelectVisa=ivi`` - prefers usage of National Instruments VISA - ``SelectVisa=pyvisa-py`` - prefers usage of python VISA backend pyvisa-py - ``QueryInstrumentStatus = False`` - same as ``driver.utilities.instrument_status_checking = False``. Default: ``True`` - ``WriteDelay = 20, ReadDelay = 5`` - Introduces delay of 20ms before each write and 5ms before each read. Default: ``0ms`` for both - ``OpcWaitMode = OpcQuery`` - mode for all the opc-synchronized write/reads. Other modes: StbPolling, StbPollingSlow, StbPollingSuperSlow. Default: ``StbPolling`` - ``AddTermCharToWriteBinBLock = True`` - Adds one additional LF to the end of the binary data (some instruments require that). Default: ``False`` - ``AssureWriteWithTermChar = True`` - Makes sure each command/query is terminated with termination character. Default: Interface dependent - ``TerminationCharacter = "\r"`` - Sets the termination character for reading. Default: ``\n`` (LineFeed or LF) - ``DataChunkSize = 10E3`` - Maximum size of one write/read segment. If transferred data is bigger, it is split to more segments. Default: ``1E6`` bytes - ``OpcTimeout = 10000`` - same as driver.utilities.opc_timeout = 10000. Default: ``30000ms`` - ``VisaTimeout = 5000`` - same as driver.utilities.visa_timeout = 5000. Default: ``10000ms`` - ``ViClearExeMode = Disabled`` - viClear() execution mode. Default: ``execute_on_all`` - ``OpcQueryAfterWrite = True`` - same as driver.utilities.opc_query_after_write = True. Default: ``False`` - ``StbInErrorCheck = False`` - if true, the driver checks errors with \*STB? If false, it uses SYST:ERR?. Default: ``True`` - ``ScpiQuotes = double'. - for SCPI commands, you can define how strings are quoted. With single or double quotes. Possible values: single | double | {char}. Default: ``single`` - ``LoggingMode = On`` - Sets the logging status right from the start. Default: ``Off`` - ``LoggingName = 'MyDevice'`` - Sets the name to represent the session in the log entries. Default: ``'resource_name'`` - ``LogToGlobalTarget = True`` - Sets the logging target to the class-property previously set with RsRtx.set_global_logging_target() Default: ``False`` - ``LoggingToConsole = True`` - Immediately starts logging to the console. Default: False - ``LoggingToUdp = True`` - Immediately starts logging to the UDP port. Default: False - ``LoggingUdpPort = 49200`` - UDP port to log to. Default: 49200 :param resource_name: VISA resource name, e.g. 'TCPIP::192.168.2.1::INSTR' :param id_query: If True, the instrument's model name is verified against the models supported by the driver and eventually throws an exception. :param reset: Resets the instrument (sends \*RST command) and clears its status sybsystem. :param options: String tokens alternating the driver settings. More tokens are separated by comma. :param direct_session: Another driver object or pyVisa object to reuse the session instead of opening a new session. """ self._core = Core(resource_name, id_query, reset, RsRtx._driver_options, options, direct_session) self._core.driver_version = '5.55.0.0097' self._options = options self._add_all_global_repcaps() self._custom_properties_init() self.utilities.default_instrument_setup() # noinspection PyTypeChecker self._cmd_group = CommandsGroup("ROOT", self._core, None)
[docs] @classmethod def from_existing_session(cls, session: object, options: str=None) -> 'RsRtx': """ Creates a new RsRtx object with the entered 'session' reused. \n :param session: Can be another driver or a direct pyvisa session. :param options: String tokens alternating the driver settings. More tokens are separated by comma. """ # noinspection PyTypeChecker resource_name = None if hasattr(session, 'resource_name'): resource_name = getattr(session, 'resource_name') return cls(resource_name, False, False, options, session)
[docs] @classmethod def set_global_logging_target(cls, target) -> None: """ Sets global common target stream that each instance can use. To use it, call the following: io.utilities.logger.set_logging_target_global(). If an instance uses global logging target, it automatically uses the global relative timestamp (if set). You can set the target to None to invalidate it. """ cls._global_logging_target_stream = target
[docs] @classmethod def get_global_logging_target(cls): """ Returns global common target stream. """ return cls._global_logging_target_stream
[docs] @classmethod def set_global_logging_relative_timestamp(cls, timestamp: datetime) -> None: """ Sets global common relative timestamp for log entries. To use it, call the following: io.utilities.logger.set_relative_timestamp_global() """ cls._global_logging_relative_timestamp = timestamp
[docs] @classmethod def set_global_logging_relative_timestamp_now(cls) -> None: """ Sets global common relative timestamp for log entries to this moment. To use it, call the following: io.utilities.logger.set_relative_timestamp_global(). """ cls._global_logging_relative_timestamp = datetime.now()
[docs] @classmethod def clear_global_logging_relative_timestamp(cls) -> None: """ Clears the global relative timestamp. After this, all the instances using the global relative timestamp continue logging with the absolute timestamps. """ # noinspection PyTypeChecker cls._global_logging_relative_timestamp = None
[docs] @classmethod def get_global_logging_relative_timestamp(cls) -> datetime | None: """ Returns global common relative timestamp for log entries. """ return cls._global_logging_relative_timestamp
def __str__(self) -> str: if self._core.io: return f"RsRtx session '{self._core.io.resource_name}'" else: return f"RsRtx with session closed"
[docs] def get_total_execution_time(self) -> timedelta: """ Returns total time spent by the library on communicating with the instrument. This time is always shorter than get_total_time(), since it does not include gaps between the communication. You can reset this counter with reset_time_statistics(). """ return self._core.io.total_execution_time
[docs] def get_total_time(self) -> timedelta: """ Returns total time spent by the library on communicating with the instrument. This time is always shorter than get_total_time(), since it does not include gaps between the communication. You can reset this counter with reset_time_statistics(). """ return datetime.now() - self._core.io.total_time_startpoint
[docs] def reset_time_statistics(self) -> None: """ Resets all execution and total time counters. Affects the results of get_total_time() and get_total_execution_time() """ self._core.io.reset_time_statistics()
[docs] @staticmethod def assert_minimum_version(min_version: str) -> None: """ Asserts that the driver version fulfills the minimum required version you have entered. This way you make sure your installed driver is of the entered version or newer. """ min_version_list = min_version.split('.') curr_version_list = '5.55.0.0097'.split('.') count_min = len(min_version_list) count_curr = len(curr_version_list) count = count_min if count_min < count_curr else count_curr for i in range(count): minimum = int(min_version_list[i]) curr = int(curr_version_list[i]) if curr > minimum: break if curr < minimum: raise RsInstrException(f"Assertion for minimum RsRtx version failed. Current version: '5.55.0.0097', minimum required version: '{min_version}'")
[docs] @staticmethod def list_resources(expression: str = '?*::INSTR', visa_select: str=None) -> List[str]: """ Finds all the resources defined by the expression - '?*' - matches all the available instruments - 'USB::?*' - matches all the USB instruments - 'TCPIP::192?*' - matches all the LAN instruments with the IP address starting with 192 :param expression: see the examples in the function :param visa_select: optional parameter selecting a specific VISA. Examples: '@ivi', '@rs' """ rm = VisaSession.get_resource_manager(visa_select) resources = rm.list_resources(expression) rm.close() # noinspection PyTypeChecker return resources
[docs] def close(self) -> None: """ Closes the active RsRtx session. """ self._core.io.close()
[docs] def get_session_handle(self) -> object: """ Returns the underlying session handle. """ return self._core.get_session_handle()
def _add_all_global_repcaps(self) -> None: """ Adds all the repcaps defined as global to the instrument's global repcaps dictionary. """ def _custom_properties_init(self) -> None: """Adds all the interfaces that are custom for the driver.""" from .CustomFiles.utilities import Utilities self.utilities = Utilities(self._core) from .CustomFiles.events import Events self.events = Events(self._core) from .CustomFiles.ivi_utility import IviUtility self.ivi_utility = IviUtility(self._core) from .CustomFiles.ivi_direct_io import IviDirectIo self.ivi_direct_io = IviDirectIo(self._core) def _sync_to_custom_properties(self, cloned: 'RsRtx') -> None: """Synchronises the state of all the custom properties to the entered object.""" cloned.utilities.sync_from(self.utilities) cloned.events.sync_from(self.events) cloned.ivi_utility.sync_from(self.ivi_utility) cloned.ivi_direct_io.sync_from(self.ivi_direct_io) @property def system(self): """ | Commands in total: 21 | Subgroups: 6 | Direct child commands: 4 """ if not hasattr(self, '_system'): from .Implementations.System import SystemCls self._system = SystemCls(self._core, self._cmd_group) return self._system @property def massMemory(self): """ | Commands in total: 24 | Subgroups: 5 | Direct child commands: 11 """ if not hasattr(self, '_massMemory'): from .Implementations.MassMemory import MassMemoryCls self._massMemory = MassMemoryCls(self._core, self._cmd_group) return self._massMemory @property def channel(self): """ | Commands in total: 97 | Subgroups: 22 | Direct child commands: 0 """ if not hasattr(self, '_channel'): from .Implementations.Channel import ChannelCls self._channel = ChannelCls(self._core, self._cmd_group) return self._channel @property def hardCopy(self): """ | Commands in total: 11 | Subgroups: 5 | Direct child commands: 4 """ if not hasattr(self, '_hardCopy'): from .Implementations.HardCopy import HardCopyCls self._hardCopy = HardCopyCls(self._core, self._cmd_group) return self._hardCopy @property def run(self): """ | Commands in total: 2 | Subgroups: 0 | Direct child commands: 2 """ if not hasattr(self, '_run'): from .Implementations.Run import RunCls self._run = RunCls(self._core, self._cmd_group) return self._run @property def calculate(self): """ | Commands in total: 51 | Subgroups: 1 | Direct child commands: 0 """ if not hasattr(self, '_calculate'): from .Implementations.Calculate import CalculateCls self._calculate = CalculateCls(self._core, self._cmd_group) return self._calculate @property def digital(self): """ | Commands in total: 11 | Subgroups: 9 | Direct child commands: 0 """ if not hasattr(self, '_digital'): from .Implementations.Digital import DigitalCls self._digital = DigitalCls(self._core, self._cmd_group) return self._digital @property def raster(self): """ | Commands in total: 8 | Subgroups: 1 | Direct child commands: 6 """ if not hasattr(self, '_raster'): from .Implementations.Raster import RasterCls self._raster = RasterCls(self._core, self._cmd_group) return self._raster @property def formatPy(self): """ | Commands in total: 3 | Subgroups: 1 | Direct child commands: 2 """ if not hasattr(self, '_formatPy'): from .Implementations.FormatPy import FormatPyCls self._formatPy = FormatPyCls(self._core, self._cmd_group) return self._formatPy @property def iq(self): """ | Commands in total: 7 | Subgroups: 0 | Direct child commands: 7 """ if not hasattr(self, '_iq'): from .Implementations.Iq import IqCls self._iq = IqCls(self._core, self._cmd_group) return self._iq @property def acquire(self): """ | Commands in total: 25 | Subgroups: 3 | Direct child commands: 11 """ if not hasattr(self, '_acquire'): from .Implementations.Acquire import AcquireCls self._acquire = AcquireCls(self._core, self._cmd_group) return self._acquire @property def calibration(self): """ | Commands in total: 5 | Subgroups: 1 | Direct child commands: 3 """ if not hasattr(self, '_calibration'): from .Implementations.Calibration import CalibrationCls self._calibration = CalibrationCls(self._core, self._cmd_group) return self._calibration @property def cdr(self): """ | Commands in total: 24 | Subgroups: 2 | Direct child commands: 0 """ if not hasattr(self, '_cdr'): from .Implementations.Cdr import CdrCls self._cdr = CdrCls(self._core, self._cmd_group) return self._cdr @property def cursor(self): """ | Commands in total: 32 | Subgroups: 24 | Direct child commands: 0 """ if not hasattr(self, '_cursor'): from .Implementations.Cursor import CursorCls self._cursor = CursorCls(self._core, self._cmd_group) return self._cursor @property def display(self): """ | Commands in total: 46 | Subgroups: 10 | Direct child commands: 1 """ if not hasattr(self, '_display'): from .Implementations.Display import DisplayCls self._display = DisplayCls(self._core, self._cmd_group) return self._display @property def layout(self): """ | Commands in total: 45 | Subgroups: 4 | Direct child commands: 2 """ if not hasattr(self, '_layout'): from .Implementations.Layout import LayoutCls self._layout = LayoutCls(self._core, self._cmd_group) return self._layout @property def mtest(self): """ | Commands in total: 86 | Subgroups: 17 | Direct child commands: 6 """ if not hasattr(self, '_mtest'): from .Implementations.Mtest import MtestCls self._mtest = MtestCls(self._core, self._cmd_group) return self._mtest @property def measurement(self): """ | Commands in total: 246 | Subgroups: 36 | Direct child commands: 1 """ if not hasattr(self, '_measurement'): from .Implementations.Measurement import MeasurementCls self._measurement = MeasurementCls(self._core, self._cmd_group) return self._measurement @property def probe(self): """ | Commands in total: 71 | Subgroups: 6 | Direct child commands: 0 """ if not hasattr(self, '_probe'): from .Implementations.Probe import ProbeCls self._probe = ProbeCls(self._core, self._cmd_group) return self._probe @property def trProbe(self): """ | Commands in total: 33 | Subgroups: 3 | Direct child commands: 0 """ if not hasattr(self, '_trProbe'): from .Implementations.TrProbe import TrProbeCls self._trProbe = TrProbeCls(self._core, self._cmd_group) return self._trProbe @property def refCurve(self): """ | Commands in total: 33 | Subgroups: 15 | Direct child commands: 4 """ if not hasattr(self, '_refCurve'): from .Implementations.RefCurve import RefCurveCls self._refCurve = RefCurveCls(self._core, self._cmd_group) return self._refCurve @property def refLevel(self): """ | Commands in total: 39 | Subgroups: 8 | Direct child commands: 0 """ if not hasattr(self, '_refLevel'): from .Implementations.RefLevel import RefLevelCls self._refLevel = RefLevelCls(self._core, self._cmd_group) return self._refLevel @property def search(self): """ | Commands in total: 1207 | Subgroups: 6 | Direct child commands: 4 """ if not hasattr(self, '_search'): from .Implementations.Search import SearchCls self._search = SearchCls(self._core, self._cmd_group) return self._search @property def status(self): """ | Commands in total: 60 | Subgroups: 1 | Direct child commands: 0 """ if not hasattr(self, '_status'): from .Implementations.Status import StatusCls self._status = StatusCls(self._core, self._cmd_group) return self._status @property def timebase(self): """ | Commands in total: 9 | Subgroups: 2 | Direct child commands: 5 """ if not hasattr(self, '_timebase'): from .Implementations.Timebase import TimebaseCls self._timebase = TimebaseCls(self._core, self._cmd_group) return self._timebase @property def swTrigger(self): """ | Commands in total: 1 | Subgroups: 0 | Direct child commands: 1 """ if not hasattr(self, '_swTrigger'): from .Implementations.SwTrigger import SwTriggerCls self._swTrigger = SwTriggerCls(self._core, self._cmd_group) return self._swTrigger @property def trigger(self): """ | Commands in total: 864 | Subgroups: 65 | Direct child commands: 0 """ if not hasattr(self, '_trigger'): from .Implementations.Trigger import TriggerCls self._trigger = TriggerCls(self._core, self._cmd_group) return self._trigger @property def waveform(self): """ | Commands in total: 5 | Subgroups: 1 | Direct child commands: 0 """ if not hasattr(self, '_waveform'): from .Implementations.Waveform import WaveformCls self._waveform = WaveformCls(self._core, self._cmd_group) return self._waveform @property def sense(self): """ | Commands in total: 2 | Subgroups: 1 | Direct child commands: 0 """ if not hasattr(self, '_sense'): from .Implementations.Sense import SenseCls self._sense = SenseCls(self._core, self._cmd_group) return self._sense @property def export(self): """ | Commands in total: 34 | Subgroups: 5 | Direct child commands: 0 """ if not hasattr(self, '_export'): from .Implementations.Export import ExportCls self._export = ExportCls(self._core, self._cmd_group) return self._export @property def executable(self): """ | Commands in total: 3 | Subgroups: 0 | Direct child commands: 3 """ if not hasattr(self, '_executable'): from .Implementations.Executable import ExecutableCls self._executable = ExecutableCls(self._core, self._cmd_group) return self._executable @property def hdefinition(self): """ | Commands in total: 3 | Subgroups: 0 | Direct child commands: 3 """ if not hasattr(self, '_hdefinition'): from .Implementations.Hdefinition import HdefinitionCls self._hdefinition = HdefinitionCls(self._core, self._cmd_group) return self._hdefinition @property def eye(self): """ | Commands in total: 68 | Subgroups: 14 | Direct child commands: 0 """ if not hasattr(self, '_eye'): from .Implementations.Eye import EyeCls self._eye = EyeCls(self._core, self._cmd_group) return self._eye @property def deembedding(self): """ | Commands in total: 38 | Subgroups: 10 | Direct child commands: 4 """ if not hasattr(self, '_deembedding'): from .Implementations.Deembedding import DeembeddingCls self._deembedding = DeembeddingCls(self._core, self._cmd_group) return self._deembedding @property def psrc(self): """ | Commands in total: 6 | Subgroups: 1 | Direct child commands: 5 """ if not hasattr(self, '_psrc'): from .Implementations.Psrc import PsrcCls self._psrc = PsrcCls(self._core, self._cmd_group) return self._psrc @property def report(self): """ | Commands in total: 8 | Subgroups: 1 | Direct child commands: 6 """ if not hasattr(self, '_report'): from .Implementations.Report import ReportCls self._report = ReportCls(self._core, self._cmd_group) return self._report @property def zvc(self): """ | Commands in total: 37 | Subgroups: 1 | Direct child commands: 3 """ if not hasattr(self, '_zvc'): from .Implementations.Zvc import ZvcCls self._zvc = ZvcCls(self._core, self._cmd_group) return self._zvc @property def qaction(self): """ | Commands in total: 5 | Subgroups: 1 | Direct child commands: 4 """ if not hasattr(self, '_qaction'): from .Implementations.Qaction import QactionCls self._qaction = QactionCls(self._core, self._cmd_group) return self._qaction @property def tdrt(self): """ | Commands in total: 23 | Subgroups: 4 | Direct child commands: 7 """ if not hasattr(self, '_tdrt'): from .Implementations.Tdrt import TdrtCls self._tdrt = TdrtCls(self._core, self._cmd_group) return self._tdrt @property def differential(self): """ | Commands in total: 16 | Subgroups: 8 | Direct child commands: 0 """ if not hasattr(self, '_differential'): from .Implementations.Differential import DifferentialCls self._differential = DifferentialCls(self._core, self._cmd_group) return self._differential @property def advJitter(self): """ | Commands in total: 136 | Subgroups: 3 | Direct child commands: 0 """ if not hasattr(self, '_advJitter'): from .Implementations.AdvJitter import AdvJitterCls self._advJitter = AdvJitterCls(self._core, self._cmd_group) return self._advJitter @property def efrontend(self): """ | Commands in total: 4 | Subgroups: 1 | Direct child commands: 3 """ if not hasattr(self, '_efrontend'): from .Implementations.Efrontend import EfrontendCls self._efrontend = EfrontendCls(self._core, self._cmd_group) return self._efrontend @property def signalConfig(self): """ | Commands in total: 10 | Subgroups: 1 | Direct child commands: 0 """ if not hasattr(self, '_signalConfig'): from .Implementations.SignalConfig import SignalConfigCls self._signalConfig = SignalConfigCls(self._core, self._cmd_group) return self._signalConfig @property def lane(self): """ | Commands in total: 116 | Subgroups: 10 | Direct child commands: 3 """ if not hasattr(self, '_lane'): from .Implementations.Lane import LaneCls self._lane = LaneCls(self._core, self._cmd_group) return self._lane @property def autoScale(self): """ | Commands in total: 1 | Subgroups: 0 | Direct child commands: 1 """ if not hasattr(self, '_autoScale'): from .Implementations.AutoScale import AutoScaleCls self._autoScale = AutoScaleCls(self._core, self._cmd_group) return self._autoScale @property def vautoscale(self): """ | Commands in total: 1 | Subgroups: 0 | Direct child commands: 1 """ if not hasattr(self, '_vautoscale'): from .Implementations.Vautoscale import VautoscaleCls self._vautoscale = VautoscaleCls(self._core, self._cmd_group) return self._vautoscale @property def runContinous(self): """ | Commands in total: 1 | Subgroups: 0 | Direct child commands: 1 """ if not hasattr(self, '_runContinous'): from .Implementations.RunContinous import RunContinousCls self._runContinous = RunContinousCls(self._core, self._cmd_group) return self._runContinous @property def triggerInvoke(self): """ | Commands in total: 1 | Subgroups: 0 | Direct child commands: 1 """ if not hasattr(self, '_triggerInvoke'): from .Implementations.TriggerInvoke import TriggerInvokeCls self._triggerInvoke = TriggerInvokeCls(self._core, self._cmd_group) return self._triggerInvoke @property def power(self): """ | Commands in total: 284 | Subgroups: 17 | Direct child commands: 0 """ if not hasattr(self, '_power'): from .Implementations.Power import PowerCls self._power = PowerCls(self._core, self._cmd_group) return self._power @property def genType(self): """ | Commands in total: 1 | Subgroups: 1 | Direct child commands: 0 """ if not hasattr(self, '_genType'): from .Implementations.GenType import GenTypeCls self._genType = GenTypeCls(self._core, self._cmd_group) return self._genType @property def wgenerator(self): """ | Commands in total: 63 | Subgroups: 12 | Direct child commands: 1 """ if not hasattr(self, '_wgenerator'): from .Implementations.Wgenerator import WgeneratorCls self._wgenerator = WgeneratorCls(self._core, self._cmd_group) return self._wgenerator @property def pgenerator(self): """ | Commands in total: 8 | Subgroups: 2 | Direct child commands: 5 """ if not hasattr(self, '_pgenerator'): from .Implementations.Pgenerator import PgeneratorCls self._pgenerator = PgeneratorCls(self._core, self._cmd_group) return self._pgenerator @property def generator(self): """ | Commands in total: 6 | Subgroups: 2 | Direct child commands: 0 """ if not hasattr(self, '_generator'): from .Implementations.Generator import GeneratorCls self._generator = GeneratorCls(self._core, self._cmd_group) return self._generator @property def gpib(self): """ | Commands in total: 2 | Subgroups: 0 | Direct child commands: 2 """ if not hasattr(self, '_gpib'): from .Implementations.Gpib import GpibCls self._gpib = GpibCls(self._core, self._cmd_group) return self._gpib @property def saveset(self): """ | Commands in total: 5 | Subgroups: 2 | Direct child commands: 0 """ if not hasattr(self, '_saveset'): from .Implementations.Saveset import SavesetCls self._saveset = SavesetCls(self._core, self._cmd_group) return self._saveset @property def usrDefined(self): """ | Commands in total: 4 | Subgroups: 1 | Direct child commands: 0 """ if not hasattr(self, '_usrDefined'): from .Implementations.UsrDefined import UsrDefinedCls self._usrDefined = UsrDefinedCls(self._core, self._cmd_group) return self._usrDefined @property def bus(self): """ | Commands in total: 932 | Subgroups: 43 | Direct child commands: 0 """ if not hasattr(self, '_bus'): from .Implementations.Bus import BusCls self._bus = BusCls(self._core, self._cmd_group) return self._bus @property def diagnostic(self): """ | Commands in total: 30 | Subgroups: 1 | Direct child commands: 0 """ if not hasattr(self, '_diagnostic'): from .Implementations.Diagnostic import DiagnosticCls self._diagnostic = DiagnosticCls(self._core, self._cmd_group) return self._diagnostic
[docs] def stop(self, opc_timeout_ms: int = -1) -> None: """ ``STOP`` \n Snippet: ``driver.stop()`` \n Stops the running acquistion. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'STOP', opc_timeout_ms)
def clone(self) -> 'RsRtx': """ Creates a deep copy of the RsRtx object. Also copies: - All the existing Global repeated capability values - All the default group repeated capabilities setting \n Does not check the *IDN? response, and does not perform Reset. After cloning, you can set all the repeated capabilities settings independentely from the original group. Calling close() on the new object does not close the original VISA session """ cloned = RsRtx.from_existing_session(self.get_session_handle(), self._options) self._cmd_group.synchronize_repcaps(cloned) self._sync_to_custom_properties(cloned) return cloned
[docs] def restore_all_repcaps_to_default(self) -> None: """ Sets all the Group and Global repcaps to their initial values. """ self._cmd_group.restore_repcaps()