ScriptExplicitConnectorObject

 

class

ScriptExplicitConnectorObject.

ScriptExplicitConnectorObjectMarker

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

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

ScriptExplicitConnectorObject.

ScriptExplicitConnectorObject

Bases: ScriptExplicitConnectorObject.ScriptExplicitConnectorObject­Marker, ScriptDeviceParameters.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

index

device=None

type=None

id=None

version=None

module=None

Inserts the specified device at the specified index.

Warning

The original C# function that is called with this method contains 2 overloads. It is strongly advised to pass all arguments with their respective keywords. device, type, id and version are not actually optional, they just aren't required in every overload. Pass them if your overload needs them!

insert(self, name, index, device, module=None) (1/2)

Parameters

  • name (str) -- Name of the device.

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

  • device (DeviceId) -- The device id.

  • module (str) -- The module ID.

insert(self, name, index, type, id, version, module=None) (2/2)

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

device=None

type=None

id=None

version=None

module=None

Adds the specified device.

Warning

The original C# function that is called with this method contains 2 overloads. It is strongly advised to pass all arguments with their respective keywords. device, type, id and version are not actually optional, they just aren't required in every overload. Pass them if your overload needs them!

add(self, name, device, module=None) (1/2)

Parameters

  • name (str) -- Name of the device.

  • device (DeviceId) -- The device id.

  • module (str) -- The module ID.

add(self, name, type, id, version, module=None) (2/2)

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.