Skip to main content
Open topic with navigation CAPL Functions » J1939 » J1939 IL » J1939ILOnRequest

J1939ILOnRequest (Callback)

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long J1939ILOnRequest( long rqPGN, long sourceAddr )
long J1939ILOnRequest( long rqPGN, long sourceAddr, long destinationAddress )

Description

This callback function is called from the J1939 IL if a request (0xEA00) is received.

Parameters

  • rqPGN: requested PGN
  • sourceAddr: source address from which the request was sent
  • destinationAddress: destination address on which the request was sent

Return Values

  • 0: do not respond to the request
  • 1: request with the message from the Tx list of the node
  • 2: send a negative acknowledgment (NACK)
  • 3: send a positive acknowledgment (ACK)

Example

LONG J1939ILOnRequest( LONG rqPGN, LONG sourceAddr )
{
  switch( rqPGN ) {
    case 0xFF02:
      return 2; // send NACK
  }
  return 1;
}