instrumentserver.testing.dummy_instruments.generic#
Classes
|
|
|
A dummy instrument with a few parameters that have random numbers generated on demand |
|
A dummy instrument to test timeout situations. |
|
Dummy instrument whose parameters return |
|
A dummy instrument with submodules. |
|
class used to develop json serialization and guis |
|
Dummy whose parameters, methods, and submodules can change at runtime. |
|
Dummy that returns representative values across the Client transport. |
|
An |
|
Serializable request used by Client transport tests and examples. |
|
Serializable result used by Client transport tests and examples. |
- class instrumentserver.testing.dummy_instruments.generic.DummyChannel(*args: Any, **kwargs: Any)[source]#
Bases:
Instrument
- class instrumentserver.testing.dummy_instruments.generic.DummyInstrumentRandomNumber(*args: Any, **kwargs: Any)[source]#
Bases:
InstrumentA dummy instrument with a few parameters that have random numbers generated on demand
- class instrumentserver.testing.dummy_instruments.generic.DummyInstrumentTimeout(*args: Any, **kwargs: Any)[source]#
Bases:
InstrumentA dummy instrument to test timeout situations.
- class instrumentserver.testing.dummy_instruments.generic.DummyInstrumentWithFlags(*args: Any, **kwargs: Any)[source]#
Bases:
InstrumentDummy instrument whose parameters return
IntFlagvalues.Mirrors the Yokogawa GS200 status/event register parameters, which store
IntFlaginstances as their value. Used to test that station snapshots containing flag values serialize (and round-trip) correctly.
- class instrumentserver.testing.dummy_instruments.generic.DummyInstrumentWithSubmodule(*args: Any, **kwargs: Any)[source]#
Bases:
InstrumentA dummy instrument with submodules.
- close() None[source]#
Irreversibly stop this instrument and free its resources.
Subclasses should override this if they have other specific resources to close.
- class instrumentserver.testing.dummy_instruments.generic.FieldVectorIns(*args: Any, **kwargs: Any)[source]#
Bases:
Instrumentclass used to develop json serialization and guis
- set_field(field_vector: FieldVector)[source]#
- class instrumentserver.testing.dummy_instruments.generic.MutableInterfaceInstrument(*args: Any, **kwargs: Any)[source]#
Bases:
InstrumentDummy whose parameters, methods, and submodules can change at runtime.
- remove_dynamic_interface()[source]#
Remove the runtime interface added by
add_dynamic_interface().
- class instrumentserver.testing.dummy_instruments.generic.SerializationInstrument(*args: Any, **kwargs: Any)[source]#
Bases:
InstrumentDummy that returns representative values across the Client transport.
- run_sweep(request)[source]#
Return a three-point sweep for a
SweepRequest.
- class instrumentserver.testing.dummy_instruments.generic.StatusFlag(*values)[source]#
Bases:
IntFlagAn
IntFlagmirroring drivers like the Yokogawa GS200 status byte.On Python >= 3.11 flag members are iterable and a single-bit member iterates to itself, which is what triggers the snapshot serialization recursion bug this instrument is used to test.
- EAV = 4#
- ESB = 32#
- MAV = 16#
- class instrumentserver.testing.dummy_instruments.generic.SweepRequest(center_hz: float, span_hz: float, metadata: dict[str, str]=<factory>)[source]#
Bases:
objectSerializable request used by Client transport tests and examples.