In OPC UA Historical Accessthe StatusCodeis used to indicate the conditions under which a Valueor Eventwas stored, and thereby can be used as an indicator of its usability. Due to the nature of historical data and/or Events, additional information beyond the basic quality and call result code needs to be conveyed to the Client, for example, whether the value is actually stored in the data repository, whether the result was Interpolated, whether all data inputs to a calculation were of good quality, etc.

In the following, Table 17contains codes with Bad severity indicating a failure; Table 18contains Good (success) codes.

It is important to note that these are the codes that are specific for OPC UA Historical Accessand supplement the codes that apply to all types of data and are therefore defined in OPC 10000-4, OPC 10000-8andOPC 10000-13.

Table 17– Bad operation level result codes

Symbolic Id

Description

Bad_NoData

No data exists for the requested time range or Eventfilter.

Bad_BoundNotFound

No data found to provide upper or lower bound value.

Bad_BoundNotSupported

Bounding Values are not applicable or the Serverhas reached its search limit and will not return a bound.

Bad_DataLost

Data is missing due to collection started/stopped/lost.

Bad_DataUnavailable

Expected data is unavailable for the requested time range due to an un-mounted volume, an off-line historical collection, or similar reason for temporary unavailability.

Bad_EntryExists

The data or Eventwas not successfully inserted because a matching entry exists.

Bad_NoEntryExists

The data or Eventwas not successfully updated because no matching entry exists.

Bad_TimestampNotSupported

The Client requested history using a TimestampsToReturn the Serverdoes not support (i.e. requested ServerTimestamp when Serveronly supports SourceTimestamp).

Bad_InvalidArgument

One or more arguments are invalid or missing.

Bad_AggregateListMismatch

The list of Aggregates does not have the same length as the list of operations.

Bad_AggregateConfigurationRejected

The Serverdoes not support the specified AggregateConfiguration for the Node.

Bad_AggregateNotSupported

The specified Aggregate is not valid for the specified Node.

Bad_ArgumentsMissing

See OPC 10000-4for the description of this result code.

Bad_TypeDefinitionInvalid

See OPC 10000-4for the description of this result code.

Bad_SourceNodeIdInvalid

See OPC 10000-4for the description of this result code.

Bad_OutOfRange

See OPC 10000-4for the description of this result code.

Bad_NotSupported

See OPC 10000-4for the description of this result code.

Bad_IndexRangeInvalid

See OPC 10000-4for the description of this result code.

Bad_NotWriteable

See OPC 10000-4for the description of this result code.

Table 18– Good operation level result codes

Symbolic Id

Description

Good_NoData

No data exists for the requested time range or Eventfilter.

Good_EntryInserted

The data or Eventwas successfully inserted into the historical database

Good_EntryReplaced

The data or Eventfield was successfully replaced in the historical database

Good_DataIgnored

The Eventfield was ignored and was not inserted into the historical database.

It may be noted that there are both Good and Bad Status codes that deal with cases of no data or missing data. In general Good_NoDatais used for cases where no data was found when performing a simple ‘Read’ request. Bad_NoData is used in cases where some action is requested on an interval and no data could be found. The distinction exists if users are attempting an action on a given interval where they would expect data to exist, or would like to be notified that the requested action could not be performed.

Good_NoDatais returned for cases such as:

  • ReadEvents where startTime=endTime
  • ReadEvent data is requested and does not exist
  • ReadRaw where data is requested and does not exist

Bad_NoDatais returned for cases such as:

  • ReadEvent data is requested and underlying historian does not support the requested field
  • ReadProcessed where data is requested and does not exist
  • Any Delete requests where data does not exist

The above use cases are illustrative examples. Detailed explanations on when each status code is returned are found in 6.4and 6.7