AnalysisPackageMappingCall

class AnalysisPackageMappingCall

An analysis package mapping call in a project.

AddParameterGenerator(name, generatorId)

Adds a parameter generator to the package call.

Parameters:
name : str

Name of the parameter generator.

generatorId : str

Unique generator id of generator to be added.

Returns:

The parameter generator.

Return type:

ParameterGenerator

AddParameterSet(name, index=None)

Adds a parameter set to the analysis package call.

Please note, that only parameters, mappings, and test management settings of parameters sets are permitted for parameter sets of analysis package calls!

Parameters:
name : str

Name of the parameter set

index : int

Zero based index to insert the parameter set inside the analysis package call

Returns:

The parameter set

Return type:

ParameterSetAnalysisPackage

AddParameterVariationGenerator(name)

Adds a parameter variation generator to the analysis package call.

Parameters:
name : str

Name of the parameter variation generator.

Returns:

The parameter variation generator.

Return type:

ParameterVariationGeneratorComponent

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:

AnalysisPackageMappingCall

GetAbsolutePath()

Returns the absolute path to referenced package or None if the mapping has not yet been resolved.

Returns:

Absolute path to referenced package

Return type:

str

GetAutoAssignParameters()

Returns whether parameters without assigned value (via parameter set/general project parameterization) should automatically use an equally named return value of the stimulation package if one exists.

Returns:

True, if the auto assignment is enabled. Otherwise, False.

Return type:

bool

GetComponents()

Returns all direct children of the package call.

Returns:

List with all children components

Return type:

list[ProjectComponent]

GetImplementedAnalysisLabel()

Returns the label for the trace analysis implemented by this package.

Returns:

trace analysis label

Return type:

str

GetIndex()

Returns the zero based index in the parent.

Returns:

Zero based index

Return type:

int

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

GetPackage()

Returns the referenced analysis package or None if the mapping has not yet been resolved.

Note:

The returned package object is a reference. If this object is used to manipulate the content all references in this project are affected.

Returns:

Referenced analysis package

Return type:

AnalysisPackage

Raises:

ApiError – If the referenced package file (*.ta) does not exist.

GetParameterGenerators(skipDisabled=True)

Returns all parameter generators of the analysis package call.

Parameters:
skipDisabled : bool

Defines whether disabled components should be included.

Returns:

The parameter generators.

Return type:

list[ParameterGenerator]

GetParameterSets(skipDisabled=True)

Returns all parameter sets of the analysis package call.

Parameters:
skipDisabled : boolean

Defines whether disabled components should be included.

Returns:

Parameter sets

Return type:

list[ParameterSetAnalysisPackage]

GetParameterVariationGenerators(skipDisabled=True)

Returns all parameter variation generators of the analysis package call.

Parameters:
skipDisabled : bool

Defines whether disabled generators should be excluded.

Returns:

The parameter variation generators.

Return type:

list[ParameterVariationGeneratorComponent]

GetParent()

Returns the parent project component.

Returns:

Parent component

Return type:

ProjectComponent

GetProjectRelativePath()

Returns the file project relative path of the referenced package.

The returned path is a relative path, its base is the folder where the calling project is located, just like the path is shown in the package test step’s dialog.

Returns:

File name with relative path of the package to be called.

Return type:

str

Raises:

ProjectNotSavedError – If this method is called before project is saved.

GetStimulationPackageCall()

Returns the stimulation package call connected to this analysis package.

This method will return None if the analysis package is run for all previous stimulations (see SetRunForPreviousStimulations()).

Returns:

Stimulation package call. Returns None if no stimulation package call is set or the referenced stimulation package call was not found in the project.

Return type:

StimulationPackageCall

GetStimulationPackageCalls()

Returns a list containing all related stimulation package calls, i.e. either all previous stimulation package calls if the corresponding option is set or the explicitly connected stimulation package call. In the latter case, see also GetStimulationPackageCall().

Returns:

list of related stimulation package calls

Return type:

list[StimulationPackageCall]

GetTestCaseId()

Returns the test case id for the analysis package call.

Returns:

Test case id

Return type:

str

GetTestScriptId()

Returns the test script id of the corresponding analysis package.

Returns:

Test script id

Return type:

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

HasComponents()

Returns whether the package call has children.

Returns:

True if there are children, False otherwise.

Return type:

boolean

InsertParameterSet(parameterSet, index=None)

Adds a parameter set to the analysis package call.

Please note, that only parameters and test management settings of parameters sets are permitted for parameter sets of analysis package calls!

Parameters:
parameterSet

parameter set

index : int

Zero based index to insert the parameter set inside the analysis package call

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

IsRunForPreviousStimulations()

Returns whether the analysis package call is run for all previous stimulation package calls.

Returns:

True, if run for all stimulations. Otherwise, False.

Return type:

bool

RemoveFromProject()

Removes this component from the project.

Raises:

ApiError – if the component is not part of any project

RemoveParameterGenerator(paramGenerator)

Removes a parameter generator from the package call.

Parameters:
paramGenerator

The parameter generator to be removed.

Raises:

ApiError –

  • If the given parameter generator is not part of the package call

  • If paramGenerator is not of type ParameterGenerator

RemoveParameterSet(paramSet)

Removes a parameter set from the analysis package call.

Parameters:
paramSet

The parameter set to be removed

Raises:

ApiError –

RemoveParameterVariationGenerator(paramVariationGenerator)

Removes a parameter variation generator from the analysis package call.

Parameters:
paramVariationGenerator

The parameter variation generator to be removed.

Raises:

ApiError –

SetAutoAssignParameters(value)

Sets whether parameters without assigned value (via parameter set/general project parameterization) should automatically use an equally named return value of the stimulation package if one exists.

Parameters:
value : bool

True, to enable the auto assignment. Otherwise, False.

SetEnabled(state=True)

Enable or disable the test step.

Parameters:
state : bool

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

SetImplementedAnalysisLabel(label)

Sets the label for the trace analysis implemented by this package.

The label cannot be set for analysis packages that are run for all previous stimulations (see SetRunForPreviousStimulations()).

Parameters:
label : str

trace analysis label

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.

SetStimulationPackageCall(stimulationPackage)

Connects the given stimulation package call with this analysis package.

Parameters:
stimulationPackage

Stimulation package

SetTestCaseId(testCaseId)

Sets the test case id for the analysis package call.

Parameters:
testCaseId : str

Test case id

GetPosition()

Returns the position in the parent project.

Returns:

parent position

Return type:

int

Deprecated since version 2024.4: Please use method GetLineNo instead.