ns=2;s=DEPRAG Smart/Network/HTTP/REST/ActiveClients/0/SetProxy
Sets the proxy server. The proxy server is used for all requests to the API.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bHttpSetProxy : BOOL;
OutputDataHttpSetProxy : ST_VoidOutputData;
hrHttpSetProxy : HRESULT;
fbHttpRest : FB_HttpRest;
END_VAR
hrHttpSetProxy := fbHttpRest.SetProxy(
bExecute := bHttpSetProxy,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sHost := 'TestHost',
nPort := 1234,
bBypassProxyOnLocal := TRUE,
bUseDefaultCredentials := TRUE,
sUserName := 'User1',
sPassword := 'Password123',
sDomain := 'http://OpcUa.deprag.com/',
sClientId := '0',
OutputData => OutputDataHttpSetProxy);
IF hrHttpSetProxy <> S_FALSE THEN
bHttpSetProxy := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".