uaPLUS Reference
ReadAnnotations(DateTime,DateTime,Int32[],AnnotationDef[],Int32[]) Method
See Also  Send Feedback
I_HDAPlugin Namespace > IAppPlugin Interface > ReadAnnotations Method : ReadAnnotations(DateTime,DateTime,Int32[],AnnotationDef[],Int32[]) Method

startTime
The beginning of the history period to be read.
endTime
The end of the history period to be read.
serverHnd
The list of server item handles for the annotation items to be read.
annotationValues
Array of objects in which the annotation values are returned. The order of the objects in the array shall be the same as the order of server item handles.
errors
Array of HRESULTS indicating the success of the individual annotation reads. The errors correspond to the handles passed in phServer. 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

Professional Edition only.
This function reads the annotations from the history database in the specified time domain for the specified item IDs. This method is intended to read annotations for an item at specified timestamps. The time domain of the request is defined by htStartTime and htEndTime. If htEndTime is less than htStartTime the data shall be returned in reverse order, with later data coming first. OPC_S_NODATA is returned only if no annotations exist over the time domain.

Syntax

Visual Basic (Declaration) 
Overloads Function ReadAnnotations( _
   ByVal startTime As Date, _
   ByVal endTime As Date, _
   ByVal serverHnd() As Integer, _
   ByRef annotationValues As AnnotationDef(), _
   ByRef errors As Integer() _
) As Integer
C# 
int ReadAnnotations( 
   DateTime startTime,
   DateTime endTime,
   int[] serverHnd,
   out AnnotationDef[] 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.
serverHnd
The list of server item handles for the annotation items to be read.
annotationValues
Array of objects in which the annotation values are returned. The order of the objects in the array shall be the same as the order of server item handles.
errors
Array of HRESULTS indicating the success of the individual annotation reads. The errors correspond to the handles passed in phServer. 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

HRESULTS success/error code.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family

See Also

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