Skip to main content
Open topic with navigation CAPL Functions » General » Event Procedures » on PDU

on PDU

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

  • on PDU <PDU name>;
  • on PDU short <short header ID>;
  • on PDU long <long header ID>;
  • on PDU <header ID>;
  • on PDU *;
  • on PDU [*];

Description

This event procedure is called if the corresponding PDU is received of which the updated bit is set or undefined. For the event procedure of type * and [*], keyword this is an untyped PDU object. For all other event procedures, keyword this is a typed PDU object. Note: The form on pdu * is also called for SOME/IP PDUs. Keyword this is an untyped PDU object. The data contains the SOME/IP header and payload. Security selectors are not available.

Parameters

Selectors

Example

Example 1
on PDU short 5
{
  write("on pdu: %s", this.name);
}
Example 2
on PDU EngineData
{
  write("EngineData received at: %d s", this.time);
}
Example 3
on PDU *
{
  write("on pdu: LongHeaderID %X length %d", this.LongHeaderID, this.PduLength);
}
Resolution of Ambiguities