6.2.2 Operation level result codes

In OPC UA Historical Access the StatusCode is used to indicate the conditions under which a Value or Event was 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 25 contains codes with Bad severity indicating a failure; Table 26 contains Good (success) codes.

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

Table 25 – Bad operation level result codes
Symbolic IdDescription
Bad_NoDataNo data exists for the requested time range or Event filter.
Bad_BoundNotFoundNo data found to provide upper or lower bound value.
Bad_BoundNotSupportedBounding Values are not applicable or the Server has reached its search limit and will not return a bound.
Bad_DataLostData is missing due to collection started/stopped/lost.
Bad_DataUnavailableExpected 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_EntryExistsThe data or Event was not successfully inserted because a matching entry exists.
Bad_NoEntryExistsThe data or Event was not successfully updated because no matching entry exists.
Bad_TimestampNotSupported

The Client requested history using a TimestampsToReturn the Server does not support.

For example requested ServerTimestamp when Server only supports SourceTimestamp.

Bad_InvalidArgumentOne or more arguments are invalid or missing.
Bad_AggregateListMismatchThe list of Aggregates does not have the same length as the list of operations.
Bad_AggregateConfigurationRejectedThe Server does not support the specified AggregateConfiguration for the Node.
Bad_AggregateNotSupportedThe specified Aggregate is not valid for the specified Node.
Bad_ArgumentsMissingSee OPC 10000-4 for the description of this result code.
Bad_TypeDefinitionInvalidSee OPC 10000-4 for the description of this result code.
Bad_SourceNodeIdInvalidSee OPC 10000-4 for the description of this result code.
Bad_OutOfRangeSee OPC 10000-4 for the description of this result code.
Bad_NotSupportedSee OPC 10000-4 for the description of this result code.
Bad_IndexRangeInvalidSee OPC 10000-4 for the description of this result code.
Bad_NotWritableSee OPC 10000-4 for the description of this result code.
Table 26 – Good operation level result codes
Symbolic IdDescription
Good_NoDataNo data exists for the requested time range or Event filter.
Good_EntryInsertedThe data or Event was successfully inserted into the historical database
Good_EntryReplacedThe data or Event field was successfully replaced in the historical database
Good_DataIgnoredThe Event field 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_NoData is 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_NoData is returned for cases such as:

ReadEventDetails where startTime=endTime

ReadEventDetails data is requested and does not exist

ReadRawModifiedDetails where data is requested and does not exist

Bad_NoData is returned for cases such as:

ReadEventDetails 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.5 and 6.8.