Snapshot Property (ListData object)

                     

Return a PointValues collection containing a single snapshot value for each point in the PointList.

 

Syntax

object.Snapshot nvErrors 

 

The Snapshot property syntax has these parts:

Part

Description

object

An object expression that evaluates to a ListData object.

nvErrors

A NamedValues collection indicating server level errors.  See Remarks below.

 

Remarks

The ListData object represents data obtained from a PointList which can be composed of points from several servers.  ListData retrieval functions attempt to return as much data as possible even if there are retrieval failures on particular servers or for particular points.  To support partial success, ListData retrieval routines will return a successful result code and use the nvErrors argument, to return server level errors.  The nvErrors collection, if the Count is greater than 0, will contain NamedValue items where the name property is the server name where the error occurred, and the value property is a Variant of type VT_ERROR containing an HRESULT with the server level error.  When an error is encountered for just a particular point, the error is returned in the Value member of the PIValue for the specific point in the returned data collection.  The Value contains a Variant of type VT_ERROR, with the Variant's value containing an HRESULT indicating the particular point related error.  For example, PointList.Data.Snapshot will return point specific errors in the returned PointValues collection.   Success of a ListData retrieval function is determined by examining the method return for general failures, the nvErrors collection for server specific errors, and the Value portion of each member of the returned value collection for point specific errors. 

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following method level errors may occur:

Error

Description

psePOINTVALUESCREATE Unable to create a new PointValues collection to return results.

pseSERVERPOINTIDMAP

Unable to create a mapping of servers and point IDs to execute the call.

pseNAMEDVALUESCREATE

Unable to create a NamedValues collection to return server level errors.

 

In addition to generic errors, the following server level errors may occur.  These errors are returned in the nvErrors collection as the value property of a NamedValue whose Name property is the Server Name.

Error

Description

pseARRAYCREATE

Unable to create a SAFEARRAY to process the call.  Likely not enough memory to support the PointList.

pseSAFEARRAYACCESS Unable to access a SAFEARRAY used to process the call.

pseNOGENSERVER

Could not return the generic server level object to talk to the particular type of server.  Typically this indicates a problem with the Known Severs Table or the registration of the PI-SDK COM servers.

pseNAMEDVALUESCREATE Unable to create a NamedValues collection to process the call.  This typically indicates an Out of Memory condition.

pseDISCONNECTED

The server can not be reached over the network.

E_ACCESSDENIED

The caller does not have sufficient privileges to access the server.
psePOINTVALSTOCPOINTVALS Unable to cast a PointValues collection to its underlying class.  
psePOINTVALUESAPPEND Unable to append a PointValue to a PointValues collection.
pseSNAPSHOTFETCH Server returned an error other than access or disconnection.  

 

In addition to generic errors, the following point level errors may occur.  These errors will appear in the Value member of the PIValue within the returned collection of results.

Error Description
E_ACCESSDENIED The caller does not have sufficient privileges to access the point or its data.
psePOINTNOTEXIST A point from the PointList was not found on the server.  It may have been deleted or is not visible given the current privileges.
psePIPOINTINIT A PIPoint from the PointList could not be properly initialized.
psePTERRORONSERVER The server reported an error other than access permission or point existence for the point.
Enabling Operational Intelligence