/// <summary> /// Unsubscribe from receiving samples. /// </summary> /// <remarks> /// Unregister a client and stop it from receiving samples. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='endpointId'> /// The endpoint to unsubscribe from /// </param> /// <param name='userId'> /// The user id that will not receive any more published samples /// </param> public static void Unsubscribe(this IAzureOpcPublisherClient operations, string endpointId, string userId) { operations.UnsubscribeAsync(endpointId, userId).GetAwaiter().GetResult(); }
/// <summary> /// Subscribe to receive samples /// </summary> /// <remarks> /// Register a client to receive publisher samples through SignalR. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='endpointId'> /// The endpoint to subscribe to /// </param> /// <param name='body'> /// The user id that will receive publisher samples. /// </param> public static void Subscribe(this IAzureOpcPublisherClient operations, string endpointId, string body = default(string)) { operations.SubscribeAsync(endpointId, body).GetAwaiter().GetResult(); }
/// <summary> /// Subscribe to receive samples /// </summary> /// <remarks> /// Register a client to receive publisher samples through SignalR. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='endpointId'> /// The endpoint to subscribe to /// </param> /// <param name='body'> /// The user id that will receive publisher samples. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task SubscribeAsync(this IAzureOpcPublisherClient operations, string endpointId, string body = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.SubscribeWithHttpMessagesAsync(endpointId, body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Get next set of published nodes /// </summary> /// <remarks> /// Returns next set of currently published node ids for an endpoint. The /// endpoint must be activated and connected and the module client and server /// must trust each other. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='endpointId'> /// The identifier of the activated endpoint. /// </param> /// <param name='continuationToken'> /// The continuation token to continue with /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PublishedItemListResponseApiModel> GetNextListOfPublishedNodesAsync(this IAzureOpcPublisherClient operations, string endpointId, string continuationToken, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetNextListOfPublishedNodesWithHttpMessagesAsync(endpointId, continuationToken, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get next set of published nodes /// </summary> /// <remarks> /// Returns next set of currently published node ids for an endpoint. The /// endpoint must be activated and connected and the module client and server /// must trust each other. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='endpointId'> /// The identifier of the activated endpoint. /// </param> /// <param name='continuationToken'> /// The continuation token to continue with /// </param> public static PublishedItemListResponseApiModel GetNextListOfPublishedNodes(this IAzureOpcPublisherClient operations, string endpointId, string continuationToken) { return(operations.GetNextListOfPublishedNodesAsync(endpointId, continuationToken).GetAwaiter().GetResult()); }
/// <summary> /// Get currently published nodes /// </summary> /// <remarks> /// Returns currently published node ids for an endpoint. The endpoint must be /// activated and connected and the module client and server must trust each /// other. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='endpointId'> /// The identifier of the activated endpoint. /// </param> /// <param name='body'> /// The list request /// </param> public static PublishedItemListResponseApiModel GetFirstListOfPublishedNodes(this IAzureOpcPublisherClient operations, string endpointId, PublishedItemListRequestApiModel body) { return(operations.GetFirstListOfPublishedNodesAsync(endpointId, body).GetAwaiter().GetResult()); }
/// <summary> /// Stop publishing node values /// </summary> /// <remarks> /// Stop publishing variable node values to IoT Hub. The endpoint must be /// activated and connected and the module client and server must trust each /// other. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='endpointId'> /// The identifier of the activated endpoint. /// </param> /// <param name='body'> /// The unpublish request /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PublishStopResponseApiModel> StopPublishingValuesAsync(this IAzureOpcPublisherClient operations, string endpointId, PublishStopRequestApiModel body, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.StopPublishingValuesWithHttpMessagesAsync(endpointId, body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Stop publishing node values /// </summary> /// <remarks> /// Stop publishing variable node values to IoT Hub. The endpoint must be /// activated and connected and the module client and server must trust each /// other. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='endpointId'> /// The identifier of the activated endpoint. /// </param> /// <param name='body'> /// The unpublish request /// </param> public static PublishStopResponseApiModel StopPublishingValues(this IAzureOpcPublisherClient operations, string endpointId, PublishStopRequestApiModel body) { return(operations.StopPublishingValuesAsync(endpointId, body).GetAwaiter().GetResult()); }