C++ Based OPC UA Client/Server/PubSub SDK
1.7.9.586
|
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... | |
virtual 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... | |
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.
UaVariableNs1UserDataGetCounter::UaVariableNs1UserDataGetCounter | ( | int * | pData | ) |
Constructs a user data object for a Variable containing an integer value.
[in] | pData | Pointer to the integer value used as value for the variable |
|
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.