OpcUaPlc::CtrlResourceType Class Reference

Class implementing the UaObject interface for the CtrlResourceType. More...

#include <opcuaplc_ctrlresourcetype.h>

Inherits OpcUaPlc::CtrlResourceTypeBase.

Collaboration diagram for OpcUaPlc::CtrlResourceType:

List of all members.

Public Member Functions

 CtrlResourceType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 CtrlResourceType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
virtual UaNodeId typeDefinitionId () const
void setTypeDefinition (const UaNodeId &typeDefinition)
UaStatus addProgramInstance (UaReferenceLists *pProgramOject, NodeManagerConfig *pNodeConfig=NULL)
UaStatus addProgramType (UaReferenceLists *pProgramOjectType)
UaStatus addGlobalVar (UaReferenceLists *pGlobalVarNode, NodeManagerConfig *pNodeConfig=NULL)

Protected Member Functions

virtual ~CtrlResourceType ()

Detailed Description

Class implementing the UaObject interface for the CtrlResourceType.

OPC UA Objects are used to represent systems, system components, real-world objects and software objects. They have the NodeClass Object. The detailed description of Objects and their attributes can be found in the general description of the Object node class.


Constructor & Destructor Documentation

OpcUaPlc::CtrlResourceType::~CtrlResourceType (  ) [protected, virtual]

Destruction

OpcUaPlc::CtrlResourceType::CtrlResourceType ( const UaNodeId nodeId,
UaObject pInstanceDeclarationObject,
NodeManagerConfig pNodeConfig,
UaMutexRefCounted pSharedMutex = NULL 
)

Construction of the class CtrlResourceType. 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
[in]pSharedMutexShared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided
OpcUaPlc::CtrlResourceType::CtrlResourceType ( const UaNodeId nodeId,
const UaString name,
OpcUa_UInt16  browseNameNameSpaceIndex,
NodeManagerConfig pNodeConfig,
UaMutexRefCounted pSharedMutex = NULL 
)

Construction of the class CtrlResourceType. 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
[in]pSharedMutexShared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided

Member Function Documentation

UaStatus OpcUaPlc::CtrlResourceType::addGlobalVar ( UaReferenceLists pGlobalVarNode,
NodeManagerConfig pNodeConfig = NULL 
)

Adds the passed GlobalVar node as component to the ParameterSet and to GlobalVars functional group. Adds the node to the node management, creates a HasComponent reference from the ParameterSet and an Organizes reference from the GlobalVars functional group.

Parameters:
[in]pGlobalVarNodeGlobel variable node to add
[in]pNodeConfigOptional NodeConfig interface pointer representing the NodeManager responsible for the new node. By default the NodeManager of the resource node is used.
UaStatus OpcUaPlc::CtrlResourceType::addProgramInstance ( UaReferenceLists pProgramOject,
NodeManagerConfig pNodeConfig = NULL 
)

Adds the passed program object as component to the Programs configurable object. Adds the node to the node management and creates a HasComponent reference

Parameters:
[in]pProgramOjectProgram object node
[in]pNodeConfigOptional NodeConfig interface pointer representing the NodeManager responsible for the new node. By default the NodeManager of the resource node is used.
UaStatus OpcUaPlc::CtrlResourceType::addProgramType ( UaReferenceLists pProgramOjectType )

Adds the passed program object type to the SupportedTypes folder of the Programs configurable object

Parameters:
[in]pProgramOjectTypeProgram object type node
void OpcUaPlc::CtrlResourceType::setTypeDefinition ( const UaNodeId typeDefinition )

Sets the type definition NodeId of the Object.

UaNodeId OpcUaPlc::CtrlResourceType::typeDefinitionId (  ) const [virtual]

Overwrites the typeDefintionId method of the base class returning the type definition NodeId of the Object.

Reimplemented from OpcUa::BaseObjectType.


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