Class CompleteFrameAssembler

Waits for a full frame (all TX/RX configs) before publishing as a MathNet.Numerics.LinearAlgebra.Matrix<T>.

Inheritance
CompleteFrameAssembler
Implements
Namespace: MOSAIC.Components.Devices.Wulpus
Assembly: MOSAIC.dll
Syntax
internal sealed class CompleteFrameAssembler : IDataAssembler

Fields

_buffer

Declaration
private short[]? _buffer
Field Value
Type Description
short[]

_expectedConfigIx

Declaration
private int _expectedConfigIx
Field Value
Type Description
int

_frame

Declaration
private Matrix<double>? _frame
Field Value
Type Description
Matrix<double>

Methods

Assemble(Connection)

Performs one acquisition cycle and returns the assembled output, or null if the output is not yet ready (e.g., incomplete frame).

Declaration
public object? Assemble(Connection connection)
Parameters
Type Name Description
Connection connection

The active Wulpus connection to read from.

Returns
Type Description
object

A MathNet.Numerics.LinearAlgebra.Vector<T> or MathNet.Numerics.LinearAlgebra.Matrix<T>, or null.

Remarks

Must be called under GIL. Implementations call ReceiveOne(short[]) internally.

CropMetadata(object, Connection)

Removes metadata columns (config index + acquisition counter) from the output.

Declaration
public object? CropMetadata(object output, Connection connection)
Parameters
Type Name Description
object output

The raw output from Assemble(Connection).

Connection connection

Connection providing dimensions.

Returns
Type Description
object

Output with metadata columns removed.

Reset(Connection)

Resets internal state (e.g., clears partial frames). Called when streaming starts.

Declaration
public void Reset(Connection connection)
Parameters
Type Name Description
Connection connection

Connection providing current NumSamples and NumChannelConfigs.

Implements

IDataAssembler

Search documentation

Start typing to search the documentation.