Vuo  2.0.0
VuoRuntimeContext.hh
Go to the documentation of this file.
1 
10 #pragma once
11 
12 extern "C"
13 {
14 
19 {
20  bool event;
21  void *data;
22  bool dataRetained;
23  dispatch_queue_t triggerQueue;
24  dispatch_semaphore_t triggerSemaphore;
26 };
27 
32 {
34  unsigned long portContextCount;
35  void *instanceData;
36  dispatch_semaphore_t semaphore;
37  unsigned long claimingEventId;
38  dispatch_group_t executingGroup;
40  bool *outputEvents;
41 
43 };
44 
45 struct PortContext * vuoCreatePortContext(void *data, bool isTrigger, const char *triggerQueueName);
46 struct NodeContext * vuoCreateNodeContext(bool hasInstanceData, bool isComposition, size_t outputEventCount);
47 void vuoFreePortContext(struct PortContext *portContext);
48 void vuoFreeNodeContext(struct NodeContext *nodeContext);
49 void vuoSetPortContextEvent(struct PortContext *portContext, bool event);
50 void vuoSetPortContextData(struct PortContext *portContext, void *data);
51 void vuoSetPortContextTriggerFunction(struct PortContext *portContext, void *triggerFunction);
52 bool vuoGetPortContextEvent(struct PortContext *portContext);
53 void * vuoGetPortContextData(struct PortContext *portContext);
54 dispatch_queue_t vuoGetPortContextTriggerQueue(struct PortContext *portContext);
55 dispatch_semaphore_t vuoGetPortContextTriggerSemaphore(struct PortContext *portContext);
56 void * vuoGetPortContextTriggerFunction(struct PortContext *portContext);
57 void vuoRetainPortContextData(struct PortContext *portContext);
58 void vuoSetNodeContextPortContexts(struct NodeContext *nodeContext, struct PortContext **portContexts, unsigned long portContextCount);
59 void vuoSetNodeContextInstanceData(struct NodeContext *nodeContext, void *instanceData);
60 void vuoSetNodeContextClaimingEventId(struct NodeContext *nodeContext, unsigned long claimingEventId);
61 void vuoSetNodeContextOutputEvent(struct NodeContext *nodeContext, size_t index, bool event);
62 struct PortContext * vuoGetNodeContextPortContext(struct NodeContext *nodeContext, size_t index);
63 void * vuoGetNodeContextInstanceData(struct NodeContext *nodeContext);
64 dispatch_semaphore_t vuoGetNodeContextSemaphore(struct NodeContext *nodeContext);
65 unsigned long vuoGetNodeContextClaimingEventId(struct NodeContext *nodeContext);
66 dispatch_group_t vuoGetNodeContextExecutingGroup(struct NodeContext *nodeContext);
67 bool vuoGetNodeContextOutputEvent(struct NodeContext *nodeContext, size_t index);
68 void vuoResetNodeContextEvents(struct NodeContext *nodeContext);
69 void vuoStartedExecutingEvent(struct NodeContext *nodeContext, unsigned long eventId);
70 void vuoSpunOffExecutingEvent(struct NodeContext *nodeContext, unsigned long eventId);
71 bool vuoFinishedExecutingEvent(struct NodeContext *nodeContext, unsigned long eventId);
72 unsigned long vuoGetOneExecutingEvent(struct NodeContext *nodeContext);
73 
74 }