CoreFlow 1.0.0
A modern orchestration and execution runtime
Loading...
Searching...
No Matches
Extension: Events Handling API

The Event Handling Extension. More...

Classes

struct  _vx_event_graph_parameter_consumed
 Parameter structure returned with event of type VX_EVENT_GRAPH_PARAMETER_CONSUMED. More...
 
struct  _vx_event_graph_completed
 Parameter structure returned with event of type VX_EVENT_GRAPH_COMPLETED. More...
 
struct  _vx_event_node_completed
 Parameter structure returned with event of type VX_EVENT_NODE_COMPLETED. More...
 
struct  _vx_event_node_error
 Parameter structure returned with event of type VX_EVENT_NODE_ERROR. More...
 
struct  _vx_event_user_event
 Parameter structure returned with event of type VX_EVENT_USER_EVENT. More...
 
union  _vx_event_info_t
 Parameter structure associated with an event. Depends on type of the event. More...
 
struct  _vx_event
 Data structure which holds event information. More...
 

Typedefs

typedef struct _vx_event_graph_parameter_consumed vx_event_graph_parameter_consumed
 Parameter structure returned with event of type VX_EVENT_GRAPH_PARAMETER_CONSUMED.
 
typedef struct _vx_event_graph_completed vx_event_graph_completed
 Parameter structure returned with event of type VX_EVENT_GRAPH_COMPLETED.
 
typedef struct _vx_event_node_completed vx_event_node_completed
 Parameter structure returned with event of type VX_EVENT_NODE_COMPLETED.
 
typedef struct _vx_event_node_error vx_event_node_error
 Parameter structure returned with event of type VX_EVENT_NODE_ERROR.
 
typedef struct _vx_event_user_event vx_event_user_event
 Parameter structure returned with event of type VX_EVENT_USER_EVENT.
 
typedef union _vx_event_info_t vx_event_info_t
 Parameter structure associated with an event. Depends on type of the event.
 
typedef struct _vx_event vx_event_t
 Data structure which holds event information.
 

Enumerations

enum  vx_event_enum_e { VX_ENUM_EVENT_TYPE = 0x22 }
 Extra enums. More...
 
enum  vx_event_type_e {
  VX_EVENT_GRAPH_PARAMETER_CONSUMED = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_EVENT_TYPE << 12)) + 0x0 ,
  VX_EVENT_GRAPH_COMPLETED = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_EVENT_TYPE << 12)) + 0x1 ,
  VX_EVENT_NODE_COMPLETED = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_EVENT_TYPE << 12)) + 0x2 ,
  VX_EVENT_NODE_ERROR = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_EVENT_TYPE << 12)) + 0x3 ,
  VX_EVENT_USER = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_EVENT_TYPE << 12)) + 0x4
}
 Type of event that can be generated during system execution. More...
 

Functions

VX_API_ENTRY vx_status VX_API_CALL vxWaitEvent (vx_context context, vx_event_t *event, vx_bool do_not_block)
 Wait for a single event.
 
VX_API_ENTRY vx_status VX_API_CALL vxEnableEvents (vx_context context)
 Enable event generation.
 
VX_API_ENTRY vx_status VX_API_CALL vxDisableEvents (vx_context context)
 Disable event generation.
 
VX_API_ENTRY vx_status VX_API_CALL vxSendUserEvent (vx_context context, vx_uint32 app_value, void *parameter)
 Generate user defined event.
 
VX_API_ENTRY vx_status VX_API_CALL vxRegisterEvent (vx_reference ref, enum vx_event_type_e type, vx_uint32 param, vx_uint32 app_value)
 Register an event to be generated.
 

Detailed Description

The Event Handling Extension.

Typedef Documentation

◆ vx_event_graph_completed

#include <vx_khr_pipelining.h>

Parameter structure returned with event of type VX_EVENT_GRAPH_COMPLETED.

◆ vx_event_graph_parameter_consumed

#include <vx_khr_pipelining.h>

Parameter structure returned with event of type VX_EVENT_GRAPH_PARAMETER_CONSUMED.

◆ vx_event_info_t

#include <vx_khr_pipelining.h>

Parameter structure associated with an event. Depends on type of the event.

◆ vx_event_node_completed

#include <vx_khr_pipelining.h>

Parameter structure returned with event of type VX_EVENT_NODE_COMPLETED.

◆ vx_event_node_error

#include <vx_khr_pipelining.h>

Parameter structure returned with event of type VX_EVENT_NODE_ERROR.

◆ vx_event_t

typedef struct _vx_event vx_event_t

#include <vx_khr_pipelining.h>

Data structure which holds event information.

◆ vx_event_user_event

#include <vx_khr_pipelining.h>

Parameter structure returned with event of type VX_EVENT_USER_EVENT.

Enumeration Type Documentation

◆ vx_event_enum_e

#include <vx_khr_pipelining.h>

Extra enums.

Enumerator
VX_ENUM_EVENT_TYPE 

Event Type enumeration.

◆ vx_event_type_e

#include <vx_khr_pipelining.h>

Type of event that can be generated during system execution.

Enumerator
VX_EVENT_GRAPH_PARAMETER_CONSUMED 

Graph parameter consumed event.

This event is generated when a data reference at a graph parameter is consumed during a graph execution. It is used to indicate that a given data reference is no longer used by the graph and can be dequeued and accessed by the application.

Note
Graph execution could still be "in progress" for rest of the graph that does not use this data reference.
VX_EVENT_GRAPH_COMPLETED 

Graph completion event.

This event is generated every time a graph execution completes. Graph completion event is generated for both successful execution of a graph or abandoned execution of a graph.

VX_EVENT_NODE_COMPLETED 

Node completion event.

This event is generated every time a node within a graph completes execution.

VX_EVENT_NODE_ERROR 

Node error event.

This event is generated every time a node returns error within a graph.

VX_EVENT_USER 

User defined event.

This event is generated by user application outside of OpenVX framework using the vxSendUserEvent API. User events allow application to have single centralized 'wait-for' loop to handle both framework generated events as well as user generated events.

Note
Since the application initiates user events and not the framework, the application does NOT register user events using vxRegisterEvent.

Function Documentation

◆ vxDisableEvents()

VX_API_ENTRY vx_status VX_API_CALL vxDisableEvents ( vx_context context)

#include <vx_khr_pipelining.h>

Disable event generation.

When events are disabled, any event generated before this API is called will still be returned via vxWaitEvent API. However no additional events would be returned via vxWaitEvent API until events are enabled again.

Parameters
context[in] OpenVX context
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.

◆ vxEnableEvents()

VX_API_ENTRY vx_status VX_API_CALL vxEnableEvents ( vx_context context)

#include <vx_khr_pipelining.h>

Enable event generation.

Depending on the implementation, events may be either enabled or disabled by default.

Parameters
context[in] OpenVX context
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.

◆ vxRegisterEvent()

VX_API_ENTRY vx_status VX_API_CALL vxRegisterEvent ( vx_reference ref,
enum vx_event_type_e type,
vx_uint32 param,
vx_uint32 app_value )

#include <vx_khr_pipelining.h>

Register an event to be generated.

Generation of event may need additional resources and overheads for an implementation. Hence events should be registered for references only when really required by an application.

This API can be called on graph, node or graph parameter. This API MUST be called before doing vxVerifyGraph for that graph.

Parameters
ref[in] Reference which will generate the event
type[in] Type or condition on which the event is generated
param[in] Specifies the graph parameter index when type is VX_EVENT_GRAPH_PARAMETER_CONSUMED
app_value[in] Application-specified value that will be returned to user as part of vx_event_t::app_value. NOT used by implementation.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEref is not a valid vx_reference reference.
VX_ERROR_NOT_SUPPORTEDtype is not valid for the provided reference.

◆ vxSendUserEvent()

VX_API_ENTRY vx_status VX_API_CALL vxSendUserEvent ( vx_context context,
vx_uint32 app_value,
void * parameter )

#include <vx_khr_pipelining.h>

Generate user defined event.

Parameters
context[in] OpenVX context
app_value[in] Application-specified value that will be returned to user as part of vx_event_t.app_value NOT used by implementation.
parameter[in] User defined event parameter. NOT used by implementation. Returned to user as part vx_event_t.event_info.user_event.user_event_parameter field
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.

◆ vxWaitEvent()

VX_API_ENTRY vx_status VX_API_CALL vxWaitEvent ( vx_context context,
vx_event_t * event,
vx_bool do_not_block )

#include <vx_khr_pipelining.h>

Wait for a single event.

After vxDisableEvents is called, if vxWaitEvent(.. ,.. , vx_false_e) is called, vxWaitEvent will remain blocked until events are re-enabled using vxEnableEvents and a new event is received.

If vxReleaseContext is called while an application is blocked on vxWaitEvent , the behavior is not defined by OpenVX.

If vxWaitEvent is called simultaneously from multiple thread/task contexts then its behaviour is not defined by OpenVX.

Parameters
context[in] OpenVX context
event[out] Data structure which holds information about a received event
do_not_block[in] When value is vx_true_e API does not block and only checks for the condition
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSEvent received and event information available in 'event'
VX_FAILURENo event is received