Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::ValueChannelSet Class Reference

A processor's declared channels. More...

#include <value_channel_set.hpp>

Public Types

enum class  DeclareError { ok , empty_name , duplicate_name , reserved_character }
 Why a declaration was refused. More...

Public Member Functions

 ValueChannelSet ()=default
 ValueChannelSet (const ValueChannelSet &)=delete
 ValueChannelSet (ValueChannelSet &&)=delete
ValueChannelSet & operator= (const ValueChannelSet &)=delete
ValueChannelSet & operator= (ValueChannelSet &&)=delete
std::uint64_t generation_identity () const noexcept
 Process-local identity assigned with the first declaration in this exact set lifetime.
ScalarSource * declare_scalar (std::string name, std::string unit={}, float neutral=0.0f, DeclareError *error=nullptr)
 Declare a scalar channel.
MeterSource * declare_meter (std::string name, std::string unit={}, float neutral=0.0f, DeclareError *error=nullptr)
 Declare a multi-channel meter.
VectorSource * declare_vector (std::string name, std::string unit={}, float neutral=0.0f, DeclareError *error=nullptr)
 Declare a block channel for a scope-style display.
EventSource * declare_events (std::string name, std::string unit={}, DeclareError *error=nullptr)
 Declare occurrences carrying frame offsets and values.
ScalarSource * scalar (std::string_view name) const
 Look up a declared channel by its exact name.
MeterSource * meter (std::string_view name) const
VectorSource * vector (std::string_view name) const
EventSource * events (std::string_view name) const
const std::vector< ValueChannelInfo > & infos () const noexcept
 Every declared channel, in declaration order.
ValueChannelTelemetryAttachment attach_telemetry () const
 Claim the transport-free telemetry sidecars.
bool empty () const noexcept
std::size_t size () const noexcept

Static Public Member Functions

static const char * describe (DeclareError e) noexcept
 Human-readable reason, for diagnostics and test failure messages.

Detailed Description

A processor's declared channels.

Construct and declare on the host thread, before audio runs; the name set is fixed thereafter so a binding resolved once stays valid and discovery cannot race a declaration. Declaring returns a reference the processor keeps and publishes through.

Member Enumeration Documentation

◆ DeclareError

Why a declaration was refused.

Names are a lookup key, so the rules are strict on purpose: a silently renamed or deduplicated channel is a binding that resolves to the wrong data.

Enumerator
ok 
empty_name 
duplicate_name 
reserved_character 

contains ':', reserved for the "value:" JS prefix

Constructor & Destructor Documentation

◆ ValueChannelSet() [1/3]

◆ ValueChannelSet() [2/3]

pulp::dataplane::ValueChannelSet::ValueChannelSet ( const ValueChannelSet & )
delete

◆ ValueChannelSet() [3/3]

Member Function Documentation

◆ attach_telemetry()

Claim the transport-free telemetry sidecars.

The claim is exclusive; callers receive an invalid attachment while another reader owns them. Creating and destroying the attachment happens off the audio thread.

◆ declare_events()

EventSource * pulp::dataplane::ValueChannelSet::declare_events ( std::string name,
std::string unit = {},
DeclareError * error = nullptr )

Declare occurrences carrying frame offsets and values.

◆ declare_meter()

MeterSource * pulp::dataplane::ValueChannelSet::declare_meter ( std::string name,
std::string unit = {},
float neutral = 0.0f,
DeclareError * error = nullptr )

Declare a multi-channel meter.

◆ declare_scalar()

ScalarSource * pulp::dataplane::ValueChannelSet::declare_scalar ( std::string name,
std::string unit = {},
float neutral = 0.0f,
DeclareError * error = nullptr )

Declare a scalar channel.

Returns nullptr on refusal; error receives the reason when non-null.

◆ declare_vector()

VectorSource * pulp::dataplane::ValueChannelSet::declare_vector ( std::string name,
std::string unit = {},
float neutral = 0.0f,
DeclareError * error = nullptr )

Declare a block channel for a scope-style display.

◆ describe()

const char * pulp::dataplane::ValueChannelSet::describe ( DeclareError e)
staticnoexcept

Human-readable reason, for diagnostics and test failure messages.

◆ empty()

bool pulp::dataplane::ValueChannelSet::empty ( ) const
inlinenoexcept

◆ events()

EventSource * pulp::dataplane::ValueChannelSet::events ( std::string_view name) const

◆ generation_identity()

Process-local identity assigned with the first declaration in this exact set lifetime.

Unlike its address, this does not repeat when allocator storage is reused after a hot swap. Empty sets report zero.

◆ infos()

const std::vector< ValueChannelInfo > & pulp::dataplane::ValueChannelSet::infos ( ) const
inlinenoexcept

Every declared channel, in declaration order.

This is what discovery and a UI lint read.

◆ meter()

MeterSource * pulp::dataplane::ValueChannelSet::meter ( std::string_view name) const

◆ operator=() [1/2]

ValueChannelSet & pulp::dataplane::ValueChannelSet::operator= ( const ValueChannelSet & )
delete

◆ operator=() [2/2]

ValueChannelSet & pulp::dataplane::ValueChannelSet::operator= ( ValueChannelSet && )
delete

◆ scalar()

ScalarSource * pulp::dataplane::ValueChannelSet::scalar ( std::string_view name) const

Look up a declared channel by its exact name.

Returns nullptr when the name is absent OR was declared with a different shape — never creates. Call from the reader (UI) thread.

◆ size()

std::size_t pulp::dataplane::ValueChannelSet::size ( ) const
inlinenoexcept

◆ vector()

VectorSource * pulp::dataplane::ValueChannelSet::vector ( std::string_view name) const

The documentation for this class was generated from the following file: