![]() |
The OpenVX Specification
a73e458
|
Allows Clients to receive a callback after a specific node has completed execution.
Callbacks are not guaranteed to be called immediately after the Node completes. Callbacks are intended to be used to create simple early exit conditions for Vision graphs using Return code action values return values. An example of setting up a callback can be seen below:
Once the graph has been initialized and the callback has been installed then the callback itself will be called during graph execution.
The callback must return a vx_action code indicating how the graph processing should proceed.
VX_ACTION_CONTINUE is returned, the graph will continue execution with no changes [R00127]. VX_ACTION_ABANDON is returned, execution is unspecified for all nodes for which this node is a dominator. Nodes that are dominators of this node will have executed [R00128]. Execution of any other node is unspecified.
Modules | |
| Return code action values | |
Possible return values from a vx_nodecomplete_f during execution. | |
Typedefs | |
| typedef vx_enum | vx_action |
| The formal typedef of the response from the callback. More... | |
| typedef vx_action(* | vx_nodecomplete_f) (vx_node node) |
| A callback to the client after a particular node has completed. More... | |
Functions | |
| vx_status VX_API_CALL | vxAssignNodeCallback (vx_node node, vx_nodecomplete_f callback) |
| Assigns a callback to a node. If a callback already exists in this node, this function must return an error [R00782]. The user may clear the callback by passing a NULL pointer as the callback [R00783]. More... | |
| vx_nodecomplete_f VX_API_CALL | vxRetrieveNodeCallback (vx_node node) |
| Retrieves the current node callback function pointer set on the node. More... | |
The formal typedef of the response from the callback.
Definition at line 440 of file vx_types.h.
A callback to the client after a particular node has completed.
| [in] | node | The node to which the callback was attached. |
Return code action values. Definition at line 449 of file vx_types.h.
| vx_status VX_API_CALL vxAssignNodeCallback | ( | vx_node | node, |
| vx_nodecomplete_f | callback | ||
| ) |
Assigns a callback to a node. If a callback already exists in this node, this function must return an error [R00782]. The user may clear the callback by passing a NULL pointer as the callback [R00783].
| [in] | node | The reference to the node [R00784]. |
| [in] | callback | The callback to associate with completion of this specific node [R00785]. |
The vx_status Constants value. | VX_SUCCESS | Callback assigned; and other value indicates failure [R00786]. |
| VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
| vx_nodecomplete_f VX_API_CALL vxRetrieveNodeCallback | ( | vx_node | node | ) |
Retrieves the current node callback function pointer set on the node.
| [in] | node | The reference to the vx_node object [R00787]. |
| NULL | No callback is set [R00788]. |
| * | The node callback function [R00789]. |