Class TemplateViz
Pass-through vector template with the standard visualization bundle.
JSON configuration
Use these block entries inside a pipeline configuration. Input names must match other blocks in that pipeline; device addresses and file paths must match your setup.
{
"Display": { "Type": "templateviz", "Inputs": ["Signal"] }
}
This fragment requires a registered templateviz factory key and a vector-producing Signal block.
How Type, Inputs and Params work · Block catalogue and parameter reference
Implements
Inherited Members
Namespace: MOSAIC.Models
Assembly: MOSAIC.dll
Syntax
public class TemplateViz : BaseBlock, INotifyPropertyChanged, INotifyPropertyChanging, ISubscriber, IPublisher, IBaseBlockProps, IJsonExportable, IDisposable, IAsyncDisposable
Remarks
Copy and rename this class, then add factory and catalogue entries before loading it. Bind a VisualizationPanel to Viz. The panel manages visibility; this model owns disposal. The default input constraints require one input. No custom parameters are needed.
Constructors
TemplateViz(string, double)
Creates a template instance; a zero rate is inherited from upstream.
Declaration
public TemplateViz(string name = "TemplateViz", double desiredRate = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| double | desiredRate |
Properties
JsonTypeName
Block type identifier for JSON serialization. Override for a custom name.
Declaration
protected override string JsonTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Scope
Scope alias for callers that use the individual monitor; null in headless tests.
Declaration
public ScopeMonitor? Scope { get; }
Property Value
| Type | Description |
|---|---|
| ScopeMonitor |
Visualization
This block's visualization, or null when it has none.
Declaration
protected override BlockVisualization? Visualization { get; }
Property Value
| Type | Description |
|---|---|
| BlockVisualization |
Overrides
Remarks
Blocks own their scope as a public Viz property rather than inheriting one, so the
base class has no way to reach it. Overriding this is what lets the rate below be wired up
automatically. With correct publication metadata, the bundle derives the time axis for
one vector per publication or fixed-size contiguous sample packets from the feed shape.
When a plot needs a rate that publication frequency and feed shape cannot express (for
example, variable-sized packets or overlapping windows), declare it with
Viz.UpdateSignalRate. An explicit declaration wins over the derived rate. A block
with several bundles must configure each one; this hook exposes only one bundle.
Viz
Standard Scope, Spider and Heatmap bundle, fed with the published output.
Declaration
public BlockVisualization Viz { get; }
Property Value
| Type | Description |
|---|---|
| BlockVisualization |
Methods
ConfigureInput(IServiceProvider, JsonModel)
Reads common JSON fields; recording is attached by BlockFactory.Create.
Declaration
public static TemplateViz ConfigureInput(IServiceProvider sp, JsonModel m)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceProvider | sp | |
| JsonModel | m |
Returns
| Type | Description |
|---|---|
| TemplateViz |
Dispose(bool)
Releases managed resources: status subscription, output dispatcher, CSV dumper, subscriber references.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | true when called from Dispose(). There is no finalizer, so a false pass has nothing to release. |
Overrides
OnReceive(object, object)
Processes incoming data from an upstream block. Must be implemented by derived classes.
Declaration
protected override void OnReceive(object sender, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | The publishing block, or whatever else delivered the value. |
| object | value | The payload. Blocks are wired by config rather than by type, so an implementation has to check the run-time type and reject or handle a shape it cannot use. Status is updated automatically from publication activity; it is not a per-value validation result. |
Overrides
Remarks
Called on the dispatching thread, not the UI thread.