qmi.instruments.toptica.dlc

Instrument driver for the Toptica DLC Pro digital laser controller.

Classes

Toptica_DLC(context, name, transport)

Instrument driver for the Toptica DLC Pro digital laser controller.

class qmi.instruments.toptica.dlc.Toptica_DLC(context: QMI_Context, name: str, transport: str)

Instrument driver for the Toptica DLC Pro digital laser controller.

This driver implements a single connection to the instrument. The communication is using a Scheme-based command language on TCP port 1998;

NOTE: the driver does not currently support the parameter monitoring facility on TCP port 1999.

Parameters:
  • context – QMI context.

  • name – name for the instrument instance.

  • transport – transport string.

open() None

“Open connection with the instrument.

close() None

Close connection with the instrument.

get_timestamped_parameter(parameter_name: str) Tuple[float, Any]

Get parameter value from the controller.

Parameters:

parameter_name – string identifier of the parameter to get.

get_parameter(parameter_name: str) Any

Get a single parameter value from the controller.

Returns a timestamp of when the parameteres were requested from the controller and the parameter value.

Parameters:

parameter_name – string identifier of the parameter to get.

get_multiple_timestamped_parameters(parameter_names: List[str]) Tuple[float, Tuple[Any, ...]]

Get multiple parameter values from the controller.

Returns a timestamp of when the parameters were requested from the controller and a tuple of parameter values.

Note: this method cannot handle nested tuples (e.g. one of the parameter values is a tuple).

Parameters:

parameter_names – a list of string identifiers of the parameters to get.

get_multiple_parameters(parameter_names: List[str]) Tuple[Any, ...]

Get mulitple parameter values.

Parameters:

parameter_names – a list of string identifiers of the parameters to get.

set_parameter(parameter_name: str, value: Any) float

Set parameter value from the controller.

Returns the time at which the set command was sent to the controller.

Parameters:
  • parameter_name – string identifier of the parameter to set.

  • value – new value for the parameter.

set_multiple_parameters(parameters: List[Tuple[str, Any]]) float

Set parameter value from the controller.

Returns the time at which the set command was sent to the controller.

Parameters:

parameters – a list of tuples with parameter_name-value pairs.

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.