Allolib  1.0
C++ Components For Interactive Multimedia
al::SequenceServer Class Reference

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/ui/al_SequenceServer.hpp>

Inheritance diagram for al::SequenceServer:
al::osc::PacketHandler al::OSCNotifier

Public Member Functions

 SequenceServer (std::string oscAddress="127.0.0.1", int oscPort=9012)
 SequenceServer constructor. More...
 
 SequenceServer (ParameterServer &paramServer)
 using this constructor reuses the existing osc::Recv server from the ParameterServer object More...
 
virtual void onMessage (osc::Message &m)
 Called for each message contained in packet.
 
SequenceServerregisterSequencer (PresetSequencer &sequencer)
 
SequenceServerregisterRecorder (SequenceRecorder &recorder)
 
SequenceServerregisterMessageConsumer (osc::MessageConsumer &consumer)
 
void print ()
 print prints information about the server to std::out
 
void stopServer ()
 stopServer stops the OSC server thread. Calling this function is sometimes required when this object is destroyed abruptly and the destructor is not called.
 
SequenceServeroperator<< (PresetSequencer &sequencer)
 
SequenceServeroperator<< (SequenceRecorder &recorder)
 
SequenceServeroperator<< (osc::MessageConsumer &consumer)
 
void setAddress (std::string address)
 
std::string getAddress ()
 
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)
 

Static Protected Member Functions

static void changeCallback (int value, void *sender, void *userData)
 

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

SequenceServer

Definition at line 14 of file al_SequenceServer.hpp.

Constructor & Destructor Documentation

◆ SequenceServer() [1/2]

al::SequenceServer::SequenceServer ( std::string  oscAddress = "127.0.0.1",
int  oscPort = 9012 
)

SequenceServer constructor.

Parameters
oscAddressThe network address on which to listen to. If empty use all available network interfaces. Defaults to "127.0.0.1".
oscPortThe network port on which to listen. Defaults to 9012.

The sequencer server triggers sequences when it receives a valid sequence name on OSC path /sequence.

◆ SequenceServer() [2/2]

al::SequenceServer::SequenceServer ( ParameterServer paramServer)

using this constructor reuses the existing osc::Recv server from the ParameterServer object

Parameters
paramServeran existing ParameterServer object

You will want to reuse an osc::Recv server when you want to expose the interface thorugh the same network port. Since network ports are exclusive, once a port is bound, it can't be used. You might need to expose the parameters on the same network port when using things like interface.simpleserver.js That must connect all interfaces to the same network port.

Member Function Documentation

◆ addListener()

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

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 
)
inherited

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: