OPC Studio User's Guide and Reference
UADataVariable Class Methods


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

For a list of all members of this type, see UADataVariable members.

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
See Also

Reference

UADataVariable Class
OpcLabs.EasyOpc.UA.NodeSpace Namespace