Skip to main content
Open topic with navigation CAPL Functions » ISO11783 » Task Controller Interaction Layer (TC IL) » TCIL_StopTask

TCIL_StopTask

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long TCIL_StopTask(); // form 1
long TCIL_StopTask(dbNode tc); // form 2

Description

This function stops a task.

Parameters

  • tc: Task Controller simulation node to apply the function.

Return Values

  • 0: Function has been executed successfully
  • < 0: An error has occurred, see IL Error Code

Example

Example form 2
long result;
result = TCIL_StopTask(TC);
switch (result)
{
  case     0: TestStepPass(); break;
  case -2202: TestStepFail("Function is not available in passive mode of the TC IL!"); break;
  case -2208: TestStepFail("Cannot stop task in the current state of the TC IL!"); break;
  default:    TestStepFail("Unexpected error"); break;
}