|
||||||||||
| 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.client.nodes.UaNodeImpl
com.prosysopc.ua.client.nodes.UaInstanceImpl
com.prosysopc.ua.client.nodes.UaObjectImpl
public class UaObjectImpl
Straight forward implementation of UaObject.
It keeps all attributes in memory.
| Field Summary |
|---|
| Fields inherited from class com.prosysopc.ua.client.nodes.UaNodeImpl |
|---|
addressSpace, references, supportedAttributesMap |
| Constructor Summary | |
|---|---|
UaObjectImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.core.NodeClass nodeClass,
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,
EnumSet<EventNotifierClass> eventNotifier)
|
|
UaObjectImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
Create a new object node |
|
UaObjectImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale)
Create a new object node with name. |
|
| Method Summary | ||
|---|---|---|
UaReference |
addComponent(UaNode node)
Adds a new component to the Object. |
|
protected
|
call(org.opcfoundation.ua.builtintypes.NodeId methodId,
MethodArgumentTransformer<T> outputTransformer,
Object... inputArgs)
Helper method for generated code. |
|
org.opcfoundation.ua.builtintypes.Variant[] |
call(org.opcfoundation.ua.builtintypes.NodeId methodId,
Object... args)
Call a method for this object in the server. |
|
org.opcfoundation.ua.builtintypes.Variant[] |
call(org.opcfoundation.ua.builtintypes.NodeId methodId,
org.opcfoundation.ua.builtintypes.Variant[] variantArgs)
Call a method for this object in the server. |
|
protected
|
callAsync(org.opcfoundation.ua.builtintypes.NodeId methodId,
MethodArgumentTransformer<T> outputTransformer,
Object... inputArgs)
Helper method for generated code. |
|
org.opcfoundation.ua.transport.AsyncResult<Object[]> |
callAsync(org.opcfoundation.ua.builtintypes.NodeId nodeId,
Object... inputArgs)
Call a method on the object asynchronously. |
|
org.opcfoundation.ua.transport.AsyncResult<Object[]> |
callAsync(org.opcfoundation.ua.builtintypes.NodeId methodId,
org.opcfoundation.ua.builtintypes.Variant[] variantArgs)
Call a method for this object in the server. |
|
Object[] |
callMethod(org.opcfoundation.ua.builtintypes.NodeId methodId,
Object... inputArgs)
Call a method on the object. |
|
org.opcfoundation.ua.core.NodeAttributes |
getAttributes()
|
|
protected org.opcfoundation.ua.core.NodeAttributes |
getAttributes(org.opcfoundation.ua.core.ObjectAttributes attributes)
|
|
EnumSet<EventNotifierClass> |
getEventNotifier()
Defines whether the node can be used to subscribe to events. |
|
UaProperty |
getIcon()
The Icon Property provides an image that can be used by clients when displaying the Node. |
|
org.opcfoundation.ua.core.NodeClass |
getNodeClass()
The NodeClass Attribute identifies the NodeClass of a Node. |
|
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.ObjectAttributes objectAttributes)
|
|
void |
setEventNotifier(EnumSet<EventNotifierClass> eventNotifier)
Define which kind of events the object generates. |
|
void |
setIcon(UaProperty icon)
Set the value of the Icon property. |
|
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.UaInstanceImpl |
|---|
getTypeDefinition, getTypeDefinitionId, setTypeDefinition, setTypeDefinitionId, setTypeDefinitionId |
| 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.UaInstance |
|---|
getTypeDefinition, getTypeDefinitionId, setTypeDefinition, setTypeDefinitionId, setTypeDefinitionId |
| Constructor Detail |
|---|
public UaObjectImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.core.NodeClass nodeClass,
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,
EnumSet<EventNotifierClass> eventNotifier)
public UaObjectImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
nodeId - The node identifierbrowseName - The BrowseName of the nodedisplayName - The DisplayName of the node
public UaObjectImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale)
nodeId - The node identifiername - The browse and display name of the object. The NamespaceIndex of the nodeId is also
used for the BrowseName.locale - The locale of the name, used for the DisplayName| Method Detail |
|---|
public UaReference addComponent(UaNode node)
throws IllegalArgumentException
addComponent in interface UaNodeaddComponent in class UaNodeImplnode - the component node
IllegalArgumentException - if the node is not of the correct class (see above)UaNode.addReference(UaNode, NodeId, boolean)
public org.opcfoundation.ua.builtintypes.Variant[] call(org.opcfoundation.ua.builtintypes.NodeId methodId,
Object... args)
throws MethodCallStatusException,
ServiceException
This is a shortcut to UaClient.call(NodeId, NodeId, Variant...).
methodId - the method to callargs - values for the method input arguments: they will be converted to variants before
making the call.
ServiceException - if the call fails due to connection problems, etc.
MethodCallStatusException - if the call fails due to invalid arguments or something like
that.
public org.opcfoundation.ua.builtintypes.Variant[] call(org.opcfoundation.ua.builtintypes.NodeId methodId,
org.opcfoundation.ua.builtintypes.Variant[] variantArgs)
throws ServiceException,
MethodCallStatusException
This is a shortcut to UaClient.call(NodeId, NodeId, Variant...).
methodId - the method to callvariantArgs - values for the method input arguments
ServiceException - if the call fails due to connection problems, etc.
MethodCallStatusException - if the call fails due to invalid arguments or something like
that.
public org.opcfoundation.ua.transport.AsyncResult<Object[]> callAsync(org.opcfoundation.ua.builtintypes.NodeId nodeId,
Object... inputArgs)
methodId - id of the methodinputArgs - input arguments for the method call
public org.opcfoundation.ua.transport.AsyncResult<Object[]> callAsync(org.opcfoundation.ua.builtintypes.NodeId methodId,
org.opcfoundation.ua.builtintypes.Variant[] variantArgs)
This is a shortcut to UaClient.call(NodeId, NodeId, Variant...).
methodId - the method to callvariantArgs - values for the method input arguments
public Object[] callMethod(org.opcfoundation.ua.builtintypes.NodeId methodId,
Object... inputArgs)
throws MethodCallStatusException,
ServiceException
callMethod in interface UaObjectmethodId - id of the methodinputArgs - input arguments for the method call
ServiceException - if the call fails due to connection problems, etc.
MethodCallStatusException - if the call fails due to invalid arguments or something like
that.public org.opcfoundation.ua.core.NodeAttributes getAttributes()
getAttributes in interface UaNodepublic EnumSet<EventNotifierClass> getEventNotifier()
UaObject| Value | Description |
|---|---|
| SubscribeToEvents | Indicates if it can be used to subscribe to Events (0 means cannot be used to subscribe to Events, 1 means can be used to subscribe to Events). |
| HistoryRead | Indicates if the history of the Events is readable (0 means not readable, 1 means readable). |
| HistoryWrite | Indicates if the history of the Events is writable (0 means not writable, 1 means writable). |
getEventNotifier in interface UaObjectpublic UaProperty getIcon()
UaObject
getIcon in interface UaObjectpublic final org.opcfoundation.ua.core.NodeClass getNodeClass()
UaNode
getNodeClass in interface UaNodegetNodeClass in class UaNodeImplpublic void setAttributes(org.opcfoundation.ua.core.ObjectAttributes objectAttributes)
public void setEventNotifier(EnumSet<EventNotifierClass> eventNotifier)
UaObject
setEventNotifier in interface UaObjecteventNotifier - the set of event types that the object generates
public void setIcon(UaProperty icon)
throws StatusException
UaObject
setIcon in interface UaObjecticon - the Icon to set
StatusExceptionUaObject.getIcon()public String toString()
toString in class UaInstanceImpl
protected <T> T call(org.opcfoundation.ua.builtintypes.NodeId methodId,
MethodArgumentTransformer<T> outputTransformer,
Object... inputArgs)
throws MethodCallStatusException,
ServiceException
MethodCallStatusException
ServiceException
protected <T> org.opcfoundation.ua.transport.AsyncResult<T> callAsync(org.opcfoundation.ua.builtintypes.NodeId methodId,
MethodArgumentTransformer<T> outputTransformer,
Object... inputArgs)
protected org.opcfoundation.ua.core.NodeAttributes getAttributes(org.opcfoundation.ua.core.ObjectAttributes attributes)
protected void initSupportedAttributes(List<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
initSupportedAttributes in class UaNodeImpl
protected void readAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
throws StatusException
UaNodeImpl
readAttributeValue in class UaNodeImplattributeId - the ID of the attribute to read.dataValue - the DataValue structure in which the value is set.
StatusException
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
writeAttributeValue in class UaNodeImplStatusException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||