Skip to main content
Open topic with navigation CAPL Functions » Ethernet » SOME/IP IL » <OnSomeIpEventReceived>

<OnSomeIpEventReceived>

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

void <OnSomeIpEventReceived>( dword cevHandle, dword messageHandle );

Description

This callback function is called by SOME/IP IL when a notification message has been received for the Event specified in the cevHandle parameter. A callback function with this signature must be passed to the CAPL function SomeIpCreateEventConsumer.

Parameters

  • cevHandle: Handle of the Event that triggered the callback, see SomeIpCreateEventConsumer.
  • messageHandle: Message handle of the SOME/IP Event.

Return Values

Example

variables
{
  DWORD aep; // Application Endpoint handle
  DWORD csi; // consumed Service Instance handle
  DWORD ceg; // consumed Eventgroup handle
  DWORD cev; // consumed Event handle
}

on start()
{
  // open Application Endpoint
  aep = SomeIpOpenLocalApplicationEndpoint(17, 50002);
  // create Service Instance
  csi = SomeIpCreateConsumedServiceInstance(aep,10,1);
  // create Eventgroup
  ceg = SomeIpAddConsumedEventGroup(csi,1);
  // create Event Consumer
  cev = SomeIpCreateEventConsumer(csi,32770,"CallbackEvent1 ");
}

void CallbackEvent1 (DWORD cevHandle, DWORD messageHandle)
{
  // this function is called if the Event was sent. Parameters can be evaluated here.
}