

'Declaration<CLSCompliantAttribute(True)> <ComDefaultInterfaceAttribute(OpcLabs.EasyOpc.UA.OperationModel.ComTypes._UAAttributeDataResult)> <ComVisibleAttribute(True)> <GuidAttribute("111C8C94-4928-4A45-8127-CC73667A2428")> <TypeConverterAttribute(System.ComponentModel.ExpandableObjectConverter)> <ValueControlAttribute("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.84.192.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", DefaultReadWrite=False, Export=True, PageId=10001)> <SerializableAttribute()> Public Class UAAttributeDataResult Inherits OpcLabs.BaseLib.OperationModel.OperationResult Implements LINQPad.ICustomMemberProvider, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, OpcLabs.BaseLib.OperationModel.ComTypes._OperationResult, OpcLabs.EasyOpc.UA.OperationModel.ComTypes._UAAttributeDataResult, System.ICloneable, System.IFormattable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
'UsageDim instance As UAAttributeDataResult
[CLSCompliant(true)] [ComDefaultInterface(OpcLabs.EasyOpc.UA.OperationModel.ComTypes._UAAttributeDataResult)] [ComVisible(true)] [Guid("111C8C94-4928-4A45-8127-CC73667A2428")] [TypeConverter(System.ComponentModel.ExpandableObjectConverter)] [ValueControl("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.84.192.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", DefaultReadWrite=false, Export=true, PageId=10001)] [Serializable()] public class UAAttributeDataResult : OpcLabs.BaseLib.OperationModel.OperationResult, LINQPad.ICustomMemberProvider, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, OpcLabs.BaseLib.OperationModel.ComTypes._OperationResult, OpcLabs.EasyOpc.UA.OperationModel.ComTypes._UAAttributeDataResult, System.ICloneable, System.IFormattable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
[CLSCompliant(true)] [ComDefaultInterface(OpcLabs.EasyOpc.UA.OperationModel.ComTypes._UAAttributeDataResult)] [ComVisible(true)] [Guid("111C8C94-4928-4A45-8127-CC73667A2428")] [TypeConverter(System.ComponentModel.ExpandableObjectConverter)] [ValueControl("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.84.192.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", DefaultReadWrite=false, Export=true, PageId=10001)] [Serializable()] public ref class UAAttributeDataResult : public OpcLabs.BaseLib.OperationModel.OperationResult, LINQPad.ICustomMemberProvider, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, OpcLabs.BaseLib.OperationModel.ComTypes._OperationResult, OpcLabs.EasyOpc.UA.OperationModel.ComTypes._UAAttributeDataResult, System.ICloneable, System.IFormattable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
The result is successful if the OpcLabs.BaseLib.OperationModel.OperationResult.Exception is a null reference. Otherwise, this property contains information about the reason of the failure.
// This example shows how to read data (value, timestamps, and status code) of 3 attributes at once. In this example, // we are reading a Value attribute of 3 different nodes, but the method can also be used to read multiple attributes // of the same node. // // Find all latest examples here: https://www.doc-that.com/files/onlinedocs/OPCLabs-ConnectivityStudio/Latest/examples.html . // OPC client and subscriber examples in C# on GitHub: https://github.com/OPCLabs/Examples-ConnectivityStudio-CSharp . // Missing some example? Ask us for it on our Online Forums, https://forum.opclabs.com/forum/index ! You do not have to own // a commercial license in order to use Online Forums, and we reply to every post. using System; using OpcLabs.EasyOpc.UA; using OpcLabs.EasyOpc.UA.OperationModel; namespace UADocExamples._EasyUAClient { partial class ReadMultiple { public static void Main1() { UAEndpointDescriptor endpointDescriptor = "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer"; // or "http://opcua.demo-this.com:51211/UA/SampleServer" (currently not supported) // or "https://opcua.demo-this.com:51212/UA/SampleServer/" // Instantiate the client object. var client = new EasyUAClient(); // Obtain attribute data. By default, the Value attributes of the nodes will be read. UAAttributeDataResult[] attributeDataResultArray = client.ReadMultiple(new[] { new UAReadArguments(endpointDescriptor, "nsu=http://test.org/UA/Data/ ;i=10845"), new UAReadArguments(endpointDescriptor, "nsu=http://test.org/UA/Data/ ;i=10853"), new UAReadArguments(endpointDescriptor, "nsu=http://test.org/UA/Data/ ;i=10855") }); // Display results. foreach (UAAttributeDataResult attributeDataResult in attributeDataResultArray) { if (attributeDataResult.Succeeded) Console.WriteLine($"AttributeData: {attributeDataResult.AttributeData}"); else Console.WriteLine($"*** Failure: {attributeDataResult.ErrorMessageBrief}"); } } // Example output: // //AttributeData: 51 {Int16} @11/6/2011 1:49:19 PM @11/6/2011 1:49:19 PM; Good //AttributeData: -1993984 {Single} @11/6/2011 1:49:19 PM @11/6/2011 1:49:19 PM; Good //AttributeData: Yellow% Dragon Cat) White Blue Dog# Green Banana- {String} @11/6/2011 1:49:19 PM @11/6/2011 1:49:19 PM; Good } }
# This example shows how to read data (value, timestamps, and status code) of 3 attributes at once. In this example, # we are reading a Value attribute of 3 different nodes, but the method can also be used to read multiple attributes # of the same node. # # Find all latest examples here: https://www.doc-that.com/files/onlinedocs/OPCLabs-ConnectivityStudio/Latest/examples.html . # OPC client and subscriber examples in PowerShell on GitHub: https://github.com/OPCLabs/Examples-ConnectivityStudio-PowerShell . # Missing some example? Ask us for it on our Online Forums, https://forum.opclabs.com/forum/index ! You do not have to own # a commercial license in order to use Online Forums, and we reply to every post. #requires -Version 5.1 using namespace OpcLabs.EasyOpc.UA using namespace OpcLabs.EasyOpc.UA.OperationModel # The path below assumes that the current directory is [ProductDir]/Examples-NET/PowerShell/Windows . Add-Type -Path "../../../Components/Opclabs.QuickOpc/net472/OpcLabs.EasyOpcUAPrimitives.dll" Add-Type -Path "../../../Components/Opclabs.QuickOpc/net472/OpcLabs.EasyOpcUACore.dll" Add-Type -Path "../../../Components/Opclabs.QuickOpc/net472/OpcLabs.EasyOpcUA.dll" Add-Type -Path "../../../Components/Opclabs.QuickOpc/net472/OpcLabs.EasyOpcUAComponents.dll" [UAEndpointDescriptor]$endpointDescriptor = "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer" # or "http://opcua.demo-this.com:51211/UA/SampleServer" (currently not supported) # or "https://opcua.demo-this.com:51212/UA/SampleServer/" # Instantiate the client object. $client = New-Object EasyUAClient # Obtain attribute data. By default, the Value attributes of the nodes will be read. $attributeDataResultArray = $client.ReadMultiple(@( (New-Object UAReadArguments($endpointDescriptor, "nsu=http://test.org/UA/Data/ ;i=10845")), (New-Object UAReadArguments($endpointDescriptor, "nsu=http://test.org/UA/Data/ ;i=10853")), (New-Object UAReadArguments($endpointDescriptor, "nsu=http://test.org/UA/Data/ ;i=10855")) )) foreach ($attributeDataResult in $attributeDataResultArray) { if ($attributeDataResult.Succeeded) { Write-Host "AttributeData: $($attributeDataResult.AttributeData)" } else { Write-Host "*** Failure: $($attributeDataResult.ErrorMessageBrief)" } } # Example output: # #AttributeData: 51 {Int16} @11/6/2011 1:49:19 PM @11/6/2011 1:49:19 PM; Good #AttributeData: -1993984 {Single} @11/6/2011 1:49:19 PM @11/6/2011 1:49:19 PM; Good #AttributeData: Yellow% Dragon Cat) White Blue Dog# Green Banana- {String} @11/6/2011 1:49:19 PM @11/6/2011 1:49:19 PM; Good
' This example shows how to read data (value, timestamps, and status code) of 3 attributes at once. In this example, ' we are reading a Value attribute of 3 different nodes, but the method can also be used to read multiple attributes ' of the same node. ' ' Find all latest examples here: https://www.doc-that.com/files/onlinedocs/OPCLabs-ConnectivityStudio/Latest/examples.html . ' OPC client and subscriber examples in VB.NET on GitHub: https://github.com/OPCLabs/Examples-ConnectivityStudio-VBNET . ' Missing some example? Ask us for it on our Online Forums, https://forum.opclabs.com/forum/index ! You do not have to own ' a commercial license in order to use Online Forums, and we reply to every post. Imports OpcLabs.EasyOpc.UA Imports OpcLabs.EasyOpc.UA.OperationModel Namespace Global.UADocExamples._EasyUAClient Partial Friend Class ReadMultiple Public Shared Sub Main1() ' Define which server we will work with. Dim endpointDescriptor As UAEndpointDescriptor = "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer" ' or "http://opcua.demo-this.com:51211/UA/SampleServer" (currently not supported) ' or "https://opcua.demo-this.com:51212/UA/SampleServer/" ' Instantiate the client object Dim client = New EasyUAClient() ' Obtain attribute data. By default, the Value attributes of the nodes will be read. Dim attributeDataResultArray() As UAAttributeDataResult = client.ReadMultiple(New UAReadArguments() _ { New UAReadArguments(endpointDescriptor, "nsu=http://test.org/UA/Data/ ;i=10845"), New UAReadArguments(endpointDescriptor, "nsu=http://test.org/UA/Data/ ;i=10853"), New UAReadArguments(endpointDescriptor, "nsu=http://test.org/UA/Data/ ;i=10855") }) ' Display results For Each attributeDataResult As UAAttributeDataResult In attributeDataResultArray If attributeDataResult.Succeeded Then Console.WriteLine("AttributeData: {0}", attributeDataResult.AttributeData) Else Console.WriteLine("*** Failure: {0}", attributeDataResult.ErrorMessageBrief) End If Next attributeDataResult ' Example output: ' 'AttributeData: 51 {System.Int16} @11/6/2011 1:49:19 PM @11/6/2011 1:49:19 PM; Good 'AttributeData: -1993984 {System.Single} @11/6/2011 1:49:19 PM @11/6/2011 1:49:19 PM; Good 'AttributeData: Yellow% Dragon Cat) White Blue Dog# Green Banana- {System.String} @11/6/2011 1:49:19 PM @11/6/2011 1:49:19 PM; Good End Sub End Class End Namespace
# This example shows how to read data (value, timestamps, and status code) of 3 attributes at once. In this example, # we are reading a Value attribute of 3 different nodes, but the method can also be used to read multiple attributes # of the same node. # # Find all latest examples here: https://www.doc-that.com/files/onlinedocs/OPCLabs-ConnectivityStudio/Latest/examples.html . # OPC client and subscriber examples in Python on GitHub: https://github.com/OPCLabs/Examples-ConnectivityStudio-Python . # Missing some example? Ask us for it on our Online Forums, https://forum.opclabs.com/forum/index ! You do not have to own # a commercial license in order to use Online Forums, and we reply to every post. # The QuickOPC package is needed. Install it using "pip install opclabs_quickopc". import opclabs_quickopc import time # Import .NET namespaces. from OpcLabs.EasyOpc.UA import * from OpcLabs.EasyOpc.UA.OperationModel import * endpointDescriptor = UAEndpointDescriptor('opc.tcp://opcua.demo-this.com:51210/UA/SampleServer') # or 'http://opcua.demo-this.com:51211/UA/SampleServer' (currently not supported) # or 'https://opcua.demo-this.com:51212/UA/SampleServer/' # Instantiate the client object. client = EasyUAClient() # Obtain attribute data. By default, the Value attributes of the nodes will be read. attributeDataResultArray = client.ReadMultiple([ UAReadArguments(endpointDescriptor, UANodeDescriptor('nsu=http://test.org/UA/Data/ ;i=10845')), UAReadArguments(endpointDescriptor, UANodeDescriptor('nsu=http://test.org/UA/Data/ ;i=10853')), UAReadArguments(endpointDescriptor, UANodeDescriptor('nsu=http://test.org/UA/Data/ ;i=10855')), ]) # Display results. for attributeDataResult in attributeDataResultArray: if attributeDataResult.Succeeded: print('AttributeData: ', attributeDataResult.AttributeData, sep='') else: print('*** Failure: ', attributeDataResult.ErrorMessageBrief, sep='') print() print('Finished.')
// This KEPServerEX/UA example shows how to read data (value, timestamps, and status code) of 3 attributes at once. In this // example, we are reading a Value attribute of 3 different nodes, but the method can also be used to read multiple // attributes of the same node. // // Find all latest examples here: https://www.doc-that.com/files/onlinedocs/OPCLabs-ConnectivityStudio/Latest/examples.html . // OPC client and subscriber examples in C# on GitHub: https://github.com/OPCLabs/Examples-ConnectivityStudio-CSharp . // Missing some example? Ask us for it on our Online Forums, https://forum.opclabs.com/forum/index ! You do not have to own // a commercial license in order to use Online Forums, and we reply to every post. using System; using OpcLabs.EasyOpc.UA; using OpcLabs.EasyOpc.UA.AddressSpace; using OpcLabs.EasyOpc.UA.OperationModel; namespace UADocExamples.Specialized { partial class Kepware_KEPServerEX_UA { public static void ReadMultiple() { UAEndpointDescriptor endpointDescriptor = "opc.tcp://localhost:49320"; // default KEPServerEX/UA endpoint // Instantiate the client object. var client = new EasyUAClient(); // Obtain attribute data. By default, the Value attributes of the nodes will be read. UAAttributeDataResult[] attributeDataResultArray = client.ReadMultiple(new[] { // The UANodeId.KEPServerEX(...) helper method simplifies creation of node IDs for KEPServerEX/UA nodes. new UAReadArguments(endpointDescriptor, UANodeId.KEPServerEX("Simulation Examples.Functions.Random1")), new UAReadArguments(endpointDescriptor, UANodeId.KEPServerEX("Simulation Examples.Functions.Ramp1")), new UAReadArguments(endpointDescriptor, UANodeId.KEPServerEX("Simulation Examples.Functions.Sine1")), new UAReadArguments(endpointDescriptor, UANodeId.KEPServerEX("Simulation Examples.Functions.User1")) }); // Display results. foreach (UAAttributeDataResult attributeDataResult in attributeDataResultArray) { if (attributeDataResult.Succeeded) Console.WriteLine($"AttributeData: {attributeDataResult.AttributeData}"); else Console.WriteLine($"*** Failure: {attributeDataResult.ErrorMessageBrief}"); } } } }
System.Object
OpcLabs.BaseLib.Object2
OpcLabs.BaseLib.Info
OpcLabs.BaseLib.OperationModel.OperationResult
OpcLabs.EasyOpc.UA.OperationModel.UAAttributeDataResult
OpcLabs.EasyOpc.UA.Generic.UAAttributeDataResult<T>