Implementation of OSC settings and translator

Translations are in a config xml file in settings directory, and can be directly edited in text by the user. Settings UI allows changing Ports for incoming and outgoing UDP.
This commit is contained in:
Bruno Herbelin
2021-12-27 01:04:49 +01:00
parent 626eab7e8f
commit c79be090df
7 changed files with 228 additions and 50 deletions

View File

@@ -1,6 +1,9 @@
#ifndef CONTROL_H
#define CONTROL_H
#include <map>
#include <string>
#include <condition_variable>
#include "NetworkToolkit.h"
#define OSC_SYNC "/sync"
@@ -61,7 +64,7 @@ public:
bool init();
void terminate();
// void setOscPort(int P);
std::string translate (std::string addresspattern);
protected:
@@ -89,8 +92,13 @@ private:
static void listen();
RequestListener listener_;
std::condition_variable receiver_end_;
UdpListeningReceiveSocket *receiver_;
std::map<std::string, std::string> translation_;
bool configOscLoad();
void configOscReset();
};
#endif // CONTROL_H