Struct 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.

Namespace: MOSAIC.Components.Basics
Assembly: MOSAIC.dll
Syntax
private readonly record struct CsvDumper.CsvCommand : IEquatable<CsvDumper.CsvCommand>
Remarks

Routing flushes through the same queue as the data is deliberate. The writer loop parks on WaitToReadAsync(CancellationToken), so a flag set from outside would not wake it — which is precisely the case a flush exists for, a capture that has just stopped producing. Queueing the request wakes the loop and, because the channel is ordered, also guarantees the flush happens after every row enqueued before it.

Constructors

CsvCommand(double, double, double[]?, string?, int, TaskCompletionSource?)

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.

Declaration
public CsvCommand(double Timestamp, double Scalar, double[]? Values, string? Label = null, int RowIndex = -1, TaskCompletionSource? Flush = null)
Parameters
Type Name Description
double Timestamp
double Scalar
double[] Values
string Label
int RowIndex
TaskCompletionSource Flush
Remarks

Routing flushes through the same queue as the data is deliberate. The writer loop parks on WaitToReadAsync(CancellationToken), so a flag set from outside would not wake it — which is precisely the case a flush exists for, a capture that has just stopped producing. Queueing the request wakes the loop and, because the channel is ordered, also guarantees the flush happens after every row enqueued before it.

Properties

Flush

Declaration
public TaskCompletionSource? Flush { get; init; }
Property Value
Type Description
TaskCompletionSource

Label

Declaration
public string? Label { get; init; }
Property Value
Type Description
string

RowIndex

Declaration
public int RowIndex { get; init; }
Property Value
Type Description
int

Scalar

Declaration
public double Scalar { get; init; }
Property Value
Type Description
double

Timestamp

Declaration
public double Timestamp { get; init; }
Property Value
Type Description
double

Values

Declaration
public double[]? Values { get; init; }
Property Value
Type Description
double[]

Implements

IEquatable<T>

Search documentation

Start typing to search the documentation.