variables
{
DWORD gMc; // global method call handle
}
on key 'e'
{
DWORD csi; // consumed Service Instance handle
DWORD mc; // method call
// open Application Endpoint
aep = SomeIpOpenLocalApplicationEndpoint(0x11, 50002);
csi = SomeIpCreateConsumedServiceInstance(aep,11,1);
// create method call
gMc = SomeIpCreateMethodCall(csi,31,"OnMethodResponse");
// set the two input parameters of the method and call the method
SomeIpSetValueDWord(gMc,"Member_value1",11);
SomeIpSetValueDWord(gMc,"Member_value2",22);
SomeIpCallMethod(gMc);
}
on key 'r'
{
// remove method call
SomeIpRemoveMethodCall(gMc);
}
void OnMethodResponse(dword methodCallHandle, dword messageResponseHandle )
{
DWORD res; // value of return parameter
// get the returned parameter values
res = SomeIpGetValueDWord(messageResponseHandle,"Result");
write("The method call returned value: %d",res);
}