|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Stateless OSC message parser: raw UDP bytes -> InputValue. More...
#include <OscParser.hpp>
Collaboration diagram for MayaFlux::Core::OscParser:Static Public Member Functions | |
| static std::optional< InputValue > | parse (const uint8_t *data, size_t size, uint32_t device_id=0) |
| Parse a single OSC message from raw bytes. | |
| static std::vector< uint8_t > | serialize (const std::string &address, const std::vector< InputValue::OSCArg > &args) |
| Serialize an OSC message to wire format. | |
Stateless OSC message parser: raw UDP bytes -> InputValue.
Parses OSC 1.0 messages from raw datagram bytes. Does not handle bundles (yet). Does not own a socket. Does not know about NetworkService. Pure function: bytes in, optional InputValue out.
OSC wire format: [address string, null-padded to 4-byte boundary] [type tag string starting with ',', null-padded to 4-byte boundary] [arguments, each padded to 4-byte boundary]
Supported type tags: 'i' -> int32_t (big-endian) 'f' -> float (big-endian IEEE 754) 's' -> null-terminated string (padded to 4 bytes) 'b' -> blob: [int32 size][data, padded to 4 bytes]
Definition at line 33 of file OscParser.hpp.