CoreFlow 1.0.0
A modern orchestration and execution runtime
Loading...
Searching...
No Matches
coreflow::Delay Class Reference

#include <vx_delay.h>

Inheritance diagram for coreflow::Delay:
coreflow::Reference

Public Member Functions

 Delay (vx_context context, vx_reference scope)
 Construct a new Delay object.
 
 ~Delay ()
 Destroy the Delay object.
 
vx_enum dataType () const
 Get data type of references associated with this delay object.
 
vx_size numObjects () const
 Get the number of objects in this delay object.
 
vx_reference getReference (vx_int32 index)
 Retrieves a reference to a delay slot object.
 
vx_status age ()
 Shifts the internal delay ring by one.
 
vx_status registerAutoAging (vx_graph graph)
 Register a delay for auto-aging.
 
void destruct () override final
 Destruct function for delay objects.
 
vx_uint32 refCount () const
 Returns the reference count of the object.
 
const vx_charrefName () const
 Returns the name of the reference.
 
void setName (const vx_char *name)
 Sets the name of the reference.
 
vx_uint32 incrementReference (vx_reftype_e refType)
 Increments the ref count.
 
vx_uint32 decrementReference (vx_reftype_e refType)
 Decrements the ref count.
 
vx_uint32 totalReferenceCount ()
 Returns the total reference count of the object.
 
void initReferenceForDelay (vx_delay delay, vx_int32 index)
 Used to initialize any vx_reference as a delay element.
 

Static Public Member Functions

static vx_delay createDelay (vx_context context, vx_reference exemplar, vx_size count)
 Create a delay object.
 
static vx_bool removeAssociationToDelay (vx_reference value, vx_node n, vx_uint32 i)
 Removes an association to a node from a delay slot object reference.
 
static vx_bool addAssociationToDelay (vx_reference value, vx_node n, vx_uint32 i)
 Adds an association to a node to a delay slot object reference.
 
static vx_reference createReference (vx_context context, vx_enum type, vx_reftype_e refType, vx_reference scope)
 Used to create a reference.
 
static void printReference (vx_reference ref)
 Prints the values of a reference.
 
static vx_bool isValidReference (vx_reference ref)
 Used to validate everything but vx_context, vx_image and vx_buffer.
 
static vx_bool isValidReference (vx_reference ref, vx_enum type)
 Used to validate everything but vx_context, vx_image and vx_buffer.
 
static vx_size sizeOfType (vx_enum type)
 Returns the number of bytes in the internal structure for a given type.
 
static vx_status releaseReference (vx_reference *ref, vx_enum type, vx_reftype_e reftype, vx_destructor_f special_destructor)
 Used to destroy a reference.
 

Public Attributes

vx_size count
 The number of objects in the delay.
 
vx_uint32 index
 The current index which is '0'.
 
vx_enum type
 Object Type in the Delay.
 
vx_delay_param_tset
 The set of Nodes each object is associated with in the delay.
 
vx_referencerefs
 The set of objects in the delay.
 
vx_delaypyr
 The set of delays for pyramid levels.
 
struct _vx_platform * platform
 Platform for ICD compatibility.
 
vx_uint32 magic
 Used to validate references, must be set to VX_MAGIC.
 
vx_context context
 Pointer to the top level context. If this reference is the context, this will be NULL.
 
vx_reference scope
 The pointer to the object's scope parent. When virtual objects are scoped within a graph, this will point to that parent graph. This is left generic to allow future scoping variations. By default scope should be the same as context.
 
vx_uint32 external_count
 The count of the number of users with this reference. When greater than 0, this can not be freed. When zero, the value can be considered inaccessible.
 
vx_uint32 internal_count
 The count of the number of framework references. When greater than 0, this can not be freed.
 
vx_uint32 read_count
 The number of times the object has been read (in some portion)
 
vx_uint32 write_count
 The number of times the object has been written to (in some portion)
 
vx_sem_t lock
 The reference lock which is used to protect access to "in-fly" data.
 
void * reserved
 A reserved field which can be used to store anonymous data.
 
vx_bool extracted
 This indicates if the object was extracted from another object.
 
vx_bool is_virtual
 This indicates if the object is virtual or not.
 
vx_delay delay
 
vx_int32 delay_slot_index
 
vx_bool is_accessible
 This indicates that if the object is virtual whether it is accessible at the moment or not.
 
vx_char name [VX_MAX_REFERENCE_NAME]
 The reference name.
 

Member Function Documentation

◆ registerAutoAging()

vx_status coreflow::Delay::registerAutoAging ( vx_graph graph)

Register a delay for auto-aging.

This function registers a delay object to be auto-aged by the graph. This delay object will be automatically aged after each successful completion of this graph. Aging of a delay object cannot be called during graph execution. A graph abandoned due to a node callback will trigger an auto-aging.

If a delay is registered for auto-aging multiple times in a same graph, the delay will be only aged a single time at each graph completion. If a delay is registered for auto-aging in multiple graphs, this delay will aged automatically after each successful completion of any of these graphs.

Parameters
[in]graphThe graph to which the delay is registered for auto-aging.
Returns
vx_status VX_SUCCESS if successful, any other value indicates failure.

Member Data Documentation

◆ context

vx_context coreflow::Reference::context
inherited

Pointer to the top level context. If this reference is the context, this will be NULL.

◆ count

vx_size coreflow::Delay::count

The number of objects in the delay.

◆ delay

vx_delay coreflow::Reference::delay
inherited

◆ delay_slot_index

vx_int32 coreflow::Reference::delay_slot_index
inherited

◆ external_count

vx_uint32 coreflow::Reference::external_count
inherited

The count of the number of users with this reference. When greater than 0, this can not be freed. When zero, the value can be considered inaccessible.

◆ extracted

vx_bool coreflow::Reference::extracted
inherited

This indicates if the object was extracted from another object.

◆ index

vx_uint32 coreflow::Delay::index

The current index which is '0'.

◆ internal_count

vx_uint32 coreflow::Reference::internal_count
inherited

The count of the number of framework references. When greater than 0, this can not be freed.

◆ is_accessible

vx_bool coreflow::Reference::is_accessible
inherited

This indicates that if the object is virtual whether it is accessible at the moment or not.

◆ is_virtual

vx_bool coreflow::Reference::is_virtual
inherited

This indicates if the object is virtual or not.

◆ lock

vx_sem_t coreflow::Reference::lock
inherited

The reference lock which is used to protect access to "in-fly" data.

◆ magic

vx_uint32 coreflow::Reference::magic
inherited

Used to validate references, must be set to VX_MAGIC.

◆ name

vx_char coreflow::Reference::name[VX_MAX_REFERENCE_NAME]
inherited

The reference name.

◆ platform

struct _vx_platform* coreflow::Reference::platform
inherited

Platform for ICD compatibility.

◆ pyr

vx_delay* coreflow::Delay::pyr

The set of delays for pyramid levels.

◆ read_count

vx_uint32 coreflow::Reference::read_count
inherited

The number of times the object has been read (in some portion)

◆ refs

vx_reference* coreflow::Delay::refs

The set of objects in the delay.

◆ reserved

void* coreflow::Reference::reserved
inherited

A reserved field which can be used to store anonymous data.

◆ scope

vx_reference coreflow::Reference::scope
inherited

The pointer to the object's scope parent. When virtual objects are scoped within a graph, this will point to that parent graph. This is left generic to allow future scoping variations. By default scope should be the same as context.

◆ set

vx_delay_param_t* coreflow::Delay::set

The set of Nodes each object is associated with in the delay.

◆ type

vx_enum coreflow::Delay::type

Object Type in the Delay.

◆ write_count

vx_uint32 coreflow::Reference::write_count
inherited

The number of times the object has been written to (in some portion)