/* ======================================================================== * Copyright (c) 2005-2025 The OPC Foundation, Inc. All rights reserved. * * OPC Foundation MIT License 1.00 * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * The complete license agreement can be found here: * http://opcfoundation.org/License/MIT/1.00/ * ======================================================================*/ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace Opc.Ua.Server.Historian { /// /// Opt-in capability for providers that support annotations on /// historizing variables (Part 11 §5.2.7). /// /// /// /// In OPC UA, annotations live on the Annotations property of /// a historizing variable, addressed via HistoryRead/HistoryUpdate on /// the property's NodeId. The framework translates property NodeId → /// parent variable NodeId before calling this interface, so provider /// implementations only ever see the variable NodeId, not the /// Annotations property NodeId. /// /// /// Update semantics follow the same patterns as /// : per-value best-effort with /// / /// signalling. The annotation's /// is the storage key. /// /// public interface IHistorianAnnotationProvider { /// /// Reads one page of annotations associated with a historizing variable. /// /// Operation context. /// Normalised annotation read request. /// Page resume token; empty on first page. /// Cancellation token. ValueTask> ReadAnnotationsAsync( HistorianOperationContext context, HistorianAnnotationReadRequest request, HistorianResumeToken resumeToken, CancellationToken ct); /// /// Inserts new annotations. /// ValueTask> InsertAnnotationsAsync( HistorianOperationContext context, NodeId nodeId, IList annotations, CancellationToken ct); /// /// Replaces existing annotations matching their /// . /// ValueTask> ReplaceAnnotationsAsync( HistorianOperationContext context, NodeId nodeId, IList annotations, CancellationToken ct); /// /// Upserts annotations. /// ValueTask> UpdateAnnotationsAsync( HistorianOperationContext context, NodeId nodeId, IList annotations, CancellationToken ct); /// /// Deletes annotations at the specified annotation timestamps. /// ValueTask> DeleteAnnotationsAsync( HistorianOperationContext context, NodeId nodeId, IList annotationTimes, CancellationToken ct); } }