RemoveAll

TwinCAT
Network REST Client

ns=2;s=DEPRAG Smart/Network/HTTP/REST/RemoveAll

The command terminates all active REST connections and removes all REST clients from the list of active clients.

Returns:

    RemoveAll
    A variable of the OpcMethodReturnValueVoid type. The method has no command-specific return values.

Examples:

In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:

Beckhoff parameter:

    bHttpRemoveAll
    A boolean variable that can be used to trigger the execution of the RemoveAll command.
    OutputDataHttpRemoveAll
    An instance of the ST_VoidOutputData structure into which the return value of the RemoveAll method is written.
    hrHttpRemoveAll
    This can be used to monitor the execution of the command. Error codes have the type HRESULT.
    fbHttpRest
    An instance of the "FB_HttpRest" function block supplied with the DEPRAG Smart library.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
    bHttpRemoveAll   : BOOL;
    OutputDataHttpRemoveAll : ST_VoidOutputData;
    hrHttpRemoveAll   : HRESULT;

    fbHttpRest   : FB_HttpRest;
END_VAR

hrHttpRemoveAll := fbHttpRest.RemoveAll(
        bExecute   := bHttpRemoveAll, 
        ConnectionHandle  := depragSmartConnection.ConnectionHandle,
        OutputData   => OutputDataHttpRemoveAll);
IF hrHttpRemoveAll <> S_FALSE THEN 
    bHttpRemoveAll := 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".