Namespace MOSAIC.Visualization
Classes
BlockVisualization
All-in-one visualization bundle for any processing block. Owns a ScopeMonitor, SpiderMonitor, and HeatMapMonitor, and provides a single Feed(Vector<double>?) call to update all of them.
ChannelRingMonitorBase
Shared data engine for the time-series (ring-backed) monitors. It centralizes:
- the lock-free SampleRingBuffer ingest (EnqueueData(Vector<double>) / EnqueueBatch(Matrix<double>, int)),
- the VisualizationTimer subscription and Pause()/Resume() lifecycle,
- the coalesced flush (
Interlocked+Dispatcher.Post), - the coalesced channel reconfigure, and
- the monotonic clock + optional accept-rate throttle.
A subclass supplies only its rendering: OnFlush(SampleRingBuffer, int), OnRebuild(), OnResetData(), UpdateThemeColors(), and (optionally) state-reset and readiness hooks.
MonitorViewBase<TMonitor>
Base class for monitor views. Owns the rendering lifecycle shared by every monitor — visual-tree attach/detach, theme subscription, and the pause / reset / rebuild / resume sequence — so a concrete view supplies only the backend-specific surface creation and teardown. The monitor itself owns the data engine and is driven through IMonitor.
ThemeHelper
Central theme color provider for all visualization components.
Two categories:
Avalonia controls — use DynamicResourceExtension with the string constants:
control[!Border.BackgroundProperty] = new DynamicResourceExtension(ThemeHelper.ChartBackgroundBrush);SkiaSharp/LiveCharts paints — use the static SKColor properties directly:
var paint = new SolidColorPaint(ThemeHelper.ChartAxisLabel);
VisualizationPanel
Reusable panel that hosts one or more visualization monitors (Scope, Spider, Heatmap) with individual toggle buttons and a continuous size slider. Each visualization can be independently shown/hidden; hidden monitors are paused to save resources.
When this panel is detached from the visual tree (e.g. scrolled off-screen),
it notifies the bound BlockVisualization via
NotifyDetached() so that Feed(Vector<double>?)
calls are suppressed. This prevents LiveCharts2 VectorManager crashes that occur
when series data is mutated while the chart is not attached to a render context.
On re-attachment, NotifyAttached() is called and
all visible slots have their views rebuilt and monitors resumed.
Usage: bind the optional Scope / Spider / Heatmap properties to the block's ViewModel. Only monitors that are bound (non-null) will show a toggle button.
VisualizationPanel.SlotState
VisualizationSettingsFlyout
Unified settings flyout for all visualization types.
Common: Autoscale toggle + optional fixed min/max inputs. Scope: Additionally shows channel offset control (auto/manual). Heatmap: Additionally shows scaler mode selector + colormap picker.
Created by each *View class and attached to a gear button.
Structs
HeightRange
Min/max height range for each visualization slot type. The user drags a slider between these bounds for continuous resizing.
Interfaces
IMonitor
The lifecycle surface every monitor exposes to its view. A monitor owns the data engine (buffers, timers, channel configuration); the view drives it through these members as the rendering surface is created and torn down.
Enums
SettingsTarget
Which visualization type this flyout controls.
VisualizationType
Available visualization types that can be hosted in a VisualizationPanel.