Vuo  1.2.7
Functions | Variables
VuoCompositionLoader.cc File Reference

Description

VuoCompositionLoader implementation.

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 char *resourceDylibPath)
 Loads the resource dylib at the given path and adds the resulting handle to the list of resource dylibs. More...
 
void unloadResourceDylibs (void)
 Unloads all resource dylibs. More...
 
static bool isStoppedInitially (void)
 Placeholder until vuoIsCurrentCompositionStopped becomes available. More...
 
static void __attribute__ ((constructor)) VuoCompositionLoader_init(void)
 Get a reference to the main thread, so we can perform runtime thread assertions. 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...
 
void ** resourceDylibHandles = NULL
 A list of handles to the running composition's resources. More...
 
size_t resourceDylibHandlesSize = 0
 The number of items in resourceDylibHandles. More...
 
size_t resourceDylibHandlesCapacity = 0
 The number of items that resourceDylibHandlesCapacity can currently hold. 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...
 
bool trialRestrictionsEnabled = true
 If true, some nodes may restrict how they can be used. 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...
 
VuoIsCurrentCompositionStoppedTypeisStopped = isStoppedInitially
 Reference to vuoIsCurrentCompositionStopped() once it becomes available. More...
 

Function Documentation

◆ __attribute__()

static void __attribute__ ( (constructor)  )
static

Get a reference to the main thread, so we can perform runtime thread assertions.

◆ isStoppedInitially()

static bool isStoppedInitially ( void  )
static

Placeholder until vuoIsCurrentCompositionStopped becomes available.

◆ loadResourceDylib()

bool loadResourceDylib ( const char *  resourceDylibPath)

Loads the resource dylib at the given path and adds the resulting handle to the list of resource dylibs.

If resourceDylibPath is the empty string, does nothing.

◆ replaceComposition()

bool replaceComposition ( const char *  dylibPath,
char *  compositionDiff 
)

Replaces the currently running composition (if any) with the given composition.

The runtime takes ownership of compositionDiff.

◆ stopComposition()

void stopComposition ( void  )

Sends a control request to the composition telling it to stop.

◆ unloadResourceDylibs()

void unloadResourceDylibs ( void  )

Unloads all resource dylibs.

◆ vuoControlReplyReceive()

void vuoControlReplyReceive ( enum VuoControlReply  expectedReply)

Receives a control reply message from the running composition, and checks that it is the expected reply.

◆ vuoControlRequestSend()

void vuoControlRequestSend ( enum VuoControlRequest  request,
zmq_msg_t *  messages,
unsigned int  messageCount 
)

Sends a control request message to the running composition.

◆ vuoLoaderControlReplySend()

void vuoLoaderControlReplySend ( enum VuoLoaderControlReply  reply,
zmq_msg_t *  messages,
unsigned int  messageCount 
)

Sends a control reply message to the process controlling this composition loader.

Variable Documentation

◆ continueIfRunnerDies

bool continueIfRunnerDies = false

If true, the composition continues running if the runner's process ends.

◆ controlURL

char* controlURL = NULL

The URL that the composition will use to initialize its control socket.

◆ dylibHandle

void* dylibHandle = NULL

A handle to the running composition.

◆ isReplacing

bool isReplacing = false

True if the composition is in the process of being replaced.

◆ isStopped

Reference to vuoIsCurrentCompositionStopped() once it becomes available.

◆ resourceDylibHandles

void** resourceDylibHandles = NULL

A list of handles to the running composition's resources.

◆ resourceDylibHandlesCapacity

size_t resourceDylibHandlesCapacity = 0

The number of items that resourceDylibHandlesCapacity can currently hold.

◆ resourceDylibHandlesSize

size_t resourceDylibHandlesSize = 0

The number of items in resourceDylibHandles.

◆ runnerPid

pid_t runnerPid = 0

Process ID of the runner that started the composition.

◆ runnerPipe

int runnerPipe = -1

The file descriptor for the composition's end of the pipe used to detect if the runner's process ends.

◆ telemetryURL

char* telemetryURL = NULL

The URL that the composition will use to initialize its telemetry socket.

◆ trialRestrictionsEnabled

bool trialRestrictionsEnabled = true

If true, some nodes may restrict how they can be used.

◆ VuoApp_dylibPath

char* VuoApp_dylibPath = NULL

The path of the most recently loaded composition dylib.

◆ VuoApp_mainThread

void* VuoApp_mainThread = NULL

A reference to the main thread.

◆ ZMQControl

void* ZMQControl = NULL

The socket for controlling the composition.

◆ ZMQControlContext

void* ZMQControlContext = NULL

The context for initializing sockets to control the composition.

◆ ZMQLoaderControl

void* ZMQLoaderControl = NULL

The socket for controlling the composition loader.

◆ ZMQLoaderControlContext

void* ZMQLoaderControlContext = NULL

The context for initializing sockets to control the composition loader.

◆ ZMQLoaderSelfReceive

void* ZMQLoaderSelfReceive = 0
static

Used to break out of a ZMQLoaderControl poll.

◆ ZMQLoaderSelfSend

void* ZMQLoaderSelfSend = 0
static

Used to break out of a ZMQLoaderControl poll.