OPCHDA.NET Reference Manual
ReadAnnotations(OPCHDAtime,OPCHDAtime,Int32[],OPCHDAannotation[],Int32[]) Method
See Also  Send Feedback
OpcHDAWrapperUA.Net4 Assembly > OPCHDA.NET Namespace > OpcHDAServer Class > ReadAnnotations Method : ReadAnnotations(OPCHDAtime,OPCHDAtime,Int32[],OPCHDAannotation[],Int32[]) Method

startTime
The beginning of the history period to be read.
endTime
The end of the history period to be read.
server
The list of server item handles for the annotation items to be read.
annotationValues
OUT: Array of structures in which the annotation values are returned. The order of the structures in the array shall be the same as the order of server item handles.
errors
OUT: Array of HRESULTs indicating the success of the individual annotation reads. The errors correspond to the handles passed in server. This indicates whether the read succeeded in obtaining a defined annotation item. NOTE any FAILED error code indicates that the corresponding Annotation structure is undefined.

Glossary Item Box

This synchronous function reads the annotations from the history database in the specified time domain for the specified item IDs.

This function is intended to read annotations for an item at specified timestamps.

Syntax

Visual Basic (Declaration) 
Public Overloads Function ReadAnnotations( _
   ByVal startTime As OPCHDA.NET.OPCHDAtime, _
   ByVal endTime As OPCHDA.NET.OPCHDAtime, _
   ByVal server() As Integer, _
   ByRef annotationValues As OPCHDA.NET.OPCHDAannotation(), _
   ByRef errors As Integer() _
) As Integer
C# 
public int ReadAnnotations( 
   OPCHDA.NET.OPCHDAtime startTime,
   OPCHDA.NET.OPCHDAtime endTime,
   int[] server,
   out OPCHDA.NET.OPCHDAannotation[] annotationValues,
   out int[] errors
)

Parameters

startTime
The beginning of the history period to be read.
endTime
The end of the history period to be read.
server
The list of server item handles for the annotation items to be read.
annotationValues
OUT: Array of structures in which the annotation values are returned. The order of the structures in the array shall be the same as the order of server item handles.
errors
OUT: Array of HRESULTs indicating the success of the individual annotation reads. The errors correspond to the handles passed in server. This indicates whether the read succeeded in obtaining a defined annotation item. NOTE any FAILED error code indicates that the corresponding Annotation structure is undefined.

Return Value

S_OK, S_FALSE, E_INVALIDARG, E_FAIL

Remarks

The time domain of the request is defined by startTime and endTime. If endTime is less than startTime the data shall be returned in reverse order, with later data coming first.

If either startTime or endTime is given in string (relative) format, the absolute time of the OPCHDAtime structure (time) shall be set to the dateTime which the relative time was translated to by the server. OPC_S_NODATA is returned only if no annotations exist over the time domain.

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2008/2012/2016, .NET 4.x

See Also

Copyright © 2002-2018 Advosol Inc. All Rights Reserved.