.NET Based OPC UA Client/Server SDK  2.6.0.418
UnifiedAutomation.UaBase.ReadRawModifiedDetails Class Reference

Selects a set of raw or modified values from the history database by specifying a time domain for one or more variables. More...

Inherits UnifiedAutomation.UaBase.HistoryReadDetails.

Public Member Functions

 ReadRawModifiedDetails ()
 The default constructor. More...
 
override void Encode (IEncoder encoder)
 
override void Decode (IDecoder decoder)
 
override bool IsEqual (IEncodeable encodeable)
 Checks if encodeable is the same object or has the same content More...
 
override object Clone ()
 
- Public Member Functions inherited from UnifiedAutomation.UaBase.HistoryReadDetails
 HistoryReadDetails ()
 The default constructor. More...
 

Properties

bool IsReadModified [get, set]
 TRUE for read modified functionality, FALSE for read raw functionality. More...
 
DateTime StartTime [get, set]
 The beginning of the period to read. More...
 
DateTime EndTime [get, set]
 The end of the period to read. More...
 
uint NumValuesPerNode [get, set]
 The maximum number of values returned for any node over the time range. More...
 
bool ReturnBounds [get, set]
 A boolean parameter indicating whether bounding values should be returned. More...
 
override ExpandedNodeId TypeId [get]
 
override ExpandedNodeId BinaryEncodingId [get]
 
override ExpandedNodeId XmlEncodingId [get]
 
- Properties inherited from UnifiedAutomation.UaBase.HistoryReadDetails
virtual ExpandedNodeId TypeId [get]
 
virtual ExpandedNodeId BinaryEncodingId [get]
 
virtual ExpandedNodeId XmlEncodingId [get]
 
- Properties inherited from UnifiedAutomation.UaBase.IEncodeable
ExpandedNodeId TypeId [get]
 Returns the UA type identifier for the encodable type. More...
 
ExpandedNodeId BinaryEncodingId [get]
 Returns the UA type identifier for the default binary encoding for the type. More...
 
ExpandedNodeId XmlEncodingId [get]
 Returns the UA type identifier for the default XML encoding for the type. More...
 

Detailed Description

Selects a set of raw or modified values from the history database by specifying a time domain for one or more variables.

Read raw functionality

When this structure is used for reading Raw Values, it reads the values, qualities, and timestamps from the history database for the specified time domain for one or more HistoricalDataNodes. This parameter is intended for use by a Client that wants the actual data saved within the historian. The actual data may be compressed or may be all raw data collected for the item depending on the historian and the storage rules invoked when the item values were saved. When returnBounds is TRUE, the bounding values for the time domain are returned. The optional bounding values are provided to allow the Client to interpolate values for the start and end times when trending the actual data on a display.

The time domain of the request is defined by startTime, endTime, and numValuesPerNode; at least two of these must be specified. If endTime is less than startTime, or endTime and numValuesPerNode alone are specified, the data will be returned in reverse order, with later data coming first, as if time was flowing backward. If all three are specified, the call shall return up to numValuesPerNode results going from startTime to endTime, in either ascending or descending order, depending on the relative values of startTime and endTime. If numValuesPerNode is 0, all the values in the range are returned. A default value of DateTime.MinValue is used to indicate that startTime or endTime are not specified.

It is specifically allowed for the startTime and the endTime to be identical. This allows the Client to request just one value. If startTime and endTime are identical, time is presumed to be flowing forward. It is specifically not allowed for the server to return a Bad_InvalidArgument StatusCode if the requested time domain is outside of the server’s range. Such a case shall be treated as an interval in which no data exists.

If startTime, endTime, and numValuesPerNode are all provided and if more than numValuesPerNode values exist within that time range for a given node, only numValuesPerNode values per node are returned along with a continuationPoint. When a continuationPoint is returned, a Client wanting the next numValuesPerNode values should call ReadRaw again with the continuationPoint set.

If Bounding Values are requested and a non-zero numValuesPerNode was specified, any bounding values returned are included in the numValuesPerNode count. If numValuesPerNode is 1, only the start bound is returned (the end bound if reverse order is needed). If numValuesPerNode is 2, the start bound and the first data point are returned (the end bound if reverse order is needed). When bounding values are requested and no bounding value is found, the corresponding StatusCode entry will be set to Bad_BoundNotFound, a timestamp equal to the start or end time as appropriate, and a value of null. How far back or forward to look in history for bounding values is server dependent.

For an interval in which no data exists, if bounding values are not requested, the corresponding StatusCode must be Good_NoData. If bounding values are requested and one or both exist, then the result code returned is Success and the bounding value(s) are returned.

For cases where there are multiple values for a given timestamp, all but the most recent are considered to be modified values and the server must return the most recent value. If the server returns a value which hides other values at a timestamp, it must set the ExtraData bit in the StatusCode associated with that value. If the Server contains additional information regarding a value, the ExtraData bit shall also be set. This indicates that ModifiedValues are available for retrieval.

If the requested timestamp format is not supported for a node, the operation shall return the Bad_TimestampNotSupported StatusCode.

Read modified functionality

When this structure is used for reading modified values, it reads the values, StatusCodes, timestamps, modification type, the user identifier, and the timestamp of the modification from the history database for the specified time domain for one or more HistoricalDataNodes. If there are multiple replaced values, the server must return all of them. The updateType specifies which value is returned in the modification record. If the updateType is INSERT, the value is the new value that was inserted. If the updateType is anything else, the value is the old value that was changed.

The purpose of this function is to read values from history that have been modified. The returnBounds parameter must be set to FALSE for this case, otherwise the server returns a Bad_InvalidArgument StatusCode.

The domain of the request is defined by startTime, endTime, and numValuesPerNode; at least two of these must be specified. If endTime is less than startTime, or endTime and numValuesPerNode alone are specified, the data shall be returned in reverse order with later data coming first. If all three are specified, the call shall return up to numValuesPerNode results going from StartTime to EndTime, in either ascending or descending order, depending on the relative values of StartTime and EndTime. If more than numValuesPerNode values exist within that time range for a given Node, only numValuesPerNode values per node are returned along with a continuationPoint. If a continuationPoint is returned, a Client wanting the next numValuesPerNode values should call ReadRaw again with the continuationPoint set. If numValuesPerNode is 0, all of the values in the range are returned. If the Server cannot return all modified values for a given timestamp in a single response, it shall return modified values with the same timestamp in subsequent calls.

If a value has been modified multiple times, all values for the time are returned. This means that a timestamp can appear in the array more than once. The order of the returned values with the same timestamp should be from the most recent to oldest modification timestamp if startTime is less than or equal to endTime. If endTime is less than startTime, the order of the returned values will be from the oldest modificfication timestamp to the most recent. It is server dependent whether multiple modifications are kept or only the most recent.

A server does not have to create a modification record for data when it is first added to the historical collection. If it does, it shall set the ExtraData bit and the Client can read the modification record using a ReadModified call. If the data is subsequently modified, the server shall create a second modification record, which is returned along with the original modification record whenever a Client uses the ReadModified call if the Server supports multiple modification records per timestamp.

If the requested timestamp format is not supported for a Node, the operation shall return the Bad_TimestampNotSupported StatusCode.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.ReadRawModifiedDetails.ReadRawModifiedDetails ( )
inline

The default constructor.

Member Function Documentation

override bool UnifiedAutomation.UaBase.ReadRawModifiedDetails.IsEqual ( IEncodeable  encodeable)
inlinevirtual

Checks if encodeable is the same object or has the same content

Parameters
encodeable
Returns

Reimplemented from UnifiedAutomation.UaBase.HistoryReadDetails.

Property Documentation

DateTime UnifiedAutomation.UaBase.ReadRawModifiedDetails.EndTime
getset

The end of the period to read.

Set to default value of DateTime.MinValue if no specific end time is specified.

bool UnifiedAutomation.UaBase.ReadRawModifiedDetails.IsReadModified
getset

TRUE for read modified functionality, FALSE for read raw functionality.

The default value is FALSE.

uint UnifiedAutomation.UaBase.ReadRawModifiedDetails.NumValuesPerNode
getset

The maximum number of values returned for any node over the time range.

If only one time is specified, the time range must extend to return this number of values. The default value 0 indicates that there is no maximum.

bool UnifiedAutomation.UaBase.ReadRawModifiedDetails.ReturnBounds
getset

A boolean parameter indicating whether bounding values should be returned.

It has the following values

TRUE
bounding values should be returned
FALSE
all other cases
DateTime UnifiedAutomation.UaBase.ReadRawModifiedDetails.StartTime
getset

The beginning of the period to read.

Set to default value of DateTime.MinValue if no specific start time is specified.


The documentation for this class was generated from the following file: