Class CsvDataCapture
Playback data from a .csv file
public class CsvDataCapture : IDataCapture, IPeriodicEmissionCapture, IBackgroundDataCapture
- Inheritance
-
CsvDataCapture
- Implements
- Inherited Members
Constructors
CsvDataCapture(Stream, double, double, int)
Capture new CSV data capture from the specified stream
public CsvDataCapture(Stream Stream, double SampleInterval, double VisibleTime, int UpdatePeriodMs = 10)
Parameters
Stream
StreamData stream
SampleInterval
doubleData sample interval (seconds)
VisibleTime
doubleMaximum number of seconds visible (determines buffer size)
UpdatePeriodMs
int(Optional) How often data is emitted (milliseconds)
CsvDataCapture(string, double)
Capture CSV data from the specified file and statically display all the data
public CsvDataCapture(string FilePath, double SampleInterval)
Parameters
CsvDataCapture(string, double, double, int)
Capture CSV data from the specified file and replay the data as if it was live data
public CsvDataCapture(string FilePath, double SampleInterval, double VisibleTime, int UpdatePeriodMs = 10)
Parameters
FilePath
stringFile path
SampleInterval
doubleData sample interval (seconds)
VisibleTime
doubleMaximum number of seconds visible (determines buffer size)
UpdatePeriodMs
int(Optional) How often data is emitted (milliseconds)
Properties
BufferSize
Buffer size (maximum number of double values stored within the buffer)
public int BufferSize { get; }
Property Value
DataSource
Source of data
public DataSources DataSource { get; }
Property Value
EmissionPeriod
How often new samples are emitted, in milliseconds
public int EmissionPeriod { get; }
Property Value
ID
Data capture identifier
public Guid ID { get; }
Property Value
IsCapturing
Background capture thread is currently active
public bool IsCapturing { get; set; }
Property Value
SampleInterval
Sample interval (seconds)
public double SampleInterval { get; }
Property Value
Remarks
Amount of time between each sample value (in seconds)
SampleOrder
Sample ordering
public SampleOrderTypes SampleOrder { get; }
Property Value
SweepMode
Sweep mode, determining when acquisition is halted
public SweepModes SweepMode { get; }
Property Value
Methods
SetOnDataAvailable(SamplesDelegate)
Assign callback method for when data is available to render
public void SetOnDataAvailable(SamplesDelegate callback)
Parameters
callback
SamplesDelegateCallback
StartCapture()
Start capturing
public void StartCapture()
StopCapture()
Stop capturing
public void StopCapture()