devices.dummy:dummy

Dummy device for testing.

Usage

Source

devices.dummy:dummy(
    adapter,
    **kwargs,
)

Upon initialization the device starts a socket server which processes queries received via this network socket. The server is hosted on the loopback interface (localhost) and uses a high TCP/IP port number.

Parameters

adapter: str

Local VISA TCPIP socket address, e.g. “TCPIP::localhost::10007::SOCKET”.

**kwargs: dict

Optionally starting values for the fake measurement parameters can be given as entries to the keyword arguments dictionary. Parameters match the data types defined in cmd_list:

  • p1 through p7 Parameters with types matching command list definitions

Methods

Name Description
close() Close the device server.
configure() Configure the dummy device.
trigger() Simulate device triggering.

close()

Close the device server.

Usage

Source

close()

Stops the local server and closes the adapter connection.


configure()

Configure the dummy device.

Usage

Source

configure(**kwargs)

Fake configure function to demonstrate configuration upon initialization.

Parameters

**kwargs: dict
Configuration parameters to set.

trigger()

Simulate device triggering.

Usage

Source

trigger()

Fake trigger function which allows to show the trigger functionality in the dummy system files, but actually has no real impact on the device.