Vuo  2.3.2
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  void *nodeMutex;
38  unsigned long claimingEventId;
39  dispatch_group_t executingGroup;
41  bool *outputEvents;
42 
44 };
45 
46 struct PortContext * vuoCreatePortContext(void *data, bool isTrigger, const char *triggerQueueName);
47 struct NodeContext * vuoCreateNodeContext(bool hasInstanceData, bool isComposition, size_t outputEventCount);
48 void vuoFreePortContext(struct PortContext *portContext);
49 void vuoFreeNodeContext(struct NodeContext *nodeContext);
50 void vuoSetPortContextEvent(struct PortContext *portContext, bool event);
51 void vuoSetPortContextData(struct PortContext *portContext, void *data);
52 void vuoSetPortContextTriggerFunction(struct PortContext *portContext, void *triggerFunction);
53 bool vuoGetPortContextEvent(struct PortContext *portContext);
54 void * vuoGetPortContextData(struct PortContext *portContext);
55 dispatch_queue_t vuoGetPortContextTriggerQueue(struct PortContext *portContext);
56 dispatch_semaphore_t vuoGetPortContextTriggerSemaphore(struct PortContext *portContext);
57 void * vuoGetPortContextTriggerFunction(struct PortContext *portContext);
58 void vuoRetainPortContextData(struct PortContext *portContext);
59 void vuoSetNodeContextPortContexts(struct NodeContext *nodeContext, struct PortContext **portContexts, unsigned long portContextCount);
60 void vuoSetNodeContextInstanceData(struct NodeContext *nodeContext, void *instanceData);
61 void vuoSetNodeContextClaimingEventId(struct NodeContext *nodeContext, unsigned long claimingEventId);
62 void vuoSetNodeContextOutputEvent(struct NodeContext *nodeContext, size_t index, bool event);
63 struct PortContext * vuoGetNodeContextPortContext(struct NodeContext *nodeContext, size_t index);
64 void * vuoGetNodeContextInstanceData(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 }