The OpenVX Specification
dba1aa3
|
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 vx_action_e
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. 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. Execution of any other node is unspecified.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... | |
Enumerations | |
enum | vx_action_e { VX_ACTION_CONTINUE = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_ACTION << 12)) + 0x0, VX_ACTION_ABANDON = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_ACTION << 12)) + 0x1 } |
A return code enumeration from a vx_nodecomplete_f during execution. 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 and the user may clear the callback by passing a NULL pointer as the callback. 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 451 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. |
vx_action_e
. Definition at line 460 of file vx_types.h.
enum vx_action_e |
A return code enumeration from a vx_nodecomplete_f
during execution.
vxAssignNodeCallback
Enumerator | |
---|---|
VX_ACTION_CONTINUE |
Continue executing the graph with no changes. |
VX_ACTION_ABANDON |
Stop executing the graph. |
Definition at line 601 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 and the user may clear the callback by passing a NULL pointer as the callback.
[in] | node | The reference to the node. |
[in] | callback | The callback to associate with completion of this specific node. |
vx_status_e
enumeration. VX_SUCCESS | Callback assigned; any other value indicates failure. |
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. |
NULL | No callback is set. |
* | The node callback function. |