toptica.lasersdk.asyncio.parameter module

class toptica.lasersdk.asyncio.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’).

async 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

async subscribe(interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:

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.asyncio.parameter.DecopBoolean(client: Client, name: str)

Bases: object

A read-only boolean parameter.

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

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

async 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

async subscribe(interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:

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.asyncio.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’).

async 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

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

Creates a subscription to the value changes of the parameter.

Parameters:
  • 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.asyncio.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’).

async 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

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

Creates a subscription to the value changes of the parameter.

Parameters:
  • 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 updates of the parameter.

Return type:

Subscription

class toptica.lasersdk.asyncio.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’).

async 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

async subscribe(interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:

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.asyncio.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’).

async 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

async 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.

async subscribe(interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:

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

Returns:

A subscription to updates of the parameter.

Return type:

Subscription

class toptica.lasersdk.asyncio.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’).

async 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

async 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.

async subscribe(interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:

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.asyncio.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’).

async 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

async 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.

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

Creates a subscription to the value changes of the parameter.

Parameters:
  • 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.asyncio.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’).

async 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

async 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.

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

Creates a subscription to the value changes of the parameter.

Parameters:
  • 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.asyncio.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’).

async 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

async 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.

async subscribe(interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:

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.asyncio.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’)

async get() → bytes

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

bytes

async 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

async 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.

async subscribe(interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:

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.asyncio.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’).

async get() → bool

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

bool

async 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

async 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.

async subscribe(interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:

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.asyncio.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’).

async get() → int

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

int

async 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

async 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.

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

Creates a subscription to the value changes of the parameter.

Parameters:
  • 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.asyncio.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’).

async get() → float

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

float

async 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

async 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.

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

Creates a subscription to the value changes of the parameter.

Parameters:
  • 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.asyncio.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’).

async get() → str

Returns the current value of the parameter.

Returns:

The current value of the parameter.

Return type:

str

async 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

async 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.

async subscribe(interval: int | None = None) → Subscription

Creates a subscription to the value changes of the parameter.

Parameters:

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

Returns:

A subscription to the value changes of the parameter.

Return type:

Subscription