Class implementing the UaMethod interface for the Method handling.
More...
#include <opcua_baseobjecttype.h>
List of all members.
Public Member Functions |
| BaseMethod (UaNode *pParentNode, UaMethod *pInstanceDeclarationMethod, UaMutexRefCounted *pSharedMutex=NULL) |
| BaseMethod (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, UaMutexRefCounted *pSharedMutex=NULL) |
UaReferenceLists * | getUaReferenceLists () const |
virtual UaStatus | browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References) |
UaNodeId | nodeId () const |
virtual UaQualifiedName | browseName () const |
virtual UaLocalizedText | displayName (Session *pSession) const |
| < [in] Session context for the call.
|
virtual OpcUa_Boolean | isDescriptionSupported () const |
virtual UaLocalizedText | description (Session *pSession) const |
| < [in] Session context for the call.
|
virtual OpcUa_Boolean | isWriteMaskSupported () const |
virtual OpcUa_UInt32 | writeMask () const |
virtual OpcUa_Boolean | isUserWriteMaskSupported () const |
virtual OpcUa_UInt32 | userWriteMask (Session *pSession) const |
| < [in] Session context for the call.
|
UaNode * | getUaNode () const |
virtual OpcUa_Boolean | executable () const |
virtual OpcUa_Boolean | userExecutable () const |
virtual void | setBrowseName (const UaQualifiedName &browseName) |
virtual void | setDisplayName (const UaLocalizedText &displayName) |
virtual void | setDescription (const UaLocalizedText &description) |
virtual void | setWriteMask (OpcUa_UInt32 writeMask) |
virtual void | setExecutable (OpcUa_Boolean executable) |
virtual void | setModellingRuleId (const UaNodeId &modellingRuleId) |
virtual UaNodeId | modellingRuleId () const |
virtual UaStatus | setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, OpcUa_Boolean checkWriteMask) |
Protected Member Functions |
virtual | ~BaseMethod () |
Detailed Description
Class implementing the UaMethod interface for the Method handling.
OPC UA Methods are used to represent methods that can be called on objects.
Constructor & Destructor Documentation
OpcUa::BaseMethod::~BaseMethod |
( |
) |
[protected, virtual] |
Destruction of the BaseMethod. The Method is reference counted and can not be deleted directly. The methods addReference and releaseReference are used to manage the reference to this Method.
Construction of the class BaseMethod.
This constructor is used if the Method is created based on an instance declaration of an Method type. Since the only difference between the instance declaration Method and the instance Method are the NodeId, the pointer to the instance declaration node is used to get the attribute values other than NodeId from the instance declaration node.
The Method is reference counted and can not be deleted directly. The reference counter is set to one after the Method is created. If the Method 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 Method 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 Method 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] | pParentNode | Parent node of the new method |
[in] | pInstanceDeclarationMethod | UaMethod interface of the instance declaration node used to provide attribute values other than NodeId |
[in] | pSharedMutex | Shared mutex Method used to synchronize access to the Method. Can be NULL if no shared mutex is provided |
Construction of the class BaseMethod.
This constructor is used if the Method is not created based on an instance declaration. It defines the name and node id of the Method. Additional language specific names and other attribute values can be set with set methods provided by the class. The Method is reference counted and can not be deleted directly. The reference counter is set to one after the Method is created. If the Method 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 Method 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 Method 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] | nodeId | NodeId of the new Method |
[in] | name | Name of the new Method. Used as browse name and also as display name if no additional language specific names are set. |
[in] | browseNameNameSpaceIndex | Namespace index used for the browse name |
[in] | pSharedMutex | Shared mutex Method used to synchronize access to the Method. Can be NULL if no shared mutex is provided |
Member Function Documentation
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:
-
serviceContext | General context for the service calls containing information like the session Method, return diagnostic mask and timeout hint. |
browseContext | Browse context for the first browse or the following browse with continuation point. |
References | Array of ReferenceDescription results for the browsed node. |
- Returns:
- Error code
Implements UaNode.
Get the browseName of the current Node.
- Returns:
- the browseName of the current Node.
Implements UaNode.
< [in] Session context for the call.
Get the description as LocalizedText of the current Node.
- Returns:
- the LocalizedText of the current Node.
Implements UaNode.
< [in] Session context for the call.
Get the displayName as LocalizedText of the current Node.
- Returns:
- the LocalizedText of the current Node.
Implements UaNode.
OpcUa_Boolean OpcUa::BaseMethod::executable |
( |
) |
const [virtual] |
Indicates if Method is executable.
- Returns:
- TRUE if executable FALSE if not.
Implements UaMethod.
UaNode* OpcUa::BaseMethod::getUaNode |
( |
) |
const [inline, virtual] |
UaReferenceLists* OpcUa::BaseMethod::getUaReferenceLists |
( |
) |
const [inline, virtual] |
OpcUa_Boolean OpcUa::BaseMethod::isDescriptionSupported |
( |
) |
const [virtual] |
Check if Node is DescriptionSupported.
- Returns:
- FALSE if not supported.
Implements UaNode.
OpcUa_Boolean OpcUa::BaseMethod::isUserWriteMaskSupported |
( |
) |
const [virtual] |
Check if Node is UserWriteMaskSupported.
- Returns:
- TRUE if Node is UserWriteMaskSupported.
Implements UaNode.
OpcUa_Boolean OpcUa::BaseMethod::isWriteMaskSupported |
( |
) |
const [virtual] |
Check if Node is WriteMaskSupported.
- Returns:
- TRUE if Node is WriteMaskSupported.
Implements UaNode.
UaNodeId OpcUa::BaseMethod::modellingRuleId |
( |
) |
const [virtual] |
Get NodeId of the modelling rule for this node. Only instance declaration nodes like Methods, 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 from UaNode.
UaNodeId OpcUa::BaseMethod::nodeId |
( |
) |
const [virtual] |
Get the NodeId of the current Node.
- Returns:
- the NodeId of the current Node.
Implements UaNode.
UaStatus OpcUa::BaseMethod::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] | pSession | Interface to the Session context for the method call |
[in] | attributeId | Attribute id indicating the attribute to set |
[in] | dataValue | New value for the attribute |
[out] | checkWriteMask | Flag indicating if the write mask of the node should be checked before setting the new value |
Reimplemented from UaNode.
void OpcUa::BaseMethod::setBrowseName |
( |
const UaQualifiedName & |
browseName ) |
[virtual] |
Sets the browse name attribute value.
- Parameters:
-
browseName | the browse name of the current Node |
void OpcUa::BaseMethod::setDescription |
( |
const UaLocalizedText & |
description ) |
[virtual] |
Sets the description attribute value.
- Parameters:
-
description | the description of the server. |
void OpcUa::BaseMethod::setDisplayName |
( |
const UaLocalizedText & |
displayName ) |
[virtual] |
Sets the display name attribute value.
- Parameters:
-
displayName | the display name of a node. |
void OpcUa::BaseMethod::setExecutable |
( |
OpcUa_Boolean |
executable ) |
[virtual] |
Sets the executable attribute value.
- Parameters:
-
executable | True if executable False if not |
void OpcUa::BaseMethod::setModellingRuleId |
( |
const UaNodeId & |
modellingRuleId ) |
[virtual] |
Set NodeId of the modelling rule for this node.
void OpcUa::BaseMethod::setWriteMask |
( |
OpcUa_UInt32 |
writeMask ) |
[virtual] |
Sets the write mask attribute value.
- Parameters:
-
writeMask | the write mask of the node. |
OpcUa_Boolean OpcUa::BaseMethod::userExecutable |
( |
) |
const [virtual] |
Indicates if method is executable by the user.
- Returns:
- TRUE if Userexecutable FALSE if not.
Implements UaMethod.
OpcUa_UInt32 OpcUa::BaseMethod::userWriteMask |
( |
Session * |
pSession ) |
const [virtual] |
< [in] Session context for the call.
Check if Node has a userWriteMask.
- Returns:
- the userWriteMask.
Implements UaNode.
OpcUa_UInt32 OpcUa::BaseMethod::writeMask |
( |
) |
const [virtual] |
Get the writeMask of the current Node.
- Returns:
- the writeMask.
Implements UaNode.
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