dOPC Client Toolkit
Close
Example
uses ua.datatypes, // for OPC UA datatypes of the UA service calls dOPCUA, ua.client; // use this units if you want to work with the OPC UA core client (TdOPCUAClient) of the dOPCDAClient // ticky: get underlying connection TdOPCUAClient object of the TdOPCDAClient client object function GetOPCUAClient(DaClient: TdOPCDAClient): TdOPCUAClient; var Connection: TObject; begin if DaClient.OPCConnection <> nil then begin Connection := DaClient.OPCConnection.GetObject; // ticky: get underlying connection object if (Connection <> nil) and (Connection is TdOPCUAConnection) then result := TdOPCUAConnection(Connection).uaClient else raise Exception.Create('connection is not a opc ua server connection'); end else raise Exception.Create('first connect to opc ua server'); end;
Kassl GmbH Copyright © 2024. All rights reserved.