C++ UA Server SDK
1.5.2.336
|
Base class for user data stored in SDK managed objects like UaNode. More...
#include <userdatabase.h>
Inherited by UaBase::BaseNodeStandardUserData, and UserDataVariableGetValue.
Public Types | |
enum | UserDataType { UserDataType_Custom, UserDataType_GetValue } |
Enumeration used to detect the type of user data for further processing. More... | |
Public Member Functions | |
UserDataBase () | |
Creates an object of the type UserDataBase. More... | |
virtual | ~UserDataBase () |
Destroys the UserDataBase object. More... | |
virtual UserDataType | getUserDataType () const |
Return the type of user data. More... | |
virtual void | setInvalid () |
This method is called by the SDK when the owning object of the user data was invalidated. More... | |
Base class for user data stored in SDK managed objects like UaNode.
User data classes need to be derived from this class if the user data should be added to SDK managed objects like a UaNode to allow the SDK managed object to clean the memory of the user data when the SDK managed object is deleted.
Enumeration used to detect the type of user data for further processing.
Enumerator | |
---|---|
UserDataType_Custom |
Default type for custom user data |
UserDataType_GetValue |
User data class derived from UserDataVariableGetValue. This option can be used for data in memory where the update of the data is not reported through internal events and the data needs to be polled |
UserDataBase::UserDataBase | ( | ) |
Creates an object of the type UserDataBase.
|
virtual |
Destroys the UserDataBase object.
|
virtual |
Return the type of user data.
The default type is UserDataType_Custom.
Derived classes like the specialized class UserDataVariableGetValue can overwrite this method to set a different UserDataType.
Reimplemented in UaBase::BaseNodeStandardUserData, and UserDataVariableGetValue.
|
virtual |
This method is called by the SDK when the owning object of the user data was invalidated.
A typical example is a Variable that node that was removed from the address space but is still used by monitored items.
A derived class can overwrite this method to invalidate the user data, to clear any internal memory and to provide the invalidated information to the application specific handling of the user data.
Reimplemented in UserDataGetCounterNodeId, UserDataGetCounterBoolean, UserDataGetCounterDouble, UserDataGetCounterByte, UserDataGetCounterUInt32, and UaVariableNs1UserDataGetCounter.