|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.server.ServiceManagerBase
com.prosysopc.ua.server.NodeManager
com.prosysopc.ua.server.NodeManagerUaNode
com.prosysopc.ua.server.NodeManagerRoot
public final class NodeManagerRoot
NodeManager for the namespace 0, which is the default OPCUA namespace. The node manager handles the address space root, and the default folder structure. It also contains the default OPCUA types.
NodeManagerRoot is also used to trigger ModelChangeEvents (see beginModelChange() &
endModelChange()).
| Field Summary |
|---|
| Fields inherited from class com.prosysopc.ua.server.NodeManager |
|---|
initialized, started |
| Constructor Summary | |
|---|---|
NodeManagerRoot(UaServer server)
|
|
| Method Summary | |
|---|---|
void |
addModelChange(org.opcfoundation.ua.builtintypes.NodeId nodeAffected,
org.opcfoundation.ua.builtintypes.NodeId typeDefinition,
ModelChangeType... changeTypes)
Adds a change to the ModelChangeEvent, if one is active. |
void |
addModelChange(UaNode nodeAffected,
ModelChangeType... changeTypes)
Adds a change to the ModelChangeEvent, if one is active. |
protected org.opcfoundation.ua.builtintypes.NodeId |
addNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.NodeId parentNodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinitionId,
org.opcfoundation.ua.core.NodeAttributes attributes,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId)
Handle adding a new node. |
protected void |
addReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isForward,
org.opcfoundation.ua.core.NodeClass targetNodeClass,
String targetServerUri)
Handle adding a reference. |
void |
addSemanticChange(UaNode nodeAffected)
|
void |
beginModelChange()
Begins a model change operation. |
void |
beginSemanticChange()
Begins a semantic change operation. |
protected void |
deleteNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
Boolean deleteTargetReferences)
|
protected void |
deleteReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
Boolean isForward,
Boolean deleteBidirectional)
|
void |
endModelChange()
Ends a model change started with beginModelChange() and triggers the ModelChangeEvent. |
org.opcfoundation.ua.builtintypes.ByteString |
endSemanticChange()
Ends a semantic change started with beginSemanticChange(). |
protected UaDataType |
getBaseDataType()
|
protected UaVariableType |
getBaseDataVariableType()
|
protected UaObjectType |
getBaseObjectType()
|
protected UaReferenceType |
getBaseReferenceType()
|
protected UaVariableType |
getBaseVariableType()
|
DataTypeConverter |
getDataTypeConverter()
|
FolderType |
getDataTypesFolder()
|
FolderType |
getEventTypesFolder()
|
GeneralModelChangeEvent |
getModelChangeEvent()
Get access to the contents of the current modelChangeEvent. |
int |
getNamespaceIndex()
|
FolderType |
getObjectsFolder()
This is the root of the Objects folder, containing all object definitions. |
FolderType |
getObjectTypesFolder()
|
FolderType |
getReferenceTypesFolder()
|
FolderType |
getRoot()
This is the ultimate root of the client address space. |
SemanticChangeEvent |
getSemanticChangeEvent()
Get access to the contents of the current semanticChangeEvent. |
ServerTypeNode |
getServerData()
|
FolderType |
getTypesFolder()
This is the root of the Types folder, containing all type definitions. |
FolderType |
getVariableTypesFolder()
|
FolderType |
getViewsFolder()
This is the root of the Views folder, containing all view definitions. |
protected void |
init()
Initialize the NodeManager. |
protected void |
shutdown(int secondsTillShutdown,
org.opcfoundation.ua.builtintypes.LocalizedText shutdownReason)
|
protected void |
start()
Start the NodeManager, i.e. make it available |
| Methods inherited from class com.prosysopc.ua.server.ServiceManagerBase |
|---|
arrayDimensionsMatch, checkIsMethod, checkIsValueNode, checkIsVariable, checkIsVariableOrVariableType, dataTypeEquals, getNode, getNode, getNode, getNodeManagerTable, getServer, getSubscriptionManager, isValueNode, isVariable, listenerError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NodeManagerRoot(UaServer server)
server - | Method Detail |
|---|
public void addModelChange(org.opcfoundation.ua.builtintypes.NodeId nodeAffected,
org.opcfoundation.ua.builtintypes.NodeId typeDefinition,
ModelChangeType... changeTypes)
beginModelChange() before calling addModelChange.
Note: Adding and deleting nodes to NodeManagerUaNode objects and references to BaseNode:s will
call #addModelChange(UaNode, ChangeType...) automatically.
nodeAffected - the affected nodetypeDefinition - the type of nodechangeTypes - the types of change
public void addModelChange(UaNode nodeAffected,
ModelChangeType... changeTypes)
beginModelChange() before calling addModelChange.
Note: Adding and deleting nodes to NodeManagerUaNode objects and references to BaseNode:s will call this method automatically.
The NodeVersion property must also be enabled in the Node objects (by calling
BaseNode.incNodeVersion() once), before the changes are accepted to the
ModelChangeEvent - the version will be automatically incremented when endModelChange()
is called and the event is sent to the clients.
nodeAffected - the affected nodechangeTypes - the types of changepublic void addSemanticChange(UaNode nodeAffected)
nodeAffected - the affected nodepublic void beginModelChange()
All node and reference additions and deletions done using UaNode:s (or BaseNode:s specifically)
will call #addModelChange(UaNode, ChangeType...) automatically, and these are recorded
when a ModelChangeEvent is activated with this method.
The change is finally ended with endModelChange(), which triggers the event.
Note: The nodes must define the NodeVersion property before they are accepted to the
ModelChangeEvent (you can define it with BaseNode.incNodeVersion()).
public void beginSemanticChange()
All node modifications that result in a BaseNode#semanticChange being called
The change is finally ended with endSemanticChange(), which triggers the event.
public void endModelChange()
beginModelChange() and triggers the ModelChangeEvent.
Also increases the NodeVersion of the affectedNodes (if they are BaseNodes).
If the list of changes to report is empty, will not send any events.
public org.opcfoundation.ua.builtintypes.ByteString endSemanticChange()
beginSemanticChange(). If several begin/end-calls
are nested, the last endSemanticChange call will trigger the SemanticChangeEvent.
public DataTypeConverter getDataTypeConverter()
ServiceManagerBase.getNodeManagerTable().public FolderType getDataTypesFolder()
public FolderType getEventTypesFolder()
public GeneralModelChangeEvent getModelChangeEvent()
beginModelChange() to
start a model change and endModelChange() to end it. All node modifications done
between them are recorded and sent to the clients that are listening to the event.
Alternatively, you can access and fill the event yourself.
public int getNamespaceIndex()
getNamespaceIndex in class NodeManagerNodeManager.getNamespaceUri()public FolderType getObjectsFolder()
public FolderType getObjectTypesFolder()
public FolderType getReferenceTypesFolder()
public FolderType getRoot()
public SemanticChangeEvent getSemanticChangeEvent()
beginModelChange() to start a model change and endModelChange() to end it.
All node modifications done between them are recorded and sent to the clients that are
listening to the event.
Alternatively, you can access and fill the event yourself.
public ServerTypeNode getServerData()
public FolderType getTypesFolder()
public FolderType getVariableTypesFolder()
public FolderType getViewsFolder()
protected org.opcfoundation.ua.builtintypes.NodeId addNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.NodeId parentNodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinitionId,
org.opcfoundation.ua.core.NodeAttributes attributes,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId)
throws StatusException
NodeManager
addNode in class NodeManagerUaNodeStatusException
protected void addReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isForward,
org.opcfoundation.ua.core.NodeClass targetNodeClass,
String targetServerUri)
throws StatusException
NodeManager
addReference in class NodeManagerUaNodeStatusException
protected void deleteNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
Boolean deleteTargetReferences)
throws StatusException
deleteNode in class NodeManagerUaNodeStatusException
protected void deleteReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
Boolean isForward,
Boolean deleteBidirectional)
throws StatusException
deleteReference in class NodeManagerUaNodeStatusExceptionprotected UaDataType getBaseDataType()
protected UaVariableType getBaseDataVariableType()
protected UaObjectType getBaseObjectType()
protected UaReferenceType getBaseReferenceType()
protected UaVariableType getBaseVariableType()
protected void init()
throws RuntimeException
NodeManager
init in class NodeManagerRuntimeException
UaNodeFactoryException
protected void shutdown(int secondsTillShutdown,
org.opcfoundation.ua.builtintypes.LocalizedText shutdownReason)
secondsTillShutdown - shutdownReason -
StatusException
protected void start()
throws StatusException,
UaNodeFactoryException
NodeManager
start in class NodeManagerStatusException
UaNodeFactoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||