toptica.lasersdk.parameter module

class toptica.lasersdk.parameter.DecopBinary(client: Client, name: str)

Bases: object

A read-only DeCoP binary parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → bytes

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

bytes

property name: str

The fully qualified name of the parameter.

Type:

str

subscribe(callback: DecopCallback, interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.DecopBoolean(client: Client, name: str)

Bases: object

A read-only DeCoP boolean parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → bool

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

bool

property name: str

The fully qualified name of the parameter.

Type:

str

subscribe(callback: DecopCallback, interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.DecopInteger(client: Client, name: str)

Bases: object

A read-only DeCoP integer parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → int

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

int

property name: str

The fully qualified name of the parameter.

Type:

str

subscribe(callback: DecopCallback, interval: int | None = None, threshold: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

  • threshold (int | None) – The minimum change of the value for an update.

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.DecopReal(client: Client, name: str)

Bases: object

A read-only DeCoP floating point parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → float

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

float

property name: str

The fully qualified name of the parameter.

Type:

str

subscribe(callback: DecopCallback, interval: int | None = None, threshold: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

  • threshold (float | None) – The minimum change of the value for an update.

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.DecopString(client: Client, name: str)

Bases: object

A read-only DeCoP string parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → str

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

str

property name: str

The fully qualified name of the parameter.

Type:

str

subscribe(callback: DecopCallback, interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.MutableDecopBinary(client: Client, name: str)

Bases: object

A read/write DeCoP binary parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → bytes

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

bytes

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: bytes | bytearray) → int

Updates the value of the parameter.

Parameters:

value (bytes | bytearray) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.MutableDecopBoolean(client: Client, name: str)

Bases: object

A read/write DeCoP boolean parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → bool

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

bool

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: bool) → int

Updates the value of the parameter.

Parameters:

value (bool) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.MutableDecopInteger(client: Client, name: str)

Bases: object

A read/write DeCoP integer parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → int

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

int

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: int) → int

Updates the value of the parameter.

Parameters:

value (int) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None, threshold: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

  • threshold (int | None) – The minimum change of the value for an update.

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.MutableDecopReal(client: Client, name: str)

Bases: object

A read/write DeCoP floating point parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → float

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

float

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: SupportsFloat) → int

Updates the value of the parameter.

Parameters:

value (SupportsFloat) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None, threshold: float | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

  • threshold (float | None) – The minimum change of the value for an update.

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.MutableDecopString(client: Client, name: str)

Bases: object

A read/write DeCoP string parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → str

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

str

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: str) → int

Updates the value of the parameter.

Parameters:

value (str) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.SettableDecopBinary(client: Client, name: str)

Bases: object

A settable DeCoP binary parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → bytes

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

bytes

get_set_value() → bytes

Returns the current set-value of the parameter.

Returns:

The current set-value of the parameter.

Return type:

bytes

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: bytes | bytearray) → int

Updates the value of the parameter.

Parameters:

value (bytes | bytearray) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.SettableDecopBoolean(client: Client, name: str)

Bases: object

A settable DeCoP boolean parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → bool

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

bool

get_set_value() → bool

Returns the current set-value of the parameter.

Returns:

The current set-value of the parameter.

Return type:

bool

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: bool) → int

Updates the value of the parameter.

Parameters:

value (bool) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.SettableDecopInteger(client: Client, name: str)

Bases: object

A settable DeCoP integer parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → int

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

int

get_set_value() → int

Returns the current set-value of the parameter.

Returns:

The current set-value of the parameter.

Return type:

int

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: int) → int

Updates the value of the parameter.

Parameters:

value (int) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None, threshold: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

  • threshold (int | None) – The minimum change of the value for an update.

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.SettableDecopReal(client: Client, name: str)

Bases: object

A settable DeCoP floating point parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → float

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

float

get_set_value() → float

Returns the current set-value of the parameter.

Returns:

The current set-value of the parameter.

Return type:

float

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: SupportsFloat) → int

Updates the value of the parameter.

Parameters:

value (SupportsFloat) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None, threshold: float | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

  • threshold (float | None) – The minimum change of the value for an update.

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription

class toptica.lasersdk.parameter.SettableDecopString(client: Client, name: str)

Bases: object

A settable DeCoP string parameter.

Parameters:
  • client (Client) – A DeCoP client that is used to access the parameter on a device.

  • name (str) – The fully qualified name of the parameter (e.g. ‘laser1:amp:ontime’).

get() → str

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

str

get_set_value() → str

Returns the current set-value of the parameter.

Returns:

The current set-value of the parameter.

Return type:

str

property name: str

The fully qualified name of the parameter.

Type:

str

set(value: str) → int

Updates the value of the parameter.

Parameters:

value (str) – The new value of the parameter.

Returns:

Zero if successful or a positive integer indicating a warning.

Return type:

int

Raises:
  • UnavailableError – If the connection is closed or the command line is not available.

  • DecopError – If the device returned an error when setting the new value.

subscribe(callback: DecopCallback, interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:
  • callback (DecopCallback) – A callback that will be invoked when the value of the parameter has changed.

  • interval (int | None) – The minimum update interval (in milliseconds).

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription