TraceAnalysisReference¶
- class TraceAnalysisReference¶
Most methods of the
TraceAnalysisReferencecan only be used if it is assigned to a package.I.e. add the
TraceAnalysisReferenceto a trace analysis and the trace analysis itself to a package.Returned by
- AssignGenericSignal(direction, sigName, genSig)¶
Bind a generic signal to a signal of the referenced trace analysis.
- Parameters:
- Returns:
An object representing the signal binding. If there is already a signal binding for sigName, the signal binding object and its settings will be reused; otherwise, a new signal binding object will be created.
- Return type:
- Raise:
ApiError: Raised when any of the following occur:
The trace analysis reference has to be added to the package before generic signals can be assigned.
The direction either has to be ‘IN’ or ‘OUT’.
There is no signal of given name in the referenced trace analysis.
- AssignGenericSignalByName(direction, sigName, genSigName)¶
Bind a generic signal to a signal of the referenced trace analysis.
- Parameters:
- Returns:
An object representing the signal binding. If there is already a signal binding for sigName, the signal binding object and its settings will be reused; otherwise, a new signal binding object will be created.
- Return type:
- Raise:
ApiError: Raised when any of the following occur:
The trace analysis reference has to be added to the package before generic signals can be assigned.
The generic signal of given name doesn’t exist.
The direction either has to be ‘IN’ or ‘OUT’.
There is no signal of given name in the referenced trace analysis.
- 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:
- GetDescription()¶
Returns the description of the trace analysis element.
- Returns:
The description
- Return type:
str
- GetIndex()¶
Returns the zero based index in the parent.
- Returns:
Zero based index
- Return type:
int
- GetLineNo()¶
Returns the trace steps line number within its trace analysis.
- Returns:
Line number
- Return type:
int
- GetMappingItemReferenceName()¶
Returns the reference name of the package mapping item used by this trace step.
- Returns:
Reference name of the used mapping item.
- Return type:
str
- GetName()¶
Returns the name of the trace analysis element.
- Returns:
The name
- Return type:
str
- GetParameter(paramName)¶
Retrieves the expression assigned to a package parameter.
- Parameters:
- paramName : str¶
Name of the parameter
- Returns:
Expression assigned to the parameter
- Return type:
str
- Raise:
ApiError: - The package either doesn’t exist or it is a recursive dependency. - The parameter of given name doesn’t exist.
- GetParameterNames()¶
Returns the names of the parameters that can be configured for the referenced trace analysis.
- Returns:
The list of valid parameter names
- Return type:
list[str]
- GetParameters()¶
Retrieves all package parameters with its expressions.
- Returns:
Dictionary with expressions assigned to the parameters
- Return type:
dict[str, str]
- GetPkgParameters()¶
Returns a list of the incoming parameter names located in the referenced package.
- Returns:
The parameter names
- Return type:
list[str]
- Raise:
ApiError: The referenced package is invalid, might not exist or is a recursive dependency.
- GetPkgReturns()¶
Returns a list of the outgoing parameters located in the referenced package.
- Returns:
The return names
- Return type:
list[str]
- Raise:
ApiError: The referenced package is invalid, might not exist or is a recursive dependency.
- GetPkgTraceAnalyses()¶
Returns a list of the trace analysis names located in the referenced package.
- Returns:
The names of the trace analyses
- Return type:
list[str]
- Raise:
ApiError: The referenced package is invalid, might not exist or is a recursive dependency.
- GetReferencedPackage()¶
Returns the referenced package.
- Returns:
The referenced package.
- Return type:
- GetReturn(varInternal)¶
Retrieves the variable name assigned to a package return value.
- Parameters:
- varInternal : str¶
Name of the return variable in the called package
- Returns:
Assigned variable of the calling package. Empty string if there is not any variable assigned.
- Return type:
str
- GetReturns()¶
Retrieves the return value assignments.
- Returns:
Assigned variables of the calling package
- Return type:
dict[str, str]
- GetSignalBinding(direction, sigName)¶
Get the signal binding for a signal.
- Parameters:
- Return type:
- Returns:
An object representing the signal binding.
- Raise:
ApiError: The direction either has to be ‘IN’ or ‘OUT’.
- GetTags()¶
Returns the tags set for this step.
- Returns:
A (sorted) list of tags
- Return type:
list[str]
- GetTraceAnalysisName()¶
Returns the name of the referenced trace analysis.
- Return type:
str
- Returns:
The name of the referenced trace analysis
- GetType()¶
Returns the type (class name) of the trace step, e.g.
‘Episode’
‘AnalysisBlock’
‘TriggerBlock’
‘Calculation’
‘TemplateBasedTraceStep’
‘TraceAnalysisReference’
‘TraceAnalysisReferenceDeprecated’
- Returns:
Type (class name) of the trace step
- Return type:
str
- GetUuid()¶
Returns the UUID of the trace step.
- Returns:
UUID of the trace step
- Return type:
str
- IsContainer()¶
Checks whether this trace step can contain trace steps.
- Returns:
True if it can contain trace steps, else False
- Return type:
boolean
- IsEnabled()¶
Checks whether the trace step is enabled.
- Returns:
True if trace step is enabled, else False
- Return type:
boolean
- IsOk()¶
Returns the internal state of correctness of the trace step.
- Returns:
True if no problems were found, else False
- Return type:
boolean
- IsVisible()¶
Checks whether the trace step is visible. This depends on the trace step itself or a parent trace step being disabled.
- Returns:
True if trace step is visible, else False
- Return type:
boolean
- SetDescription(value)¶
Sets the description of the trace analysis element.
- Parameters:
- value : str¶
The new description
- SetEnabled(enable)¶
Enables or disables the trace step (this also affects child trace steps).
- Parameters:
- enable : boolean¶
If True, enables the trace step, if False, disables the trace step
- SetMappingItemReferenceName(mappingName)¶
Sets the package mapping item of given reference name used by this trace step.
- Parameters:
- mappingName : str¶
Reference name of the mapping item to be used.
- Raise:
ApiError: A mapping of given reference name doesn’t exist in the referencing package.
- SetParameter(paramName, paramValue)¶
Assigns a value to a package parameter.
- SetParameters(paramDict)¶
Assigns values to package parameters.
- Parameters:
- paramDict : dict[str, str]¶
Dictionary of parameter name -> parameter value (expression) mappings
- SetReturn(varInternal, varExternal)¶
Assigns a return value to a variable.
- SetReturns(returnDict)¶
Assigns package return values to variables.
- Parameters:
- returnDict : dict[str, str]¶
Dictionary of return variable -> variable of the calling package mappings
- SetTags(tags)¶
Set the list of tags for this step. The list of tags will be sorted and stored.
- Parameters:
The list of tags
- SetTraceAnalysisName(name)¶
Sets the name of the referenced trace analysis.
- Note:
Signal bindings will be synchronized. Deprecated bindings will be deleted.
- Parameters:
- name : str¶
The name
- Raise:
ApiError: Raised when any of the following occur:
The referenced package is invalid, might not exist or is a recursive dependency.
The referenced package doesn’t contain a trace analysis of given name.
- GetPackagePath()¶
Returns the path to the referenced package.
- Returns:
The package path. Returns None if no path is set.
- Return type:
str
Deprecated since version 2024.2: Please use
GetMappingItemReferenceNameinstead and retrieve the path of the referenced package from the mapping item.
- GetPackagePathExpression()¶
Returns the expression representing the path of the referenced package.
- Returns:
The expression representing the package path. Returns None if no path is set.
- Return type:
str
Deprecated since version 2024.2: Please use
GetMappingItemReferenceNameinstead and retrieve the path of the referenced package from the mapping item.
- SetPackagePath(packagePath)¶
Sets the package path.
- Note:
Signal bindings will be synchronized. Deprecated bindings will be deleted.
- Parameters:
- packagePath : str¶
The package path
- Raise:
ApiError: Raised when any of the following occur:
The trace analysis reference has to be added to the package before the package path can be set.
The package either doesn’t exist or it is a recursive dependency.
Deprecated since version 2024.2: Please use
SetMappingItemReferenceNameinstead.