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

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

Invokes the CreateSubscription service.
public CreateSubscription ( RequestHeader requestHeader, double requestedPublishingInterval, uint requestedLifetimeCount, uint requestedMaxKeepAliveCount, uint maxNotificationsPerPublish, bool publishingEnabled, byte priority, uint &subscriptionId, double &revisedPublishingInterval, uint &revisedLifetimeCount, uint &revisedMaxKeepAliveCount ) : ResponseHeader
requestHeader RequestHeader The request header.
requestedPublishingInterval double The cyclic rate that the Subscription is being requested to return Notifications to the Client.
requestedLifetimeCount uint The client-requested lifetime count for the Subscription
requestedMaxKeepAliveCount uint The requested max keep alive count.
maxNotificationsPerPublish uint The maximum number of notifications that the Client wishes to receive in a single Publish response.
publishingEnabled bool If set to true publishing is enabled for the Subscription.
priority byte The relative priority of the Subscription.
subscriptionId uint The Server-assigned identifier for the Subscription.
revisedPublishingInterval double The actual publishing interval that the Server will use.
revisedLifetimeCount uint The revised lifetime count.
revisedMaxKeepAliveCount uint The revised max keep alive count.
Результат ResponseHeader
        public override ResponseHeader CreateSubscription(
            RequestHeader requestHeader,
            double        requestedPublishingInterval,
            uint          requestedLifetimeCount,
            uint          requestedMaxKeepAliveCount,
            uint          maxNotificationsPerPublish,
            bool          publishingEnabled,
            byte          priority,
            out uint      subscriptionId,
            out double    revisedPublishingInterval,
            out uint      revisedLifetimeCount,
            out uint      revisedMaxKeepAliveCount)
        {
            OperationContext context = ValidateRequest(requestHeader, RequestType.CreateSubscription);

            try
            {
                ServerInternal.SubscriptionManager.CreateSubscription(
                    context,
                    requestedPublishingInterval,
                    requestedLifetimeCount,
                    requestedMaxKeepAliveCount,
                    maxNotificationsPerPublish,
                    publishingEnabled,
                    priority,
                    out subscriptionId,
                    out revisedPublishingInterval,
                    out revisedLifetimeCount,
                    out revisedMaxKeepAliveCount);    

                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);
            }         
        }