dOPC Client Toolkit

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://'; 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] [1] urn:DEMO-5:UA Sample Server [2] [3] [4] [5] [6] [7] [8]
Kassl GmbH Copyright © 2021. All rights reserved.