Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcEvent type exposes the following members.
Initializes a new instance of the OpcEvent class using the dataStore
specified.
C#
public OpcEvent(IOpcReadOnlyNodeDataStore dataStore)
Parameters
dataStore
IOpcReadOnlyNodeDataStore
The IOpcReadOnlyNodeDataStore of the 'Opc.UaFx.OpcEventNode' to represent.
Exceptions
The dataStore
is a null reference (Nothing in Visual Basic).
Occurs when the resolution of an event type fails. Use this event to manually provide the Type to use for a specific event type definition identifier.
C#
public static event OpcTypeResolveEventHandler TypeResolve
Gets the IOpcReadOnlyNodeDataStore which contains the data of the OpcEvent instance.
C#
protected IOpcReadOnlyNodeDataStore DataStore { get; }
Property Value
An instance implementing the IOpcReadOnlyNodeDataStore interface containing the event data represented by this OpcEvent instance.
Gets the type of event.
C#
public OpcEventType EventType { get; }
Property Value
One of the members defined by the OpcEventType enumeration indicating the type of the event represented by the OpcEvent. In case of custom event types the value Event.
Gets node identifier which describes the specific type of event.
C#
public OpcNodeId EventTypeId { get; }
Property Value
The node identifier of the event type. For more information see 'Opc.UaFx.OpcEventNode.EventTypeId'.
Gets an indication of the urgency of the event.
C#
public OpcEventSeverity Severity { get; }
Property Value
The severity of the OpcEvent. For more information see 'Opc.UaFx.OpcEventNode.Severity'.
Registers the type defined by T
as the OpcEvent type to create in case there an event instance is to be created for the type definition identified by the OpcEventTypeAttribute defined on the T
specified.
C#
public static void RegisterType<T>() where T : OpcEvent
Exceptions
The type T
does not define the OpcEventTypeAttribute or a public accessible constructor accepting an instance of the IOpcReadOnlyNodeDataStore interface or any event type specific attribute offers invalid information about the event type to associate with the Type.
Registers the type defined by T
as the OpcEvent type to create in case there an event instance is to be created for the type definition identified by the eventTypeId
specified.
C#
public static void RegisterType<T>(OpcNodeId eventTypeId) where T : OpcEvent
Parameters
eventTypeId
OpcNodeId
The identifier of the type definition for which the T
is to be used to create an event instance.
Exceptions
The type T
does not define the OpcEventTypeAttribute or a public accessible constructor accepting an instance of the IOpcReadOnlyNodeDataStore interface or any event type specific attribute offers invalid information about the event type to associate with the Type.
The eventTypeId
is a null reference (Nothing in Visual Basic).
Remarks
It is not possible to register the same or a different event type for the eventTypeId
specified as long there is already an event type registered for the type definition specified by eventTypeId
.
Registers all non-abstract types in the assembly
specified which defines the OpcEventTypeAttribute and inherit from OpcEvent.
C#
public static void RegisterTypes(Assembly assembly)
Parameters
assembly
Assembly
The Assembly its types are inspected for subclasses of the OpcEvent class which in addition using the OpcEventTypeAttribute.
Exceptions
A Type does not define the OpcEventTypeAttribute or a public accessible constructor accepting an instance of the IOpcReadOnlyNodeDataStore interface or any event type specific attribute offers invalid information about the event type to associate with the Type.
The assembly
is a null reference (Nothing in Visual Basic).
Remarks
The Type instances to register need to define the OpcEventTypeAttribute and a public accessible constructor accepting an instance of the IOpcReadOnlyNodeDataStore interface. Additionally the Type needs to be a subclass of the OpcEvent class.
Registers the eventTypes
specified as the OpcEvent type to create in case there an event instance is to be created for one of the type definitions identified by the OpcEventTypeAttribute used on one of the eventTypes
specified.
C#
public static void RegisterTypes(IEnumerable<Type> eventTypes)
Parameters
eventTypes
IEnumerable<Type>
A sequence of Type instances representing subclasses of OpcEvent to use in case there an event for the event definition equals to the event type identifier defined using the OpcEventTypeAttribute is to be created.
Exceptions
A Type does not define the OpcEventTypeAttribute or a public accessible constructor accepting an instance of the IOpcReadOnlyNodeDataStore interface or any event type specific attribute offers invalid information about the event type to associate with the Type.
The eventTypes
is a null reference (Nothing in Visual Basic).
Remarks
Any null reference (Nothing in Visual Basic) in eventTypes
is ignored.
Registers the eventType
and the further specified eventTypes
as the OpcEvent types to create in case there an event instance is to be created for one of the type definitions identified by the OpcEventTypeAttribute used on the eventType
or on one of the eventTypes
specified.
C#
public static void RegisterTypes(Type eventType, params Type[] eventTypes)
Parameters
eventType
Type
The Type instance representing a subclass of the OpcEvent to use in case there an event for the event definition equals to the event type identifier defined using the OpcEventTypeAttribute is to be created.
eventTypes
Type[]
An array of additional Type instances representing subclasses of OpcEvent to use in case there an event for the event definition equals to the event type identifier defined using the OpcEventTypeAttribute is to be created.
Exceptions
A Type does not define the OpcEventTypeAttribute or a public accessible constructor accepting an instance of the IOpcReadOnlyNodeDataStore interface or any event type specific attribute offers invalid information about the event type to associate with the Type.
The eventType
or eventTypes
is a null reference (Nothing in Visual Basic).
Unregisters the previously registered (see RegisterType´´1) type defined by T
as the OpcEvent type to not longer create for the type definition identified by the OpcEventTypeAttribute defined on the T
specified.
C#
public static void UnregisterType<T>() where T : OpcEvent
Unregisters the previously registered (see RegisterType´´1(OpcNodeId)) type defined by T
as the OpcEvent type to not longer create for the type definition identified by the eventTypeId
specified.
C#
public static void UnregisterType<T>(OpcNodeId eventTypeId) where T : OpcEvent
Parameters
eventTypeId
OpcNodeId
The identifier of the type definition for which the T
is to be unregistered.
Exceptions
The eventTypeId
is a null reference (Nothing in Visual Basic).
Unregisters all previously registered types (see RegisterTypes(Assembly)) in the assembly
specified.
C#
public static void UnregisterTypes(Assembly assembly)
Parameters
assembly
Assembly
The Assembly its types are inspected for subclasses of the OpcEvent class which in addition using the OpcEventTypeAttribute.
Exceptions
The assembly
is a null reference (Nothing in Visual Basic).
Unregisters the previously registered (see RegisterTypes(IEnumerable)) eventTypes
specified.
C#
public static void UnregisterTypes(IEnumerable<Type> eventTypes)
Parameters
eventTypes
IEnumerable<Type>
A sequence of OpcEvent types to unregister for the event definitions equals to the event type identifiers defined using the OpcEventTypeAttribute.
Exceptions
The eventTypes
is a null reference (Nothing in Visual Basic).
Unregisters the previously registered eventType
and the further specified eventTypes
(see RegisterTypes(Type, Type)).
C#
public static void UnregisterTypes(Type eventType, params Type[] eventTypes)
Parameters
eventType
Type
The OpcEvent type to unregister for the event definition equals to the event type identifier defined using the OpcEventTypeAttribute.
eventTypes
Type[]
An array of additional OpcEvent types to unregister for the event definitions equals to the event type identifiers defined using the OpcEventTypeAttribute.
Exceptions
The eventType
or eventTypes
is a null reference (Nothing in Visual Basic).