OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
artnet_protocol.hpp
1#pragma once
2#include <ossia/detail/config.hpp>
3#if defined(OSSIA_PROTOCOL_ARTNET)
4#include <ossia/network/sockets/udp_socket.hpp>
5#include <ossia/protocols/artnet/dmx_protocol_base.hpp>
6
7using artnet_node = void*;
8
9namespace ossia::net
10{
11struct dmx_config;
12class OSSIA_EXPORT artnet_protocol final : public dmx_output_protocol_base
13{
14public:
15 artnet_protocol(
16 ossia::net::network_context_ptr, const dmx_config& conf,
17 const ossia::net::outbound_socket_configuration& socket);
18 ~artnet_protocol();
19
20 void set_device(ossia::net::device_base& dev) override;
21
22private:
23 void update_function();
24
25 ossia::net::udp_send_socket m_socket;
26};
27
28class OSSIA_EXPORT artnet_input_protocol final : public dmx_input_protocol_base
29{
30public:
31 artnet_input_protocol(
32 ossia::net::network_context_ptr, const dmx_config& conf,
33 const ossia::net::inbound_socket_configuration& socket);
34 ~artnet_input_protocol();
35
36 void set_device(ossia::net::device_base& dev) override;
37
38private:
39 void stop() override;
40
41 ossia::net::udp_receive_socket m_socket;
42};
43}
44
45#endif
Root of a device tree.
Definition ossia/network/base/device.hpp:58