Vuo  2.3.1
Public Member Functions | List of all members
VuoRunnerDelegate Class Referenceabstract

Description

An abstract class to be implemented by a client that will receive telemetry messages from the composition.

Use VuoRunner::setDelegate() to connect a VuoRunnerDelegate to a VuoRunner. The VuoRunner calls the VuoRunnerDelegate functions when it receives telemetry messages from the composition.

VuoRunner calls the VuoRunnerDelegate functions sequentially (not concurrently). VuoRunner waits for each VuoRunnerDelegate function call to return before it calls another. If VuoRunner receives additional telemetry messages while a VuoRunnerDelegate function call is in progress, the messages are enqueued and the additional VuoRunnerDelegate functions are called after the in-progress one completes.

When VuoRunner is replacing or stopping the composition, it waits for any in-progress VuoRunnerDelegate function calls to return.

Inherit from this class if you want to implement all of the delegate methods. If you'd only like to implement some delegate methods, inherit from VuoRunnerDelegateAdapter.

Definition at line 246 of file VuoRunner.hh.

Public Member Functions

virtual void receivedTelemetryStats (unsigned long utime, unsigned long stime)=0
 This delegate method is invoked twice per second, to provide a heartbeat indicating that the composition is still alive. More...
 
virtual void receivedTelemetryNodeExecutionStarted (string compositionIdentifier, string nodeIdentifier)=0
 This delegate method is invoked every time a node has started executing. More...
 
virtual void receivedTelemetryNodeExecutionFinished (string compositionIdentifier, string nodeIdentifier)=0
 This delegate method is invoked every time a node has finished executing. More...
 
virtual void receivedTelemetryInputPortUpdated (string compositionIdentifier, string portIdentifier, bool receivedEvent, bool receivedData, string dataSummary)=0
 This delegate method is invoked every time any input port receives an event or data. More...
 
virtual void receivedTelemetryOutputPortUpdated (string compositionIdentifier, string portIdentifier, bool sentEvent, bool sentData, string dataSummary)=0
 This delegate method is invoked every time any output port transmits/fires an event or data. More...
 
virtual void receivedTelemetryPublishedOutputPortUpdated (VuoRunner::Port *port, bool sentData, string dataSummary)=0
 This delegate method is invoked every time any published output port in the top-level composition transmits an event. More...
 
virtual void receivedTelemetryEventDropped (string compositionIdentifier, string portIdentifier)=0
 This delegate method is invoked every time any trigger port drops an event. More...
 
virtual void receivedTelemetryError (string message)=0
 This delegate method is invoked every time an uncaught error occurs in the composition. More...
 
virtual void lostContactWithComposition (void)=0
 This delegate method is invoked if the runner receives no telemetry messages from the composition for at least 1 second, indicating that the composition has crashed or quit on its own. More...
 

Member Function Documentation

◆ lostContactWithComposition()

virtual void VuoRunnerDelegate::lostContactWithComposition ( void  )
pure virtual

This delegate method is invoked if the runner receives no telemetry messages from the composition for at least 1 second, indicating that the composition has crashed or quit on its own.

Implemented in VuoEditorComposition.

◆ receivedTelemetryError()

virtual void VuoRunnerDelegate::receivedTelemetryError ( string  message)
pure virtual

This delegate method is invoked every time an uncaught error occurs in the composition.

Parameters
messageA message with information about the error.

◆ receivedTelemetryEventDropped()

virtual void VuoRunnerDelegate::receivedTelemetryEventDropped ( string  compositionIdentifier,
string  portIdentifier 
)
pure virtual

This delegate method is invoked every time any trigger port drops an event.

Parameters
compositionIdentifierA unique identifier representing the composition instance (top-level composition or a subcomposition within it) that contains the port.
portIdentifierA unique identifier representing the port that has dropped an event (see VuoCompilerEventPort::getIdentifier()).
Changed in Vuo 2.0.0:
Added compositionIdentifier argument.

Implemented in VuoEditorComposition.

◆ receivedTelemetryInputPortUpdated()

virtual void VuoRunnerDelegate::receivedTelemetryInputPortUpdated ( string  compositionIdentifier,
string  portIdentifier,
bool  receivedEvent,
bool  receivedData,
string  dataSummary 
)
pure virtual

This delegate method is invoked every time any input port receives an event or data.

Parameters
compositionIdentifierA unique identifier representing the composition instance (top-level composition or a subcomposition within it) that contains the port.
portIdentifierA unique identifier representing the port that has received an event or data (see VuoCompilerEventPort::getIdentifier()).
receivedEventTrue if the port received an event.
receivedDataTrue if the port received data.
dataSummaryA brief description of the new data value of the port, or an empty string if the port is event-only.
Changed in Vuo 2.0.0:
Added compositionIdentifier argument.

Implemented in VuoEditorComposition.

◆ receivedTelemetryNodeExecutionFinished()

virtual void VuoRunnerDelegate::receivedTelemetryNodeExecutionFinished ( string  compositionIdentifier,
string  nodeIdentifier 
)
pure virtual

This delegate method is invoked every time a node has finished executing.

Parameters
compositionIdentifierA unique identifier representing the composition instance (top-level composition or a subcomposition within it) that contains the node.
nodeIdentifierA unique identifier representing the node that finished executing (see VuoCompilerNode::getIdentifier()).
Changed in Vuo 2.0.0:
Added compositionIdentifier argument.

Implemented in VuoEditorComposition.

◆ receivedTelemetryNodeExecutionStarted()

virtual void VuoRunnerDelegate::receivedTelemetryNodeExecutionStarted ( string  compositionIdentifier,
string  nodeIdentifier 
)
pure virtual

This delegate method is invoked every time a node has started executing.

Parameters
compositionIdentifierA unique identifier representing the composition instance (top-level composition or a subcomposition within it) that contains the node.
nodeIdentifierA unique identifier representing the node that started executing (see VuoCompilerNode::getIdentifier()).
Changed in Vuo 2.0.0:
Added compositionIdentifier argument.

Implemented in VuoEditorComposition.

◆ receivedTelemetryOutputPortUpdated()

virtual void VuoRunnerDelegate::receivedTelemetryOutputPortUpdated ( string  compositionIdentifier,
string  portIdentifier,
bool  sentEvent,
bool  sentData,
string  dataSummary 
)
pure virtual

This delegate method is invoked every time any output port transmits/fires an event or data.

Parameters
compositionIdentifierA unique identifier representing the composition instance (top-level composition or a subcomposition within it) that contains the port.
portIdentifierA unique identifier representing the port that has transmitted or fired an event (see VuoCompilerEventPort::getIdentifier()).
sentEventTrue if the port sent an event.
sentDataTrue if the port sent data.
dataSummaryA brief description of the new data value of the port, or an empty string if the port is event-only.
Changed in Vuo 2.0.0:
Added compositionIdentifier, sentEvent arguments.

Implemented in VuoEditorComposition.

◆ receivedTelemetryPublishedOutputPortUpdated()

virtual void VuoRunnerDelegate::receivedTelemetryPublishedOutputPortUpdated ( VuoRunner::Port port,
bool  sentData,
string  dataSummary 
)
pure virtual

This delegate method is invoked every time any published output port in the top-level composition transmits an event.

Parameters
portThe VuoRunner::Port that has transmitted an event (see VuoRunner::getPublishedOutputPorts() and VuoRunner::getPublishedOutputPortWithName()).
sentDataTrue if the port sent data along with the event.
dataSummaryA brief description of the new data value of the port, or an empty string if the port is event-only.

◆ receivedTelemetryStats()

virtual void VuoRunnerDelegate::receivedTelemetryStats ( unsigned long  utime,
unsigned long  stime 
)
pure virtual

This delegate method is invoked twice per second, to provide a heartbeat indicating that the composition is still alive.

It also provides some basic usage stats.

Parameters
utimeThe number of microseconds this process has spent in user-mode execution.
stimeThe number of microseconds spent in the system executing on behalf of this process.

The documentation for this class was generated from the following files: