VuoRuntimeContext implementation.
Definition in file VuoRuntimeContext.cc.
Go to the source code of this file.
Functions | |
struct PortContext * | vuoCreatePortContext (void *data, bool isTrigger, const char *triggerQueueName) |
Creates a port context, initializing its fields to default values. | |
struct NodeContext * | vuoCreateNodeContext (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 PortContext * | vuoGetNodeContextPortContext (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. | |
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.
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.
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.
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.
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.
void vuoFreeNodeContext | ( | struct NodeContext * | nodeContext | ) |
Frees the port context and its fields.
Definition at line 97 of file VuoRuntimeContext.cc.
void vuoFreePortContext | ( | struct PortContext * | portContext | ) |
Frees the port context and its fields.
Definition at line 83 of file VuoRuntimeContext.cc.
unsigned long vuoGetNodeContextClaimingEventId | ( | struct NodeContext * | nodeContext | ) |
Gets the node context's claimingEventId field.
Definition at line 247 of file VuoRuntimeContext.cc.
dispatch_group_t vuoGetNodeContextExecutingGroup | ( | struct NodeContext * | nodeContext | ) |
Gets the node context's executingGroup field.
Definition at line 255 of file VuoRuntimeContext.cc.
void * vuoGetNodeContextInstanceData | ( | struct NodeContext * | nodeContext | ) |
Gets the node context's instanceData field.
Definition at line 239 of file VuoRuntimeContext.cc.
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.
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.
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.
void * vuoGetPortContextData | ( | struct PortContext * | portContext | ) |
Gets the port context's data field.
Definition at line 157 of file VuoRuntimeContext.cc.
bool vuoGetPortContextEvent | ( | struct PortContext * | portContext | ) |
Gets the port context's event field.
Definition at line 149 of file VuoRuntimeContext.cc.
void * vuoGetPortContextTriggerFunction | ( | struct PortContext * | portContext | ) |
Gets the port context's triggerFunction field.
Definition at line 181 of file VuoRuntimeContext.cc.
dispatch_queue_t vuoGetPortContextTriggerQueue | ( | struct PortContext * | portContext | ) |
Gets the port context's triggerQueue field.
Definition at line 165 of file VuoRuntimeContext.cc.
dispatch_semaphore_t vuoGetPortContextTriggerSemaphore | ( | struct PortContext * | portContext | ) |
Gets the port context's triggerSemaphore field.
Definition at line 173 of file VuoRuntimeContext.cc.
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.
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.
void vuoSetNodeContextClaimingEventId | ( | struct NodeContext * | nodeContext, |
unsigned long | claimingEventId | ||
) |
Sets the node context's claimingEventId field.
Definition at line 215 of file VuoRuntimeContext.cc.
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.
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.
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.
void vuoSetOutputEventsAfterNodeExecution | ( | NodeContext * | nodeContext | ) |
Transmits events from the node's input ports to its output ports.
Definition at line 304 of file VuoRuntimeContext.cc.
void vuoSetPortContextData | ( | struct PortContext * | portContext, |
void * | data | ||
) |
Sets the port context's data field.
Definition at line 125 of file VuoRuntimeContext.cc.
void vuoSetPortContextEvent | ( | struct PortContext * | portContext, |
bool | event | ||
) |
Sets the port context's event field.
Definition at line 117 of file VuoRuntimeContext.cc.
void vuoSetPortContextEventBlocking | ( | struct PortContext * | portContext, |
PortContext_EventBlocking | eventBlocking | ||
) |
Sets the port context's eventBlocking field.
Definition at line 141 of file VuoRuntimeContext.cc.
void vuoSetPortContextTriggerFunction | ( | struct PortContext * | portContext, |
void * | triggerFunction | ||
) |
Sets the port context's triggerFunction field.
Definition at line 133 of file VuoRuntimeContext.cc.
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.
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.