dOPC Client Toolkit
Close
ua.client.TdOPCUAClient.GetNamespaceArray

Reads the NameSpaceArray and returns an array of all Namespace Uris.

function GetNamespaceArray: uaStringArray;
__fastcall uaStringArray GetNamespaceArray();

This method reads the NameSpaceArray (i=2255) variable from the OPC UA server and return an array of all Namespace Uris in the OPC UA server.

procedure TTestForm.bTestClick(Sender: TObject); var UAClient : TdOPCUAClient; NameSpaceArray: uaStringArray; i : integer; begin Memo1.Clear; UAClient := TdOPCUAClient.Create(nil); UAClient.Url := 'opc.tcp://opcua.demo-this.com:51210/UA/SampleServer'; UAClient.Active := true; NameSpaceArray := UAClient.GetNameSpaceArray; for i := 0 to Length(NameSpaceArray)-1 do Memo1.Lines.Add(format('[%d] %s',[i,NameSpaceArray[i]])); UAClient.Free; Memo1.Lines.Add('ready :-)'); end;

 

Returns e.g. [0] http://opcfoundation.org/UA/ [1] urn:DEMO-5:UA Sample Server [2] http://test.org/UA/Data/ [3] http://test.org/UA/Data//Instance [4] http://opcfoundation.org/UA/Boiler/ [5] http://opcfoundation.org/UA/Boiler//Instance [6] http://opcfoundation.org/UA/Diagnostics [7] http://samples.org/UA/memorybuffer [8] http://samples.org/UA/memorybuffer/Instance
Kassl GmbH Copyright © 2021. All rights reserved.