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

Transport-independent reader and bounded fan-out owner for value-channel telemetry. More...

#include <value_channel_telemetry_broker.hpp>

Classes

struct  Config

Public Types

using Clock = std::function<std::chrono::steady_clock::time_point()>
using EventSink = InspectorTargetedEventSink
using EventRetirementSink = InspectorEventRetirementSink

Public Member Functions

 ValueChannelTelemetryBroker ()
 ValueChannelTelemetryBroker (Config config, Clock clock={})
 ~ValueChannelTelemetryBroker ()
 ValueChannelTelemetryBroker (ValueChannelTelemetryBroker &&) noexcept
ValueChannelTelemetryBroker & operator= (ValueChannelTelemetryBroker &&) noexcept
 ValueChannelTelemetryBroker (const ValueChannelTelemetryBroker &)=delete
ValueChannelTelemetryBroker & operator= (const ValueChannelTelemetryBroker &)=delete
void set_event_sink (EventSink sink)
void set_event_retirement_sink (EventRetirementSink sink)
bool replace_attachment (view::ValueChannelTelemetryAttachment attachment)
 Replace the sole-reader attachment.
void replace_with_empty_source ()
 Record a source generation whose catalog is intentionally empty without retaining a reader attachment.
void clear_attachment ()
InspectorMessage handle (const InspectorRequestContext &context, const InspectorMessage &request)
 Handle Telemetry.getSnapshot, Telemetry.subscribe, or Telemetry.unsubscribe.
void poll ()
 Drain the attachment once and emit every due subscription.
void disconnect (std::string_view client_id)
std::size_t subscription_count () const noexcept
std::uint64_t source_generation () const noexcept

Detailed Description

Transport-independent reader and bounded fan-out owner for value-channel telemetry.

All methods are called serially on one control thread; the attachment remains the sole reader of its telemetry sidecars.

Member Typedef Documentation

◆ Clock

using pulp::inspect::ValueChannelTelemetryBroker::Clock = std::function<std::chrono::steady_clock::time_point()>

◆ EventRetirementSink

◆ EventSink

Constructor & Destructor Documentation

◆ ValueChannelTelemetryBroker() [1/4]

pulp::inspect::ValueChannelTelemetryBroker::ValueChannelTelemetryBroker ( )

◆ ValueChannelTelemetryBroker() [2/4]

pulp::inspect::ValueChannelTelemetryBroker::ValueChannelTelemetryBroker ( Config config,
Clock clock = {} )
explicit

◆ ~ValueChannelTelemetryBroker()

pulp::inspect::ValueChannelTelemetryBroker::~ValueChannelTelemetryBroker ( )

◆ ValueChannelTelemetryBroker() [3/4]

pulp::inspect::ValueChannelTelemetryBroker::ValueChannelTelemetryBroker ( ValueChannelTelemetryBroker && )
noexcept

◆ ValueChannelTelemetryBroker() [4/4]

pulp::inspect::ValueChannelTelemetryBroker::ValueChannelTelemetryBroker ( const ValueChannelTelemetryBroker & )
delete

Member Function Documentation

◆ clear_attachment()

void pulp::inspect::ValueChannelTelemetryBroker::clear_attachment ( )

◆ disconnect()

void pulp::inspect::ValueChannelTelemetryBroker::disconnect ( std::string_view client_id)

◆ handle()

InspectorMessage pulp::inspect::ValueChannelTelemetryBroker::handle ( const InspectorRequestContext & context,
const InspectorMessage & request )

Handle Telemetry.getSnapshot, Telemetry.subscribe, or Telemetry.unsubscribe.

Authenticated identity comes only from context.

◆ operator=() [1/2]

ValueChannelTelemetryBroker & pulp::inspect::ValueChannelTelemetryBroker::operator= ( const ValueChannelTelemetryBroker & )
delete

◆ operator=() [2/2]

ValueChannelTelemetryBroker & pulp::inspect::ValueChannelTelemetryBroker::operator= ( ValueChannelTelemetryBroker && )
noexcept

◆ poll()

void pulp::inspect::ValueChannelTelemetryBroker::poll ( )

Drain the attachment once and emit every due subscription.

◆ replace_attachment()

bool pulp::inspect::ValueChannelTelemetryBroker::replace_attachment ( view::ValueChannelTelemetryAttachment attachment)

Replace the sole-reader attachment.

An invalid attachment explicitly clears the prior source and returns false. Subscriptions retain their channel names and are resolved again against each valid generation.

◆ replace_with_empty_source()

void pulp::inspect::ValueChannelTelemetryBroker::replace_with_empty_source ( )

Record a source generation whose catalog is intentionally empty without retaining a reader attachment.

Existing subscriptions observe the generation transition and resolve their names as unavailable.

◆ set_event_retirement_sink()

void pulp::inspect::ValueChannelTelemetryBroker::set_event_retirement_sink ( EventRetirementSink sink)

◆ set_event_sink()

void pulp::inspect::ValueChannelTelemetryBroker::set_event_sink ( EventSink sink)

◆ source_generation()

std::uint64_t pulp::inspect::ValueChannelTelemetryBroker::source_generation ( ) const
noexcept

◆ subscription_count()

std::size_t pulp::inspect::ValueChannelTelemetryBroker::subscription_count ( ) const
noexcept

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