15 #include <dispatch/dispatch.h>
20 #if (__clang_major__ == 3 && __clang_minor__ >= 2) || __clang_major__ > 3
21 #define VUO_CLANG_32_OR_LATER
24 #pragma clang diagnostic push
25 #ifdef VUO_CLANG_32_OR_LATER
26 #pragma clang diagnostic ignored "-Wdocumentation"
28 #include "json-c/json.h"
29 #pragma clang diagnostic pop
164 string executablePath;
167 std::shared_ptr<VuoRunningCompositionLibraries> dependencyLibraries;
168 bool shouldContinueIfRunnerDies;
169 bool shouldDeleteBinariesWhenFinished;
171 bool isRuntimeCheckingEnabled;
177 dispatch_semaphore_t stoppedSemaphore;
178 dispatch_semaphore_t terminatedZMQContextSemaphore;
179 dispatch_semaphore_t beganListeningSemaphore;
180 dispatch_semaphore_t endedListeningSemaphore;
181 dispatch_semaphore_t lastFiredEventSemaphore;
182 bool lastFiredEventSignaled;
183 dispatch_queue_t controlQueue;
184 pid_t compositionPid;
185 int runnerReadCompositionWritePipe[2];
188 void *ZMQSelfReceive;
192 void *ZMQLoaderControl;
193 string ZMQControlURL;
194 string ZMQLoaderControlURL;
195 string ZMQTelemetryURL;
198 dispatch_queue_t delegateQueue;
200 vector<Port *> publishedInputPorts;
201 vector<Port *> publishedOutputPorts;
202 bool arePublishedInputPortsCached;
203 bool arePublishedOutputPortsCached;
208 void saturating_semaphore_signal(dispatch_semaphore_t dsema,
bool *sent);
209 void saturating_semaphore_wait(dispatch_semaphore_t dsema,
bool *sent);
212 void startInternal(
void);
214 void setUpConnections(
void);
215 void cleanUpConnections(
void);
217 void vuoLoaderControlRequestSend(
enum VuoLoaderControlRequest request, zmq_msg_t *messages,
unsigned int messageCount);
220 string receiveString(
string fallbackIfNull);
221 vector<string> receiveListOfStrings(
void);
222 vector<Port *> getCachedPublishedPorts(
bool input);
223 vector<Port *> refreshPublishedPorts(
bool input);
224 bool isInCurrentProcess(
void);
225 bool isUsingCompositionLoader(
void);
226 void stopBecauseLostContact(
string errorMessage);
227 void copyDylibAndChangeId(
string dylibPath,
string &outputDylibPath);
230 friend class TestControlAndTelemetry;
231 friend class TestVuoRunner;
287 virtual void receivedTelemetryInputPortUpdated(
string compositionIdentifier,
string portIdentifier,
bool receivedEvent,
bool receivedData,
string dataSummary) = 0;
334 #define VUO_UNUSED_VARIABLE __attribute__((unused))
352 virtual void lostContactWithComposition(
void) { }