TsReadFaultMemory¶
- class TsReadFaultMemory¶
Teststep for reading the fault memory of an ECU and examining the returned DTC list.
Returned by
- AllowedSubfunctions()¶
Returns a list of subfunctions which can be passed to SetSubfunction().
- Returns:
allowed subfunction names
- Return type:
list[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:
- DeactivateExpectation()¶
Deactivates the expectation so that the result will not be evaluated.
- DeactivateSaveIn()¶
Deactivates the test step’s save in property, so the value will not be stored in a package variable.
- DeactivateTimeOption()¶
Deactivates any time option set on the test step. This is equivalent to selecting the option “none” in the test step’s time options menu.
- DeleteTranslatedCommentText(language)¶
Deletes a comment for the test step in the given language.
- Parameters:
- language : str¶
Language of the text (‘en_US’, ‘de_DE’, ‘zh_CN’)
- GetActionColumnText()¶
Returns the text value of the “action” column.
- Returns:
Action column text
- Return type:
str
- GetActiveTimeOptionType()¶
Returns the type of the currently active time option.
- Returns:
Type of active time option (“Timeless”, “Finally”, “TrueForWithin”, “Generally”, “SyncOnly”, “PollingCycleMultiplier”)
- Return type:
string
- GetComment()¶
Returns the comment of the test step in the current test case language.
- Returns:
Comment text as shown in the comment tab
- Return type:
str
- GetCommentColumnText()¶
Returns the text value of the “comment” column.
- Returns:
Comment column text
- Return type:
str
- GetError()¶
Returns a list of errors. Note that the error messages depend on the program language ecu.test is set to. Because of that we do not recommend to check against exact error messages, unless you are certain about the respective program language.
- Returns:
List of errors
- Return type:
list[str]
- GetExpectation()¶
Returns the expectation expression from the evaluation of the test step, or None, if no expectation was defined.
- Returns:
The expectation
- Return type:
- GetIndex()¶
Returns the zero based index in the parent.
- Returns:
Zero based index
- Return type:
integer
- GetLineNo()¶
Returns the test steps line number within its test case.
- Returns:
Line number
- Return type:
int
- GetMappingItemReferenceName()¶
Returns the unique reference name of the mapping item used by this test step.
- Returns:
Reference name of used mapping item
- Return type:
str
- GetMemorySelectionExpression()¶
Returns the hexadecimal representation of memorySelection as a string. Can only be used with subfunction 0x17: ReportUserDefMemoryDTCByStatusMask
- Returns:
memorySelection
- Return type:
str
- GetMinimumDuration()¶
Returns the minimum duration of the test step’s time option, if a corresponding option has been set.
- Returns:
The minimum duration, else None
- Return type:
string
- GetMinimumDurationUnit()¶
Returns the unit of the minimum duration of the test step’s time option, if a corresponding option has been set.
- Returns:
The unit of the minimum duration, else None
- Return type:
string
- GetParameterColumnText()¶
Returns the text value of the “parameter” column.
- Returns:
Parameter column text
- Return type:
str
- GetParent()¶
Returns the parent test step.
- Returns:
The parent test step or None if it is a top level test step.
- Return type:
- GetPollingCycle()¶
Returns the polling cycle of the test step’s time option, if a corresponding option has been set.
- Returns:
The polling cycle, else None
- Return type:
string
- GetPollingCycleUnit()¶
Returns the unit of the polling cycle of the test step’s time option, if a corresponding option has been set.
- Returns:
The unit of the polling cycle, else None
- Return type:
string
- GetSaveInVariableName()¶
Returns the currently selected variable to save the data.
- Returns:
The variable’s name
- Return type:
string
- GetStatusMaskExpression()¶
Returns the status mask which will be used in subfunctions that need one, i.e. the subfunction name ends with “ByStatusMask”.
- Returns:
statusMask
- Return type:
str
- GetSubfunction()¶
Returns the subfunction used to read the fault memory.
- Returns:
subfunction name or empty string if it has not yet been set
- Return type:
str
- GetTags()¶
Returns the tags set for this step.
- Returns:
A (sorted) list of tags
- Return type:
list[str]
- GetTestManagementId()¶
Returns the test management id of the test step.
- Returns:
Test step id.
- Return type:
str
- GetTestStepId()¶
Returns the test step id.
- Returns:
test step id
- Return type:
str
- GetTimeout()¶
Returns the timeout of the test step’s time option, if a corresponding option has been set.
- Returns:
The timeout else None
- Return type:
string
- GetTimeoutUnit()¶
Returns the unit of the timeout of the test step’s time option, if a corresponding option has been set.
- Returns:
The unit of the timeout else None
- Return type:
string
- GetTranslatedCommentText(language)¶
Returns the text value of the “comment” column in the given language.
- Parameters:
- language : str¶
Language of the requested text (‘en_US’, ‘de_DE’, ‘zh_CN’)
- Returns:
Comment column text
- Return type:
str
- GetType()¶
Returns the type (class name) of the test step, e.g.
“TsPreconditionBlock”
“TsWait”
“TsIfThenElse”
“TsSwitchCase”
“TsCaseNode”
- Returns:
Type (class name) of the test step
- Return type:
str
- GetValueColumnText()¶
Returns the text value of the “value” column in your current test case language.
- Returns:
Value column text
- Return type:
str
- IsBreakpoint()¶
Checks whether the test step is a break point.
- Returns:
True if test step is a break point, else False
- Return type:
boolean
- IsContainer()¶
Returns True, if the test step supports calling GetChildren as well as manipulating the structure of its children. (e. g. via inserting or deleting sub test steps).
- Returns:
True if it can contain test steps, else False
- Return type:
boolean
- IsEnabled()¶
Returns the state of the test step.
- Returns:
True if test step is enabled, otherwise False
- Return type:
bool
- IsInPostcondition()¶
Returns True if the test step is located in a postcondition
- Returns:
True if the test step is located in a postcondition, else Flase
- Return type:
bool
- IsInPrecondition()¶
Returns True if the test step is located in a precondition
- Returns:
True if the test step is located in a precondition, else False
- Return type:
bool
- IsOk()¶
Returns the internal state of correctness of the test step.
- Returns:
True if no problems were found, else False
- Return type:
boolean
- IsVisible()¶
Checks whether the test step is visible. This depends on the test step itself or a parent test step being disabled.
- Returns:
True if test step is visible, else False
- Return type:
boolean
- SetBreakpoint(enable)¶
Sets or unsets the test step to act as a break point.
- Parameters:
- enable : boolean¶
True if test step is a break point, else False
- SetComment(comment)¶
Sets a comment for the test step in the current test case language.
- Parameters:
- comment : str¶
Text to be displayed in the comment tab
-
SetEnabled(state=
True)¶ Enable or disable the test step.
- Parameters:
- state : bool¶
True (Default) to enable, False to disable the test step.
- SetExpectation(expectation)¶
Sets the expectation in the evaluation of the test step. The expectation will be activated if it was not enabled previously.
- Parameters:
- expectation¶
The expectation
- SetMemorySelectionExpression(memorySelection)¶
Sets the memory selection for subfunction 0x17: ReportUserDefMemoryDTCByStatusMask.
- Parameters:
- memorySelection : str¶
hexadecimal value, 1 byte, e.g. 0xAB
- SetSaveInVariableName(variableName)¶
Sets the name of the variable used for storing data by the test step. The variable will be created automatically if it does not already exist in the package where the test step is placed in. This method must not be called, if the test step has not been added to a package previously.
- Parameters:
- variableName : string¶
The variable’s name. Must not be None or an empty string.
- Raises:
ApiError –
If SaveIn was called before the test step was added to a package.
If variableName is None or an empty string
- SetStatusMaskByBits(testFailed, testFailedThisOperationCycle, pendingDTC, confirmedDTC, testNotCompletedSinceLastClear, testFailedSinceLastClear, testNotCompletedThisOpeartionCycle, warningIndicatorRequested)¶
Sets the status mask for a subfunction that needs one, i.e. the subfunction name ends with “ByStatusMask”.
- Parameters:
- testFailed : bool¶
set bit #0 ‘testFailed’
- testFailedThisOperationCycle : bool¶
set bit #1 ‘testFailedThisOperationCycle’
- pendingDTC : bool¶
set bit #2 ‘pendingDTC’
- confirmedDTC : bool¶
set bit #3 ‘confirmedDTC’
- testNotCompletedSinceLastClear : bool¶
set bit #4 ‘testNotCompletedSinceLastClear’
- testFailedSinceLastClear : bool¶
set bit #5 ‘testFailedSinceLastClear’
- testNotCompletedThisOpeartionCycle : bool¶
set bit #6 ‘testNotCompletedThisOpeartionCycle’
- warningIndicatorRequested : bool¶
set bit #7 ‘warningIndicatorRequested’
- SetStatusMaskExpression(statusMask)¶
Sets the status mask for a subfunction that needs one, i.e. the subfunction name ends with “ByStatusMask”.
- Parameters:
- statusMask : str¶
status mask, e.g. ‘0x8F’ or ‘variable’
- SetSubfunction(subfunctionName)¶
Selects the subfunction used to read the fault memory. Use the ‘AllowedSubfunctions’ method to get the available subfunctions.
- Parameters:
- subfunctionName : str¶
name of the subfunction that should be executed
- SetTags(tags)¶
Set the list of tags for this step. The list of tags will be sorted and stored.
- Parameters:
The list of tags
- SetTestManagementId(testManagementId)¶
Sets the test management id of the test step.
- Parameters:
- testManagementId : str¶
Test management id of the test step
-
SetTimeOptionOnlySynchronization(timeout, pollingCycle=
None, timeoutUnit='ms', pollingCycleUnit='ms')¶ Sets the test step’s time option to “only synchronization”.
- SetTimeOptionPollingCycleMultiplier(pollingCycleMultiplier)¶
Sets the test step’s time option to “polling cycle multiplier”. This option must only be used when inserting the test step into a Multi-Check!
- Parameters:
- pollingCycleMultiplier : string¶
The polling cycle multiplier to be used.
-
SetTimeOptionTrueForAtLeast(minimumDuration, pollingCycle=
None, minimumDurationUnit='ms', pollingCycleUnit='ms')¶ Sets the test step’s time option to “true for at least”.
-
SetTimeOptionTrueForAtLeastWithin(minimumDuration, timeout, pollingCycle=
None, timeoutUnit='ms', minimumDurationUnit='ms', pollingCycleUnit='ms')¶ Sets the test step’s time option to “true for at least … within …”.
- Parameters:
- minimumDuration : string¶
The minimum duration to be used
- timeout : string¶
The timeout to be used
- pollingCycle : string¶
Optional polling cycle to be used
- timeoutUnit : string¶
Optional unit for the timeout (ms, s, min, h or d)
- minimumDurationUnit : string¶
Optional unit for the minimum duration (ms, s, min, h or d)
- pollingCycleUnit : string¶
Optional unit for the polling cycle (ms, s, min, h or d)
-
SetTimeOptionWaitUntilTrue(timeout, pollingCycle=
None, timeoutUnit='ms', pollingCycleUnit='ms')¶ Sets the test step’s time option to “wait until true”.