dummy: A dummy driver module

This is a driver for debugging purposes.

Supported method parameters:

Parameter

Type

Meaning

technique

Literal["random", "sequential"]

see below

time

Union[int,float]

total runtime of the method

delay

Union[int,float]

delay between datapoints

Supported techniques:

  • random: returns a random float value

  • sequential: returns a sequentially increasing int value

Code author: Peter Kraus

Submodules

tomato.drivers.dummy.main.get_status(address, channel, jobqueue, logger, **kwargs)

Get the current status of the device.

Parameters
  • address (str) – Not used

  • channel (int) – Numeric, 1-indexed ID of the channel.

  • dllpath – Path to the BioLogic DLL file.

Returns

timestamp, ready, metadata – Returns a tuple containing the timestamp, readiness status, and associated metadata.

Return type

tuple[float, bool, dict]

tomato.drivers.dummy.main.get_data(address, channel, jobqueue, logger, **kwargs)

Get cached data from the device.

Parameters
  • address (str) – IP address of the potentiostat.

  • channel (int) – Numeric, 1-indexed ID of the channel.

  • dllpath – Path to the BioLogic DLL file.

Returns

timestamp, nrows, data – Returns a tuple containing the timestamp and associated metadata.

Return type

tuple[float, int, dict]

tomato.drivers.dummy.main.start_job(address, channel, jobqueue, logger, payload, **kwargs)

Start a job on the device.

Parameters
  • address (str) – IP address of the potentiostat.

  • channel (int) – Numeric, 1-indexed ID of the channel.

  • jobqueue (Queue) – multiprocessing.Queue for passing job related data.

  • logger (Logger) – logging.Logger instance for writing logs.

  • payload (list[dict]) – A protocol describing the techniques to be executed and their order.

Returns

A timestamp corresponding to the start of the job execution.

Return type

timestamp

tomato.drivers.dummy.main.stop_job(address, channel, jobqueue, logger, **kwargs)

Stop a job running on the device.

This function stops any currently running technique on the specified channel of the device. No data is returned.

Parameters
  • address (str) – IP address of the potentiostat.

  • channel (int) – Numeric, 1-indexed ID of the channel.

  • dllpath – Path to the BioLogic DLL file.

Returns

A timestamp corresponding to the start of the job execution.

Return type

timestamp