ScriptExplicitConnectorObjects

class ScriptExplicitConnectorObjects.ScriptExplicitConnectorObjectsMarker

Bases: object

Decorator for marking an object as explicit connector or not.

All objects within a project are decorated with this marker since V3.5.4.0.

Version added:

3.5.4.0

property is_explicit_connector

Gets a value indicating whether this instance is a device object.

Return type:

bool

Returns:

True if this instance is device object; otherwise, False.

class ScriptExplicitConnectorObjects.ScriptExplicitConnectorObject

Bases: ScriptExplicitConnectorObjectsMarker, ScriptConnector

Decorator for explicit connector objects.

All objects within a project which are explicit connector objects are extended with this interface (since V3.5.4.0).

Version added:

3.5.4.0

allowed_interfaces_at(index)

Get the name of the child interfaces that this device object can accept at the specified insert position.

Parameters:

index (int) – The child index where a device should be inserted.

Return type:

list[str]

Returns:

A list of possible interface names or None if no device can be inserted at that position.

insert(name: str, index: int, type: int, id: str, version: str, module: Optional[str] = None)

Inserts the specified device at the specified index.

Parameters:
  • name (str) – Name of the device.

  • index (int) – index where to insert the device.

  • type (int) – The device type.

  • id (str) – The device identification.

  • version (str) – The device version.

  • module (str) – The module ID.

add(name: str, type: int, id: str, version: str, module: Optional[str] = None)

Adds the specified device.

Parameters:
  • name (str) – Name of the device.

  • type (int) – The device type.

  • id (str) – The device identification.

  • version (str) – The device version.

  • module (str) – The module ID.

export_io_mappings_as_csv(file_path)

Export the io mappings as a CSV file to the specified absolute path.

Parameters:

file_path (str) – The absolute path of the file to export.

import_io_mappings_from_csv(file_path)

import the io mappings from a CSV file at the specified absolute path.

Parameters:

file_path (str) – The absolute path of the file to import.

property driver_info

Get the driver info of the explicit connector.

Version added:

3.5.15.0

Return type:

ScriptDriverInfo