« Back to Product

Documentation

IPS_GetFunctions

 array IPS_GetFunctions (array $FunctionNames) 

Parameters

FunctionNames

Array with the names of the functions (string). If the array is empty, all functions are returned

Returns

An array with one entry per function in the order of FunctionNames. If FunctionNames is empty, the order of the entries is not guaranteed. Each entry has the same structure as in IPS_GetFunction.

Description

Warning

This function is intended for internal use only and may change or be removed at any time without notice.

The function returns the information of the functions with the names FunctionNames in one call. If FunctionNames is empty, all functions registered in IP-Symcon are returned (see IPS_GetFunctionList).

Warning

The function is intended to be called through the JSON-RPC interface, e.g. for the display in the console. It is not available in PHP scripts ("This function is not available for PHP") – there the result can be determined with IPS_GetFunctionList and IPS_GetFunction.

If an entry of FunctionNames is not a string, the function fails with "Parameter type of FunctionNames does not match". If one of the functions does not exist, the function fails with "Function with name ... not found!".

Example

// Query information about a function via the JSON-RPC interface
$rpc = new JSONRPC("http://user:password@127.0.0.1:3777/api/");
print_r($rpc->IPS_GetFunctions(["IPS_SemaphoreEnter"]));

/* e.g. returns:
Array
(
    [0] => Array
        (
            [FunctionName] => IPS_SemaphoreEnter
            [Parameters] => Array
                (
                    [0] => Array
                        (
                            [Description] => Name
                            [Enumeration] => Array
                                (
                                )

                            [Type_] => 3
                        )

                    [1] => Array
                        (
                            [Description] => Milliseconds
                            [Enumeration] => Array
                                (
                                )

                            [Type_] => 1
                        )

                )

            [Result] => Array
                (
                    [Description] => Result
                    [Enumeration] => Array
                        (
                        )

                    [Type_] => 0
                )

        )

)
*/
Any questions?