protected override ServiceResult Call(
ISystemContext context,
NodeId objectId,
IList<object> inputArguments,
IList<object> outputArguments)
{
if (OnCall == null)
{
return base.Call(context, objectId, inputArguments, outputArguments);
}
ServiceResult result = null;
byte[] communicationRelationId = (byte[])inputArguments[0];
ushort command = (ushort)inputArguments[1];
byte[] request = (byte[])inputArguments[2];
byte[] reply = (byte[])outputArguments[0];
object serviceError = (object)outputArguments[1];
if (OnCall != null)
{
result = OnCall(
context,
this,
objectId,
communicationRelationId,
command,
request,
ref reply,
ref serviceError);
}
outputArguments[0] = reply;
outputArguments[1] = serviceError;
return result;
}