VuoCompositionLoader implementation.
Definition in file VuoCompositionLoader.cc.
Go to the source code of this file.
Functions | |
bool | replaceComposition (const char *dylibPath, char *compositionDiff) |
Replaces the currently running composition (if any) with the given composition. More... | |
void | stopComposition (void) |
Sends a control request to the composition telling it to stop. More... | |
bool | loadResourceDylib (const string &dylibPath) |
Loads the resource dylib at the given path and adds the resulting handle to the list of resource dylibs. More... | |
bool | unloadResourceDylib (const string &dylibPath) |
Unloads the resource dylib at the given path and removes its handle from the list of resource dylibs. More... | |
static bool | isStoppedInitially (void) |
Placeholder until vuoIsCurrentCompositionStopped becomes available. More... | |
void | vuoLoaderControlReplySend (enum VuoLoaderControlReply reply, zmq_msg_t *messages, unsigned int messageCount) |
Sends a control reply message to the process controlling this composition loader. More... | |
void | vuoControlRequestSend (enum VuoControlRequest request, zmq_msg_t *messages, unsigned int messageCount) |
Sends a control request message to the running composition. More... | |
void | vuoControlReplyReceive (enum VuoControlReply expectedReply) |
Receives a control reply message from the running composition, and checks that it is the expected reply. More... | |
Variables | |
void * | ZMQLoaderControlContext = NULL |
The context for initializing sockets to control the composition loader. More... | |
void * | ZMQLoaderControl = NULL |
The socket for controlling the composition loader. More... | |
static void * | ZMQLoaderSelfReceive = 0 |
Used to break out of a ZMQLoaderControl poll. More... | |
static void * | ZMQLoaderSelfSend = 0 |
Used to break out of a ZMQLoaderControl poll. More... | |
void * | ZMQControlContext = NULL |
The context for initializing sockets to control the composition. More... | |
void * | ZMQControl = NULL |
The socket for controlling the composition. More... | |
char * | controlURL = NULL |
The URL that the composition will use to initialize its control socket. More... | |
char * | telemetryURL = NULL |
The URL that the composition will use to initialize its telemetry socket. More... | |
bool | isReplacing = false |
True if the composition is in the process of being replaced. More... | |
void * | dylibHandle = NULL |
A handle to the running composition. More... | |
map< string, void * > | resourceDylibHandles |
Handles to the running composition's resources. More... | |
vector< string > | resourceDylibsToUnload |
Paths of the resources to be unloaded when the composition is replaced. More... | |
vector< string > | resourceDylibsToLoad |
Paths of the resources to be loaded (or reloaded) when the composition is replaced. More... | |
pid_t | runnerPid = 0 |
Process ID of the runner that started the composition. More... | |
int | runnerPipe = -1 |
The file descriptor for the composition's end of the pipe used to detect if the runner's process ends. More... | |
bool | continueIfRunnerDies = false |
If true, the composition continues running if the runner's process ends. More... | |
void * | VuoApp_mainThread = NULL |
A reference to the main thread. More... | |
char * | VuoApp_dylibPath = NULL |
The path of the most recently loaded composition dylib. More... | |
VuoIsCurrentCompositionStoppedType * | isStopped = isStoppedInitially |
Reference to vuoIsCurrentCompositionStopped() once it becomes available. More... | |
|
static |
Placeholder until vuoIsCurrentCompositionStopped
becomes available.
Definition at line 57 of file VuoCompositionLoader.cc.
bool loadResourceDylib | ( | const string & | dylibPath | ) |
Loads the resource dylib at the given path and adds the resulting handle to the list of resource dylibs.
Definition at line 447 of file VuoCompositionLoader.cc.
bool replaceComposition | ( | const char * | dylibPath, |
char * | compositionDiff | ||
) |
Replaces the currently running composition (if any) with the given composition.
The runtime takes ownership of compositionDiff.
Definition at line 315 of file VuoCompositionLoader.cc.
void stopComposition | ( | void | ) |
Sends a control request to the composition telling it to stop.
Definition at line 431 of file VuoCompositionLoader.cc.
bool unloadResourceDylib | ( | const string & | dylibPath | ) |
Unloads the resource dylib at the given path and removes its handle from the list of resource dylibs.
Definition at line 463 of file VuoCompositionLoader.cc.
void vuoControlReplyReceive | ( | enum VuoControlReply | expectedReply | ) |
Receives a control reply message from the running composition, and checks that it is the expected reply.
Definition at line 100 of file VuoCompositionLoader.cc.
void vuoControlRequestSend | ( | enum VuoControlRequest | request, |
zmq_msg_t * | messages, | ||
unsigned int | messageCount | ||
) |
Sends a control request message to the running composition.
Definition at line 92 of file VuoCompositionLoader.cc.
void vuoLoaderControlReplySend | ( | enum VuoLoaderControlReply | reply, |
zmq_msg_t * | messages, | ||
unsigned int | messageCount | ||
) |
Sends a control reply message to the process controlling this composition loader.
Definition at line 84 of file VuoCompositionLoader.cc.
bool continueIfRunnerDies = false |
If true, the composition continues running if the runner's process ends.
Definition at line 44 of file VuoCompositionLoader.cc.
char* controlURL = NULL |
The URL that the composition will use to initialize its control socket.
Definition at line 34 of file VuoCompositionLoader.cc.
void* dylibHandle = NULL |
A handle to the running composition.
Definition at line 38 of file VuoCompositionLoader.cc.
bool isReplacing = false |
True if the composition is in the process of being replaced.
Definition at line 37 of file VuoCompositionLoader.cc.
VuoIsCurrentCompositionStoppedType* isStopped = isStoppedInitially |
Reference to vuoIsCurrentCompositionStopped()
once it becomes available.
Definition at line 62 of file VuoCompositionLoader.cc.
map<string, void *> resourceDylibHandles |
Handles to the running composition's resources.
Definition at line 39 of file VuoCompositionLoader.cc.
vector<string> resourceDylibsToLoad |
Paths of the resources to be loaded (or reloaded) when the composition is replaced.
Definition at line 41 of file VuoCompositionLoader.cc.
vector<string> resourceDylibsToUnload |
Paths of the resources to be unloaded when the composition is replaced.
Definition at line 40 of file VuoCompositionLoader.cc.
pid_t runnerPid = 0 |
Process ID of the runner that started the composition.
Definition at line 42 of file VuoCompositionLoader.cc.
int runnerPipe = -1 |
The file descriptor for the composition's end of the pipe used to detect if the runner's process ends.
Definition at line 43 of file VuoCompositionLoader.cc.
char* telemetryURL = NULL |
The URL that the composition will use to initialize its telemetry socket.
Definition at line 35 of file VuoCompositionLoader.cc.
char* VuoApp_dylibPath = NULL |
The path of the most recently loaded composition dylib.
Definition at line 52 of file VuoCompositionLoader.cc.
void* VuoApp_mainThread = NULL |
A reference to the main thread.
Definition at line 51 of file VuoCompositionLoader.cc.
void* ZMQControl = NULL |
The socket for controlling the composition.
Definition at line 33 of file VuoCompositionLoader.cc.
void* ZMQControlContext = NULL |
The context for initializing sockets to control the composition.
Definition at line 32 of file VuoCompositionLoader.cc.
void* ZMQLoaderControl = NULL |
The socket for controlling the composition loader.
Definition at line 28 of file VuoCompositionLoader.cc.
void* ZMQLoaderControlContext = NULL |
The context for initializing sockets to control the composition loader.
Definition at line 27 of file VuoCompositionLoader.cc.
|
static |
Used to break out of a ZMQLoaderControl poll.
Definition at line 29 of file VuoCompositionLoader.cc.
|
static |
Used to break out of a ZMQLoaderControl poll.
Definition at line 30 of file VuoCompositionLoader.cc.