com.prosysopc.ua.server.nodes
Class CallbackInstanceVariable

java.lang.Object
  extended by com.prosysopc.ua.nodes.AbstractUaNode
      extended by com.prosysopc.ua.server.nodes.ServerNode
          extended by com.prosysopc.ua.server.nodes.InstanceVariable
              extended by com.prosysopc.ua.server.nodes.CallbackInstanceVariable
All Implemented Interfaces:
UaInstance, UaNode, UaValueNode, UaVariable
Direct Known Subclasses:
CallbackInstanceProperty, ReflectiveInstanceVariable

public class CallbackInstanceVariable
extends InstanceVariable

An implementation of InstanceVariable. The variable will retrieve the current value using a callback method only.


Field Summary
protected  UaVariableCallback callback
           
 
Fields inherited from class com.prosysopc.ua.server.nodes.ServerNode
eventListeners, INITIALIZATION_TIME, nodeManager, supportedAttributesMap
 
Constructor Summary
CallbackInstanceVariable(NodeManagerUaNode nodeManager, org.opcfoundation.ua.builtintypes.NodeId nodeId, org.opcfoundation.ua.builtintypes.NodeId instanceDeclarationId)
          Create a new node, referring to an instance declaration node.
CallbackInstanceVariable(NodeManagerUaNode nodeManager, org.opcfoundation.ua.builtintypes.NodeId nodeId, UaVariable instanceDeclaration)
          Create a new node, referring to an instance declaration node.
 
Method Summary
protected  void doSetValue(org.opcfoundation.ua.builtintypes.DataValue value)
          Perform the actual value set.
 UaVariableCallback getCallback()
           
 org.opcfoundation.ua.builtintypes.DataValue getValue()
           
 void setCallback(UaVariableCallback callback)
           
 
Methods inherited from class com.prosysopc.ua.server.nodes.InstanceVariable
addReference, beforeAddReference, deleteReference, getAccessLevel, getArrayDimensions, getAttributes, getBrowseName, getComponent, getComponents, getDataType, getDataTypeId, getDescription, getDisplayName, getHistorizing, getMethod, getMinimumSamplingInterval, getNodeClass, getNodeVersion, getProperties, getProperty, getPropertyTypeNode, getReference, getReferencesAsList, getStatus, getTypeDefinition, getTypeDefinitionId, getTypeDefinitionReference, getUserAccessLevel, getUserWriteMask, getValueRank, getWriteMask, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, removeComponent, removeProperty, setAccessLevel, setArrayDimensions, setAttribute, setAttributes, setBrowseName, setDataType, setDataTypeId, setDescription, setDisplayName, setHistorizing, setMinimumSamplingInterval, setReferences, setStatus, setTypeDefinition, setTypeDefinitionId, setTypeDefinitionId, setUserAccessLevel, setUserWriteMask, setValue, setValue, setValueRank, setWriteMask, writeAttribute
 
Methods inherited from class com.prosysopc.ua.server.nodes.ServerNode
addComponent, addDataChangeListener, addEventListener, addNewReference, addNewReference, addOrganizes, addProperties, addProperty, addReference, addReference, addReference, addReference, addReference, afterAddReference, afterDeleteReference, dataChange, deleteReference, deleteReference, deleteReference, deleteReferences, doAddProperty, doDeleteReference, equals, findPlaceholders, fireDataChange, fireEvent, fireEventInParents, getAddressSpace, getDefaultBrowseName, getNodeId, getNodeManager, getReferenceList, getReferences, getSupportedAttributes, getTargetNodes, hashCode, hasReference, initSupportedAttributes, isAddNotifierReferencesToServerObject, isFalseOrNull, isMandatory, isMonitoredForEvents, isTrueOrNull, isType, referenceTypeInherits, removeDataChangeListener, removeEventListener, setAddNotifierReferencesToServerObject, supportsAttribute, toString, translateBrowsePathToNodeIds, validateHasEventSourceChain, validateHasEventSourceChain, writeAttributeValue
 
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.nodes.UaVariable
addDataChangeListener, removeDataChangeListener
 
Methods inherited from interface com.prosysopc.ua.nodes.UaNode
addComponent, addProperty, addReference, addReference, deleteReference, deleteReference, deleteReference, getAddressSpace, getForwardReferences, getInverseReferences, getNodeId, getReferences, getReferences, getSupportedAttributes, supportsAttribute
 

Field Detail

callback

protected UaVariableCallback callback
Constructor Detail

CallbackInstanceVariable

public CallbackInstanceVariable(NodeManagerUaNode nodeManager,
                                org.opcfoundation.ua.builtintypes.NodeId nodeId,
                                org.opcfoundation.ua.builtintypes.NodeId instanceDeclarationId)
                         throws StatusException
Create a new node, referring to an instance declaration node.

Parameters:
nodeManager - The node manager to which the node is created.
nodeId - The ID of the new node.
instanceDeclarationId - The ID of the instance declaration node, which this node is referring to. I.e. the same variable or property as this one, but under the type, instead of the instance.
Throws:
StatusException - if instanceDeclarationId cannot be converted to a variable node

CallbackInstanceVariable

public CallbackInstanceVariable(NodeManagerUaNode nodeManager,
                                org.opcfoundation.ua.builtintypes.NodeId nodeId,
                                UaVariable instanceDeclaration)
Create a new node, referring to an instance declaration node.

Parameters:
nodeManager - The node manager to which the node is created.
nodeId - The ID of the new node.
instanceDeclaration - The instance declaration node, which this node is referring to. I.e. the same variable or property as this one, but under the type, instead of the instance.
Method Detail

getCallback

public UaVariableCallback getCallback()
Returns:
the callback

getValue

public org.opcfoundation.ua.builtintypes.DataValue getValue()
Returns:
The default Value for instances of this type.

setCallback

public void setCallback(UaVariableCallback callback)

doSetValue

protected void doSetValue(org.opcfoundation.ua.builtintypes.DataValue value)
                   throws StatusException
Description copied from class: InstanceVariable
Perform the actual value set.

Specified by:
doSetValue in class InstanceVariable
Throws:
StatusException


Copyright © 2018. All rights reserved.