com.prosysopc.ua.client.nodes
Class UaMethodImpl

java.lang.Object
  extended by com.prosysopc.ua.nodes.AbstractUaNode
      extended by com.prosysopc.ua.client.nodes.UaNodeImpl
          extended by com.prosysopc.ua.client.nodes.UaMethodImpl
All Implemented Interfaces:
UaMethod, UaNode

public class UaMethodImpl
extends UaNodeImpl
implements UaMethod

Straight forward implementation of UaMethod.

It keeps all attributes in memory. Additionally, it manages the


Field Summary
 
Fields inherited from class com.prosysopc.ua.client.nodes.UaNodeImpl
addressSpace, logger, references, supportedAttributesMap
 
Constructor Summary
UaMethodImpl(AddressSpace addressSpace, org.opcfoundation.ua.builtintypes.NodeId nodeId, org.opcfoundation.ua.builtintypes.QualifiedName browseName, org.opcfoundation.ua.builtintypes.LocalizedText displayName)
           
UaMethodImpl(AddressSpace addressSpace, org.opcfoundation.ua.builtintypes.NodeId nodeId, org.opcfoundation.ua.builtintypes.QualifiedName browseName, org.opcfoundation.ua.builtintypes.LocalizedText displayName, org.opcfoundation.ua.builtintypes.LocalizedText description, EnumSet<WriteAccess> writeMask, EnumSet<WriteAccess> userWriteMask, UaClientReference[] references, UaProperty[] properties, Boolean executable, Boolean userExecutable)
           
UaMethodImpl(AddressSpace addressSpace, org.opcfoundation.ua.builtintypes.NodeId nodeId, String name, Locale locale)
           
 
Method Summary
 org.opcfoundation.ua.core.NodeAttributes getAttributes()
           
protected  org.opcfoundation.ua.core.NodeAttributes getAttributes(org.opcfoundation.ua.core.MethodAttributes attributes)
           
 Boolean getExecutable()
          The Executable Attribute indicates if the Method is currently executable ('False' means not executable, 'True' means executable).
 org.opcfoundation.ua.core.Argument[] getInputArguments()
          The InputArguments Property is used to specify the arguments that shall be used by a client when calling the Method.
 org.opcfoundation.ua.core.NodeClass getNodeClass()
          The NodeClass Attribute identifies the NodeClass of a Node.
 org.opcfoundation.ua.core.Argument[] getOutputArguments()
          The OutputArguments Property specifies the result returned from the Method call.
 Boolean getUserExecutable()
          The UserExecutable Attribute indicates if the Method is currently executable taking user access rights into account ('False' means not executable, 'True' means executable).
protected  void initSupportedAttributes(List<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
           
protected  void readAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId, org.opcfoundation.ua.builtintypes.DataValue dataValue)
          Read the value of an attribute.
 void setAttributes(org.opcfoundation.ua.core.MethodAttributes methodAttributes)
           
 void setExecutable(Boolean executable)
           
 void setUserExecutable(Boolean userExecutable)
           
 String toString()
           
protected  void writeAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId, Object value, org.opcfoundation.ua.builtintypes.StatusCode statusCode, org.opcfoundation.ua.builtintypes.DateTime sourceTime, org.opcfoundation.ua.builtintypes.UnsignedShort sourcePicoseconds)
           
 
Methods inherited from class com.prosysopc.ua.client.nodes.UaNodeImpl
addComponent, addProperties, addProperty, addReference, addReference, addReference, addReference, afterAddReference, afterDeleteReference, assertTypeSupport, assertTypeSupport, beforeAddReference, deleteReference, deleteReference, deleteReference, deleteReference, deleteReferences, doAddProperty, equals, findPlaceholders, getAddressSpace, getAttributes, getBrowseName, getComponent, getComponents, getDescription, getDescription, getDisplayName, getDisplayName, getMethod, getNodeId, getNodeVersion, getNodeVersionString, getProperties, getProperty, getPropertyValue, getReference, getReferenceList, getReferences, getSupportedAttributes, getUserWriteMask, getWriteMask, hashCode, hasProperty, hasTypeDefinition, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, referenceTypeInherits, removeComponent, removeProperty, setAttribute, setAttributes, setBrowseName, setDescription, setDisplayName, setNodeVersion, setPropertyValue, setReferences, setUserWriteMask, setWriteMask, supportsAttribute, writeAttribute
 
Methods inherited from class com.prosysopc.ua.nodes.AbstractUaNode
getForwardReferences, getInverseReferences, getReferences, getReferences, getReferencesAsList, referenceTypeInherits
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.prosysopc.ua.nodes.UaNode
addComponent, addProperty, addReference, addReference, addReference, deleteReference, deleteReference, deleteReference, deleteReference, getAddressSpace, getBrowseName, getComponent, getComponents, getDescription, getDisplayName, getForwardReferences, getInverseReferences, getMethod, getNodeId, getNodeVersion, getProperties, getProperty, getReference, getReferences, getReferences, getSupportedAttributes, getUserWriteMask, getWriteMask, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, removeComponent, removeProperty, setAttribute, setAttributes, setBrowseName, setDescription, setDisplayName, setReferences, setUserWriteMask, setWriteMask, supportsAttribute, writeAttribute
 

Constructor Detail

UaMethodImpl

public UaMethodImpl(AddressSpace addressSpace,
                    org.opcfoundation.ua.builtintypes.NodeId nodeId,
                    org.opcfoundation.ua.builtintypes.QualifiedName browseName,
                    org.opcfoundation.ua.builtintypes.LocalizedText displayName)

UaMethodImpl

public UaMethodImpl(AddressSpace addressSpace,
                    org.opcfoundation.ua.builtintypes.NodeId nodeId,
                    org.opcfoundation.ua.builtintypes.QualifiedName browseName,
                    org.opcfoundation.ua.builtintypes.LocalizedText displayName,
                    org.opcfoundation.ua.builtintypes.LocalizedText description,
                    EnumSet<WriteAccess> writeMask,
                    EnumSet<WriteAccess> userWriteMask,
                    UaClientReference[] references,
                    UaProperty[] properties,
                    Boolean executable,
                    Boolean userExecutable)

UaMethodImpl

public UaMethodImpl(AddressSpace addressSpace,
                    org.opcfoundation.ua.builtintypes.NodeId nodeId,
                    String name,
                    Locale locale)
Parameters:
nodeId -
name -
locale -
Method Detail

getAttributes

public org.opcfoundation.ua.core.NodeAttributes getAttributes()
Specified by:
getAttributes in interface UaNode
Returns:
the current attribute values of the node in a NodeAttributes structure.

getExecutable

public Boolean getExecutable()
Description copied from interface: UaMethod
The Executable Attribute indicates if the Method is currently executable ('False' means not executable, 'True' means executable). The Executable Attribute does not take any user access rights into account, i.e. although the Method is executable this may be restricted to a certain user / user group.

Specified by:
getExecutable in interface UaMethod
Returns:
the current value of executable.

getInputArguments

public org.opcfoundation.ua.core.Argument[] getInputArguments()
                                                       throws MethodArgumentException
Description copied from interface: UaMethod
The InputArguments Property is used to specify the arguments that shall be used by a client when calling the Method.

Specified by:
getInputArguments in interface UaMethod
Returns:
the InputArguments of the method. Should provide an empty list, if no arguments are defined.
Throws:
MethodArgumentException - if the property does not contain valid argument values

getNodeClass

public final org.opcfoundation.ua.core.NodeClass getNodeClass()
Description copied from interface: UaNode
The NodeClass Attribute identifies the NodeClass of a Node.

Specified by:
getNodeClass in interface UaNode
Overrides:
getNodeClass in class UaNodeImpl
Returns:
the Node Class of the node. This is hard-coded and cannot be changed.

getOutputArguments

public org.opcfoundation.ua.core.Argument[] getOutputArguments()
                                                        throws MethodArgumentException
Description copied from interface: UaMethod
The OutputArguments Property specifies the result returned from the Method call.

Specified by:
getOutputArguments in interface UaMethod
Returns:
the OutputArguments of the method. Should provide an empty list, if no arguments are defined.
Throws:
MethodArgumentException - if the property does not contain valid argument values

getUserExecutable

public Boolean getUserExecutable()
Description copied from interface: UaMethod
The UserExecutable Attribute indicates if the Method is currently executable taking user access rights into account ('False' means not executable, 'True' means executable).

Specified by:
getUserExecutable in interface UaMethod
Returns:
the current value of user executable.

setAttributes

public void setAttributes(org.opcfoundation.ua.core.MethodAttributes methodAttributes)

setExecutable

public void setExecutable(Boolean executable)
Specified by:
setExecutable in interface UaMethod
Parameters:
executable - value to set for executable
See Also:
UaMethod.getExecutable()

setUserExecutable

public void setUserExecutable(Boolean userExecutable)
Specified by:
setUserExecutable in interface UaMethod
Parameters:
userExecutable - value to set for user executable
See Also:
UaMethod.getUserExecutable()

toString

public String toString()
Overrides:
toString in class UaNodeImpl

getAttributes

protected org.opcfoundation.ua.core.NodeAttributes getAttributes(org.opcfoundation.ua.core.MethodAttributes attributes)

initSupportedAttributes

protected void initSupportedAttributes(List<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
Overrides:
initSupportedAttributes in class UaNodeImpl

readAttributeValue

protected void readAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
                                  org.opcfoundation.ua.builtintypes.DataValue dataValue)
                           throws StatusException
Description copied from class: UaNodeImpl
Read the value of an attribute.

Overrides:
readAttributeValue in class UaNodeImpl
Parameters:
attributeId - the ID of the attribute to read.
dataValue - the DataValue structure in which the value is set.
Throws:
StatusException

writeAttributeValue

protected void writeAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
                                   Object value,
                                   org.opcfoundation.ua.builtintypes.StatusCode statusCode,
                                   org.opcfoundation.ua.builtintypes.DateTime sourceTime,
                                   org.opcfoundation.ua.builtintypes.UnsignedShort sourcePicoseconds)
                            throws StatusException
Overrides:
writeAttributeValue in class UaNodeImpl
Throws:
StatusException


Copyright © 2018. All rights reserved.