Marsyas  0.5.0-beta1
Public Member Functions
OscTransmitter Class Reference

Real-time-safe generator of OSC messages with control change info. More...

#include <osc_transmitter.h>

Inherits MarSystem.

Public Member Functions

MarSystemclone () const
void myProcess (realvec &, realvec &)
 Processes data.
void myUpdate (MarControlPtr handler)
 Updates internal state due to a control change.
 OscTransmitter (MarSystem *system)
bool subscribe (const std::string &path, OscSubscriber *subscriber)
 Subscribe receiver to changes of a particular control.
bool subscribe (MarControlPtr control, OscSubscriber *subscriber)
void unsubscribe (const std::string &path, OscSubscriber *subscriber)
 Unsubscribe receiver from changes of a particular control.
void unsubscribe (MarControlPtr control, OscSubscriber *subscriber)

Detailed Description

Real-time-safe generator of OSC messages with control change info.

Author:
Jakob Leben <jakob.leben@gmail.com>

Monitors changes of controls within a MarSystem. For each change generates an OSC message with new control data and address equal to path of control, then calls subscribers to that particular control to process the OSC message. Only monitors controls and generates OSC messages specifically subscribed to.

Definition at line 51 of file osc_transmitter.h.


Constructor & Destructor Documentation

OscTransmitter ( MarSystem system) [inline]

Definition at line 54 of file osc_transmitter.h.


Member Function Documentation

MarSystem* clone ( ) const [inline, virtual]

Implements MarSystem.

Definition at line 60 of file osc_transmitter.h.

void myProcess ( realvec in,
realvec out 
) [virtual]

Processes data.

Parameters:
inInput data to read.
outOutput data to write.

Implement this method in subclass to define specific data processing.

Implements MarSystem.

Definition at line 125 of file osc_transmitter.cpp.

void myUpdate ( MarControlPtr  sender) [virtual]

Updates internal state due to a control change.

Parameters:
senderThe control that triggered the update; more precisely, any control passed to the update() method - could be an invalid one.

Implement this method in subclass to define specific response to control changes.

Reimplemented from MarSystem.

Definition at line 130 of file osc_transmitter.cpp.

bool subscribe ( const std::string &  path,
OscSubscriber subscriber 
) [inline]

Subscribe receiver to changes of a particular control.

Parameters:
pathPath of control, in the form of "/child-system/child-system/.../control-name"
addressIP host of receiver.
portIP port of receiver.
Returns:

Definition at line 73 of file osc_transmitter.h.

bool subscribe ( MarControlPtr  control,
OscSubscriber subscriber 
)

Definition at line 62 of file osc_transmitter.cpp.

void unsubscribe ( const std::string &  path,
OscSubscriber subscriber 
) [inline]

Unsubscribe receiver from changes of a particular control.

Parameters:
pathPath of control, in the form of "/child-system/child-system/.../control-name"
addressIP host of receiver.
portIP port of receiver.
Returns:

Definition at line 90 of file osc_transmitter.h.

void unsubscribe ( MarControlPtr  control,
OscSubscriber subscriber 
)

Definition at line 89 of file osc_transmitter.cpp.


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