UA Server SDK C++ Bundle  1.4.1.271
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UaVariableNs1UserDataGetCounter Class Reference

Specialized UserData class for UaVariable in namespace 1 where the UserData class provides access to a int counter. More...

#include <nodemanagerns1.h>

Inherits UserDataVariableGetValue.

Public Member Functions

 UaVariableNs1UserDataGetCounter (int *pData)
 Constructs a user data object for a Variable containing an integer value. More...
 
void setInvalid ()
 Invalidate the user data.
 
virtual OpcUa_StatusCode getValue (UaVariant &value) const
 Get the value for the variable.
 
virtual void getDataValue (UaDataValue &dataValue) const
 Default implementation for getting the value as DataValue. More...
 
- Public Member Functions inherited from UserDataVariableGetValue
 UserDataVariableGetValue ()
 Creates an object of the type UserDataVariableGetValue. More...
 
virtual ~UserDataVariableGetValue ()
 Destroys the UserDataVariableGetValue object. More...
 
UserDataType getUserDataType () const
 Returns UserDataType_GetValue as UserDataType for the class UserDataVariableGetValue.
 
virtual OpcUa_StatusCode setDataValue (const UaDataValue &dataValue)
 Default implementation for setting the value. More...
 
- Public Member Functions inherited from UserDataBase
 UserDataBase ()
 Creates an object of the type UserDataBase. More...
 
virtual ~UserDataBase ()
 Destroys the UserDataBase object. More...
 

Additional Inherited Members

- Public Types inherited from UserDataBase
enum  UserDataType { UserDataType_Custom, UserDataType_GetValue }
 Enumeration used to detect the type of user data for further processing. More...
 

Detailed Description

Specialized UserData class for UaVariable in namespace 1 where the UserData class provides access to a int counter.

This class is used for instances of the UaVariable where polling access through NodeManagerUaNode::readValues is used for variables in namespace 1.

This class can be used to provide the value of the variable through the UserData. This option can be used for an int value in memory where the update of the data is not reported through internal events and the data needs to be polled.

The access to the int value is not synchronized. Therefore the int value must be incremented and decremented using the atomic functions ua_atomic_increment and ua_atomic_decrement.

Constructor & Destructor Documentation

UaVariableNs1UserDataGetCounter::UaVariableNs1UserDataGetCounter ( int *  pData)

Constructs a user data object for a Variable containing an integer value.

Parameters
[in]pDataPointer to the integer value used as value for the variable

Member Function Documentation

void UaVariableNs1UserDataGetCounter::getDataValue ( UaDataValue dataValue) const
virtual

Default implementation for getting the value as DataValue.

The default implementation is using getValue(). An implementation class can overwrite this method and return the DataValue directly

Reimplemented from UserDataVariableGetValue.


The documentation for this class was generated from the following files: