|
||||||||||
| 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
com.prosysopc.ua.types.opcua.server.ConditionTypeNodeBase
com.prosysopc.ua.types.opcua.server.ConditionTypeNode
com.prosysopc.ua.types.opcua.server.AcknowledgeableConditionTypeNodeBase
com.prosysopc.ua.types.opcua.server.AcknowledgeableConditionTypeNode
public class AcknowledgeableConditionTypeNode
The AcknowledgeableConditionType extends the ConditionType by defining acknowledgement characteristics. It is an abstract type.
The following is from the OPC UA specification Part 9, section 5.7:
AckedState when FALSE indicates that the Condition instance requires acknowledgement for the reported Condition state. When the Condition instance is acknowledged the AckedState is set to TRUE. ConfirmedState indicates whether it requires confirmation. Recommended state names are described in Annex A. The two states are sub-states of the TRUE EnabledState. See section 4.3 for more information about acknowledgement and confirmation models. The EventId used in the Event Notification is considered the identifier of this state and has to be used when calling the Methods for acknowledgement or confirmation.
A Server may require that previous states be acknowledged. If the acknowledgement of a previous state is still open and a new state also requires acknowledgement, the Server shall create a branch of the Condition instance as specified in section 4.4. Clients are expected to keep track of all ConditionBranches where AckedState/Id is FALSE to allow acknowledgement of those. See also section 5.5.2 for more information about ConditionBranches and the examples in appendix B.1. The handling of the AckedState and branches also applies to the ConfirmState.
| Field Summary |
|---|
| Fields inherited from class com.prosysopc.ua.types.opcua.server.BaseEventTypeNode |
|---|
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.AcknowledgeableConditionType |
|---|
ACKED_STATE, ACKNOWLEDGE, CONFIRM, CONFIRMED_STATE, ENABLED_STATE |
| Fields inherited from interface com.prosysopc.ua.types.opcua.ConditionType |
|---|
ADD_COMMENT, BRANCH_ID, CLIENT_USER_ID, COMMENT, CONDITION_CLASS_ID, CONDITION_CLASS_NAME, CONDITION_NAME, DISABLE, ENABLE, LAST_SEVERITY, QUALITY, RETAIN |
| 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 | |
|---|---|
protected |
AcknowledgeableConditionTypeNode(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
NodeBuilder uses this, you should not call this yourself. |
| Method Summary | |
|---|---|
void |
acknowledge(org.opcfoundation.ua.builtintypes.ByteString eventId,
org.opcfoundation.ua.builtintypes.LocalizedText comment,
org.opcfoundation.ua.builtintypes.DateTime ackTime,
org.opcfoundation.ua.builtintypes.ByteString userEventId)
Acknowledged the condition, adds the comment to the eventId with ConditionTypeNode.addComment(ByteString, LocalizedText, DateTime, ByteString). |
void |
afterCreate()
This method is called after NodeBuilder has constructed the instance, it is called for every sub-node that also implement this interface |
void |
confirm(org.opcfoundation.ua.builtintypes.ByteString eventId,
org.opcfoundation.ua.builtintypes.LocalizedText comment,
org.opcfoundation.ua.builtintypes.DateTime confirmTime,
org.opcfoundation.ua.builtintypes.ByteString userEventId)
Confirms the condition and adds the comment to the eventId with ConditionTypeNode.addComment(ByteString, LocalizedText, DateTime, ByteString). |
boolean |
isAcked()
|
boolean |
isConfirmed()
|
protected void |
onAcknowledge(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.ByteString eventId,
org.opcfoundation.ua.builtintypes.LocalizedText comment)
|
protected void |
onConfirm(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.ByteString eventId,
org.opcfoundation.ua.builtintypes.LocalizedText comment)
|
void |
setAcked(boolean acked)
Set the Acknowledged status of the condition. |
void |
setAcked(boolean acked,
org.opcfoundation.ua.builtintypes.DateTime ackTime)
Set the Acknowledged status of the condition. |
void |
setConfirmed(boolean confirmed)
Set the Confirmed status of the condition. |
void |
setConfirmed(boolean confirmed,
org.opcfoundation.ua.builtintypes.DateTime confirmTime)
Set the Confirmed status of the condition. |
| Methods inherited from class com.prosysopc.ua.types.opcua.server.ConditionTypeNode |
|---|
addComment, checkEnabled, isEnabled, onAddComment, onDisable, onEnable, setEnabled, setEnabled, setQuality, setRetain, triggerEvent, triggerEvent |
| Methods inherited from class com.prosysopc.ua.types.opcua.server.BaseEventTypeNode |
|---|
afterAddReference, getLastEvent, getSource, getSourceName, getSourceNode, isDeleteOneShotEvents, isMonitoredForEvents, setDeleteOneShotEvents, setSeverity, setSeverity, setSource, setSourceName, triggerEvent |
| Methods inherited from class com.prosysopc.ua.types.opcua.server.BaseEventTypeNodeBase |
|---|
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.ConditionType |
|---|
addComment, disable, enable, getAddCommentNode, getBranchId, getBranchIdNode, getClientUserId, getClientUserIdNode, getComment, getCommentNode, getConditionClassId, getConditionClassIdNode, getConditionClassName, getConditionClassNameNode, getConditionName, getConditionNameNode, getDisableNode, getEnableNode, getLastSeverity, getLastSeverityNode, getQuality, getQualityNode, getRetainNode, isRetain, setBranchId, setClientUserId, setComment, setConditionClassId, setConditionClassName, setConditionName, setLastSeverity, setQuality, setRetain |
| Methods inherited from interface com.prosysopc.ua.types.opcua.BaseEventType |
|---|
getEventId, getEventIdNode, getEventType, getEventTypeNode, getLocalTime, getLocalTimeNode, getMessage, getMessageNode, getReceiveTime, getReceiveTimeNode, getSeverity, getSeverityNode, getSourceName, getSourceNameNode, getSourceNode, getSourceNodeNode, getTime, getTimeNode, setEventId, setEventType, setLocalTime, setMessage, setReceiveTime, setSeverity, setSourceName, setSourceNode, setTime |
| 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 |
| Constructor Detail |
|---|
protected AcknowledgeableConditionTypeNode(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
| Method Detail |
|---|
public void acknowledge(org.opcfoundation.ua.builtintypes.ByteString eventId,
org.opcfoundation.ua.builtintypes.LocalizedText comment,
org.opcfoundation.ua.builtintypes.DateTime ackTime,
org.opcfoundation.ua.builtintypes.ByteString userEventId)
throws StatusException
ConditionTypeNode.addComment(ByteString, LocalizedText, DateTime, ByteString).
Also calls triggerEvent after acknowledging, to send a new event notification to the clients.
eventId - the event to acknowledge; use null to acknowledge the last eventcomment - the comment to addackTime - the acknowledging timeuserEventId - your custom Id for the new event that is sent about the acknowledging
StatusException - Bad_ConditionBranchAlreadyAcked, if the condition is already
acknowledgedpublic void afterCreate()
GeneratedNode
afterCreate in interface GeneratedNodeafterCreate in class AcknowledgeableConditionTypeNodeBase
public void confirm(org.opcfoundation.ua.builtintypes.ByteString eventId,
org.opcfoundation.ua.builtintypes.LocalizedText comment,
org.opcfoundation.ua.builtintypes.DateTime confirmTime,
org.opcfoundation.ua.builtintypes.ByteString userEventId)
throws StatusException
ConditionTypeNode.addComment(ByteString, LocalizedText, DateTime, ByteString).
Confirming the condition typically means that a corrective action has been taken and the condition should be recovering after this. It typically happens after the condition is acknowledged.
Also calls triggerEvent after confirming the condition, to send a new event notification to the clients.
Since ConfirmedState is an optional node in the condition, the method will only set the value if the node is defined. If the node is not defined, the method will not do anything.
eventId - the event to confirm; use null to confirm the last eventcomment - the comment to addconfirmTime - the acknowledging timeuserEventId - your custom Id for the new event that is sent about the acknowledging
StatusException - Bad_ConditionBranchAlreadyConfirmed, if the condition is already
confirmedpublic boolean isAcked()
public boolean isConfirmed()
public void setAcked(boolean acked)
Note: When Acked is set to false, Confirmed will also be set to false automatically, since the combination of Acked=false, Confirmed=true is an invalid state in OPC UA.
acked - the value of acked to setsetConfirmed(boolean)
public void setAcked(boolean acked,
org.opcfoundation.ua.builtintypes.DateTime ackTime)
Note: When Acked is set to false, Confirmed will also be set to false automatically, since the combination of Acked=false, Confirmed=true is an invalid state in OPC UA.
acked - the value of acked to setackTime - transitionTime for the change in acked stateacknowledge(ByteString, LocalizedText, DateTime, ByteString),
setConfirmed(boolean, DateTime)public void setConfirmed(boolean confirmed)
Since ConfirmedState is an optional node in the condition, the method will only set the value if the node is defined. If the node is not defined, the method will not do anything.
Note: When Acked is set to false, Confirmed will also be set to false automatically, since the combination of Acked=false, Confirmed=true is an invalid state in OPC UA.
confirmed - the value of confirmed to setconfirm(ByteString, LocalizedText, DateTime, ByteString),
setAcked(boolean)
public void setConfirmed(boolean confirmed,
org.opcfoundation.ua.builtintypes.DateTime confirmTime)
Since ConfirmedState is an optional node in the condition, the method will only set the value if the node is defined. If the node is not defined, the method will not do anything.
Note: When Acked is set to false, Confirmed will also be set to false automatically, since the combination of Acked=false, Confirmed=true is an invalid state in OPC UA.
confirmed - the value of confirmed to setconfirmTime - transitionTime for the change in confirmed stateconfirm(ByteString, LocalizedText, DateTime, ByteString),
setAcked(boolean, DateTime)
protected void onAcknowledge(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.ByteString eventId,
org.opcfoundation.ua.builtintypes.LocalizedText comment)
throws StatusException
onAcknowledge in class AcknowledgeableConditionTypeNodeBaseStatusException
protected void onConfirm(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.ByteString eventId,
org.opcfoundation.ua.builtintypes.LocalizedText comment)
throws StatusException
onConfirm in class AcknowledgeableConditionTypeNodeBaseStatusException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||