Marsyas
0.6.0-alpha
|
Real-time-safe generator of OSC messages with control change info. More...
#include <osc_transmitter.h>
Inherits MarSystem.
Public Member Functions | |
MarSystem * | clone () 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) |
Real-time-safe generator of OSC messages with control change info.
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.
OscTransmitter | ( | MarSystem * | system | ) | [inline] |
Definition at line 54 of file osc_transmitter.h.
Implements MarSystem.
Definition at line 60 of file osc_transmitter.h.
Processes data.
in | Input data to read. |
out | Output 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.
sender | The 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.
path | Path of control, in the form of "/child-system/child-system/.../control-name" |
address | IP host of receiver. |
port | IP port of receiver. |
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.
path | Path of control, in the form of "/child-system/child-system/.../control-name" |
address | IP host of receiver. |
port | IP port of receiver. |
Definition at line 90 of file osc_transmitter.h.
void unsubscribe | ( | MarControlPtr | control, |
OscSubscriber * | subscriber | ||
) |
Definition at line 89 of file osc_transmitter.cpp.