Vuo  2.3.2
Functions
VuoRuntimeContext.cc File Reference

Description

VuoRuntimeContext implementation.

Definition in file VuoRuntimeContext.cc.

Go to the source code of this file.

Functions

struct PortContextvuoCreatePortContext (void *data, bool isTrigger, const char *triggerQueueName)
 Creates a port context, initializing its fields to default values. More...
 
struct NodeContextvuoCreateNodeContext (bool hasInstanceData, bool isComposition, size_t outputEventCount)
 Creates a node context, initializing its fields to default values. More...
 
void vuoFreePortContext (struct PortContext *portContext)
 Frees the port context and its fields. More...
 
void vuoFreeNodeContext (struct NodeContext *nodeContext)
 Frees the port context and its fields. More...
 
void vuoSetPortContextEvent (struct PortContext *portContext, bool event)
 Sets the port context's event field. More...
 
void vuoSetPortContextData (struct PortContext *portContext, void *data)
 Sets the port context's data field. More...
 
void vuoSetPortContextTriggerFunction (struct PortContext *portContext, void *triggerFunction)
 Sets the port context's triggerFunction field. More...
 
bool vuoGetPortContextEvent (struct PortContext *portContext)
 Gets the port context's event field. More...
 
void * vuoGetPortContextData (struct PortContext *portContext)
 Gets the port context's data field. More...
 
dispatch_queue_t vuoGetPortContextTriggerQueue (struct PortContext *portContext)
 Gets the port context's triggerQueue field. More...
 
dispatch_semaphore_t vuoGetPortContextTriggerSemaphore (struct PortContext *portContext)
 Gets the port context's triggerSemaphore field. More...
 
void * vuoGetPortContextTriggerFunction (struct PortContext *portContext)
 Gets the port context's triggerFunction field. More...
 
void vuoRetainPortContextData (struct PortContext *portContext)
 Prevents the port context's data field from being freed by vuoFreePortContext(). More...
 
void vuoSetNodeContextPortContexts (struct NodeContext *nodeContext, struct PortContext **portContexts, unsigned long portContextCount)
 Sets the node context's portContexts and portContextCount fields. More...
 
void vuoSetNodeContextInstanceData (struct NodeContext *nodeContext, void *instanceData)
 Sets the node context's instanceData field, freeing the previous value. More...
 
void vuoSetNodeContextClaimingEventId (struct NodeContext *nodeContext, unsigned long claimingEventId)
 Sets the node context's claimingEventId field. More...
 
void vuoSetNodeContextOutputEvent (struct NodeContext *nodeContext, size_t index, bool event)
 Sets the array element at the given index of the node context's outputEvents field. More...
 
struct PortContextvuoGetNodeContextPortContext (struct NodeContext *nodeContext, size_t index)
 Gets the array element at the given index of the node context's portContexts field. More...
 
void * vuoGetNodeContextInstanceData (struct NodeContext *nodeContext)
 Gets the node context's instanceData field. More...
 
unsigned long vuoGetNodeContextClaimingEventId (struct NodeContext *nodeContext)
 Gets the node context's claimingEventId field. More...
 
dispatch_group_t vuoGetNodeContextExecutingGroup (struct NodeContext *nodeContext)
 Gets the node context's executingGroup field. More...
 
bool vuoGetNodeContextOutputEvent (struct NodeContext *nodeContext, size_t index)
 Gets the array element at the given index of the node context's outputEvents field. More...
 
void vuoResetNodeContextEvents (struct NodeContext *nodeContext)
 Sets the event field to false for all of the port contexts in this node context. More...
 
void vuoStartedExecutingEvent (struct NodeContext *nodeContext, unsigned long eventId)
 Sets the node context's executingEventIds field to a list containing the given value, clearing out any old values. More...
 
void vuoSpunOffExecutingEvent (struct NodeContext *nodeContext, unsigned long eventId)
 Adds the given value to the list in the node context's executingEventIds field. More...
 
bool vuoFinishedExecutingEvent (struct NodeContext *nodeContext, unsigned long eventId)
 Removes the given value from the list in the node context's executingEventIds field if present. More...
 
unsigned long vuoGetOneExecutingEvent (struct NodeContext *nodeContext)
 Returns the first list item in the node context's executingEventIds field. More...
 

Function Documentation

◆ vuoCreateNodeContext()

struct NodeContext* vuoCreateNodeContext ( bool  hasInstanceData,
bool  isComposition,
size_t  outputEventCount 
)

Creates a node context, initializing its fields to default values.

Definition at line 43 of file VuoRuntimeContext.cc.

◆ vuoCreatePortContext()

struct PortContext* vuoCreatePortContext ( void *  data,
bool  isTrigger,
const char *  triggerQueueName 
)

Creates a port context, initializing its fields to default values.

Definition at line 18 of file VuoRuntimeContext.cc.

◆ vuoFinishedExecutingEvent()

bool vuoFinishedExecutingEvent ( struct NodeContext nodeContext,
unsigned long  eventId 
)

Removes the given value from the list in the node context's executingEventIds field if present.

Returns true if it was present and was the last item in the list.

Definition at line 296 of file VuoRuntimeContext.cc.

◆ vuoFreeNodeContext()

void vuoFreeNodeContext ( struct NodeContext nodeContext)

Frees the port context and its fields.

Definition at line 96 of file VuoRuntimeContext.cc.

◆ vuoFreePortContext()

void vuoFreePortContext ( struct PortContext portContext)

Frees the port context and its fields.

Definition at line 82 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextClaimingEventId()

unsigned long vuoGetNodeContextClaimingEventId ( struct NodeContext nodeContext)

Gets the node context's claimingEventId field.

Definition at line 238 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextExecutingGroup()

dispatch_group_t vuoGetNodeContextExecutingGroup ( struct NodeContext nodeContext)

Gets the node context's executingGroup field.

Definition at line 246 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextInstanceData()

void* vuoGetNodeContextInstanceData ( struct NodeContext nodeContext)

Gets the node context's instanceData field.

Definition at line 230 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextOutputEvent()

bool vuoGetNodeContextOutputEvent ( struct NodeContext nodeContext,
size_t  index 
)

Gets the array element at the given index of the node context's outputEvents field.

Definition at line 254 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextPortContext()

struct PortContext* vuoGetNodeContextPortContext ( struct NodeContext nodeContext,
size_t  index 
)

Gets the array element at the given index of the node context's portContexts field.

Definition at line 222 of file VuoRuntimeContext.cc.

◆ vuoGetOneExecutingEvent()

unsigned long vuoGetOneExecutingEvent ( struct NodeContext nodeContext)

Returns the first list item in the node context's executingEventIds field.

This is useful for when you know the list contains exactly one item.

Definition at line 314 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextData()

void* vuoGetPortContextData ( struct PortContext portContext)

Gets the port context's data field.

Definition at line 148 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextEvent()

bool vuoGetPortContextEvent ( struct PortContext portContext)

Gets the port context's event field.

Definition at line 140 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextTriggerFunction()

void* vuoGetPortContextTriggerFunction ( struct PortContext portContext)

Gets the port context's triggerFunction field.

Definition at line 172 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextTriggerQueue()

dispatch_queue_t vuoGetPortContextTriggerQueue ( struct PortContext portContext)

Gets the port context's triggerQueue field.

Definition at line 156 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextTriggerSemaphore()

dispatch_semaphore_t vuoGetPortContextTriggerSemaphore ( struct PortContext portContext)

Gets the port context's triggerSemaphore field.

Definition at line 164 of file VuoRuntimeContext.cc.

◆ vuoResetNodeContextEvents()

void vuoResetNodeContextEvents ( struct NodeContext nodeContext)

Sets the event field to false for all of the port contexts in this node context.

Definition at line 262 of file VuoRuntimeContext.cc.

◆ vuoRetainPortContextData()

void vuoRetainPortContextData ( struct PortContext portContext)

Prevents the port context's data field from being freed by vuoFreePortContext().

Definition at line 180 of file VuoRuntimeContext.cc.

◆ vuoSetNodeContextClaimingEventId()

void vuoSetNodeContextClaimingEventId ( struct NodeContext nodeContext,
unsigned long  claimingEventId 
)

Sets the node context's claimingEventId field.

Definition at line 206 of file VuoRuntimeContext.cc.

◆ vuoSetNodeContextInstanceData()

void vuoSetNodeContextInstanceData ( struct NodeContext nodeContext,
void *  instanceData 
)

Sets the node context's instanceData field, freeing the previous value.

Definition at line 197 of file VuoRuntimeContext.cc.

◆ vuoSetNodeContextOutputEvent()

void vuoSetNodeContextOutputEvent ( struct NodeContext nodeContext,
size_t  index,
bool  event 
)

Sets the array element at the given index of the node context's outputEvents field.

Definition at line 214 of file VuoRuntimeContext.cc.

◆ vuoSetNodeContextPortContexts()

void vuoSetNodeContextPortContexts ( struct NodeContext nodeContext,
struct PortContext **  portContexts,
unsigned long  portContextCount 
)

Sets the node context's portContexts and portContextCount fields.

Definition at line 188 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextData()

void vuoSetPortContextData ( struct PortContext portContext,
void *  data 
)

Sets the port context's data field.

Definition at line 124 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextEvent()

void vuoSetPortContextEvent ( struct PortContext portContext,
bool  event 
)

Sets the port context's event field.

Definition at line 116 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextTriggerFunction()

void vuoSetPortContextTriggerFunction ( struct PortContext portContext,
void *  triggerFunction 
)

Sets the port context's triggerFunction field.

Definition at line 132 of file VuoRuntimeContext.cc.

◆ vuoSpunOffExecutingEvent()

void vuoSpunOffExecutingEvent ( struct NodeContext nodeContext,
unsigned long  eventId 
)

Adds the given value to the list in the node context's executingEventIds field.

Definition at line 283 of file VuoRuntimeContext.cc.

◆ vuoStartedExecutingEvent()

void vuoStartedExecutingEvent ( struct NodeContext nodeContext,
unsigned long  eventId 
)

Sets the node context's executingEventIds field to a list containing the given value, clearing out any old values.

Definition at line 271 of file VuoRuntimeContext.cc.