diff --git a/CHANGELOG.md b/CHANGELOG.md index e81b2128..6ed455b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ Things to be included in the next release go here. - This file is located next to the main log file and will start with the same name, but have the unique address of the device appended. - This file will only be created if file logging is enabled for the package (which is the default behavior). - Full Python API support for the MDO3 model. +- Added fast acquisition support for the MSO2 model. ### Changed diff --git a/src/tm_devices/commands/gen_1zn03_mso/acquire.py b/src/tm_devices/commands/gen_1zn03_mso/acquire.py index 52077b16..fec6c49a 100644 --- a/src/tm_devices/commands/gen_1zn03_mso/acquire.py +++ b/src/tm_devices/commands/gen_1zn03_mso/acquire.py @@ -9,6 +9,10 @@ Commands and Queries: ``` + - ACQuire:FASTAcq:PALEtte {NORMal|TEMPerature|SPECtral|INVErted} + - ACQuire:FASTAcq:PALEtte? + - ACQuire:FASTAcq:STATE {ON|OFF|} + - ACQuire:FASTAcq:STATE? - ACQuire:MAXSamplerate? - ACQuire:MODe {SAMple|PEAKdetect|HIRes|AVErage|ENVelope} - ACQuire:MODe? @@ -354,6 +358,145 @@ class AcquireMaxsamplerate(SCPICmdRead): """ +class AcquireFastacqState(SCPICmdWrite, SCPICmdRead): + """The ``ACQuire:FASTAcq:STATE`` command. + + Description: + - Sets or queries the state of fast acquisition mode. + + Usage: + - Using the ``.query()`` method will send the ``ACQuire:FASTAcq:STATE?`` query. + - Using the ``.verify(value)`` method will send the ``ACQuire:FASTAcq:STATE?`` query and + raise an AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``ACQuire:FASTAcq:STATE value`` command. + + SCPI Syntax: + ``` + - ACQuire:FASTAcq:STATE {ON|OFF|} + - ACQuire:FASTAcq:STATE? + ``` + + Info: + - ```` = 0 disables FASTAcq; any other value turns this feature on. + - ``OFF`` disables the FASTAcq feature. + - ``ON`` enables the FASTAcq feature. + """ + + +class AcquireFastacqPalette(SCPICmdWrite, SCPICmdRead): + """The ``ACQuire:FASTAcq:PALEtte`` command. + + Description: + - Sets or queries the waveform grading for fast acquisition mode. + + Usage: + - Using the ``.query()`` method will send the ``ACQuire:FASTAcq:PALEtte?`` query. + - Using the ``.verify(value)`` method will send the ``ACQuire:FASTAcq:PALEtte?`` query and + raise an AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``ACQuire:FASTAcq:PALEtte value`` + command. + + SCPI Syntax: + ``` + - ACQuire:FASTAcq:PALEtte {NORMal|TEMPerature|SPECtral|INVErted} + - ACQuire:FASTAcq:PALEtte? + ``` + + Info: + - ``NORMal`` colors traces according to their channel. + - ``TEMPerature`` colors all traces using a multicolored palette, where 'intensity' is + represented by hue; blue for least frequently hit, red for most frequently hit. All traces + share this palette. This is the default color palette. + - ``SPECtral`` colors all traces using a multicolored palette, where 'intensity' is + represented by hue; red for least frequently hit, blue for most frequently hit. All traces + share this palette. + - ``INVErted`` Inverts the normal display hues and lightness levels based on sample + intensity. The areas of lowest sample density appear the brightest, while the areas with + the highest sample density appear the darkest. + """ + + +class AcquireFastacq(SCPICmdRead): + """The ``ACQuire:FASTAcq`` command tree. + + Usage: + - Using the ``.query()`` method will send the ``ACQuire:FASTAcq?`` query. + - Using the ``.verify(value)`` method will send the ``ACQuire:FASTAcq?`` query and raise an + AssertionError if the returned value does not match ``value``. + + Properties: + - ``.palette``: The ``ACQuire:FASTAcq:PALEtte`` command. + - ``.state``: The ``ACQuire:FASTAcq:STATE`` command. + """ + + def __init__(self, device: Optional["PIControl"], cmd_syntax: str) -> None: + super().__init__(device, cmd_syntax) + self._palette = AcquireFastacqPalette(device, f"{self._cmd_syntax}:PALEtte") + self._state = AcquireFastacqState(device, f"{self._cmd_syntax}:STATE") + + @property + def palette(self) -> AcquireFastacqPalette: + """Return the ``ACQuire:FASTAcq:PALEtte`` command. + + Description: + - Sets or queries the waveform grading for fast acquisition mode. + + Usage: + - Using the ``.query()`` method will send the ``ACQuire:FASTAcq:PALEtte?`` query. + - Using the ``.verify(value)`` method will send the ``ACQuire:FASTAcq:PALEtte?`` query + and raise an AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``ACQuire:FASTAcq:PALEtte value`` + command. + + SCPI Syntax: + ``` + - ACQuire:FASTAcq:PALEtte {NORMal|TEMPerature|SPECtral|INVErted} + - ACQuire:FASTAcq:PALEtte? + ``` + + Info: + - ``NORMal`` colors traces according to their channel. + - ``TEMPerature`` colors all traces using a multicolored palette, where 'intensity' is + represented by hue; blue for least frequently hit, red for most frequently hit. All + traces share this palette. This is the default color palette. + - ``SPECtral`` colors all traces using a multicolored palette, where 'intensity' is + represented by hue; red for least frequently hit, blue for most frequently hit. All + traces share this palette. + - ``INVErted`` Inverts the normal display hues and lightness levels based on sample + intensity. The areas of lowest sample density appear the brightest, while the areas + with the highest sample density appear the darkest. + """ + return self._palette + + @property + def state(self) -> AcquireFastacqState: + """Return the ``ACQuire:FASTAcq:STATE`` command. + + Description: + - Sets or queries the state of fast acquisition mode. + + Usage: + - Using the ``.query()`` method will send the ``ACQuire:FASTAcq:STATE?`` query. + - Using the ``.verify(value)`` method will send the ``ACQuire:FASTAcq:STATE?`` query and + raise an AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``ACQuire:FASTAcq:STATE value`` + command. + + SCPI Syntax: + ``` + - ACQuire:FASTAcq:STATE {ON|OFF|} + - ACQuire:FASTAcq:STATE? + ``` + + Info: + - ```` = 0 disables FASTAcq; any other value turns this feature on. + - ``OFF`` disables the FASTAcq feature. + - ``ON`` enables the FASTAcq feature. + """ + return self._state + + +# pylint: disable=too-many-instance-attributes class Acquire(SCPICmdRead): """The ``ACQuire`` command. @@ -371,6 +514,7 @@ class Acquire(SCPICmdRead): ``` Properties: + - ``.fastacq``: The ``ACQuire:FASTAcq`` command tree. - ``.maxsamplerate``: The ``ACQuire:MAXSamplerate`` command. - ``.mode``: The ``ACQuire:MODe`` command. - ``.numacq``: The ``ACQuire:NUMACq`` command. @@ -382,6 +526,7 @@ class Acquire(SCPICmdRead): def __init__(self, device: Optional["PIControl"] = None, cmd_syntax: str = "ACQuire") -> None: super().__init__(device, cmd_syntax) + self._fastacq = AcquireFastacq(device, f"{self._cmd_syntax}:FASTAcq") self._maxsamplerate = AcquireMaxsamplerate(device, f"{self._cmd_syntax}:MAXSamplerate") self._mode = AcquireMode(device, f"{self._cmd_syntax}:MODe") self._numacq = AcquireNumacq(device, f"{self._cmd_syntax}:NUMACq") @@ -390,6 +535,21 @@ def __init__(self, device: Optional["PIControl"] = None, cmd_syntax: str = "ACQu self._state = AcquireState(device, f"{self._cmd_syntax}:STATE") self._stopafter = AcquireStopafter(device, f"{self._cmd_syntax}:STOPAfter") + @property + def fastacq(self) -> AcquireFastacq: + """Return the ``ACQuire:FASTAcq`` command tree. + + Usage: + - Using the ``.query()`` method will send the ``ACQuire:FASTAcq?`` query. + - Using the ``.verify(value)`` method will send the ``ACQuire:FASTAcq?`` query and raise + an AssertionError if the returned value does not match ``value``. + + Sub-properties: + - ``.palette``: The ``ACQuire:FASTAcq:PALEtte`` command. + - ``.state``: The ``ACQuire:FASTAcq:STATE`` command. + """ + return self._fastacq + @property def maxsamplerate(self) -> AcquireMaxsamplerate: """Return the ``ACQuire:MAXSamplerate`` command. diff --git a/src/tm_devices/commands/gen_1zn03_mso/mask.py b/src/tm_devices/commands/gen_1zn03_mso/mask.py index f5e3d370..57ae50fe 100644 --- a/src/tm_devices/commands/gen_1zn03_mso/mask.py +++ b/src/tm_devices/commands/gen_1zn03_mso/mask.py @@ -11,6 +11,7 @@ ``` - MASK:DELete 'MASK' - MASK:MASK:COUNT:HITS? + - MASK:MASK:COUNT:SEG:HITS? - MASK:MASK:COUNT? - MASK:MASK:DEFinedby {SEGments|TOLerances} - MASK:MASK:DEFinedby? @@ -19,7 +20,6 @@ - MASK:MASK:LIST? - MASK:MASK:SEG:POINTS - MASK:MASK:SEG:POINTS? - - MASK:MASK:SEGCOUNT:HITS? - MASK:MASK:SOUrce {CH|REF|MATH|RFvsTime} - MASK:MASK:SOUrce? - MASK:MASK:TESt:STATE {ON|OFF} @@ -493,74 +493,6 @@ class MaskMaskItemSource(SCPICmdWrite, SCPICmdRead): """ -class MaskMaskItemSegcountItemHits(SCPICmdRead): - """The ``MASK:MASK:SEGCOUNT:HITS`` command. - - Description: - - The command returns the total number of mask hits in the specified mask segment of the - specified mask test. - - Usage: - - Using the ``.query()`` method will send the ``MASK:MASK:SEGCOUNT:HITS?`` query. - - Using the ``.verify(value)`` method will send the ``MASK:MASK:SEGCOUNT:HITS?`` query - and raise an AssertionError if the returned value does not match ``value``. - - SCPI Syntax: - ``` - - MASK:MASK:SEGCOUNT:HITS? - ``` - - Info: - - ``MASK`` specifies the mask test. - - ``SEG`` specifies the mask segment. - """ - - -class MaskMaskItemSegcountItem(ValidatedDynamicNumberCmd, SCPICmdRead): - """The ``MASK:MASK:SEGCOUNT`` command tree. - - Usage: - - Using the ``.query()`` method will send the ``MASK:MASK:SEGCOUNT?`` query. - - Using the ``.verify(value)`` method will send the ``MASK:MASK:SEGCOUNT?`` query and - raise an AssertionError if the returned value does not match ``value``. - - Info: - - ``MASK`` specifies the mask test. - - ``SEG`` specifies the mask segment. - - Properties: - - ``.hits``: The ``MASK:MASK:SEGCOUNT:HITS`` command. - """ - - def __init__(self, device: Optional["PIControl"], cmd_syntax: str) -> None: - super().__init__(device, cmd_syntax) - self._hits = MaskMaskItemSegcountItemHits(device, f"{self._cmd_syntax}:HITS") - - @property - def hits(self) -> MaskMaskItemSegcountItemHits: - """Return the ``MASK:MASK:SEGCOUNT:HITS`` command. - - Description: - - The command returns the total number of mask hits in the specified mask segment of the - specified mask test. - - Usage: - - Using the ``.query()`` method will send the ``MASK:MASK:SEGCOUNT:HITS?`` query. - - Using the ``.verify(value)`` method will send the ``MASK:MASK:SEGCOUNT:HITS?`` - query and raise an AssertionError if the returned value does not match ``value``. - - SCPI Syntax: - ``` - - MASK:MASK:SEGCOUNT:HITS? - ``` - - Info: - - ``MASK`` specifies the mask test. - - ``SEG`` specifies the mask segment. - """ - return self._hits - - class MaskMaskItemSegItemPoints(SCPICmdWriteNoArguments, SCPICmdRead): """The ``MASK:MASK:SEG:POINTS`` command. @@ -709,6 +641,74 @@ class MaskMaskItemDefinedby(SCPICmdWrite, SCPICmdRead): """ +class MaskMaskItemCountSegItemHits(SCPICmdRead): + """The ``MASK:MASK:COUNT:SEG:HITS`` command. + + Description: + - The command returns the total number of mask hits in the specified mask segment of the + specified mask test. + + Usage: + - Using the ``.query()`` method will send the ``MASK:MASK:COUNT:SEG:HITS?`` query. + - Using the ``.verify(value)`` method will send the ``MASK:MASK:COUNT:SEG:HITS?`` + query and raise an AssertionError if the returned value does not match ``value``. + + SCPI Syntax: + ``` + - MASK:MASK:COUNT:SEG:HITS? + ``` + + Info: + - ``MASK`` specifies the mask test. + - ``SEG`` specifies the mask segment. + """ + + +class MaskMaskItemCountSegItem(ValidatedDynamicNumberCmd, SCPICmdRead): + """The ``MASK:MASK:COUNT:SEG`` command tree. + + Usage: + - Using the ``.query()`` method will send the ``MASK:MASK:COUNT:SEG?`` query. + - Using the ``.verify(value)`` method will send the ``MASK:MASK:COUNT:SEG?`` query and + raise an AssertionError if the returned value does not match ``value``. + + Info: + - ``MASK`` specifies the mask test. + - ``SEG`` specifies the mask segment. + + Properties: + - ``.hits``: The ``MASK:MASK:COUNT:SEG:HITS`` command. + """ + + def __init__(self, device: Optional["PIControl"], cmd_syntax: str) -> None: + super().__init__(device, cmd_syntax) + self._hits = MaskMaskItemCountSegItemHits(device, f"{self._cmd_syntax}:HITS") + + @property + def hits(self) -> MaskMaskItemCountSegItemHits: + """Return the ``MASK:MASK:COUNT:SEG:HITS`` command. + + Description: + - The command returns the total number of mask hits in the specified mask segment of the + specified mask test. + + Usage: + - Using the ``.query()`` method will send the ``MASK:MASK:COUNT:SEG:HITS?`` query. + - Using the ``.verify(value)`` method will send the ``MASK:MASK:COUNT:SEG:HITS?`` + query and raise an AssertionError if the returned value does not match ``value``. + + SCPI Syntax: + ``` + - MASK:MASK:COUNT:SEG:HITS? + ``` + + Info: + - ``MASK`` specifies the mask test. + - ``SEG`` specifies the mask segment. + """ + return self._hits + + class MaskMaskItemCountHits(SCPICmdRead): """The ``MASK:MASK:COUNT:HITS`` command. @@ -753,11 +753,15 @@ class MaskMaskItemCount(SCPICmdRead): Properties: - ``.hits``: The ``MASK:MASK:COUNT:HITS`` command. + - ``.seg``: The ``MASK:MASK:COUNT:SEG`` command tree. """ def __init__(self, device: Optional["PIControl"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) self._hits = MaskMaskItemCountHits(device, f"{self._cmd_syntax}:HITS") + self._seg: Dict[int, MaskMaskItemCountSegItem] = DefaultDictPassKeyToFactory( + lambda x: MaskMaskItemCountSegItem(device, f"{self._cmd_syntax}:SEG{x}") + ) @property def hits(self) -> MaskMaskItemCountHits: @@ -782,6 +786,24 @@ def hits(self) -> MaskMaskItemCountHits: """ return self._hits + @property + def seg(self) -> Dict[int, MaskMaskItemCountSegItem]: + """Return the ``MASK:MASK:COUNT:SEG`` command tree. + + Usage: + - Using the ``.query()`` method will send the ``MASK:MASK:COUNT:SEG?`` query. + - Using the ``.verify(value)`` method will send the ``MASK:MASK:COUNT:SEG?`` query + and raise an AssertionError if the returned value does not match ``value``. + + Info: + - ``MASK`` specifies the mask test. + - ``SEG`` specifies the mask segment. + + Sub-properties: + - ``.hits``: The ``MASK:MASK:COUNT:SEG:HITS`` command. + """ + return self._seg + # pylint: disable=too-many-instance-attributes class MaskMaskItem(ValidatedDynamicNumberCmd, SCPICmdRead): @@ -801,7 +823,6 @@ class MaskMaskItem(ValidatedDynamicNumberCmd, SCPICmdRead): - ``.display``: The ``MASK:MASK:DISplay`` command. - ``.list``: The ``MASK:MASK:LIST`` command. - ``.seg``: The ``MASK:MASK:SEG`` command tree. - - ``.segcount``: The ``MASK:MASK:SEGCOUNT`` command tree. - ``.source``: The ``MASK:MASK:SOUrce`` command. - ``.test``: The ``MASK:MASK:TESt`` command tree. - ``.tolerance``: The ``MASK:MASK:TOLerance`` command tree. @@ -816,9 +837,6 @@ def __init__(self, device: Optional["PIControl"], cmd_syntax: str) -> None: self._seg: Dict[int, MaskMaskItemSegItem] = DefaultDictPassKeyToFactory( lambda x: MaskMaskItemSegItem(device, f"{self._cmd_syntax}:SEG{x}") ) - self._segcount: Dict[int, MaskMaskItemSegcountItem] = DefaultDictPassKeyToFactory( - lambda x: MaskMaskItemSegcountItem(device, f"{self._cmd_syntax}:SEG{x}COUNT") - ) self._source = MaskMaskItemSource(device, f"{self._cmd_syntax}:SOUrce") self._test = MaskMaskItemTest(device, f"{self._cmd_syntax}:TESt") self._tolerance = MaskMaskItemTolerance(device, f"{self._cmd_syntax}:TOLerance") @@ -846,6 +864,7 @@ def count(self) -> MaskMaskItemCount: Sub-properties: - ``.hits``: The ``MASK:MASK:COUNT:HITS`` command. + - ``.seg``: The ``MASK:MASK:COUNT:SEG`` command tree. """ return self._count @@ -947,24 +966,6 @@ def seg(self) -> Dict[int, MaskMaskItemSegItem]: """ return self._seg - @property - def segcount(self) -> Dict[int, MaskMaskItemSegcountItem]: - """Return the ``MASK:MASK:SEGCOUNT`` command tree. - - Usage: - - Using the ``.query()`` method will send the ``MASK:MASK:SEGCOUNT?`` query. - - Using the ``.verify(value)`` method will send the ``MASK:MASK:SEGCOUNT?`` query - and raise an AssertionError if the returned value does not match ``value``. - - Info: - - ``MASK`` specifies the mask test. - - ``SEG`` specifies the mask segment. - - Sub-properties: - - ``.hits``: The ``MASK:MASK:SEGCOUNT:HITS`` command. - """ - return self._segcount - @property def source(self) -> MaskMaskItemSource: """Return the ``MASK:MASK:SOUrce`` command. @@ -1112,7 +1113,6 @@ def mask(self) -> Dict[int, MaskMaskItem]: - ``.display``: The ``MASK:MASK:DISplay`` command. - ``.list``: The ``MASK:MASK:LIST`` command. - ``.seg``: The ``MASK:MASK:SEG`` command tree. - - ``.segcount``: The ``MASK:MASK:SEGCOUNT`` command tree. - ``.source``: The ``MASK:MASK:SOUrce`` command. - ``.test``: The ``MASK:MASK:TESt`` command tree. - ``.tolerance``: The ``MASK:MASK:TOLerance`` command tree. diff --git a/src/tm_devices/commands/gen_1zn03_mso/vxi.py b/src/tm_devices/commands/gen_1zn03_mso/vxi.py new file mode 100644 index 00000000..2ad6940b --- /dev/null +++ b/src/tm_devices/commands/gen_1zn03_mso/vxi.py @@ -0,0 +1,252 @@ +"""The vxi commands module. + +These commands are used in the following models: +MSO2 + +THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED. + +Please report an issue if one is found. + +Commands and Queries: + ``` + - VXI:ENAble {ON|OFF|1|0} + - VXI:ENAble? + - VXI:PORT:HIGH + - VXI:PORT:HIGH? + - VXI:PORT:LOW + - VXI:PORT:LOW? + ``` +""" + +from typing import Optional, TYPE_CHECKING + +from ..helpers import SCPICmdRead, SCPICmdWrite + +if TYPE_CHECKING: + from tm_devices.driver_mixins.device_control.pi_control import PIControl + + +class VxiPortLow(SCPICmdWrite, SCPICmdRead): + """The ``VXI:PORT:LOW`` command. + + Description: + - This command sets or queries the lower end of the port range for the VXI-11 server. + + Usage: + - Using the ``.query()`` method will send the ``VXI:PORT:LOW?`` query. + - Using the ``.verify(value)`` method will send the ``VXI:PORT:LOW?`` query and raise an + AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``VXI:PORT:LOW value`` command. + + SCPI Syntax: + ``` + - VXI:PORT:LOW + - VXI:PORT:LOW? + ``` + + Info: + - ```` is the low end of the TCPIP port range for the VXI-11 server connection. Some + ports are restricted and cannot be used because they are used by other services. If a + restricted port falls between the VXI-11 server low port and the VXI-11 server high port, + then the error code 224 (Illegal parameter value) is posted to the event queue and the + VXI-11 low port remains unchanged. If the VXI-11 low port number is set to a valid value + above the VXI-11 high port number, the VXI-11 high port number is set to the value of the + VXI-11 low port number plus one. + """ + + +class VxiPortHigh(SCPICmdWrite, SCPICmdRead): + """The ``VXI:PORT:HIGH`` command. + + Description: + - This command sets or queries the higher end of the port range for the VXI-11 server. + + Usage: + - Using the ``.query()`` method will send the ``VXI:PORT:HIGH?`` query. + - Using the ``.verify(value)`` method will send the ``VXI:PORT:HIGH?`` query and raise an + AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``VXI:PORT:HIGH value`` command. + + SCPI Syntax: + ``` + - VXI:PORT:HIGH + - VXI:PORT:HIGH? + ``` + + Info: + - ```` is the high end of the TCPIP port range for the VXI-11 server connection. Some + ports are restricted and cannot be used because they are used by other services. If a + restricted port falls between the VXI-11 server low port and the VXI-11 server high port, + then the error code 224 (Illegal parameter value) is posted to the event queue and the + VXI-11 high port remains unchanged. If the VXI-11 high port number is set to a valid value + below the VXI-11 low port number, the VXI-11 low port number is set to the value of the + VXI-11 high port number minus one. + """ + + +class VxiPort(SCPICmdRead): + """The ``VXI:PORT`` command tree. + + Usage: + - Using the ``.query()`` method will send the ``VXI:PORT?`` query. + - Using the ``.verify(value)`` method will send the ``VXI:PORT?`` query and raise an + AssertionError if the returned value does not match ``value``. + + Properties: + - ``.high``: The ``VXI:PORT:HIGH`` command. + - ``.low``: The ``VXI:PORT:LOW`` command. + """ + + def __init__(self, device: Optional["PIControl"], cmd_syntax: str) -> None: + super().__init__(device, cmd_syntax) + self._high = VxiPortHigh(device, f"{self._cmd_syntax}:HIGH") + self._low = VxiPortLow(device, f"{self._cmd_syntax}:LOW") + + @property + def high(self) -> VxiPortHigh: + """Return the ``VXI:PORT:HIGH`` command. + + Description: + - This command sets or queries the higher end of the port range for the VXI-11 server. + + Usage: + - Using the ``.query()`` method will send the ``VXI:PORT:HIGH?`` query. + - Using the ``.verify(value)`` method will send the ``VXI:PORT:HIGH?`` query and raise + an AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``VXI:PORT:HIGH value`` command. + + SCPI Syntax: + ``` + - VXI:PORT:HIGH + - VXI:PORT:HIGH? + ``` + + Info: + - ```` is the high end of the TCPIP port range for the VXI-11 server connection. + Some ports are restricted and cannot be used because they are used by other services. + If a restricted port falls between the VXI-11 server low port and the VXI-11 server + high port, then the error code 224 (Illegal parameter value) is posted to the event + queue and the VXI-11 high port remains unchanged. If the VXI-11 high port number is + set to a valid value below the VXI-11 low port number, the VXI-11 low port number is + set to the value of the VXI-11 high port number minus one. + """ + return self._high + + @property + def low(self) -> VxiPortLow: + """Return the ``VXI:PORT:LOW`` command. + + Description: + - This command sets or queries the lower end of the port range for the VXI-11 server. + + Usage: + - Using the ``.query()`` method will send the ``VXI:PORT:LOW?`` query. + - Using the ``.verify(value)`` method will send the ``VXI:PORT:LOW?`` query and raise an + AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``VXI:PORT:LOW value`` command. + + SCPI Syntax: + ``` + - VXI:PORT:LOW + - VXI:PORT:LOW? + ``` + + Info: + - ```` is the low end of the TCPIP port range for the VXI-11 server connection. + Some ports are restricted and cannot be used because they are used by other services. + If a restricted port falls between the VXI-11 server low port and the VXI-11 server + high port, then the error code 224 (Illegal parameter value) is posted to the event + queue and the VXI-11 low port remains unchanged. If the VXI-11 low port number is set + to a valid value above the VXI-11 high port number, the VXI-11 high port number is set + to the value of the VXI-11 low port number plus one. + """ + return self._low + + +class VxiEnable(SCPICmdWrite, SCPICmdRead): + """The ``VXI:ENAble`` command. + + Description: + - This command sets or queries the state of the VXI-11 server, which is used for command and + control over an Ethernet connection. + + Usage: + - Using the ``.query()`` method will send the ``VXI:ENAble?`` query. + - Using the ``.verify(value)`` method will send the ``VXI:ENAble?`` query and raise an + AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``VXI:ENAble value`` command. + + SCPI Syntax: + ``` + - VXI:ENAble {ON|OFF|1|0} + - VXI:ENAble? + ``` + + Info: + - ``ON`` enables the VXI-11 server. + - ``OFF`` disables the VXI-11 server. + - ``1`` enables the VXI-11 server. + - ``0`` disables the VXI-11 server. + """ + + +class Vxi(SCPICmdRead): + """The ``VXI`` command tree. + + Usage: + - Using the ``.query()`` method will send the ``VXI?`` query. + - Using the ``.verify(value)`` method will send the ``VXI?`` query and raise an + AssertionError if the returned value does not match ``value``. + + Properties: + - ``.enable``: The ``VXI:ENAble`` command. + - ``.port``: The ``VXI:PORT`` command tree. + """ + + def __init__(self, device: Optional["PIControl"] = None, cmd_syntax: str = "VXI") -> None: + super().__init__(device, cmd_syntax) + self._enable = VxiEnable(device, f"{self._cmd_syntax}:ENAble") + self._port = VxiPort(device, f"{self._cmd_syntax}:PORT") + + @property + def enable(self) -> VxiEnable: + """Return the ``VXI:ENAble`` command. + + Description: + - This command sets or queries the state of the VXI-11 server, which is used for command + and control over an Ethernet connection. + + Usage: + - Using the ``.query()`` method will send the ``VXI:ENAble?`` query. + - Using the ``.verify(value)`` method will send the ``VXI:ENAble?`` query and raise an + AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``VXI:ENAble value`` command. + + SCPI Syntax: + ``` + - VXI:ENAble {ON|OFF|1|0} + - VXI:ENAble? + ``` + + Info: + - ``ON`` enables the VXI-11 server. + - ``OFF`` disables the VXI-11 server. + - ``1`` enables the VXI-11 server. + - ``0`` disables the VXI-11 server. + """ + return self._enable + + @property + def port(self) -> VxiPort: + """Return the ``VXI:PORT`` command tree. + + Usage: + - Using the ``.query()`` method will send the ``VXI:PORT?`` query. + - Using the ``.verify(value)`` method will send the ``VXI:PORT?`` query and raise an + AssertionError if the returned value does not match ``value``. + + Sub-properties: + - ``.high``: The ``VXI:PORT:HIGH`` command. + - ``.low``: The ``VXI:PORT:LOW`` command. + """ + return self._port diff --git a/src/tm_devices/commands/gen_4jiykk_dpo/errordetector.py b/src/tm_devices/commands/gen_4jiykk_dpo/errordetector.py index 229c047c..33b2316c 100644 --- a/src/tm_devices/commands/gen_4jiykk_dpo/errordetector.py +++ b/src/tm_devices/commands/gen_4jiykk_dpo/errordetector.py @@ -124,7 +124,7 @@ - ERRORDetector:SCRAMBLED? - ERRORDetector:SENDEMAIL {OFF|ON} - ERRORDetector:SENDEMAIL? - - ERRORDetector:SIGnaltype {PCIEGEN|PRBS11|CUSTOM|ANY8B10B|USB3|PRBS9|PRBS16|PRBS23|PRBS7|SATAGEN} + - ERRORDetector:SIGnaltype {PRBS11|CUSTOM|SATAGEN|PRBS16|ANY8B10B|PCIEGEN|PRBS9|PRBS7|USB3|PRBS23} - ERRORDetector:SIGnaltype? - ERRORDetector:SSC {ON|OFF} - ERRORDetector:SSC? @@ -1393,7 +1393,7 @@ class ErrordetectorSignaltype(SCPICmdWrite, SCPICmdRead): SCPI Syntax: ``` - - ERRORDetector:SIGnaltype {PCIEGEN|PRBS11|CUSTOM|ANY8B10B|USB3|PRBS9|PRBS16|PRBS23|PRBS7|SATAGEN} + - ERRORDetector:SIGnaltype {PRBS11|CUSTOM|SATAGEN|PRBS16|ANY8B10B|PCIEGEN|PRBS9|PRBS7|USB3|PRBS23} - ERRORDetector:SIGnaltype? ``` @@ -5736,7 +5736,7 @@ def signaltype(self) -> ErrordetectorSignaltype: SCPI Syntax: ``` - - ERRORDetector:SIGnaltype {PCIEGEN|PRBS11|CUSTOM|ANY8B10B|USB3|PRBS9|PRBS16|PRBS23|PRBS7|SATAGEN} + - ERRORDetector:SIGnaltype {PRBS11|CUSTOM|SATAGEN|PRBS16|ANY8B10B|PCIEGEN|PRBS9|PRBS7|USB3|PRBS23} - ERRORDetector:SIGnaltype? ``` diff --git a/src/tm_devices/commands/gen_4jiykk_dpo/rosc.py b/src/tm_devices/commands/gen_4jiykk_dpo/rosc.py index 8e52984a..03090353 100644 --- a/src/tm_devices/commands/gen_4jiykk_dpo/rosc.py +++ b/src/tm_devices/commands/gen_4jiykk_dpo/rosc.py @@ -13,7 +13,7 @@ - ROSc:OUT:FREQuency? - ROSc:OUT:ULTRAsync {OFF|ON} - ROSc:OUT:ULTRAsync? - - ROSc:SOUrce {ULTRAsync|TEKLink|INTERnal|EXTernal} + - ROSc:SOUrce {INTERnal|TEKLink|EXTernal|ULTRAsync} - ROSc:SOUrce? - ROSc:STATE? - ROSc:TRACking {STABle|FAST} @@ -94,7 +94,7 @@ class RoscSource(SCPICmdWrite, SCPICmdRead): SCPI Syntax: ``` - - ROSc:SOUrce {ULTRAsync|TEKLink|INTERnal|EXTernal} + - ROSc:SOUrce {INTERnal|TEKLink|EXTernal|ULTRAsync} - ROSc:SOUrce? ``` @@ -283,7 +283,7 @@ def source(self) -> RoscSource: SCPI Syntax: ``` - - ROSc:SOUrce {ULTRAsync|TEKLink|INTERnal|EXTernal} + - ROSc:SOUrce {INTERnal|TEKLink|EXTernal|ULTRAsync} - ROSc:SOUrce? ``` diff --git a/src/tm_devices/commands/gen_5xwdsk_dpodsamso/errordetector.py b/src/tm_devices/commands/gen_5xwdsk_dpodsamso/errordetector.py index 25b75149..04442ef6 100644 --- a/src/tm_devices/commands/gen_5xwdsk_dpodsamso/errordetector.py +++ b/src/tm_devices/commands/gen_5xwdsk_dpodsamso/errordetector.py @@ -148,7 +148,7 @@ - ERRORDetector:SCRAMBLED? - ERRORDetector:SENDEMAIL {OFF|ON} - ERRORDetector:SENDEMAIL? - - ERRORDetector:SIGnaltype {PCIEGEN|PRBS11|CUSTOM|ANY8B10B|USB3|PRBS9|PRBS16|PRBS23|PRBS7|SATAGEN} + - ERRORDetector:SIGnaltype {PRBS11|CUSTOM|SATAGEN|PRBS16|ANY8B10B|PCIEGEN|PRBS9|PRBS7|USB3|PRBS23} - ERRORDetector:SIGnaltype? - ERRORDetector:SKIPSETPRIMitive:MINus? - ERRORDetector:SKIPSETPRIMitive:PLUS? @@ -1725,7 +1725,7 @@ class ErrordetectorSignaltype(SCPICmdWrite, SCPICmdRead): SCPI Syntax: ``` - - ERRORDetector:SIGnaltype {PCIEGEN|PRBS11|CUSTOM|ANY8B10B|USB3|PRBS9|PRBS16|PRBS23|PRBS7|SATAGEN} + - ERRORDetector:SIGnaltype {PRBS11|CUSTOM|SATAGEN|PRBS16|ANY8B10B|PCIEGEN|PRBS9|PRBS7|USB3|PRBS23} - ERRORDetector:SIGnaltype? ``` @@ -7099,7 +7099,7 @@ def signaltype(self) -> ErrordetectorSignaltype: SCPI Syntax: ``` - - ERRORDetector:SIGnaltype {PCIEGEN|PRBS11|CUSTOM|ANY8B10B|USB3|PRBS9|PRBS16|PRBS23|PRBS7|SATAGEN} + - ERRORDetector:SIGnaltype {PRBS11|CUSTOM|SATAGEN|PRBS16|ANY8B10B|PCIEGEN|PRBS9|PRBS7|USB3|PRBS23} - ERRORDetector:SIGnaltype? ``` diff --git a/src/tm_devices/commands/gen_fn2qbf_msodpo/errordetector.py b/src/tm_devices/commands/gen_fn2qbf_msodpo/errordetector.py index d1fe29de..9216f9f4 100644 --- a/src/tm_devices/commands/gen_fn2qbf_msodpo/errordetector.py +++ b/src/tm_devices/commands/gen_fn2qbf_msodpo/errordetector.py @@ -122,7 +122,7 @@ - ERRORDetector:SCRAMBLED? - ERRORDetector:SENDEMAIL {OFF|ON} - ERRORDetector:SENDEMAIL? - - ERRORDetector:SIGnaltype {PCIEGEN|PRBS11|CUSTOM|ANY8B10B|USB3|PRBS9|PRBS16|PRBS23|PRBS7|SATAGEN} + - ERRORDetector:SIGnaltype {PRBS11|CUSTOM|SATAGEN|PRBS16|ANY8B10B|PCIEGEN|PRBS9|PRBS7|USB3|PRBS23} - ERRORDetector:SIGnaltype? - ERRORDetector:SSC {ON|OFF} - ERRORDetector:SSC? @@ -1391,7 +1391,7 @@ class ErrordetectorSignaltype(SCPICmdWrite, SCPICmdRead): SCPI Syntax: ``` - - ERRORDetector:SIGnaltype {PCIEGEN|PRBS11|CUSTOM|ANY8B10B|USB3|PRBS9|PRBS16|PRBS23|PRBS7|SATAGEN} + - ERRORDetector:SIGnaltype {PRBS11|CUSTOM|SATAGEN|PRBS16|ANY8B10B|PCIEGEN|PRBS9|PRBS7|USB3|PRBS23} - ERRORDetector:SIGnaltype? ``` @@ -5654,7 +5654,7 @@ def signaltype(self) -> ErrordetectorSignaltype: SCPI Syntax: ``` - - ERRORDetector:SIGnaltype {PCIEGEN|PRBS11|CUSTOM|ANY8B10B|USB3|PRBS9|PRBS16|PRBS23|PRBS7|SATAGEN} + - ERRORDetector:SIGnaltype {PRBS11|CUSTOM|SATAGEN|PRBS16|ANY8B10B|PCIEGEN|PRBS9|PRBS7|USB3|PRBS23} - ERRORDetector:SIGnaltype? ``` diff --git a/src/tm_devices/commands/gen_fpx9s1_dpodsamso/rosc.py b/src/tm_devices/commands/gen_fpx9s1_dpodsamso/rosc.py index 6355f50a..b881db15 100644 --- a/src/tm_devices/commands/gen_fpx9s1_dpodsamso/rosc.py +++ b/src/tm_devices/commands/gen_fpx9s1_dpodsamso/rosc.py @@ -12,7 +12,7 @@ ``` - ROSc:OUT:FREQuency {MHZ10|MHZ100} - ROSc:OUT:FREQuency? - - ROSc:SOUrce {ULTRAsync|TEKLink|INTERnal|EXTernal} + - ROSc:SOUrce {INTERnal|TEKLink|EXTernal|ULTRAsync} - ROSc:SOUrce? - ROSc:STATE? - ROSc:TRACking {STABle|FAST} @@ -93,7 +93,7 @@ class RoscSource(SCPICmdWrite, SCPICmdRead): SCPI Syntax: ``` - - ROSc:SOUrce {ULTRAsync|TEKLink|INTERnal|EXTernal} + - ROSc:SOUrce {INTERnal|TEKLink|EXTernal|ULTRAsync} - ROSc:SOUrce? ``` @@ -228,7 +228,7 @@ def source(self) -> RoscSource: SCPI Syntax: ``` - - ROSc:SOUrce {ULTRAsync|TEKLink|INTERnal|EXTernal} + - ROSc:SOUrce {INTERnal|TEKLink|EXTernal|ULTRAsync} - ROSc:SOUrce? ``` diff --git a/src/tm_devices/commands/mso2_commands.py b/src/tm_devices/commands/mso2_commands.py index 4d353a88..07ceda3e 100644 --- a/src/tm_devices/commands/mso2_commands.py +++ b/src/tm_devices/commands/mso2_commands.py @@ -38,6 +38,7 @@ from .gen_1zn03_mso.select import Select from .gen_1zn03_mso.touchscreen import Touchscreen from .gen_1zn03_mso.trigger import Trigger +from .gen_1zn03_mso.vxi import Vxi from .gen_c69az_msotekscopepc.lic import Lic from .gen_c69az_msotekscopepc.license import License from .gen_e3h2zs_lpdmso.afg import Afg @@ -400,6 +401,7 @@ class MSO2CommandConstants: SNAP = "SNAP" # SNAp SOF = "SOF" SPACE = "SPACE" # SPace + SPECTRAL = "SPECTRAL" # SPECtral SPI = "SPI" SPLIT = "SPLIT" SRIBINARY = "SRIBINARY" # SRIbinary @@ -417,6 +419,7 @@ class MSO2CommandConstants: SYNC = "SYNC" SYNCFIELD = "SYNCFIELD" # SYNCfield TEKEXPONENTIAL = "TEKEXPONENTIAL" # TEKEXPonential + TEMPERATURE = "TEMPERATURE" # TEMPerature TENNINETY = "TENNINETY" # TENNinety THREE = "THREE" TIMEOUT = "TIMEOUT" # TIMEOut @@ -558,6 +561,7 @@ class MSO2Commands: - ``.usbdevice``: The ``USBDevice`` command tree. - ``.verbose``: The ``VERBose`` command. - ``.vertical``: The ``VERTical`` command tree. + - ``.vxi``: The ``VXI`` command tree. - ``.wai``: The ``*WAI`` command. - ``.wavfrm``: The ``WAVFrm`` command. - ``.wfmoutpre``: The ``WFMOutpre`` command. @@ -658,6 +662,7 @@ def __init__(self, device: Optional[PIControl] = None) -> None: # noqa: PLR0915 self._usbdevice = Usbdevice(device) self._verbose = Verbose(device) self._vertical = Vertical(device) + self._vxi = Vxi(device) self._wai = Wai(device) self._wavfrm = Wavfrm(device) self._wfmoutpre = Wfmoutpre(device) @@ -680,6 +685,7 @@ def acquire(self) -> Acquire: ``` Sub-properties: + - ``.fastacq``: The ``ACQuire:FASTAcq`` command tree. - ``.maxsamplerate``: The ``ACQuire:MAXSamplerate`` command. - ``.mode``: The ``ACQuire:MODe`` command. - ``.numacq``: The ``ACQuire:NUMACq`` command. @@ -2709,6 +2715,21 @@ def vertical(self) -> Vertical: """ return self._vertical + @property + def vxi(self) -> Vxi: + """Return the ``VXI`` command tree. + + Usage: + - Using the ``.query()`` method will send the ``VXI?`` query. + - Using the ``.verify(value)`` method will send the ``VXI?`` query and raise an + AssertionError if the returned value does not match ``value``. + + Sub-properties: + - ``.enable``: The ``VXI:ENAble`` command. + - ``.port``: The ``VXI:PORT`` command tree. + """ + return self._vxi + @property def wai(self) -> Wai: """Return the ``*WAI`` command. @@ -2913,6 +2934,7 @@ def commands(self) -> MSO2Commands: - ``.usbdevice``: The ``USBDevice`` command tree. - ``.verbose``: The ``VERBose`` command. - ``.vertical``: The ``VERTical`` command tree. + - ``.vxi``: The ``VXI`` command tree. - ``.wai``: The ``*WAI`` command. - ``.wavfrm``: The ``WAVFrm`` command. - ``.wfmoutpre``: The ``WFMOutpre`` command. diff --git a/tests/auto_gen_cmds_list.json b/tests/auto_gen_cmds_list.json index 1eb3160e..3a38029a 100644 --- a/tests/auto_gen_cmds_list.json +++ b/tests/auto_gen_cmds_list.json @@ -2452,6 +2452,7 @@ "MASK:MARgin:STATE", "MASK:MASK:COUNT", "MASK:MASK:COUNT:HITS", + "MASK:MASK:COUNT:SEG:HITS", "MASK:MASK:DEFinedby", "MASK:MASK:DISplay", "MASK:MASK:LIST", @@ -6412,6 +6413,9 @@ "VISual:SHOWAReas", "VISual:SHOWCRiteria", "VISual:SHOWEQuation", + "VXI:ENAble", + "VXI:PORT:HIGH", + "VXI:PORT:LOW", "WAVFRMStream", "WAVFrm", "WFMInpre",