C++ Based OPC UA Client/Server SDK
1.5.5.355
|
Class definition of the UaVariable. More...
#include <uabasenodes.h>
Inherits UaNode.
Inherited by UaDataVariableDevice, and UaVariableCache.
Public Member Functions | |
UaVariable () | |
construction | |
virtual UaDataValue | value (Session *pSession)=0 |
Returns the value of the Variable. More... | |
virtual UaStatus | setValue (Session *pSession, const UaDataValue &dataValue, OpcUa_Boolean checkAccessLevel=OpcUa_True)=0 |
Sets the value of the Variable. More... | |
virtual UaNodeId | dataType () const =0 |
Get the DataType for the Variable. More... | |
virtual OpcUa_Int32 | valueRank () const =0 |
Get the ValueRank for the Variable. More... | |
virtual OpcUa_Boolean | isArrayDimensionsSupported () const =0 |
Check if the Node is ArrayDimensionsSupported. More... | |
virtual void | arrayDimensions (UaUInt32Array &arrayDimensions) const =0 |
Get the arrayDimensions value for the passed UaNode. More... | |
virtual OpcUa_Byte | accessLevel () const =0 |
Get the AccessLevel for the Variable Value. More... | |
virtual OpcUa_Byte | userAccessLevel (Session *pSession) const =0 |
Get the UserAccessLevel for the Variable. More... | |
virtual OpcUa_Boolean | isMinimumSamplingIntervalSupported () const =0 |
Check whether a minimum sampling interval is supported. More... | |
virtual OpcUa_Double | minimumSamplingInterval () const =0 |
Get the minimum sampling interval of the Variable. More... | |
virtual OpcUa_Boolean | historizing () const =0 |
Indicates if variable value is currently historized or not. More... | |
virtual OpcUa_UInt32 | valueHandling () const |
Get the mode for the handling of the value attribute. More... | |
virtual void | setValueHandling (OpcUa_UInt32 valueHandling) |
Set the mode for the handling of the value attribute. More... | |
virtual VariableHandle * | pVariableHandle () |
Return the VariableHandle for the Value Attribute of the UaVariable. More... | |
OpcUa_NodeClass | nodeClass () const |
Get the NodeClass of the current Node. More... | |
virtual UaStatus | setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, OpcUa_Boolean checkWriteMask) |
Sets the value of an attribute of the Node. More... | |
virtual void | getAttributeValue (Session *pSession, OpcUa_Int32 attributeId, UaDataValue &uaDataValue) |
Gets the value of an attribute of the Node. More... | |
Public Member Functions inherited from UaNode | |
UaNode () | |
Construction of the UaNode. More... | |
virtual UaNodeId | getKey () const |
Get the key of the node used for the hash table. More... | |
virtual UaReferenceLists * | getUaReferenceLists () const |
Get the UaReferenceLists interface for the node. More... | |
virtual UaStatus | browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)=0 |
Discover the references of a specified node of a view. More... | |
virtual UaNodeId | typeDefinitionId () const |
Get NodeId of the type definition node for this node. More... | |
virtual UaNodeId | nodeId () const =0 |
Get value of the NodeId attribute of this Node. More... | |
virtual UaQualifiedName | browseName () const =0 |
Get value of the BrowseName attribute of this Node. More... | |
virtual UaLocalizedText | displayName (Session *pSession) const =0 |
Get value of the DisplayName attribute of this Node. More... | |
virtual OpcUa_Boolean | isDescriptionSupported () const =0 |
Flag indicating if the optional attribute Description is supported. More... | |
virtual UaLocalizedText | description (Session *pSession) const =0 |
Get value of the Description attribute of this Node. More... | |
virtual OpcUa_Boolean | isWriteMaskSupported () const =0 |
Flag indicating if the optional attribute WriteMask is supported. More... | |
virtual OpcUa_UInt32 | writeMask () const =0 |
Get value of the WriteMask attribute of this Node. More... | |
virtual OpcUa_Boolean | isUserWriteMaskSupported () const =0 |
Flag indicating if the optional attribute UserWriteMask is supported. More... | |
virtual OpcUa_UInt32 | userWriteMask (Session *pSession) const =0 |
Get value of the UserWriteMask attribute of this Node. More... | |
virtual UaNodeId | modellingRuleId () const |
Get NodeId of the modeling rule for this node. More... | |
virtual void | setUserData (UserDataBase *pUserData) |
Defines the method to set user data handled by a derived class. More... | |
virtual UserDataBase * | getUserData () const |
Returns user data provided by a derived class. More... | |
const NodeAccessInfo * | getAccessInfo () const |
Returns the access info for this node. More... | |
void | useAccessInfoFrom (const UaNode *pOther) |
Set the NodeAccessInfo from another node to this node. More... | |
void | setAccessInfo (NodeAccessInfo *pAccessInfo) |
Set the NodeAccessInfo for this node. More... | |
void | attachAccessInfo (NodeAccessInfo *pAccessInfo) |
Set the NodeAccessInfo for this node. More... | |
Public Member Functions inherited from ChainEntry | |
ChainEntry () | |
construction | |
ChainEntry * | find (const UaNodeId &key, ChainEntry **ppPrevious) |
finds the right entry in the chain. More... | |
void | add (ChainEntry *pNewEntry) |
adds a new entry to the list. More... | |
void | prepend (ChainEntry *pNewEntry) |
prepends a new entry to the list. More... | |
ChainEntry * | remove (const UaNodeId &key, ChainEntry **ppNext) |
removes an entry from the list. More... | |
ChainEntry * | getNext () const |
Check if there is a chain. More... | |
virtual void | setInvalid () |
Set the entry to invalid. More... | |
void | clearChain () |
Clear the chain when the hashtable is cleared. | |
Public Member Functions inherited from ReferenceCounter | |
ReferenceCounter () | |
construction | |
virtual | ~ReferenceCounter () |
destruction | |
Protected Member Functions | |
virtual | ~UaVariable () |
destruction | |
Protected Member Functions inherited from UaNode | |
virtual | ~UaNode () |
Destruction of the UaNode. More... | |
Protected Member Functions inherited from ChainEntry | |
virtual | ~ChainEntry () |
destruction | |
Class definition of the UaVariable.
Derived from UaNode Get all information about UaVariables and their references.
|
pure virtual |
Get the AccessLevel for the Variable Value.
The valid flags are:
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, and OpcUa::BaseVariableType.
|
pure virtual |
Get the arrayDimensions value for the passed UaNode.
arrayDimensions | the arrayDimensions value for the passed UaNode. |
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, and OpcUa::BaseVariableType.
|
pure virtual |
Get the DataType for the Variable.
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, and OpcUa::BaseVariableType.
|
virtual |
|
pure virtual |
Indicates if variable value is currently historized or not.
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, and OpcUa::BaseVariableType.
|
pure virtual |
Check if the Node is ArrayDimensionsSupported.
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, and OpcUa::BaseVariableType.
|
pure virtual |
Check whether a minimum sampling interval is supported.
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, and OpcUa::BaseVariableType.
|
pure virtual |
Get the minimum sampling interval of the Variable.
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, and OpcUa::BaseVariableType.
|
inlinevirtual |
Get the NodeClass of the current Node.
Implements UaNode.
Reimplemented in UaGenericVariable.
|
inlinevirtual |
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 optimize by keeping a created variable handle in memory.
Reimplemented in UaVariableCache.
|
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 UaGenericVariable, and OpcUa::BaseVariableType.
|
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 UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, OpcUa::BaseVariableTypeLocalizedTextValue, OpcUa::ConditionVariableType, and OpcUa::BaseVariableType.
|
virtual |
Set the mode for the handling of the value attribute.
The default implementation in UaVariable is not storing the value set. It must be overwritten by implementations of the UaVariable interface.
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.
|
pure virtual |
Get the UserAccessLevel for the Variable.
pSession | Interface to the Session context for the method call |
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, and OpcUa::BaseVariableType.
|
pure virtual |
Returns the value of the Variable.
pSession | Interface to the Session context for the method call |
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, OpcUa::BaseVariableTypeLocalizedTextValue, OpcUa::TwoStateVariableType, and OpcUa::BaseVariableType.
|
inlinevirtual |
Get the mode for the handling of the value attribute.
The value is a bit mask with the following values:
Reimplemented in UaDataVariableDevice, UaVariableCache, and OpcUa::BaseVariableType.
|
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:
Implemented in UaPropertyMethodArgument, UaDataVariableDevice, UaGenericVariable, UaDataVariableCache, and OpcUa::BaseVariableType.