dOPC Client Toolkit
Close
Example
ua.client.TdOPCUAClient.SessionLess
Copy Code
uses
ua.client
,
ua.datatypes
;
procedure
TFormOPCUATest.ButtonDiscoverTestClick(Sender: TObject);
var
uaDiscoverClient:
TdOPCUAClient
; ServiceCall :
uaFindServers
;
// OPC Service Call
Server:
uaApplicationDescription
; DiscoveryUrl :
string
;
begin
uaDiscoverClient := TdOPCUAClient.Create(
nil
); ServiceCall := uaFindServers.Create(uaDiscoverClient);
try
uaDiscoverClient.Url := 'opc.tcp://localhost:4840';
// default url of discovery server
uaDiscoverClient.Proxy := ''; uaDiscoverClient.SessionLess := true; uaDiscoverClient.Active := true; ServiceCall.Run;
// Finds the servers known to the discovery server.
for
Server
in
ServiceCall.Response.Servers
do
begin
for
DiscoveryUrl
in
Server.DiscoveryUrls
do
Memo1.Lines.Add(DiscoveryUrl);
end
;
finally
uaDiscoverClient.Free; ServiceCall.Free;
end
;
end
;
Kassl GmbH Copyright © 2024. All rights reserved.