OPC Historian .NET Server Toolkit Reference
ReadAnnotations(DateTime,DateTime,Int32[],AnnotationDef[],Int32[]) Method

The beginning of the history period to be read.
The end of the history period to be read.
The list of server item handles for the annotation items to be read.
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.
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.
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
'Usage
 
Dim instance As IAppPlugin
Dim startTime As Date
Dim endTime As Date
Dim serverHnd() As Integer
Dim annotationValues As AnnotationDef()
Dim errors As Integer()
Dim value As Integer
 
value = instance.ReadAnnotations(startTime, endTime, serverHnd, annotationValues, errors)
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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IAppPlugin Interface
IAppPlugin Members
Overload List

 

 


Copyright © 2004-2019 Advosol Inc. All rights reserved

Send Feedback