C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
OpcUa_UpdateEventDetails Struct Reference

This function inserts new events or replaces existing events in the history database for one or more HistoricalEventNodes. More...

#include <opcua_types.h>

Public Attributes

OpcUa_NodeId NodeId
 NodeId of the object to be updated.
 
OpcUa_PerformUpdateType PerformInsertReplace
 Determines which action of insert, replace, or update is performed. More...
 
OpcUa_EventFilter Filter
 If the history of the notification conforms to the EventFilter, the history of the notification is updated.
 
OpcUa_HistoryEventFieldList * EventData
 Event notification data to be inserted or updated.
 

Detailed Description

This function inserts new events or replaces existing events in the history database for one or more HistoricalEventNodes.

Insert event functionality
This function is intended to insert new entries; e.g., backfilling of historical events.

Setting performInsertReplace = INSERT_1 inserts entries into the event history database for one or more HistoricalEventNodes. The whereClause parameter of the EventFilter shall be empty. The SelectClause must as a minimum provide the following event fields: EventType and Time. It is also recommended that the SourceNode and the SourceName fields are provided. If one of the required fields is not provided, the following error is returned: Bad_ArgumentsMissing. If the historian does not support archiving the specified EventType, the StatusCode shall indicate Bad_TypeDefinitionInvalid. If the SourceNode is not a valid source for Events, the StatusCode shall indicate Bad_SourceNodeIdInvalid. If the time does not fall within range that can be stored, the StatusCode shall indicate Bad_OutOfRange. If the selectClause does not include fields which are mandatory for the EventType, the StatusCode shall indicate Bad_ArgumentsMissing. If the selectClause specifies fields which are not valid for the EventType or cannot be saved by the historian, the StatusCode shall indicate Good_DataIgnored and the OperationResults array shall specify Bad_NotSupported for each ignored field.

The EventId is a server generated opaque value and a Client cannot assume that it knows how to create valid EventIds. A Server must be able to generate an appropriate default value for the EventId field. If a Client does specify the EventId in the selectClause and it matches an exitsting event, the StatusCode shall indicate Bad_EntryExists. A Client must use a HistoryRead to discover any automatically generated EventIds.

If any errors occur while processing individual fields, the StatusCode shall indicate Bad_InvalidArgument and the OperationResults array shall specify the exact error for each invalid field. The IndexRange parameter of the SimpleAttributeOperand is not valid for insert operations and the OperationResults shall specify Bad_IndexRangeInvalid if one is specified.

If no errors occur, the StatusCode shall indicate Good and the OperationResults array shall be empty. If errors do occur, the OperationResults array will have one element for each fiel d specified in the selectClause.

A Client may instruct the Server to choose a suitable default value for a field by specifying a value of null. If the server is not able to select a suitable default, the corresponding entry in the OperationResults array shall be Bad_InvalidArgument.

Replace event functionality
This function is intended to replace fields in existing event entries; e.g. correct event data that contained incorrect data due to a bad sensor.

Setting performInsertReplace = REPLACE_2 replaces entries in the event history database for the specified filter for one or more HistoricalEventNodes. The whereClause parameter of the EventFilter shall specify the EventId property. If no entry exists matching the specified filter, no updates will be performed; instead the StatusCode shall indicate Bad_NoEntryExists.

If the selectClause specifies fields which are not valid for the EventType or cannot be saved by the historian, the StatusCode shall indicate Good_DataIgnored and the OperationResults array shall specify Bad_NotSupported for each ignored field.

If a field is valid for the EventType but cannot be changed, then the StatusCode shall indicate Good_DataIgnored and the corresponding entry in the OperationResults array shall be Bad_NotWriteable.

If fatal errors occur while processing individual fields, the StatusCode shall indicate Bad_InvalidArgument and the OperationResults array shall specify the exact error.

If no errors occur, the StatusCode shall indicate Good and the OperationResults array shall be empty.If errors do occur, the OperationResults array will have one element for each field specified in the selectClause.

Update event functionality
This function is intended to unconditionally insert/replace events, e.g. synchronizing a backup event database.

Setting performInsertReplace = UPDATE_3 inserts or replaces entries in the event history database for the specified filter for one or more HistoricalEventNodes.

The server will, based on its own criteria, attempt to determine whether the event already exists. If it does exist, the event will be deleted and the new event will be inserted (retaining the EventId). If the EventID was provided, the EventID will be used to determine if the event already exists. If the event does not exist, a new event will be inserted, including the generation of a new EventId.

All of the restrictions, behaviours, and errors specified for the insert functionality also apply to this function.

If an existing entry was replaced successfully, the the StatusCode shall be Good_EntryReplaced. If a new entry was created, the StatusCode shall be Good_EntryInserted. If the server cannot determine whether it replaced or inserted an entry, the StatusCode shall be Good.


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