Skip to main content
Open topic with navigation

TestResetNamespaceSysVarValues

CAPL Functions » Test Feature Set » TestResetNamespaceSysVarValues

Tool Availability

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

long TestResetNamespaceSysVarValues (char aNamespace[]);

Description

Resets all system variables of the given namespace and all sub-namespaces to their initial value. If no initial value is defined for a system variable, the system variable is not set. aNamespace is not allowed to be empty. If system variables without namespace should be reset, TestResetSysVarValue has to be used.

Parameters

  • aNamespace: Namespace which system variables should be reset.

Return Values

  • 0: No error
  • -1: General error

Example

// check the warning lights
@sysvar::Lights::SysVarWarningLights = 1;
TestWaitForTimeout(100);
if (@sysvar::Lights::SysVarWarningLightsDsp != 1)
    TestStepFail("Warning lights do not flash!");

// reset all "Lights" system variables
TestResetNamespaceSysVarValues("Lights");
TestWaitForTimeout(200);