TIOVX User Guide
TIOVX Safety Features

TIOVX Timeout

By default, certain API's within OpenVX allow users to specify timeout values for the API operation. This can present an issue in the case of a heterogeneous system such as TI's SoC's in the event that a remote processor or OpenVX target experiences a fault and thus cannot receive new messages from the host CPU. Given the plausibility of this event occurring, safety systems must have a mechanism by which to recover from this issue.

If any of the blocking calls of API's from the following OpenVX objects fail due to a timeout issue, the return value will be TIVX_ERROR_EVENT_TIMEOUT. More information about how timeouts can be used with these objects is described below.

Node Timeouts

For the vx_node API, a timeout can be specified by calling the vxSetNodeAttribute API with the attribute TIVX_NODE_TIMEOUT. The timeout value can also be queried using the vxQueryNode API.

In the case that a timeout occurs during the create or delete commands of a node, the error will get propogated through the vxVerifyGraph or vxReleaseGraph calls.

The TI extension API tivxNodeSendCommandTimed also allows for specifying a timeout value at which time the API will return the TIVX_ERROR_EVENT_TIMEOUT value.

Graph Timeouts

For the vx_graph API, a timeout can be specified by calling the vxSetGraphAttribute API with the attribute TIVX_GRAPH_TIMEOUT. The timeout value can also be queried using the vxQueryGraph API.

The following graph related API's may return the TIVX_NODE_TIMEOUT error when enabling timeouts on the graph or nodes within the graph.

Custom Timeout Configuration in Target Kernel

For a custom target kernel, a timeout can be implemented at the callback level in order to return in the case that the timeout needs to be set at that granularity.

The recommended approach to achieve this is to configure the node API to pass a vx_user_data_object containing timeout values to the custom node. The tivxTaskWaitMsecs can then be used when setting the timeout. Please reference the target kernel implementation of the tivxCmdTimeoutTestNode for an example of how this can be achieved.