Vuo  2.0.3
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...
 
dispatch_semaphore_t vuoGetNodeContextSemaphore (struct NodeContext *nodeContext)
 Gets the node context's semaphore 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 42 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 17 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 302 of file VuoRuntimeContext.cc.

◆ vuoFreeNodeContext()

void vuoFreeNodeContext ( struct NodeContext nodeContext)

Frees the port context and its fields.

Definition at line 94 of file VuoRuntimeContext.cc.

◆ vuoFreePortContext()

void vuoFreePortContext ( struct PortContext portContext)

Frees the port context and its fields.

Definition at line 80 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextClaimingEventId()

unsigned long vuoGetNodeContextClaimingEventId ( struct NodeContext nodeContext)

Gets the node context's claimingEventId field.

Definition at line 244 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextExecutingGroup()

dispatch_group_t vuoGetNodeContextExecutingGroup ( struct NodeContext nodeContext)

Gets the node context's executingGroup field.

Definition at line 252 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextInstanceData()

void* vuoGetNodeContextInstanceData ( struct NodeContext nodeContext)

Gets the node context's instanceData field.

Definition at line 228 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 260 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 220 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextSemaphore()

dispatch_semaphore_t vuoGetNodeContextSemaphore ( struct NodeContext nodeContext)

Gets the node context's semaphore field.

Definition at line 236 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 320 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextData()

void* vuoGetPortContextData ( struct PortContext portContext)

Gets the port context's data field.

Definition at line 146 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextEvent()

bool vuoGetPortContextEvent ( struct PortContext portContext)

Gets the port context's event field.

Definition at line 138 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextTriggerFunction()

void* vuoGetPortContextTriggerFunction ( struct PortContext portContext)

Gets the port context's triggerFunction field.

Definition at line 170 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextTriggerQueue()

dispatch_queue_t vuoGetPortContextTriggerQueue ( struct PortContext portContext)

Gets the port context's triggerQueue field.

Definition at line 154 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextTriggerSemaphore()

dispatch_semaphore_t vuoGetPortContextTriggerSemaphore ( struct PortContext portContext)

Gets the port context's triggerSemaphore field.

Definition at line 162 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 268 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 178 of file VuoRuntimeContext.cc.

◆ vuoSetNodeContextClaimingEventId()

void vuoSetNodeContextClaimingEventId ( struct NodeContext nodeContext,
unsigned long  claimingEventId 
)

Sets the node context's claimingEventId field.

Definition at line 204 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 195 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 212 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 186 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextData()

void vuoSetPortContextData ( struct PortContext portContext,
void *  data 
)

Sets the port context's data field.

Definition at line 122 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextEvent()

void vuoSetPortContextEvent ( struct PortContext portContext,
bool  event 
)

Sets the port context's event field.

Definition at line 114 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextTriggerFunction()

void vuoSetPortContextTriggerFunction ( struct PortContext portContext,
void *  triggerFunction 
)

Sets the port context's triggerFunction field.

Definition at line 130 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 289 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 277 of file VuoRuntimeContext.cc.