Vuo
0.5.5
|
VuoRuntime implementation.
Functions | |
void | vuoControlReplySend (enum VuoControlReply reply, zmq_msg_t *messages, unsigned int messageCount) |
This function may only be called on dispatch queue VuoControlQueue . | |
void | vuoTelemetrySend (enum VuoTelemetry type, zmq_msg_t *messages, unsigned int messageCount) |
This function may be called 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 | sendNodeExecutionStarted (char *nodeIdentifier) |
Constructs and sends a message on the telemetry socket, indicating that a node has started execution. | |
void | sendNodeExecutionFinished (char *nodeIdentifier) |
Constructs and sends a message on the telemetry socket, indicating that a node has finished execution. | |
void | sendInputPortsUpdated (char *portIdentifier, bool receivedEvent, bool receivedData, char *portDataSummary) |
Constructs and sends a message on the telemetry socket, indicating that an input port has received an event or data. | |
void | sendOutputPortsUpdated (char *portIdentifier, bool sentData, char *portDataSummary) |
Constructs and sends a message on the telemetry socket, indicating that an output port has transmitted or fired an event. | |
void | vuoStopComposition (void) |
Cleanly stops the composition. | |
void | sendError (const char *message) |
Constructs and sends a message on the telemetry socket, indicating that an uncaught error has occurred. | |
char * | vuoTranscodeToGraphvizIdentifier (const char *originalString) |
Replaces '"' with '"' and '\' with '\' in a string. | |
bool | isNodeInBothCompositions (const char *nodeIdentifier) |
Returns true if the node is found in both the old and the new composition, when replacing compositions for live coding. | |
graph_t * | openGraphvizGraph (const char *graphString) |
Returns a Graphviz graph constructed from the given Graphviz-format string. | |
void | closeGraphvizGraph (graph_t *graph) |
Cleans up a Graphviz graph when it is no longer in use. | |
const char * | getConstantValueFromGraphviz (graph_t *graph, const char *node, const char *port) |
Returns the constant value of the input port or instance data listed in the Graphviz graph, or null if it is not listed. | |
void | vuoFini (void) |
Cleans up composition execution: closes the ZMQ sockets and dispatch source and queues. | |
void | setup (void) |
void | nodeInstanceInit (void) |
void | nodeInstanceFini (void) |
void | nodeInstanceTriggerStart (void) |
void | nodeInstanceTriggerStop (void) |
void | setInputPortValue (char *portIdentifier, char *valueAsString, int shouldUpdateCallbacks) |
void | fireTriggerPortEvent (char *portIdentifier) |
char * | getInputPortValue (char *portIdentifier, int shouldUseInterprocessSerialization) |
char * | getOutputPortValue (char *portIdentifier, int shouldUseInterprocessSerialization) |
char * | getInputPortSummary (char *portIdentifier) |
char * | getOutputPortSummary (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 | firePublishedInputPortEvent (char *name) |
Variables | |
bool | hasZMQConnection = false |
True if the ZMQControl and ZMQTelemetry sockets are connected to something. | |
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 = 0 |
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 composition 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. | |
gvplugin_library_t | gvplugin_dot_layout_LTX_library |
Reference to the statically-built Graphviz Dot library. | |
gvplugin_library_t | gvplugin_core_LTX_library |
Reference to the statically-built Graphviz core library. | |
const char * | compositionDiff = NULL |
A string containing a space-delimited list of nodes present in both the old and new composition, when replacing compositions for live coding. | |
GVC_t * | graphvizContext = NULL |
The context used when working with a Graphviz graph. | |
void closeGraphvizGraph | ( | graph_t * | graph | ) |
Cleans up a Graphviz graph when it is no longer in use.
const char* getConstantValueFromGraphviz | ( | graph_t * | graph, |
const char * | node, | ||
const char * | port | ||
) |
Returns the constant value of the input port or instance data listed in the Graphviz graph, or null if it is not listed.
bool isNodeInBothCompositions | ( | const char * | nodeIdentifier | ) |
Returns true if the node is found in both the old and the new composition, when replacing compositions for live coding.
This needs to be kept in sync with VuoCompilerComposition::diffAgainstOlderComposition().
graph_t* openGraphvizGraph | ( | const char * | graphString | ) |
Returns a Graphviz graph constructed from the given Graphviz-format string.
void sendError | ( | const char * | message | ) |
Constructs and sends a message on the telemetry socket, indicating that an uncaught error has occurred.
void sendInputPortsUpdated | ( | char * | portIdentifier, |
bool | receivedEvent, | ||
bool | receivedData, | ||
char * | portDataSummary | ||
) |
Constructs and sends a message on the telemetry socket, indicating that an input port has received an event or data.
void sendNodeExecutionFinished | ( | char * | nodeIdentifier | ) |
Constructs and sends a message on the telemetry socket, indicating that a node has finished execution.
void sendNodeExecutionStarted | ( | char * | nodeIdentifier | ) |
Constructs and sends a message on the telemetry socket, indicating that a node has started execution.
void sendOutputPortsUpdated | ( | char * | portIdentifier, |
bool | sentData, | ||
char * | portDataSummary | ||
) |
Constructs and sends a message on the telemetry socket, indicating that an output port has transmitted or fired an event.
void vuoControlReplySend | ( | enum VuoControlReply | reply, |
zmq_msg_t * | messages, | ||
unsigned int | messageCount | ||
) |
This function may only be called on dispatch queue VuoControlQueue
.
void vuoFini | ( | void | ) |
Cleans up composition execution: closes the ZMQ sockets and dispatch source and queues.
Assumes the composition has received and replied to a VuoControlRequestCompositionStop
message.
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()
.
If the composition is not paused, also calls nodeInstanceInit()
and nodeInstanceTriggerStart()
.
void vuoStopComposition | ( | void | ) |
Cleanly stops the composition.
void vuoTelemetrySend | ( | enum VuoTelemetry | type, |
zmq_msg_t * | messages, | ||
unsigned int | messageCount | ||
) |
This function may be called from any thread.
char* vuoTranscodeToGraphvizIdentifier | ( | const char * | originalString | ) |
Replaces '"' with '"' and '\' with '\' in a string.
const char* compositionDiff = NULL |
A string containing a space-delimited list of nodes present in both the old and new composition, when replacing compositions for live coding.
dispatch_semaphore_t controlCanceledSemaphore |
Signaled when control events are no longer being processed.
dispatch_source_t controlTimer |
Timer for receiving control messages.
GVC_t* graphvizContext = NULL |
The context used when working with a Graphviz graph.
gvplugin_library_t gvplugin_core_LTX_library |
Reference to the statically-built Graphviz core library.
gvplugin_library_t gvplugin_dot_layout_LTX_library |
Reference to the statically-built Graphviz Dot library.
bool hasBeenUnpaused |
True if node execution was unpaused initially, or if it has since been unpaused.
bool hasZMQConnection = false |
True if the ZMQControl and ZMQTelemetry sockets are connected to something.
bool isPaused |
True if node execution is currently paused.
bool isStopped |
True if composition execution has stopped.
True if the composition has stopped.
dispatch_semaphore_t telemetryCanceledSemaphore |
Signaled when telemetry events are no longer being processed.
dispatch_source_t telemetryTimer |
Timer for sending telemetry messages.
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 = 0 |
The telemetry socket. Use only on VuoControlQueue.