Namespace MOSAIC.Components.Basics

Classes

BaseBlock

Base class for processing blocks in the MOSAIC pipeline.

CircularBuffer<T>

A fixed-size circular (ring) buffer that overwrites the oldest elements once full.

ConfigPicker

Provides helper methods for selecting and loading a MOSAIC JSON pipeline configuration via an Avalonia file picker.

CsvDumper

Asynchronously appends numeric samples to a CSV file using a bounded, non-blocking queue.

JsonExporter

Serializes MOSAIC pipeline configurations to JSON files.

JsonModel

Represents the JSON configuration model for a single MOSAIC pipeline component (block).

JsonParser

Parses MOSAIC pipeline configuration JSON into a read-only dictionary of block definitions.

LatestFrameSlot

Lock-free, allocation-free "latest value wins" handoff for one multi-channel frame, for the latest-only monitors (spider, heatmap) that render only the newest sample each flush.

Why: these monitors push a frame per sample but the flush keeps only the last one, so a queue is pure waste. This slot keeps exactly the newest frame in pre-allocated buffers — the producer overwrites, the consumer reads the latest. Steady-state allocates nothing.

SPSC triple buffer: one producer calls Write(ReadOnlySpan<double>); one consumer calls TryReadInto(Span<double>)/HasData/Clear(). Three buffers — the producer always owns one (back), the consumer always owns one (front), and a shared "ready" slot (middle) is swapped via a single atomic. The producer and consumer never touch the same buffer, so reads are tear-free and wait-free; intermediate frames are simply skipped. NOT safe for multiple producers.

MosaicJsonContext

System.Text.Json source-generation context for MOSAIC configuration types.

ObjectListConverter

Custom JSON converter that preserves JsonElement instances for mixed-type arrays.

OutputDispatcher

Dispatches published values to a set of registered subscribers.

OutputDispatcher.Subscription

SampleRingBuffer

Lock-free, allocation-free ring buffer of fixed-width sample frames for the real-time visualization ingest path (one frame = Channels doubles).

SPSC: one producer calls Write(ReadOnlySpan<double>); one consumer calls HasData/BeginRead()/Peek(int, int)/CopyFrame(int, Span<double>)/ CommitRead()/Clear(). Lock-free between the two roles. NOT safe for multiple producers.

Overflow = overwrite-oldest: the producer writes circularly and never blocks, so the ring always holds the most recent Capacity frames. If the consumer falls behind, BeginRead() skips the overwritten-oldest frames (counted in DroppedFrames) and returns a batch ENDING at the newest frame — the live signal is never the data dropped. A guard band keeps reads tear-free.

TickTracker

Tracks publish timing to estimate output rate and derive a BlockStatus.

Structs

CsvDumper.CsvCommand

One item on the writer queue: either a numeric row snapshot, or a flush request carrying the completion source to signal once the bytes are on disk.

Interfaces

IBaseBlockProps

Defines common monitoring and identification properties exposed by MOSAIC processing blocks.

Search documentation

Start typing to search the documentation.