OpcUa::BaseObjectTypeGeneric Class Reference

#include <opcua_baseobjecttype.h>

Inheritance diagram for OpcUa::BaseObjectTypeGeneric:
Collaboration diagram for OpcUa::BaseObjectTypeGeneric:

List of all members.

Public Member Functions

 BaseObjectTypeGeneric (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig)
 BaseObjectTypeGeneric (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig)
virtual ~BaseObjectTypeGeneric ()
virtual UaNodeId typeDefinitionId () const
virtual void setTypeDefinitionId (const UaNodeId &typeDefinitionId)

Detailed Description

Base class for representing UA Object of any type definition. The type definition NodeId can be set on instances of this class to represent an OPC UA object of any type.


Constructor & Destructor Documentation

OpcUa::BaseObjectTypeGeneric::BaseObjectTypeGeneric ( const UaNodeId nodeId,
UaObject pInstanceDeclarationObject,
NodeManagerConfig pNodeConfig 
)

Construction of the class BaseObjectTypeGeneric. This constructor is used if the object is created based on an instance declaration of an object type. Since the only difference between the instance declaration object and the instance object are the node id, the pointer to the instance declaration node is used to get the attribute values other than NodeId from the instance declaration node.
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.

Parameters:
[in]nodeIdNodeId of the new object
[in]pInstanceDeclarationObjectUaObject interface of the instance declaration node used to provide attribute values other than NodeId
[in]pNodeConfigInterface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space
OpcUa::BaseObjectTypeGeneric::BaseObjectTypeGeneric ( const UaNodeId nodeId,
const UaString name,
OpcUa_UInt16  browseNameNameSpaceIndex,
NodeManagerConfig pNodeConfig 
)

Construction of the class BaseObjectTypeGeneric. This constructor is used if the object is not created based on an instance declaration. It defines the name and node id of the object. Additional language specific names and other attribute values can be set with set methods provided by the class. 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.

Parameters:
[in]nodeIdNodeId of the new object
[in]nameName of the new object. Used as browse name and also as display name if no additional language specific names are set.
[in]browseNameNameSpaceIndexNamespace index used for the browse name
[in]pNodeConfigInterface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space
OpcUa::BaseObjectTypeGeneric::~BaseObjectTypeGeneric (  ) [virtual]

Destroys the BaseObjectTypeGeneric instance


Member Function Documentation

void OpcUa::BaseObjectTypeGeneric::setTypeDefinitionId ( const UaNodeId typeDefinitionId ) [virtual]

Sets the type definition NodeId on the instances of this class to represent an OPC UA object of any type.

Parameters:
typeDefinitionIdType definition nodeId to use for this object type
UaNodeId OpcUa::BaseObjectTypeGeneric::typeDefinitionId (  ) const [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 from OpcUa::BaseObjectType.


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