Tool

class Tool
PropertySet

The properties of this tool.

Returns:

the properties of this tool

Return type:

PropertySet

START_OPTION_ALWAYS

Returns the constant used to specify the start option ‘always’: the tool will always be started.

Returns:

The constant

Return type:

int

START_OPTION_CONDITIONAL

Returns the constant used to specify the start option ‘conditional’: the tool will be started when needed.

Returns:

The constant

Return type:

int

START_OPTION_NEVER

Returns the constant used to specify the start option ‘never’: the tool will never be started automatically.

Returns:

The constant

Return type:

int

Clone()

Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.

Returns:

A copy of this object

Return type:

Tool

CreatePort(portType, implType=None)

Creates a new port on this tool.

Parameters:
portType : str

The port type to be used. Use GetAvailablePortTypes() to get a list of all valid values.

implType : str

The implementation type to be used. If the specified portType does not require a specific implementation type, this argument should be None or left out entirely. Use GetAvailableImplTypes() to get a list of all valid values.

Returns:

The newly created Port object.

Return type:

Port

Raises:

ApiError – If tool could not be created

GetAvailableImplTypes(portType)

Returns a list of all available implementation types for a specified port type.

Parameters:
portType : str

The port type to be used. Use GetAvailablePortTypes() to get a list of all valid values.

Returns:

A list of all available implementation types

Return type:

list[str]

GetAvailablePortTypes()

Returns a list of all available port types for this tool.

Returns:

All available port types

Return type:

list[str]

GetId()

Returns the id of the tool.

Returns:

The id of the tool

Return type:

str

GetLegacyName()

Returns the legacy name of the tool.

Returns:

The name of the tool

Return type:

str

Raises:

ApiError – If the legacy name for the tool could not be found.

GetName()

Returns the name of the tool.

Returns:

The name of the tool

Return type:

str

Raises:

ApiError – If the name for the tool could not be found.

GetPorts(portType=None)

Returns the ports assigned to this tool. If the parameter portType is given, only those ports belonging to this portType will be returned.

Parameters:
portType : str

The portType used for filtering the returned ports. Use GetAvailablePortTypes() to get a list of all valid values. Might be left out.

Returns:

A list of port objects assigned to this tool.

Return type:

list[Port]

GetStartOption()

Returns the startoption for this tool.

Returns:

Startoption of the Tool

Return type:

int

GetStartPriority()

Queries the start priority of the tool.

Returns:

Start priority. The start priority specifies the start order of the tools. A lower numeric value implies a higher priority.

Return type:

int

InsertPort(port)

Adds a copy of the given port to the toolhost. If the port ID is already present in the destination test bench configuration, a new ID will automatically be assigned.

Parameters:
port

port to be inserted

Returns:

Port that was copied to the tool

Return type:

Port

Refresh()

Refreshes the properties of the tool and all of its ports

RemovePort(port)

Removes the port from the tool.

Parameters:
port

The port to be removed.

Rename(newToolId)

Changes the id of the tool to the given one.

Parameters:
newToolId : str

The new id to be used.

Raises:

ApiError – If newtoolId could not be set

SetStartOption(option)

Sets the start option of the tool.

Parameters:
option : int

New start option for the tool. Possible values:

SetStartPriority(value)

Sets the start priority of the tool.

Parameters:
value : int

Start priority. The start priority specifies the start order of the tools. A lower numeric value implies a higher priority.