Class definition of the UaVariable. Derived from UaNode Get all information about UaVariables and their references. More...

#include <uabasenodes.h>

Inheritance diagram for UaVariable:
Collaboration diagram for UaVariable:

List of all members.

Public Member Functions

 UaVariable ()
virtual UaDataValue value (Session *pSession)=0
virtual UaStatus setValue (Session *pSession, const UaDataValue &dataValue, OpcUa_Boolean checkAccessLevel=OpcUa_True)=0
virtual UaNodeId dataType () const =0
virtual OpcUa_Int32 valueRank () const =0
virtual OpcUa_Boolean isArrayDimensionsSupported () const =0
virtual void arrayDimensions (UaUInt32Array &arrayDimensions) const =0
virtual OpcUa_Byte accessLevel () const =0
virtual OpcUa_Byte userAccessLevel (Session *pSession) const =0
virtual OpcUa_Boolean isMinimumSamplingIntervalSupported () const =0
virtual OpcUa_Double minimumSamplingInterval () const =0
virtual OpcUa_Boolean historizing () const =0
virtual OpcUa_UInt32 valueHandling () const
virtual VariableHandlepVariableHandle ()
OpcUa_NodeClass nodeClass () 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)

Protected Member Functions

virtual ~UaVariable ()

Detailed Description

Class definition of the UaVariable. Derived from UaNode Get all information about UaVariables and their references.

UaVariable


Constructor & Destructor Documentation

UaVariable::~UaVariable (  ) [protected, virtual]

destruction

UaVariable::UaVariable (  )

construction


Member Function Documentation

virtual OpcUa_Byte UaVariable::accessLevel (  ) const [pure virtual]

Get the AccessLevel for the Variable.

Returns:
the AccessLevel for the DataVariable.

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

virtual void UaVariable::arrayDimensions ( UaUInt32Array &  arrayDimensions ) const [pure virtual]

Get the arrayDimensions value for the passed UaNode.

Parameters:
arrayDimensionsthe arrayDimensions value for the passed UaNode.

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

virtual UaNodeId UaVariable::dataType (  ) const [pure virtual]

Get the DataType for the Variable.

Returns:
the DataType for the DataVariable.

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

void UaVariable::getAttributeValue ( Session pSession,
OpcUa_Int32  attributeId,
UaDataValue uaDataValue 
) [virtual]

Gets the value of an attribute of the Node.

Parameters:
[in]pSessionInterface to the Session context for the method call
[in]attributeIdAttribute id indicating the attribute to return
[out]uaDataValueThe value of the attribute or the status code for the attribute

Reimplemented from UaNode.

virtual OpcUa_Boolean UaVariable::historizing (  ) const [pure virtual]

Indicates if variable value is currently historized or not.

Returns:
OpcUa_True if historizing is active OpcUa_False if not.

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

virtual OpcUa_Boolean UaVariable::isArrayDimensionsSupported (  ) const [pure virtual]

Check if the Node is ArrayDimensionsSupported.

Returns:
FALSE if not supported.

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

virtual OpcUa_Boolean UaVariable::isMinimumSamplingIntervalSupported (  ) const [pure virtual]

Check wether a minimum sampling interval is supported.

Returns:
TRUE if supported FALSE if not.

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

virtual OpcUa_Double UaVariable::minimumSamplingInterval (  ) const [pure virtual]

Get the minimum sampling interval of the Variable.

Returns:
the minimum sampling interval.

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

OpcUa_NodeClass UaVariable::nodeClass (  ) const [inline, virtual]

Get the Nodeclass of the current Node.

Returns:
the Nodeclass of the current Node.

Implements UaNode.

Reimplemented in UaGenericVariable.

virtual VariableHandle* UaVariable::pVariableHandle (  ) [inline, virtual]

Return the VariableHandle for the Value Attribute of the UaVariable. Needs to be implemented by the derived class if the creation of the VariableHandle should be optiomize by keeping a created variable handle in memory.

Returns:
the VariableHandle for the Value Attribute of the UaVariable.

Reimplemented in UaVariableCache.

UaStatus UaVariable::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 UaNode.

Reimplemented in OpcUa::BaseVariableType, and UaGenericVariable.

virtual UaStatus UaVariable::setValue ( Session pSession,
const UaDataValue dataValue,
OpcUa_Boolean  checkAccessLevel = OpcUa_True 
) [pure virtual]

Sets the value of the Variable.

Parameters:
pSessionInterface to the Session context for the method call
dataValueNew value for the variable.
checkAccessLevelFlag indicating if the access level of the variable should be checked before setting the new value. The default value is true but may be changed to false for internal calls where the value should be changed even if this is not possible from a UA client.
Returns:
Error code

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

virtual OpcUa_Byte UaVariable::userAccessLevel ( Session pSession ) const [pure virtual]

Get the UserAccessLevel for the Variable.

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

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

virtual UaDataValue UaVariable::value ( Session pSession ) [pure virtual]

Returns the value of the Variable.

Parameters:
pSessionInterface to the Session context for the method call
Returns:
The current value for the Variable.

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.

virtual OpcUa_UInt32 UaVariable::valueHandling (  ) const [inline, 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 in OpcUa::BaseVariableType, UaVariableCache, and UaDataVariableDevice.

virtual OpcUa_Int32 UaVariable::valueRank (  ) const [pure virtual]

Get the ValueRank for the Variable. This Attribute indicates whether the Value Attribute of the VariableType 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.

Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.


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