Opc.Ua.Fdi7.TransferMethodISA100_WirelessMethodState.Call C# (CSharp) Method

Call() protected method

Invokes the method, returns the result and output argument.
protected Call ( ISystemContext context, Opc.Ua.NodeId objectId, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext The current context.
objectId Opc.Ua.NodeId The id of the object.
inputArguments IList The input arguments which have been already validated.
outputArguments IList The output arguments which have initialized with thier default values.
return Opc.Ua.ServiceResult
        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];
            string oPERATION = (string)inputArguments[1];
            ushort appID = (ushort)inputArguments[2];
            ushort objectID = (ushort)inputArguments[3];
            ushort attrOrMethID = (ushort)inputArguments[4];
            uint sUB_INDEX = (uint)inputArguments[5];
            byte[] writeData = (byte[])inputArguments[6];
            uint requestId = (uint)inputArguments[7];

            byte[] readData = (byte[])outputArguments[0];
            object serviceError = (object)outputArguments[1];

            if (OnCall != null)
            {
                result = OnCall(
                    context,
                    this,
                    objectId,
                    communicationRelationId,
                    oPERATION,
                    appID,
                    objectID,
                    attrOrMethID,
                    sUB_INDEX,
                    writeData,
                    requestId,
                    ref readData,
                    ref serviceError);
            }

            outputArguments[0] = readData;
            outputArguments[1] = serviceError;

            return result;
        }