com.prosysopc.ua.server
Class GeneralModelChangeEvent

java.lang.Object
  extended by com.prosysopc.ua.server.GeneralModelChangeEvent

public class GeneralModelChangeEvent
extends Object


Constructor Summary
GeneralModelChangeEvent(org.opcfoundation.ua.common.NamespaceTable namespaceTable)
           
 
Method Summary
protected  void addAffectedNode(UaNode affectedNode)
           
 void addChange(org.opcfoundation.ua.builtintypes.NodeId affectedNodeId, org.opcfoundation.ua.builtintypes.NodeId typeDefinition, int verb)
          Add a model change to the event before triggering it.
 void addChange(org.opcfoundation.ua.builtintypes.NodeId affectedNodeId, org.opcfoundation.ua.builtintypes.NodeId typeDefinition, ModelChangeType... changeTypes)
          Add a model change to the event before triggering it.
 void addChange(org.opcfoundation.ua.builtintypes.NodeId affectedNodeId, org.opcfoundation.ua.builtintypes.NodeId typeDefinition, org.opcfoundation.ua.builtintypes.UnsignedByte verb)
          Add a model change to the event before triggering it.
 void addChange(UaNode affectedNode, ModelChangeType... changeTypes)
          Add a model change to the event before triggering it.
 void addChanges(List<org.opcfoundation.ua.core.ModelChangeStructureDataType> changes)
          Adds a list of changes to the event.
 void addChanges(org.opcfoundation.ua.core.ModelChangeStructureDataType[] changes)
          Adds a list of changes to the event.
 void clearChanges()
          Clears the current set of changes.
 UaNode[] getAffectedNodes()
          The AffectedNodes is used to keep a list of UaNode objects that are affected by the change and to which the NodeVersion should be updated after the event is sent.
 org.opcfoundation.ua.core.ModelChangeStructureDataType[] getChanges()
           
 boolean hasChanges()
           
 void setChanges(org.opcfoundation.ua.core.ModelChangeStructureDataType[] changes)
          Sets the list of changes to send.
 void updateNodeVersions()
          Updates the NodeVersion property of all getAffectedNodes().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralModelChangeEvent

public GeneralModelChangeEvent(org.opcfoundation.ua.common.NamespaceTable namespaceTable)
Method Detail

addChange

public void addChange(org.opcfoundation.ua.builtintypes.NodeId affectedNodeId,
                      org.opcfoundation.ua.builtintypes.NodeId typeDefinition,
                      int verb)
Add a model change to the event before triggering it.

Parameters:
affectedNodeId - The NodeId of the affected node. If the node is UaNode, use addChange(UaNode, ModelChangeType...) instead.
typeDefinition - the type of the node, in case it is an Object or Variable node
verb - the change types made to the node, defined as a bit set
See Also:
addChange(UaNode, ModelChangeType...), addChange(NodeId, NodeId, ModelChangeType...)

addChange

public void addChange(org.opcfoundation.ua.builtintypes.NodeId affectedNodeId,
                      org.opcfoundation.ua.builtintypes.NodeId typeDefinition,
                      ModelChangeType... changeTypes)
Add a model change to the event before triggering it.

Parameters:
affectedNodeId - The NodeId of the affected node
typeDefinition - the type of the node, in case it is an Object or Variable node
changeTypes - The change type made to the affectedNode

addChange

public void addChange(org.opcfoundation.ua.builtintypes.NodeId affectedNodeId,
                      org.opcfoundation.ua.builtintypes.NodeId typeDefinition,
                      org.opcfoundation.ua.builtintypes.UnsignedByte verb)
Add a model change to the event before triggering it.

Parameters:
affectedNodeId - The NodeId of the affected node. If the node is UaNode, use addChange(UaNode, ModelChangeType...) instead.
typeDefinition - the type of the node, in case it is an Object or Variable node
verb - the change types made to the node, defined as a bit set
See Also:
addChange(UaNode, ModelChangeType...), addChange(NodeId, NodeId, ModelChangeType...)

addChange

public void addChange(UaNode affectedNode,
                      ModelChangeType... changeTypes)
Add a model change to the event before triggering it.

Parameters:
affectedNode - The node that was changed
changeTypes - The change type made to the affectedNode

addChanges

public void addChanges(List<org.opcfoundation.ua.core.ModelChangeStructureDataType> changes)
Adds a list of changes to the event.

Parameters:
changes -

addChanges

public void addChanges(org.opcfoundation.ua.core.ModelChangeStructureDataType[] changes)
Adds a list of changes to the event.

Parameters:
changes - the changes to add.

clearChanges

public void clearChanges()
Clears the current set of changes. The event is automatically cleared when triggerEvent is called


getAffectedNodes

public UaNode[] getAffectedNodes()
The AffectedNodes is used to keep a list of UaNode objects that are affected by the change and to which the NodeVersion should be updated after the event is sent.

Returns:
affected nodes

getChanges

public org.opcfoundation.ua.core.ModelChangeStructureDataType[] getChanges()
Returns:
the changes

hasChanges

public boolean hasChanges()
Returns:

setChanges

public void setChanges(org.opcfoundation.ua.core.ModelChangeStructureDataType[] changes)
Sets the list of changes to send. Clears the current chanegs and the calls addChange(NodeId, NodeId, int) for each change in the list.

Parameters:
changes - the list of changes to send with the event.
See Also:
addChange(org.opcfoundation.ua.builtintypes.NodeId, org.opcfoundation.ua.builtintypes.NodeId, int), addChanges(java.util.List), #triggerEvent

updateNodeVersions

public void updateNodeVersions()
Updates the NodeVersion property of all getAffectedNodes(). Should be called once before triggering.


addAffectedNode

protected void addAffectedNode(UaNode affectedNode)
Parameters:
affectedNode -


Copyright © 2018. All rights reserved.