convertersystems / opc-ua-client

Visualize and control your enterprise using OPC Unified Architecture (OPC UA) and Visual Studio.
MIT License
403 stars 119 forks source link

How to browse the data type #244

Closed sensiki closed 1 year ago

sensiki commented 1 year ago

I want to get the data type of variables during browse, such as int16、int32、float。 Thank you very much for your answer

sensiki commented 1 year ago

var readRequest = new ReadRequest { // set the NodesToRead to an array of ReadValueIds. NodesToRead = new[] { // construct a ReadValueId from a NodeId and AttributeId. new ReadValueId { // you can parse the nodeId from a string. // e.g. NodeId.Parse("ns=2;s=Demo.Static.Scalar.Double") NodeId = NodeId.Parse(rd2.NodeId.ToString()), // variable class nodes have a Value attribute. AttributeId = AttributeIds.DataType } } };