Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::osc Namespace Reference

Classes

struct  TimeTag
 OSC timetag — NTP timestamp (seconds since 1900-01-01). More...
struct  BundleElement
 Bundle element — either a message or a nested bundle. More...
struct  Bundle
 OSC Bundle — contains a timetag and a list of elements. More...
struct  ColorRgba
 32-bit RGBA color — the OSC 1.0 optional 'r' type tag. More...
struct  Message
class  Sender
struct  ReceiverRoute
struct  ReceiverOptions
class  Receiver
struct  OscChannelOptions
class  OscChannel
struct  OscMapScale
 The incoming value range an OSC surface sends, and the normalized [0, 1] window it drives. More...
class  OscParameterMap

Typedefs

using Argument
using MessageHandler = std::function<void(const Message&)>
using BundleHandler = std::function<void(const Bundle&)>
using FormatErrorHandler = std::function<void(std::string_view)>

Functions

bool address_matches (std::string_view pattern, std::string_view address)
 OSC address pattern matching per OSC 1.0 spec.
std::vector< uint8_t > encode (const Message &msg)
Message decode (const uint8_t *data, size_t size)

Variables

constexpr std::string_view kBindLoopback = "127.0.0.1"
constexpr std::string_view kBindAllInterfaces = "0.0.0.0"
constexpr std::size_t kOscPatternCapacity = 96
 Longest OSC address pattern a mapping can hold, including the terminator.

Typedef Documentation

◆ Argument

Initial value:
std::variant<int32_t, float, std::string,
std::vector<uint8_t>, ColorRgba>
32-bit RGBA color — the OSC 1.0 optional 'r' type tag.
Definition osc.hpp:19

◆ BundleHandler

using pulp::osc::BundleHandler = std::function<void(const Bundle&)>

◆ FormatErrorHandler

using pulp::osc::FormatErrorHandler = std::function<void(std::string_view)>

◆ MessageHandler

using pulp::osc::MessageHandler = std::function<void(const Message&)>

Function Documentation

◆ address_matches()

bool pulp::osc::address_matches ( std::string_view pattern,
std::string_view address )

OSC address pattern matching per OSC 1.0 spec.

Supports: * (any), ? (single char), [...] (character class), {...} (alternatives)

◆ decode()

Message pulp::osc::decode ( const uint8_t * data,
size_t size )

◆ encode()

std::vector< uint8_t > pulp::osc::encode ( const Message & msg)

Variable Documentation

◆ kBindAllInterfaces

std::string_view pulp::osc::kBindAllInterfaces = "0.0.0.0"
inlineconstexpr

◆ kBindLoopback

std::string_view pulp::osc::kBindLoopback = "127.0.0.1"
inlineconstexpr

◆ kOscPatternCapacity

std::size_t pulp::osc::kOscPatternCapacity = 96
inlineconstexpr

Longest OSC address pattern a mapping can hold, including the terminator.

Longer patterns are rejected rather than truncated, so a binding can never silently match the wrong address.