dpDisconnectExtUserData()

Unregisters a callback function called with using dpDisconnectExtUserData().

Synopsis

int dpDisconnectExtUserData([class object,] string|function_ptr work, anytype userData, dyn_string dpConn, dyn_string dpExt);

Parameters

Parameter Description
object An object of a Control++ class.
userData User-defined data that is passed as a parameter to the callback function.
dpConn List of the datapoints whose value change disconnect the work function.
dpExt

List of the extended datapoints.

Return Value

The function dpDisconnectExtUserData() returns 0 and in the event of a failure it returns -1.

Errors

Errors can be retrieved with getLastError(). This includes missing arguments or if the datapoint or work function does not exist. The use of not initialized variables for the parameter userData will raise an error.

Description

The function dpDisconnectExtUserData() unregisters the function work() from being called if the values of the datapoint attributes dpConn are changed. The work function is no longer executed automatically.

A dpDisconnectExtUserData() can only be used in the same script as the dpConnectExtUserData()!

You can find an example of how to use a CONTROL++ class instance in a connect function in the chapter dpConnect().

Assignment

Datapoint Functions, Waiting Control Functions

Availability

CTRL