Skip to content

OscModule

Source: OscModule.h

OscModule

class OscModule
src/core/OscModule.h:41

Inherits: MoonModule, ControlSurface

Service: receives OSC and writes it onto the device's controls.

OscModule card

Public Attributes

bool enabledOsc = false : Off by default: this opens an unauthenticated UDP port that writes controls, so it is a capability a user turns on rather than one every device carries.

uint16_t port = osc::kDefaultPort

bool feedback = false : Mirror control changes back to the surface.

uint16_t feedbackPort = 9001 : Where the CLIENT listens, which is not where we do.

Public Methods

virtual inline ModuleRole role() const override : Role for type identification (no RTTI needed).

virtual inline void defineControls() override : defineControls MUST be idempotent and pure: only controls_.clear() + controls_.addX().

virtual inline void onControlChanged(const char *) override : Cheap per-control reaction, tier 1 of the three-tier control-change split (mirrors MoonLight's onUpdate / requestMappings / onSizeChanged; see architecture.md ยง Rebuild propagation).

virtual inline void release() override

virtual inline void sendValue(SurfaceControl kind, uint8_t index, uint8_t value) override : A control's position changed.

virtual inline void tick1s() override : The status is time-dependent (a peer goes stale), so it is refreshed on the second, not only when something arrives.

virtual inline void tick() override