C++ UA Server SDK  1.5.0.318
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
OpcUa::BaseVariableType Class Reference

Base class for all classes representing UA Variables. More...

#include <opcua_basevariabletype.h>

Inherits UaVariableCache, and UaReferenceLists.

Inherited by OpcUa::BaseDataVariableType, OpcUa::BaseVariableTypeGeneric, OpcUa::PropertyType, and OpcUaDi::UIElementType.

Public Member Functions

 BaseVariableType (UaNode *pParentNode, UaVariable *pInstanceDeclarationVariable, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an instance of the class BaseVariableType based on an instance declaration variable. More...
 
 BaseVariableType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, const UaVariant &initialValue, OpcUa_Byte accessLevel, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an instance of the class BaseVariableType with the passed attribute values. More...
 
UaReferenceListsgetUaReferenceLists () const
 Get a ReferenceList where all the Nodes are in. More...
 
UaStatus browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)
 Discover the references of a specified node of a view. More...
 
UaNodeId nodeId () const
 Get the NodeId for the DataVariable. More...
 
virtual UaQualifiedName browseName () const
 Get the browseName as QualifiedName of the current Node. More...
 
virtual UaLocalizedText displayName (Session *pSession) const
 Get the displayName as LocalizedText of the current Node. More...
 
virtual OpcUa_Boolean isDescriptionSupported () const
 Check if Node is DescriptionSupported. More...
 
virtual UaLocalizedText description (Session *pSession) const
 Get the description as LocalizedText of the current Node. More...
 
virtual OpcUa_Boolean isWriteMaskSupported () const
 Check if Node is WriteMaskSupported. More...
 
virtual OpcUa_UInt32 writeMask () const
 Get the writeMask of the current Node. More...
 
virtual OpcUa_Boolean isUserWriteMaskSupported () const
 Check if Node is UserWriteMaskSupported. More...
 
virtual OpcUa_UInt32 userWriteMask (Session *pSession) const
 Get the WriteMask of the User. More...
 
virtual UaDataValue value (Session *pSession)
 Gets the current value for the DataVariable. More...
 
virtual UaStatus setValue (Session *pSession, const UaDataValue &dataValue, OpcUa_Boolean checkAccessLevel)
 Sets the current value for the DataVariable. More...
 
virtual UaNodeId dataType () const
 Get the DataType for the DataVariable. More...
 
virtual OpcUa_Int32 valueRank () const
 Get the ValueRank for the DataVariable. More...
 
virtual OpcUa_Boolean isArrayDimensionsSupported () const
 Check if the Node is ArrayDimensionsSupported. More...
 
virtual void arrayDimensions (UaUInt32Array &arrayDimensions) const
 Get the arrayDimensions value for the passed UaNode. More...
 
virtual OpcUa_Byte accessLevel () const
 Get the AccessLevel for the DataVariable. More...
 
virtual OpcUa_Byte userAccessLevel (Session *pSession) const
 Get the UserAccessLevel for the DataVariable. More...
 
virtual OpcUa_Boolean isMinimumSamplingIntervalSupported () const
 Check whether a minimum sampling interval is supported. More...
 
virtual OpcUa_Double minimumSamplingInterval () const
 Get the minimum sampling interval of the Node. More...
 
virtual OpcUa_Boolean historizing () const
 Indicates if historizing is available or not. More...
 
virtual void setBrowseName (const UaQualifiedName &browseName)
 Sets the browse name attribute value.
 
virtual void setDisplayName (const UaLocalizedText &displayName)
 Sets the display name attribute value.
 
virtual void setDescription (const UaLocalizedText &description)
 Sets the description attribute value.
 
virtual void setWriteMask (OpcUa_UInt32 writeMask)
 Sets the write mask attribute value.
 
virtual void setDataType (const UaNodeId &dataType)
 Sets the data type attribute value.
 
virtual void setValueRank (OpcUa_Int32 valueRank)
 Sets the value rank attribute value. More...
 
virtual void setArrayDimensions (const UaUInt32Array &arrayDimensions)
 Sets the array dimensions attribute value.
 
virtual void setAccessLevel (OpcUa_Byte accessLevel)
 Sets the access level attribute value.
 
virtual void setMinimumSamplingInterval (OpcUa_Double minimumSamplingInterval)
 Sets the minimum sampling interval attribute value.
 
virtual void setHistorizing (OpcUa_Boolean historizing)
 Sets the historizing attribute value.
 
virtual void setModellingRuleId (const UaNodeId &modellingRuleId)
 Set NodeId of the modeling rule for this node. More...
 
virtual UaNodeId modellingRuleId () const
 Get NodeId of the modeling rule for this node. More...
 
UaNodegetUaNode () const
 Get the Node. More...
 
virtual OpcUa_UInt32 valueHandling () const
 Get the mode for the handling of the value attribute. More...
 
virtual void setValueHandling (OpcUa_UInt32 valueHandling)
 Set the mode for the handling of the value attribute. More...
 
virtual void setInvalid ()
 Set the variable to invalid. More...
 
virtual void setUserData (UserDataBase *pUserData)
 Method to set user data stored in this class. More...
 
virtual UserDataBasegetUserData () const
 Method to get the user data stored in this class. More...
 
virtual UaStatus setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, OpcUa_Boolean checkWriteMask)
 Sets the value of an attribute of the Node. More...
 
- Public Member Functions inherited from UaVariableCache
 UaVariableCache ()
 Constructes a cache variable with default settings.
 
 UaVariableCache (UaMutexRefCounted *pSharedMutex)
 Constructes a cache variable with default settings using the passed shared mutex.
 
void addCacheSignal (CacheSignal *pCacheSignal)
 Add a cache item. More...
 
void removeCacheSignal (CacheSignal *pCacheSignal)
 Remove a cache item. More...
 
void signalChange ()
 Signal change to all cache items.
 
OpcUa_UInt32 signalCount ()
 Get the count of connected monitored items. More...
 
OpcUa_UInt32 getMinSamplingInterval ()
 Get the minimum sampling interval requested. More...
 
VariableHandlepVariableHandle ()
 Return the VariableHandle for the DataVariable. More...
 
virtual void setSharedMutex (UaMutexRefCounted *pSharedMutex)
 Set a shared mutex used for multiple variables to reduce resource consumption. More...
 
UaMutexRefCountedgetSharedMutex ()
 Returns the shared mutex used for multiple variables to reduce resource consumption.
 
void getHandleIOVariableList (std::list< OpcUa_UInt32 > &handles)
 Returns a list of IOManager handles for the connected IOVariable CacheSignals. More...
 
- Public Member Functions inherited from UaVariable
 UaVariable ()
 construction
 
OpcUa_NodeClass nodeClass () const
 Get the NodeClass of the current Node. More...
 
virtual void getAttributeValue (Session *pSession, OpcUa_Int32 attributeId, UaDataValue &uaDataValue)
 Gets the value of an attribute of the Node. More...
 
- Public Member Functions inherited from UaNode
 UaNode ()
 Construction of the UaNode. More...
 
virtual UaNodeId getKey () const
 Get the key of the node used for the hash table. More...
 
virtual UaNodeId typeDefinitionId () const
 Get NodeId of the type definition node for this node. More...
 
const NodeAccessInfogetAccessInfo () const
 Returns the access info for this node. More...
 
void useAccessInfoFrom (const UaNode *pOther)
 Set the access info from another node to this node. More...
 
void setAccessInfo (NodeAccessInfo *pAccessInfo)
 Defines the method to set access info on this node. More...
 
void attachAccessInfo (NodeAccessInfo *pAccessInfo)
 Defines the method to set access info on this node. More...
 
- Public Member Functions inherited from ChainEntry
 ChainEntry ()
 construction
 
ChainEntryfind (const UaNodeId &key, ChainEntry **ppPrevious)
 finds the right entry in the chain. More...
 
void add (ChainEntry *pNewEntry)
 adds a new entry to the list. More...
 
void prepend (ChainEntry *pNewEntry)
 prepends a new entry to the list. More...
 
ChainEntryremove (const UaNodeId &key, ChainEntry **ppNext)
 removes an entry from the list. More...
 
ChainEntrygetNext () const
 Check if there is a chain. More...
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter ()
 construction
 
virtual ~ReferenceCounter ()
 destruction
 
- Public Member Functions inherited from UaReferenceLists
 UaReferenceLists ()
 Constructs the reference lists object.
 
virtual ~UaReferenceLists ()
 Destroys the reference lists object.
 
virtual UaStatus browseReferences (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)
 Discover the references of a specified node of a view. More...
 
virtual UaStatus translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets)
 Find a node based on an element of an relative path. More...
 
virtual const UaReferencepTargetNodes () const
 Returns the list of references to target nodes. More...
 
virtual const UaReferencepSourceNodes () const
 Returns the list of references to source nodes. More...
 
virtual UaNodegetTargetNodeByBrowseName (const UaQualifiedName &browseName) const
 Searches a target node with the passed browse name and returns the UaNode interface if found. More...
 
virtual void addTargetNode (UaReference *pReference)
 Add a reference to a target node where this node is the source node. More...
 
virtual void addSourceNode (UaReference *pReference)
 Adds a reference to a source node where this node is the target node. More...
 
virtual UaStatus removeSourceNode (UaReference *pReferenceToRemove)
 Remove a reference to a source node where this node is the target node. More...
 
virtual bool removeSourceReference (UaReference *pReferenceToRemove)
 Remove the passed reference to a source node. More...
 
virtual UaStatus removeTargetNode (UaNode *pTargetNode, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
 Remove a reference to a target node where this node is the source node. More...
 
virtual UaStatus removeTargetNode (const UaNodeId &targetNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
 Remove a reference to a target node where this node is the source node. More...
 
virtual bool removeTargetReference (UaReference *pReferenceToRemove)
 Remove the passed reference to a target node. More...
 
virtual UaStatus removeCrossNodeManagerRef (NodeManager *pNodeManager)
 Remove references to another NodeManager. More...
 
virtual UaStatus invalidateSourceReferences (OpcUa_Boolean deleteSourceReferences)
 Set all references from SourceNodes to this Node invalid. More...
 
virtual UaStatus invalidateTargetReferences (OpcUa_Boolean deleteTargetReferences)
 Set all references to TargetNode of this node invalid. More...
 
virtual UaStatus deleteAllChildren (NodeManagerConfig *pNodeManagerConfig)
 Deletes all child nodes. More...
 

Static Public Member Functions

static void createTypes ()
 Create the related type nodes.
 
static void clearStaticMembers ()
 Clear the static members of the class.
 

Protected Member Functions

virtual ~BaseVariableType ()
 Destruction.
 
- Protected Member Functions inherited from UaVariableCache
virtual ~UaVariableCache ()
 Destroyes the cache variable object.
 
- Protected Member Functions inherited from UaVariable
virtual ~UaVariable ()
 destruction
 
- Protected Member Functions inherited from UaNode
virtual ~UaNode ()
 Destruction of the UaNode. More...
 
- Protected Member Functions inherited from ChainEntry
virtual ~ChainEntry ()
 destruction
 

Additional Inherited Members

- Protected Attributes inherited from UaReferenceLists
UaReferencem_pTargetNodes
 List of references to target nodes where this node is the source node. More...
 
UaReferencem_pLastTargetNode
 Last references in the list of references to the target nodes. More...
 
UaReferencem_pSourceNodes
 List of references to source nodes where this node is the target node. More...
 

Detailed Description

Base class for all classes representing UA Variables.

Constructor & Destructor Documentation

OpcUa::BaseVariableType::BaseVariableType ( UaNode pParentNode,
UaVariable pInstanceDeclarationVariable,
NodeManagerConfig pNodeConfig,
UaMutexRefCounted pSharedMutex = NULL 
)

Constructs an instance of the class BaseVariableType based on an instance declaration variable.

This constructor is used if the variable is created based on an instance declaration of an object or variable type. Since the only difference between the instance declaration variable and the instance variable are the NodeId and the Value, the pointer to the instance declaration node is used to get the attribute values other than the attributes NodeId and Value from the instance declaration node.
The variable is reference counted and can not be deleted directly. The reference counter is set to one after the variable is created. If the variable 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 variable was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the variable 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]pParentNodeParent node of the new variable
[in]pInstanceDeclarationVariableUaVariable interface of the instance declaration node used to provide attribute values other than NodeId and Value
[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 variable. Can be NULL if no shared mutex is provided
OpcUa::BaseVariableType::BaseVariableType ( const UaNodeId nodeId,
const UaString name,
OpcUa_UInt16  browseNameNameSpaceIndex,
const UaVariant initialValue,
OpcUa_Byte  accessLevel,
NodeManagerConfig pNodeConfig,
UaMutexRefCounted pSharedMutex = NULL 
)

Constructs an instance of the class BaseVariableType with the passed attribute values.

This constructor is used if the variable is not created based on an instance declaration. It defines the name, nodeId, initial value and access level of the variable. Additional language specific names and other attribute values can be set with set methods provided by the class. The variable is reference counted and can not be deleted directly. The reference counter is set to one after the variable is created. If the variable 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 variable was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the variable 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 variable
[in]nameName of the new variable. 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]initialValueInitial value for the Variable
[in]accessLevelAccess level for the Variable
[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 variable. Can be NULL if no shared mutex is provided

Member Function Documentation

OpcUa_Byte OpcUa::BaseVariableType::accessLevel ( ) const
virtual

Get the AccessLevel for the DataVariable.

Returns
the AccessLevel for the DataVariable.

Implements UaVariable.

void OpcUa::BaseVariableType::arrayDimensions ( UaUInt32Array arrayDimensions) const
virtual

Get the arrayDimensions value for the passed UaNode.

Parameters
arrayDimensionsthe arrayDimensions value for the passed UaNode.

Implements UaVariable.

UaStatus OpcUa::BaseVariableType::browse ( const ServiceContext serviceContext,
BrowseContext browseContext,
UaReferenceDescriptions References 
)
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

Implements UaNode.

UaQualifiedName OpcUa::BaseVariableType::browseName ( ) const
virtual

Get the browseName as QualifiedName of the current Node.

Returns
the BrowseName for the DataVariable as QualifiedName.

Implements UaNode.

UaNodeId OpcUa::BaseVariableType::dataType ( ) const
virtual

Get the DataType for the DataVariable.

Returns
the DataType for the DataVariable.

Implements UaVariable.

UaLocalizedText OpcUa::BaseVariableType::description ( Session pSession) const
virtual

Get the description as LocalizedText of the current Node.

Parameters
pSession[in] Session context for the call.
Returns
the LocalizedText of the current Node.

Implements UaNode.

UaLocalizedText OpcUa::BaseVariableType::displayName ( Session pSession) const
virtual

Get the displayName as LocalizedText of the current Node.

Parameters
pSession[in] Session context for the call.
Returns
the LocalizedText of the current Node.

Implements UaNode.

UaNode * OpcUa::BaseVariableType::getUaNode ( ) const
virtual

Get the Node.

Returns
the current searched Node.

Implements UaReferenceLists.

UaReferenceLists * OpcUa::BaseVariableType::getUaReferenceLists ( ) const
virtual

Get a ReferenceList where all the Nodes are in.

Returns
a ReferenceList where all the Nodes are in.

Reimplemented from UaNode.

UserDataBase * OpcUa::BaseVariableType::getUserData ( ) const
virtual

Method to get the user data stored in this class.

This is typically used to store information necessary to connect to access the data source of the variable value.

Reimplemented from UaNode.

OpcUa_Boolean OpcUa::BaseVariableType::historizing ( ) const
virtual

Indicates if historizing is available or not.

Returns
TRUE if historizing is available FALSE if not.

Implements UaVariable.

OpcUa_Boolean OpcUa::BaseVariableType::isArrayDimensionsSupported ( ) const
virtual

Check if the Node is ArrayDimensionsSupported.

Returns
FALSE if not supported.

Implements UaVariable.

OpcUa_Boolean OpcUa::BaseVariableType::isDescriptionSupported ( ) const
virtual

Check if Node is DescriptionSupported.

Returns
FALSE if not supported.

Implements UaNode.

OpcUa_Boolean OpcUa::BaseVariableType::isMinimumSamplingIntervalSupported ( ) const
virtual

Check whether a minimum sampling interval is supported.

Returns
TRUE if supported FALSE if not.

Implements UaVariable.

OpcUa_Boolean OpcUa::BaseVariableType::isUserWriteMaskSupported ( ) const
virtual

Check if Node is UserWriteMaskSupported.

Returns
TRUE if Node is UserWriteMaskSupported.

Implements UaNode.

OpcUa_Boolean OpcUa::BaseVariableType::isWriteMaskSupported ( ) const
virtual

Check if Node is WriteMaskSupported.

Returns
TRUE if Node is WriteMaskSupported.

Implements UaNode.

OpcUa_Double OpcUa::BaseVariableType::minimumSamplingInterval ( ) const
virtual

Get the minimum sampling interval of the Node.

Returns
the minimum sampling interval.

Implements UaVariable.

UaNodeId OpcUa::BaseVariableType::modellingRuleId ( ) const
virtual

Get NodeId of the modeling rule for this node.

Only instance declaration nodes like Objects, Variables or Methods have modeling rules type definition nodes. This method provides a shortcut to get the modeling 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 implementation of this method returns a null NodeId which means there is no modeling rule defined. The method must be overwritten in a derived class to return a modeling rule.

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

Reimplemented from UaNode.

UaNodeId OpcUa::BaseVariableType::nodeId ( ) const
virtual

Get the NodeId for the DataVariable.

Returns
the NodeId for the DataVariable.

Implements UaNode.

UaStatus OpcUa::BaseVariableType::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 from UaVariable.

void OpcUa::BaseVariableType::setInvalid ( )
virtual

Set the variable to invalid.

This method can be overwritten by a derived class to set the internal state to invalid until the object gets deleted when the reference count goes to zero. This method is used if the object should be invalidated but can not be deleted since the lifetime is controlled by the reference count.

Reimplemented from UaVariableCache.

void OpcUa::BaseVariableType::setModellingRuleId ( const UaNodeId modellingRuleId)
virtual

Set NodeId of the modeling rule for this node.

void OpcUa::BaseVariableType::setUserData ( UserDataBase pUserData)
virtual

Method to set user data stored in this class.

This is typically used to store information necessary to connect to access the data source of the variable value.

Parameters
[in]pUserDataUser data to set

Reimplemented from UaNode.

UaStatus OpcUa::BaseVariableType::setValue ( Session pSession,
const UaDataValue newDataValue,
OpcUa_Boolean  checkAccessLevel 
)
virtual

Sets the current value for the DataVariable.

Parameters
pSessionInterface to the Session context for the method call
newDataValueNew data value to set for the DataVariable.
checkAccessLevelchecks the Access Level of the current Session.
Returns
Error code

Implements UaVariable.

Reimplemented in OpcUa::BaseVariableTypeLocalizedTextValue, and OpcUa::ConditionVariableType.

void OpcUa::BaseVariableType::setValueHandling ( OpcUa_UInt32  valueHandling)
virtual

Set the mode for the handling of the value attribute.


The value is a bit mask with the following values
UaVariable_Value_None = 0x0 - There is no value stored in the variable. The access to the value attribute must be implemented by the user of the SDK
UaVariable_Value_Cache = 0x1 - The variable has a cached value but normal read and data monitoring will not use the value directly. If only this flag is set all read and sampling access uses IOManagerUaNode::readValues that needs to be implemented in the custom NodeManager. All write operations to this variable are using IOManagerUaNode::writeValues. The cache value is not updated by the SDK. The custom code is responsible for updating the cache to allow the SDK to return values that are not older than the MaxAge parameter in the Read.
UaVariable_Value_CacheIsSource = 0x2 - If this flag is set, the value in the variable node is the data source and all read, data monitoring and write operations are using the value without requiring any custom code. Value changes can be provided with the method UaVariable::setValue(). IOManagerUaNode::beforeSetAttributeValue and IOManagerUaNode::afterSetAttributeValue can be used to control writing of attributes or to get informed about a successful write of an attribute. This requires overwriting these functions in the custom NodeManager implementation class.
UaVariable_Value_CacheIsUpdatedOnRequest = 0x4 - If this flag is set, the custom code is responsible for updating the cache value for variables monitored by one or more clients and to handle read and write operations. Value changes can be provided with the method UaVariable::setValue(). The custom code gets informed about monitoring changes for items of this type by overwriting IOManagerUaNode::variableCacheMonitoringChanged in the custom NodeManager implementation. In addition it is required to implement IOManagerUaNode::readValues and IOManagerUaNode::writeValues for read and write operations. This option allows optimizing cyclic access to devices for data monitoring independent of read operations.

Reimplemented from UaVariable.

void OpcUa::BaseVariableType::setValueRank ( OpcUa_Int32  valueRank)
virtual

Sets the value rank attribute value.

The ValueRank Attribute indicates whether the Value Attribute of the Variable is an array and how many dimensions the array has. It may have the following values:

  • n>1:
    • the Value is an array with the specified number of dimensions.
    • OneDimension (1): The value is an array with one dimension.
    • OneOrMoreDimensions (0): The value is an array with one or more dimensions.
  • Scalar (-1): The value is not an array.
  • Any (-2): The value can be a scalar or an array with any number of dimensions.
  • ScalarOrOneDimension (-3): The value can be a scalar or a one dimensional array.
OpcUa_Byte OpcUa::BaseVariableType::userAccessLevel ( Session pSession) const
virtual

Get the UserAccessLevel for the DataVariable.

Parameters
pSessionInterface to the Session context for the method call
Returns
the UserAccessLevel for the DataVariable.

Implements UaVariable.

OpcUa_UInt32 OpcUa::BaseVariableType::userWriteMask ( Session pSession) const
virtual

Get the WriteMask of the User.

Parameters
pSessionInterface to the Session context for the method call
Returns
the WriteMask of the User.

Implements UaNode.

UaDataValue OpcUa::BaseVariableType::value ( Session pSession)
virtual

Gets the current value for the DataVariable.

Parameters
pSessionInterface to the Session context for the method call
Returns
the current value for the DataVariable.

Implements UaVariable.

Reimplemented in OpcUa::BaseVariableTypeLocalizedTextValue, and OpcUa::TwoStateVariableType.

OpcUa_UInt32 OpcUa::BaseVariableType::valueHandling ( ) const
virtual

Get the mode for the handling of the value attribute.


The value is a bit mask with the following values
UaVariable_Value_None = 0x0 - There is no value stored in the variable. The access to the value attribute must be implemented by the user of the SDK
UaVariable_Value_Cache = 0x1 - The variable has a cached value but normal read and data monitoring will not use the value directly. If only this flag is set all read and sampling access uses IOManagerUaNode::readValues that needs to be implemented in the custom NodeManager. All write operations to this variable are using IOManagerUaNode::writeValues. The cache value is not updated by the SDK. The custom code is responsible for updating the cache to allow the SDK to return values that are not older than the MaxAge parameter in the Read.
UaVariable_Value_CacheIsSource = 0x2 - If this flag is set, the value in the variable node is the data source and all read, data monitoring and write operations are using the value without requiring any custom code. Value changes can be provided with the method UaVariable::setValue(). IOManagerUaNode::beforeSetAttributeValue and IOManagerUaNode::afterSetAttributeValue can be used to control writing of attributes or to get informed about a successful write of an attribute. This requires overwriting these functions in the custom NodeManager implementation class.
UaVariable_Value_CacheIsUpdatedOnRequest = 0x4 - If this flag is set, the custom code is responsible for updating the cache value for variables monitored by one or more clients and to handle read and write operations. Value changes can be provided with the method UaVariable::setValue(). The custom code gets informed about monitoring changes for items of this type by overwriting IOManagerUaNode::variableCacheMonitoringChanged in the custom NodeManager implementation. In addition it is required to implement IOManagerUaNode::readValues and IOManagerUaNode::writeValues for read and write operations. This option allows optimizing cyclic access to devices for data monitoring independent of read operations.

Returns
The mode for the handling of the Value attribute.

Reimplemented from UaVariableCache.

OpcUa_Int32 OpcUa::BaseVariableType::valueRank ( ) const
virtual

Get the ValueRank for the DataVariable.

The ValueRank Attribute indicates whether the Value Attribute of the Variable is an array and how many dimensions the array has. It may have the following values:

  • n>1:
    • the Value is an array with the specified number of dimensions.
    • OneDimension (1): The value is an array with one dimension.
    • OneOrMoreDimensions (0): The value is an array with one or more dimensions.
  • Scalar (-1): The value is not an array.
  • Any (-2): The value can be a scalar or an array with any number of dimensions.
  • ScalarOrOneDimension (-3): The value can be a scalar or a one dimensional array.
Returns
the ValueRank for the DataVariable.

Implements UaVariable.

OpcUa_UInt32 OpcUa::BaseVariableType::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: