Skip to main content
Open topic with navigation CAPL Functions » XCP » xcpConnect

xcpConnect

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long xcpConnect (char ecuQualifier[]);

Callback

void OnXcpConnect(char ecuQualifier[]);

Description

Establishes a connection to the XCP/CCP device and starts the configured DAQ measurement. If the connection is successfully depends on the response of the device. Use xcpIsConnected to be aware of the connection. After establishing the connection and before start of the DAQ measurement the callback function OnXcpConnect is called.

Parameters

  • ecuQualifier: Name of the device, configured within the CANoe DE Family XCP/CCP Window.

Return Values

  • 0: OK
  • -1: Device with this name is not existing
  • -2: Operation not allowed – already connected

Example

testcase TC_ConnectToECU ()
{
  xcpConnect("ECU");
  ....
}

// Callback function:
void OnXcpConnect (char ecuQualifier[])
{
  // Set calibration page to RAM
  xcpSetCalPage(ecuQualifier, 0x83, 0, 0);
}
xcpDisconnect