ns=2;s=DEPRAG Smart/Network/HTTP/REST/ActiveClients/0/BaseAddress
The base address of the URI for the REST API calls.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bHttpReadBaseAddress : BOOL;
bHttpWriteBaseAddress : BOOL;
BaseAddress : STRING(255);
hrHttpBaseAddress : HRESULT;
fbHttpRest : FB_HttpRest;
END_VAR
hrHttpBaseAddress := fbHttpRest.ReadBaseAddress(
bExecute := bHttpReadBaseAddress,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ClientId := '0',
Output => BaseAddress);
IF hrHttpBaseAddress <> S_FALSE THEN
bHttpReadBaseAddress := FALSE;
END_IF
hrHttpBaseAddress := fbHttpRest.WriteBaseAddress(
bExecute := bHttpWriteBaseAddress,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ClientId := '0',
PointerToNodeValue := ADR(BaseAddress),
SizeOfNodeValue := SIZEOF(BaseAddress));
IF hrHttpBaseAddress <> S_FALSE THEN
bHttpWriteBaseAddress := 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".