VuoRuntime implementation.
Functions | |
void | vuoSend (char *name, void *socket, int type, zmq_msg_t *messages, unsigned int messageCount, bool isNonBlocking) |
Sends the multipart message messages on ZMQ socket socket . | |
void | vuoControlReplySend (enum VuoControlReply reply, zmq_msg_t *messages, unsigned int messageCount) |
Must be called on VuoControlQueue. | |
void | vuoTelemetrySend (enum VuoTelemetry type, zmq_msg_t *messages, unsigned int messageCount) |
Safe to call from any thread. | |
void | vuoInit (int argc, char **argv) |
Parses command-line arguments, then calls vuoInitInProcess() . | |
void | vuoInitInProcess (void *_ZMQContext, const char *controlURL, const char *telemetryURL, bool _isPaused) |
Sets up ZMQ control and telemetry sockets, then calls the generated function setup() . | |
void | sendOutputPortValuesChanged (char **portIdentifiers, char **portValues, size_t portCount) |
/// | |
void | sendOutputPortValueChanged (char *portIdentifier, char *portValue) |
Convenience method; calls sendOutputPortValuesChanged() . | |
void | vuoFini (void) |
Cleans up graph execution: closes the ZMQ sockets and dispatch source and queues. | |
int | vuoRelease (void *) |
Defined in the graph's generated code. | |
void | setup (void) |
void | nodeInstanceInit (void) |
void | nodeInstanceFini (void) |
void | setInputPortValue (char *portIdentifier, char *valueAsString) |
char * | getOutputPortValue (char *portIdentifier) |
unsigned int | getPublishedInputPortCount (void) |
unsigned int | getPublishedOutputPortCount (void) |
char ** | getPublishedInputPortNames (void) |
char ** | getPublishedOutputPortNames (void) |
char ** | getPublishedInputPortTypes (void) |
char ** | getPublishedOutputPortTypes (void) |
int | getPublishedInputPortConnectedIdentifierCount (char *name) |
int | getPublishedOutputPortConnectedIdentifierCount (char *name) |
char ** | getPublishedInputPortConnectedIdentifiers (char *name) |
char ** | getPublishedOutputPortConnectedIdentifiers (char *name) |
void | generatePublishedInputPortEvent (char *name) |
Variables | |
dispatch_queue_t | VuoControlQueue |
Dispatch queue for protecting access to the ZMQControl socket. | |
dispatch_queue_t | VuoTelemetryQueue |
Dispatch queue for protecting access to the ZMQTelemetry socket. | |
void * | ZMQContext |
The context used to initialize sockets. | |
void * | ZMQControl |
The control socket. Use only on VuoControlQueue. | |
void * | ZMQTelemetry |
The telemetry socket. Use only on VuoControlQueue. | |
bool | hasBeenUnpaused |
True if node execution was unpaused initially, or if it has since been unpaused. | |
bool | isPaused |
True if node execution is currently paused. | |
bool | isStopped |
True if graph execution has stopped. | |
dispatch_source_t | telemetryTimer |
Timer for sending telemetry messages. | |
dispatch_source_t | controlTimer |
Timer for receiving control messages. | |
dispatch_semaphore_t | telemetryCanceledSemaphore |
Signaled when telemetry events are no longer being processed. | |
dispatch_semaphore_t | controlCanceledSemaphore |
Signaled when control events are no longer being processed. | |
void sendOutputPortValuesChanged | ( | char ** | portIdentifiers, |
char ** | portValues, | ||
size_t | portCount | ||
) |
///
Constructs and sends a message on the telemetry socket, indicating that 1 or more output port values have changed.
void vuoFini | ( | void | ) |
Cleans up graph execution: closes the ZMQ sockets and dispatch source and queues.
Assumes the composition has received and replied to a VuoControlRequestCompositionStop
message.
void vuoInitInProcess | ( | void * | _ZMQContext, |
const char * | controlURL, | ||
const char * | telemetryURL, | ||
bool | _isPaused | ||
) |
Sets up ZMQ control and telemetry sockets, then calls the generated function setup()
.
If the graph is not paused, also calls nodeInstanceInit()
.
int vuoRelease | ( | void * | heapPointer | ) |
Defined in the graph's generated code.
Defined in the graph's generated code.
If the reference count becomes 0, heapPointer
is freed and is no longer reference-counted.
heapPointer | A pointer to allocated memory on the heap. |
heapPointer
. void vuoSend | ( | char * | name, |
void * | socket, | ||
int | type, | ||
zmq_msg_t * | messages, | ||
unsigned int | messageCount, | ||
bool | isNonBlocking | ||
) |
Sends the multipart message messages
on ZMQ socket socket
.
name
is just used for printing error messages.