SPAOP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
wonder::VisualStreamReceiver::Listener Class Referenceabstract

A listener interface that can be registered with the VisualStreamReceiver. More...

#include <VisualStreamReceiver.h>

Inheritance diagram for wonder::VisualStreamReceiver::Listener:
Inheritance graph
[legend]

Public Member Functions

virtual ~Listener ()
 
virtual int onSourceActivate (int sourceID)=0
 Called when the /WONDER/source/activate message is recieved. More...
 
virtual int onSourceDeactivate (int sourceID)=0
 Called when the /WONDER/source/deactivate message is recieved. More...
 
virtual int onSourcePosition (int sourceID, float xPos, float yPos)=0
 Called when the /WONDER/source/position message is recieved with one integer and two float parameters. More...
 
virtual int onSourceAngle (int sourceID, float angle)=0
 Called when the /WONDER/source/angle message is recieved with one integer and oe float parameter. More...
 
virtual int onSourceType (int sourceID, int type)=0
 Called when the /WONDER/source/type message is recieved. More...
 
virtual int onSourceName (int sourceID, const std::string &sourceName)=0
 Called when the /WONDER/source/name message is recieved. More...
 
virtual int onSourceColor (int sourceID, int r, int g, int b)=0
 Called when the /WONDER/source/color message is recieved. More...
 
virtual int onSourceGroupId (int sourceID, int groupID)=0
 Called when the /WONDER/source/groupID message is recieved. More...
 
virtual int onSourceRotatingDirection (int sourceID, int inverted)=0
 Called when the /WONDER/source/rotationDirection message is recieved. More...
 
virtual int onSourceScalingDirection (int sourceID, int inverted)=0
 Called when the /WONDER/source/scalingDirection message is recieved. More...
 
virtual int onSourceDopplerEffect (int sourceID, int on)=0
 Called when the /WONDER/source/dopplerEffect message is recieved. More...
 
virtual int onListenerPosition (int listenerID, float x, float y)=0
 Called when the /WONDER/listener/position message is received. More...
 
virtual int onGlobalMaxNoSources (int maxSources)=0
 Called when the /WONDER/global/maxNoSources message is recieved. More...
 
virtual int onGlobalRenderpolygon (Room &room)=0
 On receiving the /WONDER/global/renderpolygon message, the VisualStreamReceiver must create a Room object from the received information and pass it to the listener. More...
 
virtual int onProjectXmlDump (int err, const std::string &xmlDump)=0
 Called when the /WONDER/project/xmlDump message is recieved. More...
 
virtual int onStreamVisualPong (int pingCount)=0
 Called when a /WONDER/stream/visual/ping is received. More...
 
virtual int onStreamVisualConnect (OscSender *replyTo)
 Called when any /WONDER/stream/visual/connect message is recieved. More...
 
virtual int onStreamVisualDisconnect ()
 Called when any /WONDER/stream/visual/disconnect message is recieved. More...
 
virtual int onReply (std::string replyToMsg, int state, std::string msg)=0
 Called when the /WONDER/project/xmlDump message is recieved. More...
 
virtual int onPluginStandalone (bool standAloneOn)=0
 Called when the /WONDER/plugin/standalone message is recieved. More...
 

Detailed Description

A listener interface that can be registered with the VisualStreamReceiver.

On incoming OSC-messages, the VisualStreamReciever will call the listener's corresponding methods.

Constructor & Destructor Documentation

virtual wonder::VisualStreamReceiver::Listener::~Listener ( )
inlinevirtual

Member Function Documentation

virtual int wonder::VisualStreamReceiver::Listener::onGlobalMaxNoSources ( int  maxSources)
pure virtual

Called when the /WONDER/global/maxNoSources message is recieved.

Parameters
maxSourcesThe maximum number of sources the current WONDER setup can handle.
virtual int wonder::VisualStreamReceiver::Listener::onGlobalRenderpolygon ( Room room)
pure virtual

On receiving the /WONDER/global/renderpolygon message, the VisualStreamReceiver must create a Room object from the received information and pass it to the listener.

Parameters
roomA Room object describing the current WONDER setup's speaker positioning.
virtual int wonder::VisualStreamReceiver::Listener::onListenerPosition ( int  listenerID,
float  x,
float  y 
)
pure virtual

Called when the /WONDER/listener/position message is received.

Parameters
listenerIDThe ID of the listener.
xThe x-coordinate of the listener's position.
yThe x-coordinate of the listener's position.
Warning
So far, this command is only supported by a version of WONDER developed at HAW Hamburg.
virtual int wonder::VisualStreamReceiver::Listener::onPluginStandalone ( bool  standAloneOn)
pure virtual

Called when the /WONDER/plugin/standalone message is recieved.

This is used to change the communication mode of the SourceController class: In "standalone" mode, the SourceController sends the source controlling messages to its peers (via multicast) only. If standalone is off ("linked to wonder" mode), the SourceController sends those messages to cWONDER.

Parameters
standAlonetrue for "standalone" mode, false for "linked to wonder" mode.
virtual int wonder::VisualStreamReceiver::Listener::onProjectXmlDump ( int  err,
const std::string &  xmlDump 
)
pure virtual

Called when the /WONDER/project/xmlDump message is recieved.

Parameters
errError parameter sent by cWONDER (1 for error, 0 for no error).
xmlDumpAn XML formatted string describing a cWONDER project (as defined in cwonder_project.dtd).
See Also
XmlParser
virtual int wonder::VisualStreamReceiver::Listener::onReply ( std::string  replyToMsg,
int  state,
std::string  msg 
)
pure virtual

Called when the /WONDER/project/xmlDump message is recieved.

This message is sent as reply to another message, confirming successfull execution or transmitting an error message.

Parameters
replyToMsgThe OSC path of the message that triggered this reply.
state0 for confirmations of successfull operations, != 0 for error messages.
msgThe actual reply text.
virtual int wonder::VisualStreamReceiver::Listener::onSourceActivate ( int  sourceID)
pure virtual

Called when the /WONDER/source/activate message is recieved.

Parameters
sourceIDThe wonder-specific ID of the source to be activated (recieved with the incoming message). May range from 0 to N-1 where N is the total number of sources supported by the current WONDER installation.
virtual int wonder::VisualStreamReceiver::Listener::onSourceAngle ( int  sourceID,
float  angle 
)
pure virtual

Called when the /WONDER/source/angle message is recieved with one integer and oe float parameter.

Parameters
sourceIDThe wonder-specific ID of the source to be whose angle parameters is transmitted.
angleThe new angle (in Degree).
virtual int wonder::VisualStreamReceiver::Listener::onSourceColor ( int  sourceID,
int  r,
int  g,
int  b 
)
pure virtual

Called when the /WONDER/source/color message is recieved.

Parameters
sourceIDThe wonder-specific ID of the source to be whose colour is transmitted.
rThe red value of the new colour, ranging from 0 to 255.
gThe green value of the new colour, ranging from 0 to 255.
bThe blue value of the new colour, ranging from 0 to 255.
virtual int wonder::VisualStreamReceiver::Listener::onSourceDeactivate ( int  sourceID)
pure virtual

Called when the /WONDER/source/deactivate message is recieved.

Parameters
sourceIDThe wonder-specific ID of the source to be activated (recieved with the incoming message). May range from 0 to N-1 where N is the total number of sources supported by the current WONDER installation.
virtual int wonder::VisualStreamReceiver::Listener::onSourceDopplerEffect ( int  sourceID,
int  on 
)
pure virtual

Called when the /WONDER/source/dopplerEffect message is recieved.

Parameters
sourceIDThe wonder-specific ID of the source to be whose doppler effect setting is transmitted.
on1 for on, 0 for off.
virtual int wonder::VisualStreamReceiver::Listener::onSourceGroupId ( int  sourceID,
int  groupID 
)
pure virtual

Called when the /WONDER/source/groupID message is recieved.

Parameters
sourceIDThe wonder-specific ID of the source to be whose groupID is transmitted.
groupIDThe groupID of the source.
virtual int wonder::VisualStreamReceiver::Listener::onSourceName ( int  sourceID,
const std::string &  sourceName 
)
pure virtual

Called when the /WONDER/source/name message is recieved.

Parameters
sourceIDThe wonder-specific ID of the source to be whose name is transmitted.
sourceNameThe new name of the source.
virtual int wonder::VisualStreamReceiver::Listener::onSourcePosition ( int  sourceID,
float  xPos,
float  yPos 
)
pure virtual

Called when the /WONDER/source/position message is recieved with one integer and two float parameters.

Parameters
sourceIDThe wonder-specific ID of the source to be whose position parameters are transmitted.
xPosThe x-axis coordinate (in meters).
yPosThe y-axis coordinate (in meters).
virtual int wonder::VisualStreamReceiver::Listener::onSourceRotatingDirection ( int  sourceID,
int  inverted 
)
pure virtual

Called when the /WONDER/source/rotationDirection message is recieved.

Parameters
sourceIDThe wonder-specific ID of the source to be whose rotation direction is transmitted.
inverted1 for "inverted", 0 for "not inverted".
virtual int wonder::VisualStreamReceiver::Listener::onSourceScalingDirection ( int  sourceID,
int  inverted 
)
pure virtual

Called when the /WONDER/source/scalingDirection message is recieved.

Parameters
sourceIDThe wonder-specific ID of the source to be whose scaling direction is transmitted.
inverted1 for "inverted", 0 for "not inverted".
virtual int wonder::VisualStreamReceiver::Listener::onSourceType ( int  sourceID,
int  type 
)
pure virtual

Called when the /WONDER/source/type message is recieved.

Parameters
sourceIDThe wonder-specific ID of the source to be whose type is transmitted.
type0 for a planewave source, 1 for a point source.
virtual int wonder::VisualStreamReceiver::Listener::onStreamVisualConnect ( OscSender replyTo)
inlinevirtual

Called when any /WONDER/stream/visual/connect message is recieved.

The parameters of the message are ignored, but the Address to reply to is passed as parameter.

Parameters
replyToAn OscSender sending to the Address the message was sent from.
Warning
The VisualStreamReceiver may delete the OscSender replyTo after calling this method, so the listener must create its own copy if the Address shall be stored for further use.
virtual int wonder::VisualStreamReceiver::Listener::onStreamVisualDisconnect ( )
inlinevirtual

Called when any /WONDER/stream/visual/disconnect message is recieved.

virtual int wonder::VisualStreamReceiver::Listener::onStreamVisualPong ( int  pingCount)
pure virtual

Called when a /WONDER/stream/visual/ping is received.

Parameters
pingCountAn int value that should be the same as in the ping message the current pong message is replying to.