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

TCIL_StartTask

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

  • long TCIL_StartTask(); // form 1
  • long TCIL_StartTask(dbNode tc); // form 2

Description

This function starts 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_StartTask(TC);
switch (result)
{
  case 0: TestStepPass(); break;
  case -2202: TestStepFail("Function is not available in passive mode of the TC IL!"); break;
  case -2207: TestStepFail("Cannot start task in the current state of the TC IL!"); break;
  default: TestStepFail("Unexpected error"); break;
}