3 #include <ossia/network/base/protocol.hpp>
5 #include <ossia-max/src/device_base.hpp>
12 class device :
public device_base
15 using is_device = std::true_type;
17 static void register_children(device*);
18 static void loadbang(device*);
20 static void expose(device* x, t_symbol*,
long argc, t_atom* argv);
21 static void name(device* x, t_symbol*,
long argc, t_atom* argv);
22 static void get_protocols(device* x);
23 static void get_oscq_clients(device* x);
24 static void stop_expose(device* x,
int index);
25 static void enable_buffering(device* x,
int index,
int enable);
26 static void send_buffer(device* x,
int index);
27 static void get_mess_cb(device* x, t_symbol* s);
28 static void assist(ossia::max_binding::device*,
void*,
long,
long,
char*);
29 static void send_raw_osc(device* x, t_symbol* s,
int argc, t_atom* argv);
30 static void resend_all_values(device* x, t_symbol* s);
32 static void* create(t_symbol*,
long, t_atom*);
33 static void destroy(ossia::max_binding::device*);
34 static void class_setup(t_class* c);
37 namespace protocol_settings
42 std::string remoteip{
"localhost"};
43 unsigned int remoteport = 13579;
44 unsigned int localport = 9998;
49 unsigned int oscport = 9999;
50 unsigned int wsport = 5678;
55 std::string remoteip{
"localhost"};
56 unsigned int remoteport = 9997;
57 unsigned int localport = 9996;
60 static void print_protocol_help()
62 post(
"expose <protocol> <args> ...");
63 post(
"Available protocols (case sensitive): Minuit, oscquery, osc");
65 post(
"Protocols parameters :");
68 "Minuit <remoteip> <remoteport> <localport> :\n"
69 "\tremoteip (symbol): ip of target device\n"
70 "\tremoteport (int): port on which packet should be send\n"
71 "\tlocalport (int): port to which this device is listening");
74 "oscquery <oscport> <wsport> :\n"
75 "\toscport (int) : port on which osc packet are sent\n"
76 "\twsport (int) : WebSocket port on which distant application will "
80 "osc <remoteip> <remoteport> <localpoort>\n"
81 "\tremoteip (symbol): ip of target device\n"
82 "\tremoteport (int): port on which packet should be send\n"
83 "\tlocalport (int): port this device is listening.");