|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.nodes.AbstractUaNode
com.prosysopc.ua.server.nodes.ServerNode
com.prosysopc.ua.server.nodes.BaseNode
com.prosysopc.ua.server.nodes.UaInstanceNode
com.prosysopc.ua.server.nodes.UaObjectNode
com.prosysopc.ua.server.nodes.AbstractGeneratedObjectNode
com.prosysopc.ua.types.opcua.server.BaseObjectTypeNode
com.prosysopc.ua.types.opcua.server.BaseEventTypeNodeBase
com.prosysopc.ua.types.opcua.server.BaseEventTypeNode
public class BaseEventTypeNode
Base Event Type. This is the base type for all event definitions.
| Field Summary | |
|---|---|
protected AtomicReference<EventData> |
lastEvent
|
| Fields inherited from class com.prosysopc.ua.server.nodes.BaseNode |
|---|
NODE_VERSION_PROPERTY_NAME |
| Fields inherited from class com.prosysopc.ua.server.nodes.ServerNode |
|---|
eventListeners, INITIALIZATION_TIME, nodeManager, supportedAttributesMap |
| Fields inherited from interface com.prosysopc.ua.types.opcua.BaseEventType |
|---|
EVENT_ID, EVENT_TYPE, LOCAL_TIME, MESSAGE, RECEIVE_TIME, SEVERITY, SOURCE_NAME, SOURCE_NODE, TIME |
| Constructor Summary | |
|---|---|
BaseEventTypeNode(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
|
|
| Method Summary | |
|---|---|
protected void |
afterAddReference(UaReference reference)
|
void |
afterCreate()
This method is called after NodeBuilder has constructed the instance, it is called for every sub-node that also implement this interface |
EventData |
getLastEvent()
|
UaNode |
getSource()
The source of the event. |
String |
getSourceName()
The name of the event source. |
org.opcfoundation.ua.builtintypes.NodeId |
getSourceNode()
The NodeId of the event source. |
static boolean |
isDeleteOneShotEvents()
If this is true then after triggerEvent is called, "One-Shot" events, i.e. not ConditionType events, are deleted from the AddressSpace. |
boolean |
isMonitoredForEvents()
Check if the event is monitored by any client application via MonitoredEventItems |
static void |
setDeleteOneShotEvents(boolean deleteOneShotEvents)
|
void |
setSeverity(int severity)
The severity of the event. |
void |
setSeverity(org.opcfoundation.ua.builtintypes.UnsignedShort severity)
The severity of the event. |
void |
setSource(UaNode source)
Define the source node of the event. |
void |
setSourceName(String sourceName)
Description of the source of the event. |
org.opcfoundation.ua.builtintypes.ByteString |
triggerEvent(org.opcfoundation.ua.builtintypes.ByteString userEventId)
Generates a new event using the current time. |
org.opcfoundation.ua.builtintypes.ByteString |
triggerEvent(org.opcfoundation.ua.builtintypes.DateTime time,
org.opcfoundation.ua.builtintypes.DateTime receiveTime,
org.opcfoundation.ua.builtintypes.ByteString userEventId)
Generates a new event. |
| Methods inherited from class com.prosysopc.ua.types.opcua.server.BaseEventTypeNodeBase |
|---|
callMethod, getBaseEventTypeNodeInitializer, getEventId, getEventIdNode, getEventType, getEventTypeNode, getLocalTime, getLocalTimeNode, getMessage, getMessageNode, getReceiveTime, getReceiveTimeNode, getSeverity, getSeverityNode, getSourceNameNode, getSourceNodeNode, getTime, getTimeNode, setBaseEventTypeNodeInitializer, setEventId, setEventType, setLocalTime, setMessage, setReceiveTime, setSourceNode, setTime |
| Methods inherited from class com.prosysopc.ua.types.opcua.server.BaseObjectTypeNode |
|---|
isCacheMethodIds, setCacheMethodIds |
| Methods inherited from class com.prosysopc.ua.server.nodes.AbstractGeneratedObjectNode |
|---|
afterCreateInitIfExists, afterCreateSetValueIfExists, callAfterCreateIfExists, getDefaultTypeDefinition, getQualifiedName, isComponentMatch |
| Methods inherited from class com.prosysopc.ua.server.nodes.UaObjectNode |
|---|
addCallListener, callMethod, deleteIfNodeExists, getAttributes, getAttributes, getEventNotifier, getIcon, getNodeClass, initSupportedAttributes, readAttributeValue, removeCallListener, setAttributes, setEventNotifier, setIcon, toString, writeAttributeValue |
| Methods inherited from class com.prosysopc.ua.server.nodes.UaInstanceNode |
|---|
addModellingRule, beforeAddReference, getTypeDefinition, getTypeDefinitionId, hasTypeDefinition, registerOverridePlainMethod, setTypeDefinition, setTypeDefinitionId, setTypeDefinitionId, supportsTypeDefinitionNode |
| Methods inherited from class com.prosysopc.ua.nodes.AbstractUaNode |
|---|
getForwardReferences, getInverseReferences, getReferences, getReferences, referenceTypeInherits |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.prosysopc.ua.types.opcua.BaseInstanceType |
|---|
getQualifiedName |
| Methods inherited from interface com.prosysopc.ua.nodes.UaObject |
|---|
callMethod, getEventNotifier, getIcon, setEventNotifier, setIcon |
| Methods inherited from interface com.prosysopc.ua.nodes.UaInstance |
|---|
getTypeDefinition, getTypeDefinitionId, setTypeDefinition, setTypeDefinitionId, setTypeDefinitionId |
| Field Detail |
|---|
protected final AtomicReference<EventData> lastEvent
| Constructor Detail |
|---|
public BaseEventTypeNode(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
| Method Detail |
|---|
public static boolean isDeleteOneShotEvents()
public static void setDeleteOneShotEvents(boolean deleteOneShotEvents)
isDeleteOneShotEvents()public void afterCreate()
GeneratedNode
afterCreate in interface GeneratedNodeafterCreate in class BaseEventTypeNodeBasepublic EventData getLastEvent()
public UaNode getSource()
The source defines the node from which the Event is generated from.
public String getSourceName()
getSourceName in interface BaseEventTypegetSourceName in class BaseEventTypeNodeBasepublic org.opcfoundation.ua.builtintypes.NodeId getSourceNode()
getSourceNode in interface BaseEventTypegetSourceNode in class BaseEventTypeNodeBasepublic boolean isMonitoredForEvents()
public void setSeverity(int severity)
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 |
setSeverity in class BaseEventTypeNodeBaseseverity - between 1 and 1000public void setSeverity(org.opcfoundation.ua.builtintypes.UnsignedShort severity)
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 |
setSeverity in interface BaseEventTypesetSeverity in class BaseEventTypeNodeBaseseverity - between 1 and 1000public void setSource(UaNode source)
source - the source node of the eventpublic void setSourceName(String sourceName)
If you do not define SourceName (or set it to null), the DisplayName of Source is used (if defined, of course).
setSourceName in interface BaseEventTypesetSourceName in class BaseEventTypeNodeBasesourceName - the sourceName to set, use null to use the DisplayName of Source (default)public org.opcfoundation.ua.builtintypes.ByteString triggerEvent(org.opcfoundation.ua.builtintypes.ByteString userEventId)
userEventId - a user specific part that will be added to the eventId that is generated
automatically for each event. The userEventId helps you to identify the event that you
created from your application, for example when an AcknowledgeableConditionType
is acknowledged. You can use EventManager.createEventId(long) to create a custom
ID from an integer value.
#createEventId(long) appended by the userEventId (if any)
public org.opcfoundation.ua.builtintypes.ByteString triggerEvent(org.opcfoundation.ua.builtintypes.DateTime time,
org.opcfoundation.ua.builtintypes.DateTime receiveTime,
org.opcfoundation.ua.builtintypes.ByteString userEventId)
time - Time 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. If 'null' is
provided, currentTime is used.receiveTime - ReceiveTime provides the time the OPC UA Server received the Event from the
underlying device of another Server. If 'null' is provided, time is also used
as receiveTime.userEventId - a user specific part that will be added to the eventId that is generated
automatically for each event. The userEventId helps you to identify the event that you
created from your application, for example when an AcknowledgeableConditionType
is acknowledged. You can use EventManager.createEventId(long) to create a custom
ID from an integer value.
#createEventId(long) appended by the userEventId (if any)protected void afterAddReference(UaReference reference)
afterAddReference in class ServerNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||