TIOVX User Guide

Detailed Description

Internal APIs for context operations.

Data Structures

struct  tivx_graph_sort_context
 Context used while sorting a graph. More...
 
struct  tivx_context_t
 The top level context data for the entire OpenVX instance. More...
 

Functions

vx_bool ownIsValidContext (vx_context context)
 Check if 'context' is valid. More...
 
vx_status ownContextFlushCmdPendQueue (vx_context context)
 Flushes the command pend queue, if not empty. More...
 
vx_bool ownAddReferenceToContext (vx_context context, vx_reference ref)
 Add reference to a context. More...
 
vx_bool ownRemoveReferenceFromContext (vx_context context, vx_reference ref)
 Remove reference from a context. More...
 
vx_status ownAddKernelToContext (vx_context context, vx_kernel kernel)
 Add's unique kernel to context. More...
 
vx_status ownRemoveKernelFromContext (vx_context context, vx_kernel kernel)
 Remove unique kernel from context. More...
 
vx_status ownIsKernelInContext (vx_context context, vx_enum enumeration, const vx_char string[VX_MAX_KERNEL_NAME], vx_bool *is_found)
 Check if kernel exists inside the context.
 
vx_status ownContextSendCmd (vx_context context, uint32_t target_id, uint32_t cmd, uint32_t num_obj_desc, const uint16_t *obj_desc_id, uint32_t timeout)
 Send a command to specified target with object descriptor ID's as parameters. More...
 
vx_status ownContextSendControlCmd (vx_context context, uint16_t node_obj_desc, uint32_t target_id, uint32_t replicated_node_idx, uint32_t node_cmd_id, const uint16_t obj_desc_id[], uint32_t num_obj_desc, uint32_t timeout)
 Send a control command to specified target with object descriptor ID's as parameters. More...
 
vx_bool ownContextGetKernelRemoveLock (vx_context context)
 Get value of kernel remove lock flag. More...
 
void ownContextSetKernelRemoveLock (vx_context context, vx_bool do_lock)
 Set value of kernel remove lock flag. More...
 
vx_status ownContextLock (vx_context context)
 Lock context. More...
 
vx_status ownContextUnlock (vx_context context)
 Lock context. More...
 
vx_context ownGetContext (void)
 Returns the vx_context object currently being used. More...
 

Function Documentation

◆ ownIsValidContext()

vx_bool ownIsValidContext ( vx_context  context)

Check if 'context' is valid.

Parameters
[in]contextThe reference to context
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors.

◆ ownContextFlushCmdPendQueue()

vx_status ownContextFlushCmdPendQueue ( vx_context  context)

Flushes the command pend queue, if not empty.

Parameters
[in]contextThe reference to context
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors.

◆ ownAddReferenceToContext()

vx_bool ownAddReferenceToContext ( vx_context  context,
vx_reference  ref 
)

Add reference to a context.

Parameters
[in]contextThe overall context.
[in]refThe reference to add.
Returns
vx_true_e on success
vx_false_e on failure

◆ ownRemoveReferenceFromContext()

vx_bool ownRemoveReferenceFromContext ( vx_context  context,
vx_reference  ref 
)

Remove reference from a context.

Parameters
[in]contextThe overall context.
[in]refThe reference to remove.
Returns
vx_true_e on success
vx_false_e on failure

◆ ownAddKernelToContext()

vx_status ownAddKernelToContext ( vx_context  context,
vx_kernel  kernel 
)

Add's unique kernel to context.

Increment internal reference count of the kernel

◆ ownRemoveKernelFromContext()

vx_status ownRemoveKernelFromContext ( vx_context  context,
vx_kernel  kernel 
)

Remove unique kernel from context.

Decrement internal reference count of the kernel

◆ ownContextSendCmd()

vx_status ownContextSendCmd ( vx_context  context,
uint32_t  target_id,
uint32_t  cmd,
uint32_t  num_obj_desc,
const uint16_t *  obj_desc_id,
uint32_t  timeout 
)

Send a command to specified target with object descriptor ID's as parameters.

This API waits until ACK for the command is received

Parameters
context[in] context to use when sending the command
target_id[in] ID of Target to whom the command is being sent
cmd[in] command to send
num_obj_desc[in] number of object descriptors to send
obj_desc_id[in] List of object descriptor to send
timeout[in] Timeout in units of msecs, use TIVX_EVENT_TIMEOUT_WAIT_FOREVER to wait forever

◆ ownContextSendControlCmd()

vx_status ownContextSendControlCmd ( vx_context  context,
uint16_t  node_obj_desc,
uint32_t  target_id,
uint32_t  replicated_node_idx,
uint32_t  node_cmd_id,
const uint16_t  obj_desc_id[],
uint32_t  num_obj_desc,
uint32_t  timeout 
)

Send a control command to specified target with object descriptor ID's as parameters.

This API waits for 'timeout' msecs, until ACK for the command is received

Parameters
context[in] context to use when sending the command
node_obj_desc[in] ID of node object descriptor to which command is being sent
target_id[in] ID of Target to whom the command is being sent
replicated_node_idx[in] If the node is replicated, index of the replica to send the command to
node_cmd_id[in] ID of the command to send to the node
obj_desc_id[][in] Array of IDs of object descriptor
num_obj_desc[in] Number of object descriptors in obj_desc_id[] array
timeout[in] Timeout in units of msecs, use TIVX_EVENT_TIMEOUT_WAIT_FOREVER to wait forever

◆ ownContextGetKernelRemoveLock()

vx_bool ownContextGetKernelRemoveLock ( vx_context  context)

Get value of kernel remove lock flag.

Parameters
context[in] context

◆ ownContextSetKernelRemoveLock()

void ownContextSetKernelRemoveLock ( vx_context  context,
vx_bool  do_lock 
)

Set value of kernel remove lock flag.

Parameters
context[in] context
do_lock[in] kernel remove lock value to set

◆ ownContextLock()

vx_status ownContextLock ( vx_context  context)

Lock context.

Parameters
context[in] context

◆ ownContextUnlock()

vx_status ownContextUnlock ( vx_context  context)

Lock context.

Parameters
context[in] context

◆ ownGetContext()

vx_context ownGetContext ( void  )

Returns the vx_context object currently being used.

This API returns the context being used. If the context has not yet been created using vxCreateContext, then it returns NULL. This API does not include reference counting like in the vxCreateContext.

Returns
The vx_context object being used.