Vuo 2.4.4
Loading...
Searching...
No Matches
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.
 
struct NodeContextvuoCreateNodeContext (bool hasInstanceData, bool isComposition, size_t outputEventCount)
 Creates a node context, initializing its fields to default values.
 
void vuoFreePortContext (struct PortContext *portContext)
 Frees the port context and its fields.
 
void vuoFreeNodeContext (struct NodeContext *nodeContext)
 Frees the port context and its fields.
 
void vuoSetPortContextEvent (struct PortContext *portContext, bool event)
 Sets the port context's event field.
 
void vuoSetPortContextData (struct PortContext *portContext, void *data)
 Sets the port context's data field.
 
void vuoSetPortContextTriggerFunction (struct PortContext *portContext, void *triggerFunction)
 Sets the port context's triggerFunction field.
 
void vuoSetPortContextEventBlocking (struct PortContext *portContext, PortContext_EventBlocking eventBlocking)
 Sets the port context's eventBlocking field.
 
bool vuoGetPortContextEvent (struct PortContext *portContext)
 Gets the port context's event field.
 
void * vuoGetPortContextData (struct PortContext *portContext)
 Gets the port context's data field.
 
dispatch_queue_t vuoGetPortContextTriggerQueue (struct PortContext *portContext)
 Gets the port context's triggerQueue field.
 
dispatch_semaphore_t vuoGetPortContextTriggerSemaphore (struct PortContext *portContext)
 Gets the port context's triggerSemaphore field.
 
void * vuoGetPortContextTriggerFunction (struct PortContext *portContext)
 Gets the port context's triggerFunction field.
 
void vuoRetainPortContextData (struct PortContext *portContext)
 Prevents the port context's data field from being freed by vuoFreePortContext().
 
void vuoSetNodeContextPortContexts (struct NodeContext *nodeContext, struct PortContext **portContexts, unsigned long portContextCount)
 Sets the node context's portContexts and portContextCount fields.
 
void vuoSetNodeContextInstanceData (struct NodeContext *nodeContext, void *instanceData)
 Sets the node context's instanceData field, freeing the previous value.
 
void vuoSetNodeContextClaimingEventId (struct NodeContext *nodeContext, unsigned long claimingEventId)
 Sets the node context's claimingEventId field.
 
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.
 
struct PortContextvuoGetNodeContextPortContext (struct NodeContext *nodeContext, size_t index)
 Gets the array element at the given index of the node context's portContexts field.
 
void * vuoGetNodeContextInstanceData (struct NodeContext *nodeContext)
 Gets the node context's instanceData field.
 
unsigned long vuoGetNodeContextClaimingEventId (struct NodeContext *nodeContext)
 Gets the node context's claimingEventId field.
 
dispatch_group_t vuoGetNodeContextExecutingGroup (struct NodeContext *nodeContext)
 Gets the node context's executingGroup field.
 
bool vuoGetNodeContextOutputEvent (struct NodeContext *nodeContext, size_t index)
 Gets the array element at the given index of the node context's outputEvents field.
 
bool vuoEventHitAnyInputPort (NodeContext *nodeContext)
 Returns true if the most recent event hit at least one input port.
 
bool vuoEventHitInputPort (NodeContext *nodeContext, PortContext_EventBlocking eligibleEventBlocking)
 Returns true if the most recent event hit at least one input port whose event blocking matches eligibleEventBlocking.
 
void vuoSetOutputEventsAfterNodeExecution (NodeContext *nodeContext)
 Transmits events from the node's input ports to its output ports.
 
void vuoResetNodeContextEvents (struct NodeContext *nodeContext)
 Sets the event field to false for all of the port contexts in this node context.
 
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.
 
void vuoSpunOffExecutingEvent (struct NodeContext *nodeContext, unsigned long eventId)
 Adds the given value to the list in the node context's executingEventIds field.
 
bool vuoFinishedExecutingEvent (struct NodeContext *nodeContext, unsigned long eventId)
 Removes the given value from the list in the node context's executingEventIds field if present.
 
unsigned long vuoGetOneExecutingEvent (struct NodeContext *nodeContext)
 Returns the first list item in the node context's executingEventIds field.
 

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 44 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.

◆ vuoEventHitAnyInputPort()

bool vuoEventHitAnyInputPort ( NodeContext nodeContext)

Returns true if the most recent event hit at least one input port.

Definition at line 271 of file VuoRuntimeContext.cc.

◆ vuoEventHitInputPort()

bool vuoEventHitInputPort ( NodeContext nodeContext,
PortContext_EventBlocking  eligibleEventBlocking 
)

Returns true if the most recent event hit at least one input port whose event blocking matches eligibleEventBlocking.

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

◆ vuoFreeNodeContext()

void vuoFreeNodeContext ( struct NodeContext nodeContext)

Frees the port context and its fields.

Definition at line 97 of file VuoRuntimeContext.cc.

◆ vuoFreePortContext()

void vuoFreePortContext ( struct PortContext portContext)

Frees the port context and its fields.

Definition at line 83 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextClaimingEventId()

unsigned long vuoGetNodeContextClaimingEventId ( struct NodeContext nodeContext)

Gets the node context's claimingEventId field.

Definition at line 247 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextExecutingGroup()

dispatch_group_t vuoGetNodeContextExecutingGroup ( struct NodeContext nodeContext)

Gets the node context's executingGroup field.

Definition at line 255 of file VuoRuntimeContext.cc.

◆ vuoGetNodeContextInstanceData()

void * vuoGetNodeContextInstanceData ( struct NodeContext nodeContext)

Gets the node context's instanceData field.

Definition at line 239 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 263 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 231 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 375 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextData()

void * vuoGetPortContextData ( struct PortContext portContext)

Gets the port context's data field.

Definition at line 157 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextEvent()

bool vuoGetPortContextEvent ( struct PortContext portContext)

Gets the port context's event field.

Definition at line 149 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextTriggerFunction()

void * vuoGetPortContextTriggerFunction ( struct PortContext portContext)

Gets the port context's triggerFunction field.

Definition at line 181 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextTriggerQueue()

dispatch_queue_t vuoGetPortContextTriggerQueue ( struct PortContext portContext)

Gets the port context's triggerQueue field.

Definition at line 165 of file VuoRuntimeContext.cc.

◆ vuoGetPortContextTriggerSemaphore()

dispatch_semaphore_t vuoGetPortContextTriggerSemaphore ( struct PortContext portContext)

Gets the port context's triggerSemaphore field.

Definition at line 173 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 323 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 189 of file VuoRuntimeContext.cc.

◆ vuoSetNodeContextClaimingEventId()

void vuoSetNodeContextClaimingEventId ( struct NodeContext nodeContext,
unsigned long  claimingEventId 
)

Sets the node context's claimingEventId field.

Definition at line 215 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 206 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 223 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 197 of file VuoRuntimeContext.cc.

◆ vuoSetOutputEventsAfterNodeExecution()

void vuoSetOutputEventsAfterNodeExecution ( NodeContext nodeContext)

Transmits events from the node's input ports to its output ports.

  • If the event hit any non-blocking input port, then the event is transmitted to all output ports.
  • If the event did not hit any non-blocking input ports or door input ports, then the event is not transmitted to any output ports.
  • Otherwise (the event hit a door input port), the event transmission is handled by the node class implementation.

Definition at line 304 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextData()

void vuoSetPortContextData ( struct PortContext portContext,
void *  data 
)

Sets the port context's data field.

Definition at line 125 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextEvent()

void vuoSetPortContextEvent ( struct PortContext portContext,
bool  event 
)

Sets the port context's event field.

Definition at line 117 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextEventBlocking()

void vuoSetPortContextEventBlocking ( struct PortContext portContext,
PortContext_EventBlocking  eventBlocking 
)

Sets the port context's eventBlocking field.

Definition at line 141 of file VuoRuntimeContext.cc.

◆ vuoSetPortContextTriggerFunction()

void vuoSetPortContextTriggerFunction ( struct PortContext portContext,
void *  triggerFunction 
)

Sets the port context's triggerFunction field.

Definition at line 133 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 344 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 332 of file VuoRuntimeContext.cc.