<OnSomeIpMethodRequest>
<OnSomeIpMethodRequest>
Valid for: CANoe DE • CANoe4SW DE
Function Syntax
void <OnSomeIpMethodRequest>(dword methodHandle, dword messageHandle, dword messageResponseHandle); // form 1void <OnSomeIpMethodRequest>(dword methodHandle, DWORD messageHandle); // form 2long <OnSomeIpMethodRequest>(dword methodHandle, dword messageHandle, dword messageResponseHandle); // form 3
Description
A callback function with this signature must be passed to the CAPL function SomeIpAddMethod. Note: The syntax of the callback function specified in form 2 must be used if the fireAndForget parameter was used when the method was created by the provider (see also SomeIpAddMethod). This callback is called when a consumer has called the method created with SomeIpAddMethod.Parameters
- methodHandle: Handle of the Event that triggered the callback, see SomeIpAddMethod.
-
messageHandle: Message handle of the SOME/IP request. The message contains the parameter values specified by the consumer in the method call.
Note:
- If the getter method of a field was overwritten (see also SomeIpAddField), the SOME/IP message payload of the request is empty.
- If the setter method of a field was overwritten (see also SomeIpAddField), the SOME/IP message contains the current field content.
-
messageResponseHandle: Message handle of the SOME/IP response. The result of the method call must be saved in this message. All parameters of this message are initialized with 0 by default and can be changed using SomeIpSetValue…. When this callback method is exited, this SOME/IP message is sent.
Note:
- If the getter method of a field was overwritten (see also SomeIpAddField), the SOME/IP response message contains the field content. The content of this SOME/IP message can be changed using SomeIpSetValue…. These changes have no effect on the field content itself when this callback method is exited.
- If the setter method of a field was overwritten (see also SomeIpAddField), the SOME/IP response message already contains the new field content. The content of this SOME/IP message can be changed using SomeIpSetValue…. When this callback method is exited, the current field content is automatically overwritten with the field content of the SOME/IP response message.
Return Values
- Form 1, 2: —
- Form 3: The response will be sent if the callback returns 1. Otherwise, the response has been filtered by the callback.