Table of Contents

Class SimpleMeasurement

Namespace
PalmSens.Core.Simplified.Data
Assembly
PalmSens.Core.Simplified.dll
public class SimpleMeasurement : IDisposable
Inheritance
SimpleMeasurement
Implements
Inherited Members

Constructors

SimpleMeasurement(Measurement)

Initializes a new instance of the SimpleMeasurement class.

public SimpleMeasurement(Measurement measurement)

Parameters

measurement Measurement

The Measurement.

Exceptions

ArgumentNullException

Cannot create an instance of simple measurement when measurement is null

Fields

Measurement

The original measurement

public Measurement Measurement

Field Value

Measurement

Properties

AvailableDataTypes

List of the available data types in the measurement

public List<DataArrayType> AvailableDataTypes { get; }

Property Value

List<DataArrayType>

Channel

Gets the channel that the measurement was measured on.

public int Channel { get; }

Property Value

int

The channel.

MeasurementType

Gets the type of measurement.

public MeasurementTypes MeasurementType { get; }

Property Value

MeasurementTypes

The type of measurement.

Method

Gets the Method defining the measurement's parameters.

public Method Method { get; }

Property Value

Method

The method.

SimpleCurveCollection

Gets the collection of SimpleCurves stored in the measurement.

public List<SimpleCurve> SimpleCurveCollection { get; }

Property Value

List<SimpleCurve>

The simple curve collection.

Title

Gets or sets the title of the measurement.

public string Title { get; set; }

Property Value

string

The title.

Methods

AddSimpleCurve(SimpleCurve, bool)

Adds the specified SimpleCurve to the SimpleMeasurement.

public void AddSimpleCurve(SimpleCurve simpleCurve, bool silent = false)

Parameters

simpleCurve SimpleCurve

The SimpleCurve.

silent bool

if set to true [silent] the SimpleCurveAdded event is not raised.

Exceptions

ArgumentNullException

The specified SimpleCurve is null.

ArgumentException

This measurement allready contains the specified SimpleCurve.

AddSimpleCurves(SimpleCurve[], bool)

Adds the specified collection of SimpleCurves to the SimpleMeasurement.

public void AddSimpleCurves(SimpleCurve[] simpleCurves, bool silent = false)

Parameters

simpleCurves SimpleCurve[]

An array of SimpleCurves.

silent bool

if set to true [silent] the SimpleCurveAdded event is not raised.

Exceptions

ArgumentNullException

The array of specified SimpleCurves is null

AddSimpleCurves(List<SimpleCurve>, bool)

Adds the specified collection of SimpleCurves to the SimpleMeasurement.

public void AddSimpleCurves(List<SimpleCurve> simpleCurves, bool silent = false)

Parameters

simpleCurves List<SimpleCurve>

A list of SimpleCurves.

silent bool

if set to true [silent] the SimpleCurveAdded event is not raised.

Exceptions

ArgumentNullException

The list of specified SimpleCurves is null

ContainsSimpleCurve(SimpleCurve)

Determines whether this SimpleMeasurement contains [the specified simple curve].

public bool ContainsSimpleCurve(SimpleCurve simpleCurve)

Parameters

simpleCurve SimpleCurve

The simple curve.

Returns

bool

true if the measurement contains [the specified simple curve]; otherwise, false.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetRawData(DataArrayType)

Gets the raw data of the specified type from this measurement.

public double[] GetRawData(DataArrayType arrayType)

Parameters

arrayType DataArrayType

The data type of the array.

Returns

double[]

Exceptions

ArgumentException

This SimpleMeasurement does not contain data of the specified array type

NewSimpleCurve(DataArrayType, DataArrayType, string, bool)

Add a new SimpleCurve to the measurement with the specified X and Y-Axis data types.

public List<SimpleCurve> NewSimpleCurve(DataArrayType xAxisArrayType, DataArrayType yAxisArrayType, string title = "", bool silent = false)

Parameters

xAxisArrayType DataArrayType

Data type of the x axis.

yAxisArrayType DataArrayType

Data type of the y axis.

title string

The title of the SimpleCurve.

silent bool

if set to true [silent] the SimpleCurveAdded even is not raised.

Returns

List<SimpleCurve>

Exceptions

ArgumentException

This SimpleMeasurement does not contain the specified X-Axis array type or This SimpleMeasurement does not contain the specified Y-Axis array type

RemoveSimpleCurve(SimpleCurve, bool)

Removes the specified SimpleCurves from the SimpleMeasurement.

public void RemoveSimpleCurve(SimpleCurve simpleCurve, bool silent = false)

Parameters

simpleCurve SimpleCurve

The simple curve.

silent bool

if set to true [silent] the SimpleCurveRemoved even is not raised.

Exceptions

ArgumentNullException

The specified SimpleCurve is null.

ArgumentException

This SimpleMeasurement does not contain the specified SimpleCurve

RemoveSimpleCurves(SimpleCurve[], bool)

Removes the specified collection of SimpleCurves from the SimpleMeasurement.

public void RemoveSimpleCurves(SimpleCurve[] simpleCurves, bool silent = false)

Parameters

simpleCurves SimpleCurve[]

The array of SimpleCurves.

silent bool

if set to true [silent] the SimpleCurveRemoved even is not raised.

Exceptions

ArgumentNullException

The array of SimpleCurves cannot be null

RemoveSimpleCurves(List<SimpleCurve>, bool)

Removes the specified collection of SimpleCurves from the SimpleMeasurement.

public void RemoveSimpleCurves(List<SimpleCurve> simpleCurves, bool silent = false)

Parameters

simpleCurves List<SimpleCurve>

The list of SimpleCurves.

silent bool

if set to true [silent] the SimpleCurveRemoved even is not raised.

Exceptions

ArgumentNullException

The list of SimpleCurves cannot be null

Events

MeasurementEnded

Occurs when the [measurement] has ended.

public event EventHandler MeasurementEnded

Event Type

EventHandler

SimpleCurveAdded

Occurs when a [SimpleCurve] has been added.

public event SimpleMeasurement.SimpleCurveEventHandler SimpleCurveAdded

Event Type

SimpleMeasurement.SimpleCurveEventHandler

SimpleCurveRemoved

Occurs when a [SimpleCurve] has been removed.

public event SimpleMeasurement.SimpleCurveEventHandler SimpleCurveRemoved

Event Type

SimpleMeasurement.SimpleCurveEventHandler