MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kakshya::PlotProcessor Class Reference

DataProcessor that acquires per-series data from heterogeneous sources and writes into PlotContainer::m_data each process() call. More...

#include <PlotProcessor.hpp>

+ Inheritance diagram for MayaFlux::Kakshya::PlotProcessor:
+ Collaboration diagram for MayaFlux::Kakshya::PlotProcessor:

Classes

struct  SeriesBinding
 

Public Types

enum class  SourceType : uint8_t {
  NODE , AUDIO_BUFFER , NETWORK , CALLABLE ,
  RAW
}
 

Public Member Functions

void bind_audio_buffer (uint32_t series_index, std::shared_ptr< Buffers::AudioBuffer > buffer)
 Bind a series slot to an AudioBuffer.
 
void bind_callable (uint32_t series_index, std::function< void(std::vector< double > &)> fn)
 Bind a series slot to a callable.
 
void bind_network (uint32_t series_index, std::shared_ptr< Nodes::Network::NodeNetwork > network)
 Bind a series slot to a NodeNetwork with audio output.
 
void bind_node (uint32_t series_index, std::shared_ptr< Nodes::Node > node)
 Bind a series slot to a Node.
 
bool has_binding (uint32_t series_index) const
 
bool is_processing () const override
 Checks if the processor is currently performing processing.
 
void on_attach (const std::shared_ptr< SignalSourceContainer > &container) override
 Called when this processor is attached to a container.
 
void on_detach (const std::shared_ptr< SignalSourceContainer > &container) override
 Called when this processor is detached from a container.
 
 PlotProcessor ()=default
 
void process (const std::shared_ptr< SignalSourceContainer > &container) override
 Acquire data from all bound sources and write into the container.
 
void set_raw (uint32_t series_index, std::vector< double > data)
 Push raw sample data for a series.
 
void set_series_semantics (uint32_t series_index, DataDimension::Role role, DataModality modality)
 Set the role and modality for a series binding.
 
void unbind (uint32_t series_index)
 Remove a binding from a series slot.
 
 ~PlotProcessor () override=default
 
- Public Member Functions inherited from MayaFlux::Kakshya::DataProcessor
virtual ~DataProcessor ()=default
 Virtual destructor for proper cleanup.
 

Private Member Functions

void acquire_from_audio_buffer (SeriesBinding &b, std::vector< double > &series)
 
void acquire_from_callable (SeriesBinding &b, std::vector< double > &series)
 
void acquire_from_network (SeriesBinding &b, std::vector< double > &series)
 
void acquire_from_node (SeriesBinding &b, std::vector< double > &series)
 
void acquire_from_raw (SeriesBinding &b, std::vector< double > &series)
 

Private Attributes

std::unordered_map< uint32_t, SeriesBindingm_bindings
 
std::atomic< bool > m_processing { false }
 

Detailed Description

DataProcessor that acquires per-series data from heterogeneous sources and writes into PlotContainer::m_data each process() call.

Mirrors the source-binding model of DescriptorBindingsProcessor but targets CPU-side DataVariant storage rather than GPU descriptor sets. Each series slot in the container has one binding. All reads are EXTERNAL — the processor never drives node or network processing; it only samples already-processed state.

Source types per series: NODE — single Node, reads get_last_output() → scalar appended or overwrites the series depending on mode (rolling vs snapshot) AUDIO_BUFFER — AudioBuffer, reads get_data() span → full series copy NETWORK — NodeNetwork with audio output, reads get_audio_buffer() → full series copy CALLABLE — std::function<void(std::vector<double>&)>, caller fills the series RAW — pending std::vector<double> pushed via set_raw(), swapped in on process()

process() iterates all bindings, acquires from source, writes into the container's m_data variant at the bound series index, then copies m_data into processed_data. Called by Forma immediately before the geometry function runs.

Definition at line 42 of file PlotProcessor.hpp.


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