Allolib  1.0
C++ Components For Interactive Multimedia
al::OSCNotifier Class Reference
Inheritance diagram for al::OSCNotifier:
al::ParameterServer al::PresetServer al::SequenceServer

Classes

class  HandshakeHandler
 

Public Member Functions

virtual void addListener (std::string IPaddress, uint16_t oscPort)
 addListener enables notifiying via OSC that a preset has changed More...
 
void notifyListeners (std::string OSCaddress, float value, ValueSource *src=nullptr)
 Notify the listeners of value changes. More...
 
void notifyListeners (std::string OSCaddress, int value, ValueSource *src=nullptr)
 
void notifyListeners (std::string OSCaddress, std::string value, ValueSource *src=nullptr)
 
void notifyListeners (std::string OSCaddress, Vec3f value, ValueSource *src=nullptr)
 
void notifyListeners (std::string OSCaddress, Vec4f value, ValueSource *src=nullptr)
 
void notifyListeners (std::string OSCaddress, Pose value, ValueSource *src=nullptr)
 
void notifyListeners (std::string OSCaddress, Color value, ValueSource *src=nullptr)
 
void notifyListeners (std::string OSCaddress, ParameterMeta *param, ValueSource *src)
 
void send (osc::Packet &p)
 
void startHandshakeServer (std::string address="0.0.0.0")
 
void appendCommandHandler (osc::PacketHandler &handler)
 

Protected Attributes

std::mutex mListenerLock
 
std::vector< osc::Send * > mOSCSenders
 
std::vector< std::pair< std::string, int > > mConnectedNodes
 
al::OSCNotifier::HandshakeHandler mHandshakeHandler
 
osc::Recv mHandshakeServer
 
std::vector< std::pair< std::string, uint16_t > > mNodes
 
std::mutex mNodeLock
 

Detailed Description

Definition at line 85 of file al_ParameterServer.hpp.

Member Function Documentation

◆ addListener()

virtual void al::OSCNotifier::addListener ( std::string  IPaddress,
uint16_t  oscPort 
)
inlinevirtual

addListener enables notifiying via OSC that a preset has changed

Parameters
IPaddressThe IP address of the listener
oscPortThe network port so send the value changes on

Definition at line 95 of file al_ParameterServer.hpp.

◆ notifyListeners()

void al::OSCNotifier::notifyListeners ( std::string  OSCaddress,
float  value,
ValueSource src = nullptr 
)

Notify the listeners of value changes.

Parameters
OSCaddressThe OSC path to send the value on
valueThe value to send

This will send all registered data to the listeners. This is useful to force a resfresh of an interface, e.g. when it just came online and is unaware of state. Otherwise, when calling addListener, you should register to be notified when the data changes to only do notifications then.


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