Skip to main content

_DoIP_IdentificationRequest

Valid for: CANoe DE Note The following DoIP CAPL function is only available with the modeling library DoIP.dll and eventually an appropriate implementation of the CAPL Callback Interface. Information about the DoIP DLL and the CAPL Callback Interface you find here:

Function Syntax

long _DoIP_IdentificationRequest(long type, BYTE VINorEID[]);

Description

A vehicle simulation has received a Vehicle Identification Request Message. The value returned will determine the reaction of the DoIP.DLL. Note that requests not targeted at the ECU will be ignored.

Parameters

  • type
    • 1: No argument, VINorEID is empty
    • 2: Argument contains the EID (6 byte)
    • 3: Argument contains the VIN (17 byte/characters)
  • VINorEID
    • The argument from the request message.

Return Values

  • -2
    • Ignore Vehicle Identification Request, i.e. do nothing
  • -1
    • Send a vehicle identification response message after A_DoIP_Announce_Wait ms (default: 500 ms, can be configured in DoIP.INI)
  • ≥ 0
    • Send a vehicle identification response message after this many ms

Example

long _DoIP_IdentificationRequest(long type, BYTE VINorEID[])
{
  if( type == 1)
    write( "Received VIR without argument");
  else if( type == 2)
    write( "Received VIR with EID: %02x:%02x:%02x:%02x:%02x:%02x"
    , VINorEID[0], VINorEID[1], VINorEID[2]
    , VINorEID[3], VINorEID[4], VINorEID[5]);
  else if( type == 3)
  {
    char textVIN[17];
    int i;
    for( i = 0; i < elcount(VINorEID); ++i)
      textVIN[i] = VINorEID[i];
    write( "Received VIR with VIN: %s", textVIN);
  }
  // The response message shall be sent after waiting between 100 and 500 ms
  return 100 + random(400);
}