.NET Based OPC UA Client/Server SDK  3.3.3.537
UnifiedAutomation.UaServer.BaseEventModel Class Reference

The base class for event objects. More...

Inherits UnifiedAutomation.UaServer.ModelControllerBase.

Inherited by UnifiedAutomation.UaServer.AuditEventModel, UnifiedAutomation.UaServer.BaseModelChangeEventModel, UnifiedAutomation.UaServer.ConditionModel, UnifiedAutomation.UaServer.EventQueueOverflowEventModel, UnifiedAutomation.UaServer.ProgressEventModel, UnifiedAutomation.UaServer.SemanticChangeEventModel, UnifiedAutomation.UaServer.SystemEventModel, and UnifiedAutomation.UaServer.TransitionEventModel.

Public Member Functions

 BaseEventModel ()
 Initializes a new instance of the BaseEventModel class. More...
 
 BaseEventModel (BaseEventModel template)
 Initializes a new instance of the BaseEventModel class. More...
 
void SetRolePermissions (RolePermissionTypeCollection rolePermissions, BaseNodeManager nodeManager)
 Sets the RolePermissions to an event. Is used to restrict the receiving of the events to certain roles. More...
 
void SetRolePermissionsAndAccessRestriction (Node sourceNode, BaseNodeManager nodeManager)
 Sets the RolePermissions and AccessRestiriction to an event. Is used to restrict the receiving of the events to certain users. More...
 
void NewId ()
 Assigns a new EventId, Time and ReceiveTime to the event. More...
 
virtual GenericEvent CreateEvent (FilterManager manager)
 Creates the event. More...
 
virtual GenericEvent CreateEvent (FilterManager manager, bool autoGenerateEventIdAndTime)
 Creates the event. More...
 
virtual void UpdateEvent (GenericEvent e)
 Updates the event. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaServer.ModelControllerBase
virtual ModelHandle GetModelHandle (StringTable namespaceUris, object instance)
 Gets the metadata handle. More...
 
virtual DataValue GetValue (IMapperContext context, ModelMapping mapping)
 Gets the value associated with the mapping. More...
 
virtual bool SetValue (IMapperContext context, ModelMapping mapping, DataValue value)
 Sets the value associated with the mapping. More...
 
StatusCode GetStatusCode (string propertyName)
 Retrieve the status code for the given property. If no status code was explicitly set, StatusCodes.Good will be returned.
Parameters
propertyNameThe property name.
Returns
The status code of the property.

 
void SetStatusCode (string propertyName, StatusCode statusCode)
 Sets the status code of the given property. More...
 

Properties

NodeId NodeId [get, set]
 The node identifier for a representation of an event in the Server address space. Used mainly for ConditionIds. More...
 
byte[] EventId [get, set]
 Generated by the server to uniquely identify a particular Event Notification. More...
 
NodeId EventType [get, set]
 Describes the specific type of Event. More...
 
NodeId SourceNode [get, set]
 Identifies the Node that the Event originated from. More...
 
string SourceName [get, set]
 Provides a description of the source of the Event. More...
 
DateTime Time [get, set]
 Provides the time the Event occurred. More...
 
DateTime ReceiveTime [get, set]
 Provides the time the OPC UA Server received the Event from the underlying device of another Server. More...
 
TimeZoneDataType LocalTime [get, set]
 Contains the Offset and the DaylightSavingInOffset flag. More...
 
LocalizedText Message [get, set]
 Provides a human-readable and localizable text description of the Event. More...
 
ushort Severity [get, set]
 An indication of the urgency of the Event. More...
 
NodeId ConditionClassId [get, set]
 Specifies in which domain this Condition is used. More...
 
LocalizedText ConditionClassName [get, set]
 
NodeId ConditionSubClassId [get, set]
 ConditionSubClassId specifies additional class[es] that apply to the Event. More...
 
LocalizedText ConditionSubClassName [get, set]
 
INodeAccessInfo NodeAccessInfo [get, set]
 Using a NodeAccessInfo can restrict the access of an event to single scopes. More...
 
AccessRestrictionType AccessRestriction [get, set]
 Using the AcccessRestrictions accessing the events can be restricted for users having a secure connection. More...
 
IRolePermissions RolePermissions [get, set]
 Using the RolePermissions accessing the events can be restricted for users having one of the configured roles. More...
 
- Properties inherited from UnifiedAutomation.UaServer.ModelControllerBase
ModelHandle ModelHandle [get, set]
 Gets or sets the metadata handle. More...
 
object UserData [get, set]
 Gets or sets the user data. More...
 
- Properties inherited from UnifiedAutomation.UaServer.INotifyStatusCodeInfo
bool HasStatusCodes [get]
 true if no property has an explicit set status code. Hence when all status codes are implicit StatusCodes.Good. More...
 

Additional Inherited Members

- Public Attributes inherited from UnifiedAutomation.UaServer.ModelControllerBase
bool HasStatusCodes => m_statusCodes != null && m_statusCodes.Count > 0
 
- Protected Member Functions inherited from UnifiedAutomation.UaServer.ModelControllerBase
void RaisePropertyChangedEvent ([CallerMemberName] string propertyName=null)
 Raises an property change event. More...
 
void RaisePropertyChangeRequestedEvent< T > (T value, [CallerMemberName] string propertyName=null)
 Called when the value of a property is supposed to be changed. More...
 
bool SetField< T > (ref T field, T value, [CallerMemberName] string propertyName=null)
 Sets the backing field to the new value, and triggers a property change event, if the value has changed. More...
 
- Events inherited from UnifiedAutomation.UaServer.ModelControllerBase
PropertyChangedEventHandler PropertyChanged
 Occurs when a property value changes. More...
 
EventHandler
< PropertyChangeRequestedEventArgs
PropertyChangeRequested
 The event is emitted just before the value will be changed, and gives the observer the opportunity to reject or adjust (e.g. clamp) the property change by setting the PropertyChangeRequestedEventArgs.StatusCode and PropertyChangeRequestedEventArgs.Value properties. More...
 
EventHandler
< StatusCodeChangedEventArgs
StatusCodeChanged
 
- Events inherited from UnifiedAutomation.UaServer.INotifyPropertyChangeRequested
EventHandler
< PropertyChangeRequestedEventArgs
PropertyChangeRequested
 The property change request event. More...
 
- Events inherited from UnifiedAutomation.UaServer.INotifyStatusCodeInfo
EventHandler
< StatusCodeChangedEventArgs
StatusCodeChanged
 Occurs if the status code of a property was changed. More...
 

Detailed Description

The base class for event objects.

The OPC UA BaseEventType defines all general characteristics of an Event. All other EventTypes derive from it.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.BaseEventModel.BaseEventModel ( )

Initializes a new instance of the BaseEventModel class.

UnifiedAutomation.UaServer.BaseEventModel.BaseEventModel ( BaseEventModel  template)

Initializes a new instance of the BaseEventModel class.

Parameters
templateThe template.

Member Function Documentation

virtual GenericEvent UnifiedAutomation.UaServer.BaseEventModel.CreateEvent ( FilterManager  manager)
virtual

Creates the event.

Parameters
managerThe manager.
Returns
The new event.
virtual GenericEvent UnifiedAutomation.UaServer.BaseEventModel.CreateEvent ( FilterManager  manager,
bool  autoGenerateEventIdAndTime 
)
virtual

Creates the event.

Parameters
managerThe manager.
autoGenerateEventIdAndTimeIf TRUE a new EventId/Time/ReceiveTime is set automatically and stored in the object. If FALSE the caller must set the EventId/Time/ReceiveTime before calling this method.
Returns
The new event.
void UnifiedAutomation.UaServer.BaseEventModel.NewId ( )

Assigns a new EventId, Time and ReceiveTime to the event.

void UnifiedAutomation.UaServer.BaseEventModel.SetRolePermissions ( RolePermissionTypeCollection  rolePermissions,
BaseNodeManager  nodeManager 
)

Sets the RolePermissions to an event. Is used to restrict the receiving of the events to certain roles.

Parameters
rolePermissionsThe RolePermissions to be set. If null, the namespace default is set. Must not be null.
nodeManagerThe BaseNodeManager that manages the SourceNode. Must not be null.
void UnifiedAutomation.UaServer.BaseEventModel.SetRolePermissionsAndAccessRestriction ( Node  sourceNode,
BaseNodeManager  nodeManager 
)

Sets the RolePermissions and AccessRestiriction to an event. Is used to restrict the receiving of the events to certain users.

Parameters
sourceNodeThe RolePermissions and the AccessRestrictions of this node are used. If not set, the namespace default is set. Must not be null.
nodeManagerThe BaseNodeManager that manages the sourceNode. Must not be null.
virtual void UnifiedAutomation.UaServer.BaseEventModel.UpdateEvent ( GenericEvent  e)
virtual

Updates the event.

Parameters
eThe event to update.

Reimplemented in UnifiedAutomation.UaServer.ProgramTransitionEventModel, UnifiedAutomation.UaServer.TransitionEventModel, UnifiedAutomation.UaServer.SystemStatusChangeEventModel, UnifiedAutomation.UaServer.RefreshStartEventModel, UnifiedAutomation.UaServer.RefreshRequiredEventModel, UnifiedAutomation.UaServer.RefreshEndEventModel, UnifiedAutomation.UaServer.PubSubTransportLimitsExceedEventModel, UnifiedAutomation.UaServer.PubSubCommunicationFailureEventModel, UnifiedAutomation.UaServer.PubSubStatusEventModel, UnifiedAutomation.UaServer.DeviceFailureEventModel, UnifiedAutomation.UaServer.SystemEventModel, UnifiedAutomation.UaServer.SemanticChangeEventModel, UnifiedAutomation.UaServer.ProgressEventModel, UnifiedAutomation.UaServer.EventQueueOverflowEventModel, UnifiedAutomation.UaServer.DialogConditionModel, UnifiedAutomation.UaServer.NonExclusiveRateOfChangeAlarmModel, UnifiedAutomation.UaServer.NonExclusiveLevelAlarmModel, UnifiedAutomation.UaServer.NonExclusiveDeviationAlarmModel, UnifiedAutomation.UaServer.NonExclusiveLimitAlarmModel, UnifiedAutomation.UaServer.ExclusiveRateOfChangeAlarmModel, UnifiedAutomation.UaServer.ExclusiveLevelAlarmModel, UnifiedAutomation.UaServer.ExclusiveDeviationAlarmModel, UnifiedAutomation.UaServer.ExclusiveLimitAlarmModel, UnifiedAutomation.UaServer.LimitAlarmModel, UnifiedAutomation.UaServer.TripAlarmModel, UnifiedAutomation.UaServer.TrustListOutOfDateAlarmModel, UnifiedAutomation.UaServer.CertificateExpirationAlarmModel, UnifiedAutomation.UaServer.SystemOffNormalAlarmModel, UnifiedAutomation.UaServer.SystemDiagnosticAlarmModel, UnifiedAutomation.UaServer.InstrumentDiagnosticAlarmModel, UnifiedAutomation.UaServer.OffNormalAlarmModel, UnifiedAutomation.UaServer.DiscreteAlarmModel, UnifiedAutomation.UaServer.DiscrepancyAlarmModel, UnifiedAutomation.UaServer.AlarmConditionModel, UnifiedAutomation.UaServer.AcknowledgeableConditionModel, UnifiedAutomation.UaServer.ConditionModel, UnifiedAutomation.UaServer.GeneralModelChangeEventModel, UnifiedAutomation.UaServer.BaseModelChangeEventModel, UnifiedAutomation.UaServer.TrustListUpdatedAuditEventModel, UnifiedAutomation.UaServer.CertificateUpdatedAuditEventModel, UnifiedAutomation.UaServer.TrustListUpdateRequestedAuditEventModel, UnifiedAutomation.UaServer.RoleMappingRuleChangedAuditEventModel, UnifiedAutomation.UaServer.KeyCredentialUpdatedAuditEventModel, UnifiedAutomation.UaServer.KeyCredentialDeletedAuditEventModel, UnifiedAutomation.UaServer.KeyCredentialAuditEventModel, UnifiedAutomation.UaServer.CertificateUpdateRequestedAuditEventModel, UnifiedAutomation.UaServer.ProgramTransitionAuditEventModel, UnifiedAutomation.UaServer.AuditProgramTransitionEventModel, UnifiedAutomation.UaServer.AuditUpdateStateEventModel, UnifiedAutomation.UaServer.AuditConditionSuppressionEventModel, UnifiedAutomation.UaServer.AuditConditionSilenceEventModel, UnifiedAutomation.UaServer.AuditConditionShelvingEventModel, UnifiedAutomation.UaServer.AuditConditionRespondEventModel, UnifiedAutomation.UaServer.AuditConditionResetEventModel, UnifiedAutomation.UaServer.AuditConditionOutOfServiceEventModel, UnifiedAutomation.UaServer.AuditConditionEnableEventModel, UnifiedAutomation.UaServer.AuditConditionConfirmEventModel, UnifiedAutomation.UaServer.AuditConditionCommentEventModel, UnifiedAutomation.UaServer.AuditConditionAcknowledgeEventModel, UnifiedAutomation.UaServer.AuditConditionEventModel, UnifiedAutomation.UaServer.AuditUpdateMethodEventModel, UnifiedAutomation.UaServer.AuditWriteUpdateEventModel, UnifiedAutomation.UaServer.AuditHistoryValueUpdateEventModel, UnifiedAutomation.UaServer.AuditHistoryEventUpdateEventModel, UnifiedAutomation.UaServer.AuditHistoryRawModifyDeleteEventModel, UnifiedAutomation.UaServer.AuditHistoryEventDeleteEventModel, UnifiedAutomation.UaServer.AuditHistoryAtTimeDeleteEventModel, UnifiedAutomation.UaServer.AuditHistoryDeleteEventModel, UnifiedAutomation.UaServer.AuditHistoryAnnotationUpdateEventModel, UnifiedAutomation.UaServer.AuditHistoryUpdateEventModel, UnifiedAutomation.UaServer.AuditUpdateEventModel, UnifiedAutomation.UaServer.AuditUrlMismatchEventModel, UnifiedAutomation.UaServer.AuditCreateSessionEventModel, UnifiedAutomation.UaServer.AuditCancelEventModel, UnifiedAutomation.UaServer.AuditActivateSessionEventModel, UnifiedAutomation.UaServer.AuditSessionEventModel, UnifiedAutomation.UaServer.AuditOpenSecureChannelEventModel, UnifiedAutomation.UaServer.AuditChannelEventModel, UnifiedAutomation.UaServer.AuditCertificateUntrustedEventModel, UnifiedAutomation.UaServer.AuditCertificateRevokedEventModel, UnifiedAutomation.UaServer.AuditCertificateMismatchEventModel, UnifiedAutomation.UaServer.AuditCertificateInvalidEventModel, UnifiedAutomation.UaServer.AuditCertificateExpiredEventModel, UnifiedAutomation.UaServer.AuditCertificateDataMismatchEventModel, UnifiedAutomation.UaServer.AuditCertificateEventModel, UnifiedAutomation.UaServer.AuditSecurityEventModel, UnifiedAutomation.UaServer.AuditDeleteReferencesEventModel, UnifiedAutomation.UaServer.AuditDeleteNodesEventModel, UnifiedAutomation.UaServer.AuditAddReferencesEventModel, UnifiedAutomation.UaServer.AuditAddNodesEventModel, UnifiedAutomation.UaServer.AuditNodeManagementEventModel, UnifiedAutomation.UaServer.AuditClientUpdateMethodResultEventModel, UnifiedAutomation.UaServer.AuditClientEventModel, and UnifiedAutomation.UaServer.AuditEventModel.

Property Documentation

AccessRestrictionType UnifiedAutomation.UaServer.BaseEventModel.AccessRestriction
getset

Using the AcccessRestrictions accessing the events can be restricted for users having a secure connection.

NodeId UnifiedAutomation.UaServer.BaseEventModel.ConditionClassId
getset

Specifies in which domain this Condition is used.

It is the NodeId of the corresponding ConditionClassType. When using this Property for filtering, Clients have to specify all individual ConditionClassType NodeIds. The OfType operator cannot be applied. BaseConditionClassType is used as class whenever a Condition cannot be assigned to a more concrete class.

LocalizedText UnifiedAutomation.UaServer.BaseEventModel.ConditionClassName
getset

ConditionClassName provides the display name of the ConditionClassType.

NodeId UnifiedAutomation.UaServer.BaseEventModel.ConditionSubClassId
getset

ConditionSubClassId specifies additional class[es] that apply to the Event.

It is the NodeId of the corresponding subtype of BaseConditionClassType. When using this Property for filtering, Clients have to specify all individual sub types of BaseConditionClassType NodeIds. The OfType operator cannot be applied. The Client specifies a NULL in the filter, to return Events where no sub class is applied. When returning Events, if this optional field is not available in an Event, a NULL shall be returned for the field.

LocalizedText UnifiedAutomation.UaServer.BaseEventModel.ConditionSubClassName
getset

ConditionSubClassName provides the DisplayName[s] of the ConditionClassType[s] listed in the ConditionSubClassId.

byte [] UnifiedAutomation.UaServer.BaseEventModel.EventId
getset

Generated by the server to uniquely identify a particular Event Notification.

The Server is responsible to ensure that each Event has its unique EventId. It may do this, for example, by putting GUIDs into the ByteString. Clients can use the EventId to assist in minimizing or eliminating gaps and overlaps that may occur during a redundancy fail over. The EventId shall always be returned as value and the Server is not allowed to return a StatusCode for the EventId indicating an error.

NodeId UnifiedAutomation.UaServer.BaseEventModel.EventType
getset

Describes the specific type of Event.

The EventType shall always be returned as value and the Server is not allowed to return a StatusCode for the EventType indicating an error.

TimeZoneDataType UnifiedAutomation.UaServer.BaseEventModel.LocalTime
getset

Contains the Offset and the DaylightSavingInOffset flag.

The Offset specifies the time difference (in minutes) between the Time Property and the time at the location in which the event was issued. If DaylightSavingInOffset is TRUE, then Standard/Daylight savings time (DST) at the originating location is in effect and Offset includes the DST correction. If FALSE, then the Offset does not include DST correction and DST may or may not have been in effect.

LocalizedText UnifiedAutomation.UaServer.BaseEventModel.Message
getset

Provides a human-readable and localizable text description of the Event.

The Server may return any appropriate text to describe the Event. A null string is not a valid value; if the Server does not have a description, it shall return the string part of the BrowseName of the Node associated with the Event.

INodeAccessInfo UnifiedAutomation.UaServer.BaseEventModel.NodeAccessInfo
getset

Using a NodeAccessInfo can restrict the access of an event to single scopes.

NodeId UnifiedAutomation.UaServer.BaseEventModel.NodeId
getset

The node identifier for a representation of an event in the Server address space. Used mainly for ConditionIds.

DateTime UnifiedAutomation.UaServer.BaseEventModel.ReceiveTime
getset

Provides the time the OPC UA Server received the Event from the underlying device of another Server.

ReceiveTime is analogous to ServerTimestamp defined in Part 4 of the OPC UA Specification, i.e. in the case where the OPC UA Server gets an Event from another OPC UA Server, each Server applies its own ReceiveTime. That implies that a Client may get the same Event, having the same EventId, from different Servers having different values of the ReceiveTime. The ReceiveTime shall always be returned as value and the Server is not allowed to return a StatusCode for the ReceiveTime indicating an error.

IRolePermissions UnifiedAutomation.UaServer.BaseEventModel.RolePermissions
getset

Using the RolePermissions accessing the events can be restricted for users having one of the configured roles.

ushort UnifiedAutomation.UaServer.BaseEventModel.Severity
getset

An indication of the urgency of the Event.

This is also commonly called “priority”. Values will range from 1 to 1000, with 1 being the lowest severity and 1000 being the highest. Typically, a severity of 1 would indicate an Event which is informational in nature, while a value of 1000 would indicate an Event of catastrophic nature, which could potentially result in severe financial loss or loss of life.

It is expected that very few Server implementations will support 1000 distinct severity levels. Therefore, Server developers are responsible for distributing their severity levels across the 1 – 1000 range in such a manner that clients can assume a linear distribution. For example, a client wishing to present five severity levels to a user should be able to do the following mapping:

Client Severity OPC Severity
HIGH 801 – 1000
MEDIUM HIGH 601 – 800
MEDIUM 401 – 600
MEDIUM LOW 201 – 400
LOW 1 – 200
string UnifiedAutomation.UaServer.BaseEventModel.SourceName
getset

Provides a description of the source of the Event.

This could be the DisplayName of the Event source, if the Event is specific to a Node, or some server-specific notation.

NodeId UnifiedAutomation.UaServer.BaseEventModel.SourceNode
getset

Identifies the Node that the Event originated from.

If the Event is not specific to a Node, the NodeId is set to null. Some subtypes of this BaseEventType may define additional rules for SourceNode.

DateTime UnifiedAutomation.UaServer.BaseEventModel.Time
getset

Provides the time the Event occurred.

This value is set as close to the event generator as possible. It often comes from the underlying system or device. Once set, intermediate OPC UA Servers shall not alter the value.


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