Class definition of the UaVariable. Derived from UaNode Get all information about UaVariables and their references. More...
#include <uabasenodes.h>
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 VariableHandle * | pVariableHandle () |
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 () |
Class definition of the UaVariable. Derived from UaNode Get all information about UaVariables and their references.
UaVariable::~UaVariable | ( | ) | [protected, virtual] |
destruction
UaVariable::UaVariable | ( | ) |
construction
virtual OpcUa_Byte UaVariable::accessLevel | ( | ) | const [pure virtual] |
Get the AccessLevel for the Variable.
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.
arrayDimensions | the 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.
Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.
void UaVariable::getAttributeValue | ( | Session * | pSession, |
OpcUa_Int32 | attributeId, | ||
UaDataValue & | uaDataValue | ||
) | [virtual] |
virtual OpcUa_Boolean UaVariable::historizing | ( | ) | const [pure virtual] |
Indicates if variable value is currently historized or 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.
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.
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.
Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.
OpcUa_NodeClass UaVariable::nodeClass | ( | ) | const [inline, virtual] |
Get 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.
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.
[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.
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.
pSession | Interface to the Session context for the method call |
dataValue | New value for the variable. |
checkAccessLevel | Flag 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. |
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.
pSession | Interface to the Session context for the method call |
Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.
virtual UaDataValue UaVariable::value | ( | Session * | pSession ) | [pure virtual] |
Returns the value of the Variable.
pSession | Interface to the Session context for the method call |
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.
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.
Implemented in OpcUa::BaseVariableType, UaDataVariableCache, UaPropertyMethodArgument, UaDataVariableCacheEx, UaGenericVariable, and UaDataVariableDevice.