Interface class for OPC UA Nodes created and managed with the SDK. More...
#include <uabasenodes.h>
Public Member Functions | |
UaNode () | |
virtual UaNodeId | getKey () const |
virtual UaReferenceLists * | getUaReferenceLists () 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 UserDataBase * | getUserData () const |
Protected Member Functions | |
virtual | ~UaNode () |
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.
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.
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.
serviceContext | General context for the service calls containing information like the session object, 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. |
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 UaQualifiedName UaNode::browseName | ( | ) | const [pure virtual] |
Get value of the BrowseName attribute of this Node.
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.
pSession | Interface to the Session context for the method call. The session provides the locale id requested by the client |
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.
pSession | Interface to the Session context for the method call. The session provides the locale id requested by the client |
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.
[in] | pSession | Interface to the Session context for the method call |
[in] | attributeId | Attribute id indicating the attribute to return |
[out] | uaDataValue | The 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.
Implements ChainEntry.
virtual UaReferenceLists* UaNode::getUaReferenceLists | ( | ) | const [inline, virtual] |
Get the UaReferenceLists interface for the node. The UaReferenceLists interface is used to manage and to access the references from and to this node.
Reimplemented 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.
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] |
Flag indicating if the optional attribute Description is supported.
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 OpcUa_Boolean UaNode::isUserWriteMaskSupported | ( | ) | const [pure virtual] |
Flag indicating if the optional attribute UserWriteMask is supported.
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 OpcUa_Boolean UaNode::isWriteMaskSupported | ( | ) | const [pure virtual] |
Flag indicating if the optional attribute WriteMask is supported.
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.
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.
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
Implemented in UaObject, UaObjectType, UaVariable, UaVariableType, UaDataType, UaView, UaMethod, UaReferenceType, UaGenericObject, UaGenericObjectType, UaGenericVariable, UaGenericVariableType, UaGenericDataType, UaGenericView, UaGenericMethod, UaGenericReferenceType, and UaVariableTypeSimple.
virtual UaNodeId UaNode::nodeId | ( | ) | const [pure virtual] |
Get value of the NodeId attribute of this Node.
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.
UaStatus UaNode::setAttributeValue | ( | Session * | pSession, |
OpcUa_Int32 | attributeId, | ||
const UaDataValue & | dataValue, | ||
OpcUa_Boolean | checkWriteMask | ||
) | [virtual] |
Sets the value of an attribute of the Node.
[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 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
[in] | pUserData | User 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.
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] |
Get value of the UserWriteMask attribute of this Node.
pSession | Interface to the Session context for the method call. |
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 OpcUa_UInt32 UaNode::writeMask | ( | ) | const [pure virtual] |
Get value of the WriteMask attribute of this Node.
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.