2#include <ossia/network/base/node.hpp>
3#include <ossia/network/base/parameter.hpp>
4#include <ossia/network/base/parameter_data.hpp>
6#include <oscpack/osc/OscTypes.h>
32static inline constexpr std::size_t pattern_size(std::size_t sz)
noexcept
34 return (sz & 0xFFFFFFFFFFFFFFFC) + 4;
37static inline std::size_t write_string(std::string_view str,
char* buffer)
noexcept
40 for(; i < str.size(); i++)
48 for(; i % 4 != 0; i++)
57 using namespace std::literals;
58 auto& ext = b.get_node().get_extended_attributes();
59 auto it = ext.find(
"extended_type"sv);
63 if(
auto* str = std::any_cast<ossia::extended_type>(&it->second))
64 return (*str) ==
"buffer"sv;
71 auto& u = b.get_unit();
72 return u == ossia::rgba8_u{};
77 using namespace std::literals;
78 auto& ext = b.extended;
79 auto it = ext.find(
"extended_type"sv);
83 if(
auto* str = std::any_cast<ossia::extended_type>(&it->second))
84 return (*str) ==
"buffer"sv;
91 return b.unit == ossia::rgba8_u{};
94static inline constexpr oscpack::RgbaColor to_osc_rgba(
const ossia::rgba8& u)
noexcept
96 uint32_t r = (uint32_t)u.dataspace_value[0] << 24;
97 uint32_t g = (uint32_t)u.dataspace_value[1] << 16;
98 uint32_t b = (uint32_t)u.dataspace_value[2] << 8;
99 uint32_t a = (uint32_t)u.dataspace_value[3];
100 return oscpack::RgbaColor(r + g + b + a);
The parameter_base class.
Definition ossia/network/base/parameter.hpp:48
Full information about a parameter.
Definition parameter_data.hpp:61