Opc.Ua.Server.StandardServer.Write C# (CSharp) Метод

Write() публичный Метод

Invokes the Write service.
public Write ( RequestHeader requestHeader, WriteValueCollection nodesToWrite, StatusCodeCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : ResponseHeader
requestHeader RequestHeader The request header.
nodesToWrite WriteValueCollection The list of Nodes, Attributes, and values to write.
results StatusCodeCollection The list of write result status codes for each write operation.
diagnosticInfos DiagnosticInfoCollection The diagnostic information for the results.
Результат ResponseHeader
        public override ResponseHeader Write(
            RequestHeader                requestHeader, 
            WriteValueCollection         nodesToWrite, 
            out StatusCodeCollection     results, 
            out DiagnosticInfoCollection diagnosticInfos)
        {
            OperationContext context = ValidateRequest(requestHeader, RequestType.Write);

            try
            {
                if (nodesToWrite == null || nodesToWrite.Count == 0)
                {
                    throw new ServiceResultException(StatusCodes.BadNothingToDo);
                }

                m_serverInternal.NodeManager.Write(
                    context,
                    nodesToWrite,
                    out results,
                    out diagnosticInfos);

                return CreateResponse(requestHeader, context.StringTable);
            }
            catch (ServiceResultException e)
            {
                lock (ServerInternal.DiagnosticsLock)
                {
                    ServerInternal.ServerDiagnostics.RejectedRequestsCount++;

                    if (IsSecurityError(e.StatusCode))
                    {
                        ServerInternal.ServerDiagnostics.SecurityRejectedRequestsCount++;
                    }
                }

                throw TranslateException(context, e);
            }  
            finally
            {
                OnRequestComplete(context);
            }
        }