OPC Studio User's Guide and Reference
UADataVariable Class Members
Fields  Properties  Methods  Events


OpcLabs.ServerOpcUA Assembly > OpcLabs.EasyOpc.UA.NodeSpace Namespace : UADataVariable Class

The following tables list the members exposed by UADataVariable.

Public Constructors
 NameDescription
Public ConstructorOverloaded.   
Top
Public Fields
 NameDescription
Public FieldDefault value of the AccessLevels property. Equals to OpcLabs.EasyOpc.UA.UAAccessLevels.CurrentReadAndWrite.  
Public FieldDefault value of the BuiltInType property. Equals to OpcLabs.EasyOpc.UA.UABuiltInType.Variant.  
Top
Public Properties
 NameDescription
Public PropertyThe access levels of this variable (e.g. readable, writable).  
Public PropertyDetermines whether there is currently any data subscription to this data variable.  
Public PropertyThe size of each dimension of the array value.  
Public PropertyThe built-in type of this variable.  
Public Property (Inherited from System.ComponentModel.Component)
Public PropertyCan be used to distinguish otherwise equal widgets. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Public PropertyThe current number of data subscriptions to this data variable.  
Public PropertyThe current set of data subscriptions to this data variable.  
Public PropertySpecifies the OPC UA data type of the variable value.  
Public PropertyOverridden. Describes the basic external characteristics of the node, such as its name.  
Public PropertyThe effective node descriptor by which this node is addressable in the OPC UA server. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyOverridden. Determines whether the events from child nodes will be handled on this node as well.  
Public PropertyDetermines whether this node is a branch. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyDetermines whether the value type of the OPC variable is CLS-compliant.  
Public PropertyDetermines whether this node is a leaf. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyDetermines whether the variable data is readable.  
Public PropertyDetermines whether this node is a root. (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public PropertyDetermines whether the component is currently started. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyDetermines whether the variable value is writable.  
Public PropertyIndexer to get a sub-node by name. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertySpecifies the minimum sampling interval that can be provided for this data variable. In milliseconds.  
Public PropertyThe name of this node in the node space. (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public PropertyOverridden. Determines whether the node is a data variable, folder, or a root.  
Public PropertyA collection of sub-nodes in this node (branch). (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public PropertyThe server node that is the parent of this node. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyDetermines whether UAServerNode.ConversionError events propagate to the parent node (defaults to True). (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyDetermines whether UAServerNode.DataSubscriptionChanged events propagate to the parent node (defaults to True). (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyDetermines whether UAServerNode.Read events propagate to the parent node (defaults to True). (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyDetermines whether UAServerNode.SamplingIntervalChanged events propagate to the parent node (defaults to True). (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyDetermines whether UAServerNode.Write events propagate to the parent node (defaults to True). (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public PropertyThe variable data (value, timestamp, status code) seen by OPC reads.  
Public PropertyThe current sampling interval, computed as the shortest of the sampling intervals of current data subscriptions. In milliseconds.  
Public Property (Inherited from System.ComponentModel.Component)
Public PropertyAn arbitrary object associated with the node. (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public PropertyDetermines whether data polling (internally invoked reads) will be used to handle data subscriptions to this variable.  
Public PropertyThe OPC UA value rank of the variable value.  
Public PropertyDetermines whether the source timestamp of the variable is writable.  
Public PropertyDetermines whether the status code of the variable is writable.  
Public PropertyThe variable data (value, timestamp, status code) modified by OPC writes.  
Public PropertyDetermines whether successfully written data will become the read data for subsequent operations.  
Top
Protected Properties
 NameDescription
Protected Property (Inherited from System.ComponentModel.Component)
Protected Property (Inherited from System.ComponentModel.Component)
Protected Property (Inherited from System.ComponentModel.Component)
Protected PropertyDetermines whether the node is locked. (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Protected PropertyThe service container provided by this widget to inheritors. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Protected PropertyOverridden. The types of branch sub-nodes that can be added to this node.  
Protected PropertyOverridden. The types of leaf sub-nodes that can be added to this node.  
Top
Public Methods
 NameDescription
Public MethodAdds a sub-node to this node. (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public MethodRemoves all sub-nodes. (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public MethodOverridden.   
Public Methodstatic (Shared in Visual Basic)Overloaded. Creates and returns a data variable (with given name) in the specified parent data variable.  
Public MethodCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public MethodOverloaded.  (Inherited from OpcLabs.BaseLib.NodeSpace.NodeFrontEnd)
Public MethodOverloaded. Overridden. Determines whether the specified object is equal to the current object.  
Public Method (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public MethodOverridden. Serves as the default hash function.  
Public MethodRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public MethodInfrastructure. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public Method (Inherited from OpcLabs.BaseLib.NodeSpace.NodeFrontEnd)
Public Method (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Public Method (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Public MethodReturns a tree traverser that iterates through the tree. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public MethodGets the System.Type of the current instance. (Inherited from object)
Public MethodObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public MethodLocks the node. (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public Method (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Public MethodRemoves the specified sub-node from this node. (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public Method (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public MethodUnlocks the node. (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public MethodOverloaded. Updates the value of the data variable as seen by OPC reads, and sets its source timestamp to the current time.  
Public MethodUpdates the write attribute data.  
Public MethodOverloaded. Determines whether the specified OpcLabs.BaseLib.NodeSpace.NodeFrontEnd is value equal to the current object. (Inherited from OpcLabs.BaseLib.NodeSpace.NodeFrontEnd)
Public Method (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Top
Protected Methods
 NameDescription
Protected Method (Inherited from System.ComponentModel.Component)
Protected MethodOverloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected MethodCalled when the value of the AreDataSubscribed property has changed.  
Protected MethodInfrastructure. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Protected MethodRaises the UAServerNode.ConversionError event, indicating when data cannot be converted from Read, for Write, or in IUADataSubscription.OnNext. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Protected MethodOverloaded. Called when a data subscription has been added to, removed from, or modified in the DataSubscriptionSet of this data variable.  
Protected MethodCalled when the lock count becomes non-zero. (Inherited from OpcLabs.BaseLib.NodeSpace.NodeFrontEnd)
Protected MethodCalled when the lock count becomes zero. (Inherited from OpcLabs.BaseLib.NodeSpace.NodeFrontEnd)
Protected MethodCalled after the branch back-end has changed. (Inherited from OpcLabs.BaseLib.NodeSpace.NodeFrontEnd)
Protected MethodRaises the UAServerNode.Read event to obtain the data for OPC UA read. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Protected MethodCalled when the value of the ReadAttributeData property has changed.  
Protected MethodOverloaded. Called when the value of the SamplingInterval property has changed.  
Protected MethodRaises the UAServerNode.Starting event, indicating when the component is starting. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Protected MethodRaises the UAServerNode.Stopped event, indicating when the component has stopped. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Protected MethodRaises the UAServerNode.Write event, supplying the OPC UA write data. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Protected MethodCalled when the value of the WriteAttributeData property has changed.  
Protected MethodInfrastructure. (Inherited from OpcLabs.BaseLib.NodeSpace.NodeFrontEnd)
Protected MethodInfrastructure. (Inherited from OpcLabs.BaseLib.NodeSpace.NodeFrontEnd)
Top
Extension Methods
 NameDescription
Public Extension MethodOverloaded. Modifies the data variable to provide the specified constant attribute data (value, status code, timestamp), non-writable.

For reads and subscriptions, the data variable will provide always the same data, specified in this method call. The data variable will not be writable.

Public Extension MethodOverloaded. Modifies the data variable to provide the specified constant value, non-writable.

For reads and subscriptions, the data variable will provide always the same value, specified in this method call. The data variable will not be writable.

The status code will be "Good", and the timestamp will be the current time of this method call.

Public Extension MethodSpecifies that reads of this data variable will be processed by the specified read function.
Public Extension MethodSpecifies that writes of this data variable will be processed by the specified write function.
Public Extension MethodOverloaded. Makes the data variable readable.
Public Extension MethodOverloaded. Modifies the data variable to provide attribute data for the pull data provision model by a specified function.

This method always makes the data variable readable, but that does not mean it automatically makes it non-writable. If you need a data variable that is readable and non-writable, combine this method with calling Writable(UADataVariable,Boolean) method with the 'writable' parameter set to false.

Public Extension MethodOverloaded. Modifies the data variable to provide value for the pull data provision model by a specified function.

This method always makes the data variable readable, but that does not mean it automatically makes it non-writable. If you need a data variable that is readable and non-writable, combine this method with calling Writable(UADataVariable,Boolean) method with the 'writable' parameter set to false.

The status code will be "Good", and the timestamp will be the current time after the read function has been called.

Public Extension MethodOverloaded. Modifies the data variable to behave as read-write register, with specified initial attribute data (value, status code, timestamp).

This method makes the data variable both readable and writable. The data written to the data variable will become the data subsequently read from the data variable.

This method also makes the status code and source timestamp of the data variable writable, i.e. OPC UA clients will be able to modify their values. If you need a different behavior, call the Writable(UADataVariable,Boolean,Boolean,Boolean) method subsequently, with desired parameters, or modify the UADataVariable.WritableStatusCode and/or UADataVariable.WritableSourceTimestamp accordingly (set one or both to false).

In order to make a read-write register of certain type, but without having to specify initial data, consider simply using one of the ValueType(UADataVariable,Type) overloads.

Public Extension MethodOverloaded. Modifies the data variable to behave as read-write register, with specified initial value.

This method makes the data variable both readable and writable. The data written to the data variable will become the data subsequently read from the data variable.

This method keeps the settings of UADataVariable.WritableStatusCode and UADataVariable.WritableSourceTimestamp. This means that by default, the status code and source timestamp of the data variable will not writable. i.e. OPC UA clients will not be able to modify them. If you need a different behavior, call the Writable(UADataVariable,Boolean,Boolean,Boolean) method subsequently, with desired parameters, or modify the UADataVariable.WritableStatusCode and/or UADataVariable.WritableSourceTimestamp accordingly (set one or both to true).

In order to make a read-write register of certain type, but without having to specify initial data, consider simply using one of the ValueType(UADataVariable,Type) overloads.

Public Extension MethodSets the array dimensions of this data variable.
Public Extension MethodSets the array rank of this data variable.
Public Extension MethodSets the minimum sampling interval of this data variable.
Public Extension MethodSets the arbitrary object associated with the node.
Public Extension MethodUpdates the write attribute data with given value, and current time for the timestamp.
Public Extension MethodOverloaded. Modifies the data variable to use certain value type.
Public Extension MethodOverloaded. Makes the data variable writable.
Public Extension MethodOverloaded. Modifies the data variable for consuming attribute data by a specified function, for the push data consumption model.

This method always makes the data variable writable, including its status code and source timestamp, i.e. OPC UA clients will be able to modify them. If you need a different behavior, call the Writable(UADataVariable,Boolean,Boolean,Boolean) method subsequently, with desired parameters, or modify the UADataVariable.WritableStatusCode and/or UADataVariable.WritableSourceTimestamp accordingly (set one or both to true).

This method does not change the readability access of the data variable. By default, data variables are readable. If you need a data variable that is writable but non-readable, combine this method with calling Readable(UADataVariable,Boolean) method with the 'readable' parameter set to false.

The write function returns a OpcLabs.EasyOpc.UA.UAStatusCode that indicates the outcome of the OPC UA write operation. The WriteFunction(UADataVariable,Type,Func<UAAttributeData,UAStatusCode>) method overloads are the most generic extensions methods for writing. If you only need to deal with the data variable value (and not its status code and/or timestamp), consider using one of the WriteValueFunction<TValue>(UADataVariable,Type,Func<TValue,UAStatusCode>) or WriteValueAction<TValue>(UADataVariable,Type,Action<TValue>) method overloads, for shorter code and easier programming.

Public Extension MethodOverloaded. Modifies the data variable for consuming values by a specified action, for the push data consumption model.

This method always makes the data variable writable; however, its status code and source timestamp will not be writable, i.e. OPC UA clients will not be able to modify them. If you need a different behavior, use one of the WriteFunction(UADataVariable,Type,Func<UAAttributeData,UAStatusCode>) method overloads instead.

This method does not change the readability access of the data variable. By default, data variables are readable. If you need a data variable that is writable but non-readable, combine this method with calling Readable(UADataVariable,Boolean) method with the 'readable' parameter set to false.

Unless the write value action throws a OpcLabs.EasyOpc.UA.UAStatusCodeException, a "Good" status code will be returned as the outcome of the OPC UA write operation. If the write value action function throws OpcLabs.EasyOpc.UA.UAStatusCodeException, the OpcLabs.EasyOpc.UA.UAStatusCodeException.StatusCode of the exception will become the outcome of the OPC UA write operation. For performance reasons, however, if you want to return status codes other than "Good" as OPC UA write operation outcomes, it is recommended that you use one of the WriteValueFunction<TValue>(UADataVariable,Type,Func<TValue,UAStatusCode>) method overloads instead. With these methods, you specify a write value function that returns the OpcLabs.EasyOpc.UA.UAStatusCode that is the OPC UA write operation outcome, allowing the status code be passed without the ineffective throwing and catching of the OpcLabs.EasyOpc.UA.UAStatusCodeException.

Public Extension MethodOverloaded. Modifies the data variable for consuming values by a specified function, for the push data consumption model.

This method always makes the data variable writable; however, its status code and source timestamp will not be writable, i.e. OPC UA clients will not be able to modify them. If you need a different behavior, use one of the WriteFunction(UADataVariable,Type,Func<UAAttributeData,UAStatusCode>) method overloads instead.

This method does not change the readability access of the data variable. By default, data variables are readable. If you need a data variable that is writable but non-readable, combine this method with calling Readable(UADataVariable,Boolean) method with the 'readable' parameter set to false.

The write function returns a OpcLabs.EasyOpc.UA.UAStatusCode that indicates the outcome of the OPC UA write operation. If the outcome of your write operation should always be "Good", you can make your code a bit simpler by using one of WriteValueAction<TValue>(UADataVariable,Type,Action<TValue>) method overloads instead.

Top
Public Events
 NameDescription
Public EventRaised when data cannot be converted from Read, for Write, or in data subscription's OpcLabs.BaseLib.ISink<T>.OnNext. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public EventRaised when data subscription has been added, removed, or modified. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public Event (Inherited from System.ComponentModel.Component)
Public Event (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public Event (Inherited from OpcLabs.BaseLib.NodeSpace.Node)
Public EventRaised to obtain the OPC UA read data. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public EventRaised when the sampling interval of a data variable has changed. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public EventRaised when the component is starting. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public EventRaised when the component has stopped. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Public EventRaised to supply the OPC UA write data. (Inherited from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode)
Top
Public Operators
Determines whether the two objects are equal.
Determines whether the two objects are not equal.
Top
See Also

Reference

UADataVariable Class
OpcLabs.EasyOpc.UA.NodeSpace Namespace