Skip to main content

on diagRequestSent

Valid for: CANoe DE Note The following syntax forms require a defined target ECU by calling diagSetTarget(char ecuQualifier[]) beforehand. When using these forms, no semantic check can be performed at compile-time, so no warnings will be emitted for nonexistent diagRequests.
  • form 1
  • form 2
  • form 3
  • form 4

Function Syntax

on diagRequestSent

Description

The procedure is sub-divided into the following events; the first matching event procedure (top-down) is called:
  • on diagRequestSent <service> // form 1
    • Is called when a request is sent completely in the Tester simulation that belongs to the indicated diagnostic service.
  • *on diagRequestSent <class>::* // form 2
    • Is called when the service of the sent request belongs to the specified class.
  • on diagRequestSent * // form 3
    • Is called when no other event procedure matches.
    • This procedure may therefore be called for several services!
  • on diagRequestSent ECU.<service> // form 4
    • Is called when a request is sent completely in the Tester simulation that belongs to the indicated diagnostic service.
  • *on diagRequestSent ECU.<class>::* // form 5
    • Is called when the service of the sent request belongs to the specified class.
  • on diagRequestSent ECU.* // form 6
    • Is called when no other event procedure matches.
    • This procedure may therefore be called for several services!
Note Please note that, after every sending of a request, all responses are signaled only to the sender. Diagnostic requests that are sent from the Diagnostic Console are thus invisible for a CAPL program as are the received responses. Similarly, no responses to requests sent from a CAPL program are displayed in the Diagnostic Console.

Example

Example 1
Example 2 For event handlers, it is also possible to specify an ECU qualifier to filter specific events. And all services that belong to the same diagnostic class can be processed in one handler.