2 #include <ossia/detail/config.hpp>
4 #include <ossia/network/base/message_origin_identifier.hpp>
5 #include <ossia/network/common/network_logger.hpp>
7 #include <tcb/span.hpp>
9 #include <nano_signal_slot.hpp>
18 struct bundle_element;
24 struct full_parameter_data;
44 SupportsMultiplex = (1 << 0)
92 virtual bool echo_incoming_message(
98 virtual bool push_bundle(
const std::vector<const ossia::net::parameter_base*>&);
99 virtual bool push_bundle(tcb::span<ossia::bundle_element>);
100 virtual bool push_bundle_bounded(tcb::span<ossia::bundle_element>);
110 virtual bool push_raw_bundle(
const std::vector<full_parameter_data>&);
172 virtual const network_logger& get_logger() const noexcept {
return m_logger; }
174 virtual bool connected() const noexcept;
175 virtual
void connect();
176 Nano::Signal<
void()> on_connection_open;
177 Nano::Signal<
void()> on_connection_closed;
178 Nano::Signal<
void()> on_connection_failure;
180 virtual
void start_execution() { }
181 virtual void stop_execution() { }
182 virtual void stop() { }
184 flags get_flags() const noexcept {
return m_flags; }
185 bool test_flag(flags f)
const noexcept {
return m_flags & f; }
188 const flags m_flags{};
189 network_logger m_logger;
192 template <
typename T>
193 class can_learn :
public T
198 bool learning() const noexcept {
return m_learning; }
200 void set_learning(
bool v) noexcept { m_learning = v; }
203 std::atomic_bool m_learning{};
Root of a device tree.
Definition: ossia/network/base/device.hpp:58
Stores custom loggers for the inbound and outbound network messages.
Definition: network_logger.hpp:19
The node_base class.
Definition: network/base/node.hpp:48
The parameter_base class.
Definition: ossia/network/base/parameter.hpp:48
The protocol_base class.
Definition: protocol.hpp:40
virtual bool push_raw(const full_parameter_data &)=0
Send a value to the network.
virtual bool observe(parameter_base &, bool)=0
Notify the network that a parameter should be listened to.
virtual bool update(node_base &node_base)=0
If the protocol supports it, request the namespace corresponding to this node. If the update takes to...
virtual bool observe_quietly(parameter_base &, bool)
Begin observation without notifying the other computers.
Definition: protocol.hpp:147
virtual bool pull(parameter_base &)=0
Pulls a value from the server synchronously.
virtual bool push(const parameter_base &, const ossia::value &v)=0
Send a value to the network.
virtual void set_logger(const network_logger &l)
Replace the loggers used.
Definition: protocol.hpp:170
The value class.
Definition: value.hpp:173
Full information about a parameter.
Definition: parameter_data.hpp:61