Class Negate

Flips the sign of every value in the incoming vector. The smallest possible block: one input, one output, no parameters, no card view.

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.

JSON configuration:

{
  "Flip": {
    "Type": "negate",
    "Inputs": [ "SinGenerator1" ]
  }
}

Params: None.

How Type, Inputs and Params work · Block catalogue and parameter reference

Inheritance
Negate
Namespace: MOSAIC.Models.SignalProcessing
Assembly: MOSAIC.dll
Syntax
public sealed class Negate : BaseBlock, INotifyPropertyChanged, INotifyPropertyChanging, ISubscriber, IPublisher, IBaseBlockProps, IJsonExportable, IDisposable, IAsyncDisposable

Constructors

Negate(string, double)

Declaration
public Negate(string name, 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
BaseBlock.JsonTypeName

Methods

ConfigureInput(IServiceProvider, JsonModel)

Called by BlockFactory for the key negate.

Declaration
public static Negate ConfigureInput(IServiceProvider sp, JsonModel m)
Parameters
Type Name Description
IServiceProvider sp
JsonModel m
Returns
Type Description
Negate

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
BaseBlock.OnReceive(object, object)
Remarks

Called on the dispatching thread, not the UI thread.

Implements

INotifyPropertyChanged
INotifyPropertyChanging
ISubscriber
IPublisher
IBaseBlockProps
IJsonExportable
IDisposable
IAsyncDisposable

Search documentation

Start typing to search the documentation.