ConfigChange

class ConfigChange

Returned by

ACTION_TYPE_RESTART

Returns the constant used to specify the action type ‘RESTART’.

Returns:

The constant

Return type:

str

ACTION_TYPE_START

Returns the constant used to specify the action type ‘START’.

Returns:

The constant

Return type:

str

ACTION_TYPE_STOP

Returns the constant used to specify the action type ‘STOP’.

Returns:

The constant

Return type:

str

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:

ConfigChange

GetActionType()

Returns the configuration change action type.

Returns:

The configuration change action type. Possible values are: * ConfigChange.ACTION_TYPE_START * ConfigChange.ACTION_TYPE_RESTART * ConfigChange.ACTION_TYPE_STOP

Return type:

str

GetIndex()

Returns the zero based index in the parent.

Returns:

Zero based index

Return type:

int

GetKeepTbc()

Returns True if the TBC selection keeps unchanged.

Returns:

True if the TBC selection keeps unchanged, else False.

Return type:

bool

GetKeepTcf()

Returns True if the TCF selection keeps unchanged.

Returns:

True if the TCF selection keeps unchanged, else False.

Return type:

bool

GetLineNo()

Returns the line number within its project.

Returns:

Line number

Return type:

int

GetName()

Returns the name of the project component.

Returns:

Name of the component

Return type:

str

GetParent()

Returns the parent project component.

Returns:

Parent component

Return type:

ProjectComponent

GetTestConfigurationPath()

Returns the path to the test configuration file, absolute or relative to the ‘Configuration’ directory.

Returns:

Path to the test configuration

Return type:

str

GetTestbenchConfigurationPath()

Returns the path to the test bench configuration file, absolute or relative to the ‘Configuration’ directory.

Returns:

Path to the test bench configuration

Return type:

str

GetToolAction(toolAlias)

Returns the action of the specified tool if it is different from ‘AUTO’ else None.

Parameters:
toolAlias : str

Alias of the tool

Returns:

Action of the specified tool

Return type:

str

GetTools()

Returns a list of the configured tools. If the test bench configuration file can not be determined or does not exist, only tools with an action different from ‘AUTO’ will be returned.

Returns:

Configured tools

Return type:

list[str]

GetType()
Returns the type (class name) of the project component, e.g.
  • “ConfigChange”

  • “ParameterSet”

  • “PackageCall”

  • “Project”

  • “PackageGenerator”

Returns:

Type (class name) of the project component

Return type:

str

IsEnabled()

Returns the state of the test step.

Returns:

True if test step is enabled, otherwise False

Return type:

bool

IsReported()

Returns whether the test step will be reported. If it has a parent test step, this function will only return true if both this test step and the parent test step should be reported.

Returns:

True if test step will be reported, otherwise False

Return type:

bool

RemoveFromProject()

Removes this component from the project.

Raises:

ApiError – if the component is not part of any project

SetActionType(actionType)

Sets the configuration change action type.

Parameters:
actionType : str

The configuration change action type. Valid values are: * ConfigChange.ACTION_TYPE_START * ConfigChange.ACTION_TYPE_RESTART * ConfigChange.ACTION_TYPE_STOP

SetEnabled(state=True)

Enable or disable the test step.

Parameters:
state : bool

True (=Default) to enable, False to disable the test step.

SetKeepTbc(keepTbc)

Defines if the TBC keeps unchanged.

Parameters:
keepTbc : bool

True to keep the TBC unchanged. False to apply the given TBC path, see SetTestbenchConfigurationPath(). False and no given TBC path will deselect the current TBC.

SetKeepTcf(keepTcf)

Defines if the TCF keeps unchanged.

Parameters:
keepTcf : bool

True to keep the TCF unchanged. False to apply the given TCF path, see SetTestConfigurationPath(). False and no given TCF path will deselect the current TCF.

SetName(name)

Sets the name of the project component.

Parameters:
name : str

Name of the component

SetReported(state=True)

Enable or disable the reporting of the test step. If it has a parent test step, its reporting must also be enabled in order to have this test step appear in the report.

Parameters:
state : bool

True (=Default) to enable, False to disable the reporting of the test step.

SetTestConfigurationPath(testConfiguration, namespace=None)

Sets the path to the test configuration file, absolute or relative to the ‘Configurations’ directory.

Parameters:
testConfiguration : str

Path to the test configuration file (absolute or relative to configurations directory)

namespace : str

Optional namespace of a configured library workspace. For relative paths, the path is resolved via the configured library workspace with this namespace. If not specified, the namespace is determined automatically via configured library workspaces (for absolute paths) and via the main workspace (for relative paths).

SetTestbenchConfigurationPath(testbenchConfiguration, namespace=None)

Sets the path to the test bench configuration file, absolute or relative to the ‘Configurations’ directory.

Parameters:
testbenchConfiguration : str

Path to the test bench configuration file (absolute or relative to configurations directory)

namespace : str

Optional namespace of a configured library workspace. For relative paths, the path is resolved via the configured library workspace with this namespace. If not specified, the namespace is determined automatically via configured library workspaces (for absolute paths) and via the main workspace (for relative paths).

SetToolAction(toolAlias, action)

Sets the action of the specified tool. Has to be one of the following:

  • ‘AUTO’: Automatic (removes tool from component as ‘AUTO’ is the default value)

  • ‘RE_START’: Start if stopped, restart if started

  • ‘START’: Start if stopped, leave as is if started

  • ‘STOP’: Stop if started, leave as is if stopped

  • ‘NONE’: Leave as is

Parameters:
toolAlias : str

Alias of the tool

action : str

The action to set the tool to

Raises:

ApiError – When the specified action is not supported.

GetPosition()

Returns the position in the parent project.

Returns:

parent position

Return type:

int

Deprecated since version 2024.4: Please use method GetLineNo instead.