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
measurementMeasurementThe 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
simpleCurveSimpleCurveThe SimpleCurve.
silentboolif 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
simpleCurvesSimpleCurve[]An array of SimpleCurves.
silentboolif 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
simpleCurvesList<SimpleCurve>A list of SimpleCurves.
silentboolif 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
simpleCurveSimpleCurveThe simple curve.
Returns
- bool
trueif 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
arrayTypeDataArrayTypeThe 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
xAxisArrayTypeDataArrayTypeData type of the x axis.
yAxisArrayTypeDataArrayTypeData type of the y axis.
titlestringThe title of the SimpleCurve.
silentboolif set to
true[silent] the SimpleCurveAdded even is not raised.
Returns
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
simpleCurveSimpleCurveThe simple curve.
silentboolif 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
simpleCurvesSimpleCurve[]The array of SimpleCurves.
silentboolif 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
simpleCurvesList<SimpleCurve>The list of SimpleCurves.
silentboolif 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
SimpleCurveAdded
Occurs when a [SimpleCurve] has been added.
public event SimpleMeasurement.SimpleCurveEventHandler SimpleCurveAdded
Event Type
SimpleCurveRemoved
Occurs when a [SimpleCurve] has been removed.
public event SimpleMeasurement.SimpleCurveEventHandler SimpleCurveRemoved