-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOSC.h
More file actions
38 lines (30 loc) · 914 Bytes
/
Copy pathOSC.h
File metadata and controls
38 lines (30 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include <string>
#include <vector>
#include <deque>
#include "SFML/Network.hpp"
class OSC
{
private:
sf::UdpSocket socket;
std::string addr;
std::deque<std::string> logs;
unsigned int port;
public:
int max_log = 100;
bool log_lock = false;
public:
OSC();
auto GetOSCData(const std::string& oscAddr, float v)->std::vector<unsigned char>;
auto GetOSCData(const std::string& oscAddr, bool v)->std::vector<unsigned char>;
auto GetOSCData(const std::string& oscAddr, int v)->std::vector<unsigned char>;
void Init(const std::string& address, unsigned int port);
void Init(std::string&& address, unsigned int port);
void SetOSCPort(int port);
bool SendOSC(std::string oscAddr, float v);
bool SendOSC(std::string oscAddr, bool v);
bool SendOSC(std::string oscAddr, int v);
auto GetLogs() -> const std::deque<std::string>&;
void AddLog(const std::string& str);
void ClearLogs();
};