Class TemplateMinimal
Minimal vector block template: receives data and publishes it downstream.
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.
{
"MyBlock": {
"Type": "TemplateMinimal",
"Inputs": [ "Upstream" ],
"Params": [ ],
"Path": "C:/Data/session1"
}
}
How Type, Inputs and Params work · Block catalogue and parameter reference
Implements
Inherited Members
Namespace: MOSAIC.Models
Assembly: MOSAIC.dll
Syntax
public class TemplateMinimal : BaseBlock, INotifyPropertyChanged, INotifyPropertyChanging, ISubscriber, IPublisher, IBaseBlockProps, IJsonExportable, IDisposable, IAsyncDisposable
Remarks
Copy and rename this class, then add factory and catalogue entries. This template is not registered as a loadable block in the shipped application.
CSV logging: When a Path is specified in the JSON config,
Dumper automatically logs every value passed to
Publish(object).
Constructors
TemplateMinimal(string, double)
Initializes a new TemplateMinimal block.
Declaration
public TemplateMinimal(string name = "TemplateMinimal", double desiredRate = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Display name. |
| double | desiredRate | Processing rate in Hz (typically inherited). |
Properties
DumpFilePrefix
Recordings from this block are named <block>_out.csv.
Declaration
protected override string DumpFilePrefix { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
JsonTypeName
Block type identifier for JSON serialization. Override for a custom name.
Declaration
protected override string JsonTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Methods
ConfigureInput(IServiceProvider, JsonModel)
Creates a TemplateMinimal from a JSON pipeline definition.
Declaration
public static TemplateMinimal ConfigureInput(IServiceProvider sp, JsonModel m)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceProvider | sp | |
| JsonModel | m |
Returns
| Type | Description |
|---|---|
| TemplateMinimal |
OnReceive(object, object)
Processes incoming data and publishes the result.
Declaration
protected override void OnReceive(object sender, object data)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | |
| object | data |