Interface class for OPC UA Nodes created and managed with the SDK. More...

#include <uabasenodes.h>

Inheritance diagram for UaNode:
Collaboration diagram for UaNode:

List of all members.

Public Member Functions

 UaNode ()
virtual UaNodeId getKey () const
virtual UaReferenceListsgetUaReferenceLists () const
virtual UaStatus browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)=0
virtual UaNodeId typeDefinitionId () const
virtual OpcUa_NodeClass nodeClass () const =0
virtual UaNodeId nodeId () const =0
virtual UaQualifiedName browseName () const =0
virtual UaLocalizedText displayName (Session *pSession) const =0
virtual OpcUa_Boolean isDescriptionSupported () const =0
virtual UaLocalizedText description (Session *pSession) const =0
virtual OpcUa_Boolean isWriteMaskSupported () const =0
virtual OpcUa_UInt32 writeMask () const =0
virtual OpcUa_Boolean isUserWriteMaskSupported () const =0
virtual OpcUa_UInt32 userWriteMask (Session *pSession) const =0
virtual UaNodeId modellingRuleId () const
virtual UaStatus setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, OpcUa_Boolean checkWriteMask)
virtual void getAttributeValue (Session *pSession, OpcUa_Int32 attributeId, UaDataValue &uaDataValue)
virtual void setUserData (UserDataBase *pUserData)
virtual UserDataBasegetUserData () const

Protected Member Functions

virtual ~UaNode ()

Detailed Description

Interface class for OPC UA Nodes created and managed with the SDK.

The OPC UA Address Space Model defines a Base NodeClass from which all other NodeClasses are derived. The derived NodeClasses represent the various components of the OPC UA Object Model. The detailed description of the base node class and their attributes can be found in the general description of the Base Node Class.


Constructor & Destructor Documentation

UaNode::~UaNode (  ) [protected, virtual]

Destruction of the UaNode. The object is reference counted and can not be deleted directly. The methods addReference and releaseReference are used to manage the reference to this object.

UaNode::UaNode (  )

Construction of the UaNode. The object is reference counted and can not be deleted directly. The reference counter is set to one after the object is created. If the object was successfully added to a NodeManager using the methods NodeManagerConfig::addUaNode or NodeManagerConfig::addNodeAndReference the NodeManager will release this reference during shut down. If the object was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availablity of the object must be ensured by incrementing the reference counter with addReference when the pointer is stored somewhere and decremented with releaseReference if the interface pointer is not longer needed.


Member Function Documentation

virtual UaStatus UaNode::browse ( const ServiceContext serviceContext,
BrowseContext browseContext,
UaReferenceDescriptions &  References 
) [pure virtual]

Discover the references of a specified node of a view. This method is used to return a list of references and target nodes for the passed node to browse for the services Browse and BrowseNext.

Parameters:
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
browseContextBrowse context for the first browse or the following browse with continuation point.
ReferencesArray of ReferenceDescription results for the browsed node.
Returns:
Error code

Implemented in OpcUa::BaseObjectType, OpcUa::BaseMethod, OpcUa::BaseVariableType, UaDataTypeNS0, UaDataVariableCache, UaMethodGeneric, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericObject, UaGenericObjectType, UaGenericVariable, UaGenericVariableType, UaGenericDataType, UaGenericView, UaGenericMethod, UaGenericReferenceType, UaObjectTypeSimple, UaObjectBase, UaVariableTypeSimple, UaDataVariableDevice, UaViewSimple, and UaReferenceTypeNS0.

virtual UaLocalizedText UaNode::description ( Session pSession ) const [pure virtual]

Get value of the Description attribute of this Node.

Parameters:
pSessionInterface to the Session context for the method call. The session provides the locale id requested by the client
Returns:
The Description of the node as UaLocalizedText.

Implemented in OpcUa::BaseObjectType, OpcUa::BaseMethod, OpcUa::BaseVariableType, UaDataTypeNS0, UaDataVariableCache, UaMethodGeneric, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericObject, UaGenericObjectType, UaGenericVariable, UaGenericVariableType, UaGenericDataType, UaGenericView, UaGenericMethod, UaGenericReferenceType, UaObjectTypeSimple, UaObjectBase, UaVariableTypeSimple, UaDataVariableDevice, UaViewSimple, and UaReferenceTypeNS0.

virtual UaLocalizedText UaNode::displayName ( Session pSession ) const [pure virtual]

Get value of the DisplayName attribute of this Node.

Parameters:
pSessionInterface to the Session context for the method call. The session provides the locale id requested by the client
Returns:
The DisplayName of the node as UaLocalizedText.

Implemented in OpcUa::BaseObjectType, OpcUa::BaseMethod, OpcUa::BaseVariableType, UaDataTypeNS0, UaDataVariableCache, UaMethodGeneric, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericObject, UaGenericObjectType, UaGenericVariable, UaGenericVariableType, UaGenericDataType, UaGenericView, UaGenericMethod, UaGenericReferenceType, UaObjectTypeSimple, UaObjectBase, UaVariableTypeSimple, UaDataVariableDevice, UaViewSimple, and UaReferenceTypeNS0.

void UaNode::getAttributeValue ( Session pSession,
OpcUa_Int32  attributeId,
UaDataValue uaDataValue 
) [virtual]

Gets the value of an attribute of the Node.

Parameters:
[in]pSessionInterface to the Session context for the method call
[in]attributeIdAttribute id indicating the attribute to return
[out]uaDataValueThe value of the attribute or the status code for the attribute

Reimplemented in UaObject, UaObjectType, UaVariable, UaVariableType, UaDataType, UaView, UaMethod, and UaReferenceType.

UaNodeId UaNode::getKey (  ) const [virtual]

Get the key of the node used for the hash table.

Returns:
The key of the current NodeId.

Implements ChainEntry.

UserDataBase * UaNode::getUserData (  ) const [virtual]

Returns user data provided by a derived class. Returns NULL if not overwritten by a class handling the user data. Can be overwritten by classes providing handling of user data

Reimplemented in OpcUa::BaseDataVariableType.

virtual OpcUa_Boolean UaNode::isDescriptionSupported (  ) const [pure virtual]
virtual OpcUa_Boolean UaNode::isUserWriteMaskSupported (  ) const [pure virtual]
virtual OpcUa_Boolean UaNode::isWriteMaskSupported (  ) const [pure virtual]
UaNodeId UaNode::modellingRuleId (  ) const [virtual]

Get NodeId of the modelling rule for this node. Only instance declaration nodes like Objects, Variables or Methodss have modelling rulestype definition nodes. This method provides a shortcut to get the modelling rule of a node. This information is available for a client by following the HasModellingRule reference (Browse or TranslateBrowsePathToNodeIds) from this node. The HasModellingRule reference is normally not contained in the list of references for the nodes and is handled by the SDK using this method. Creating the reference as normal reference instead of using this shortcut is also possible. The default implemenation of this method returns a null NodeId which means there is no modelling rule defined. The method must be overwritten in a derived class to return a modelling rule.

Returns:
The modelling rule NodeId for the node if it is an instance declaration node with a modelling rule defined.

Reimplemented in OpcUa::BaseObjectType, OpcUa::BaseMethod, and OpcUa::BaseVariableType.

virtual OpcUa_NodeClass UaNode::nodeClass (  ) const [pure virtual]

Get value of the NodeClass attribute of this Node.
Valid values for the node class enumeration are
OpcUa_NodeClass_Object
OpcUa_NodeClass_Variable
OpcUa_NodeClass_Method
OpcUa_NodeClass_ObjectType
OpcUa_NodeClass_VariableType
OpcUa_NodeClass_ReferenceType
OpcUa_NodeClass_DataType
OpcUa_NodeClass_View

Returns:
The NodeClass of the current Node.

Implemented in UaObject, UaObjectType, UaVariable, UaVariableType, UaDataType, UaView, UaMethod, UaReferenceType, UaGenericObject, UaGenericObjectType, UaGenericVariable, UaGenericVariableType, UaGenericDataType, UaGenericView, UaGenericMethod, UaGenericReferenceType, and UaVariableTypeSimple.

UaStatus UaNode::setAttributeValue ( Session pSession,
OpcUa_Int32  attributeId,
const UaDataValue dataValue,
OpcUa_Boolean  checkWriteMask 
) [virtual]

Sets the value of an attribute of the Node.

Returns:
Status code
Parameters:
[in]pSessionInterface to the Session context for the method call
[in]attributeIdAttribute id indicating the attribute to set
[in]dataValueNew value for the attribute
[out]checkWriteMaskFlag indicating if the write mask of the node should be checked before setting the new value

Reimplemented in OpcUa::BaseObjectType, OpcUa::BaseMethod, OpcUa::BaseVariableType, UaVariable, UaGenericObject, UaGenericObjectType, UaGenericVariable, UaGenericVariableType, UaGenericDataType, UaGenericView, UaGenericMethod, and UaGenericReferenceType.

void UaNode::setUserData ( UserDataBase pUserData ) [virtual]

Defines the method to set user data handled by a derived class. Does not store the user data if not overwritten by a class handling the user data. Can be overwritten by classes providing handling of user data

Parameters:
[in]pUserDataUser data to set

Reimplemented in OpcUa::BaseDataVariableType.

virtual UaNodeId UaNode::typeDefinitionId (  ) const [inline, virtual]

Get NodeId of the type definition node for this node. Only Object and Variable nodes have type definition nodes. This method provides a shortcut to get the type definition of a node. This information is available for a client by following the HasTypeDefinition reference (Browse or TranslateBrowsePathToNodeIds) from this node or is returned as part of the browse result for the node. The HasTypeDefinition reference is not contained in the list of references for the nodes and is handled by the SDK using this method.

Returns:
The type definition NodeId of the node if the node is a Variable or Object.

Reimplemented in OpcUa::AcknowledgeableConditionTypeBase, OpcUa::AlarmConditionTypeBase, OpcUa::AnalogItemTypeBase, OpcUa::BaseDataVariableTypeBase, OpcUa::BaseObjectType, OpcUa::BaseObjectTypeGeneric, OpcUa::BaseVariableTypeGeneric, OpcUa::ConditionTypeBase, OpcUa::ConditionVariableTypeBase, OpcUa::DataItemTypeBase, OpcUa::DialogConditionTypeBase, OpcUa::DiscreteAlarmTypeBase, OpcUa::DiscreteItemTypeBase, OpcUa::ExclusiveDeviationAlarmTypeBase, OpcUa::ExclusiveLevelAlarmTypeBase, OpcUa::ExclusiveLimitAlarmTypeBase, OpcUa::ExclusiveRateOfChangeAlarmTypeBase, OpcUa::LimitAlarmTypeBase, OpcUa::MultiStateDiscreteTypeBase, OpcUa::NonExclusiveDeviationAlarmTypeBase, OpcUa::NonExclusiveLevelAlarmTypeBase, OpcUa::NonExclusiveLimitAlarmTypeBase, OpcUa::NonExclusiveRateOfChangeAlarmTypeBase, OpcUa::OffNormalAlarmTypeBase, OpcUa::PropertyTypeBase, OpcUa::StateVariableTypeBase, OpcUa::TripAlarmTypeBase, OpcUa::TwoStateDiscreteTypeBase, OpcUa::TwoStateVariableTypeBase, UaStateMachineType, UaDataVariableCache, UaAnalogItemCache, UaPropertyCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaAnalogItemCacheEx, UaPropertyCacheEx, UaFolder, UaGenericObject, UaGenericObjectType, UaGenericVariable, UaGenericVariableType, UaGenericDataType, UaGenericView, UaGenericMethod, UaGenericReferenceType, UaObjectServer, UaObjectServerCapabilities, UaModelingRule, UaObjectServerDiagnostic, UaObjectVendorServerInfo, UaVariableTypeSimple, UaDataVariableDevice, OpcUaPlc::CtrlConfigurationType, OpcUaPlc::CtrlFunctionBlockType, OpcUaPlc::CtrlProgramType, and OpcUaPlc::CtrlResourceType.

virtual OpcUa_UInt32 UaNode::userWriteMask ( Session pSession ) const [pure virtual]

The documentation for this class was generated from the following files:
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/uabasenodes.h
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/uabasenodes.cpp