102 lines
3.7 KiB
C#
102 lines
3.7 KiB
C#
using System;
|
|
using Xylem.Common.Metrology.Measurements.Consts;
|
|
|
|
namespace Xylem.Common.Metrology.Measurements
|
|
{
|
|
/// <inheritdoc />
|
|
/// <summary>
|
|
/// Collection of measurement interfaces
|
|
/// </summary>
|
|
public interface IMeasurement : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// Event for new action of measurement state
|
|
/// </summary>
|
|
event EventHandler OnActionStateHasChanged;
|
|
|
|
/// <summary>
|
|
/// Get the Type of the measurement record
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Type GetType();
|
|
|
|
/// <summary>
|
|
/// Get the channel no. the measurement collecting record for
|
|
/// </summary>
|
|
/// <returns> returns 0 when all channels should be collected</returns>
|
|
Int32 GetChannel();
|
|
|
|
/// <summary>
|
|
/// Actual state of the measurement
|
|
/// </summary>
|
|
MeasurementStates MeasurementState { get; set; }
|
|
|
|
/// <summary>
|
|
/// Actual state of the measurement
|
|
/// </summary>
|
|
MeasurementDirection FlowDirectionforCalculatingVol { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// Clear start, intermediate and end record and set action state to idle
|
|
/// </summary>
|
|
void Clear();
|
|
|
|
/// <summary>
|
|
/// Adding measurement record to processing FIFO
|
|
/// </summary>
|
|
/// <param name="record"></param>
|
|
void AddData(IMeasurementRecord record);
|
|
|
|
/// <summary>
|
|
/// Returns the actual state of the ongoing measurement
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
MeasurementStates GetMeasurementState();
|
|
|
|
/// <summary>
|
|
/// Fist clear all record from earlier calibrations.
|
|
/// Set flag for starting measurement.
|
|
/// The next record is going to set the start values.
|
|
/// </summary>
|
|
void StartMeasurement();
|
|
|
|
/// <summary>
|
|
/// Stop grabbing record from streaming.
|
|
/// Last Data package is count as end volume (and time)
|
|
/// </summary>
|
|
void StopMeasurement();
|
|
|
|
/// <summary>
|
|
/// Returning the results of the ongoing measurement between two updates.
|
|
/// This can be used to update the screen during measurements like actual flow rate.
|
|
/// The timing will be set by the IntermediateUpdateTimeS.
|
|
/// </summary>
|
|
/// <param name="refTimeS"></param>
|
|
/// <param name="refVolumeCm"></param>
|
|
/// <returns></returns>
|
|
MeasurementResults GetShortTermMeasurementResult(Double? refVolumeCm = null, Double? refTimeS = null);
|
|
|
|
/// <summary>
|
|
/// Returning the intermediate results of the ongoing measurement from the start of measurement until now!
|
|
/// </summary>
|
|
/// <param name="refTimeS"></param>
|
|
/// <param name="refVolumeCm"></param>
|
|
/// <returns></returns>
|
|
MeasurementResults GetIntermediateMeasurementResult(Double? refVolumeCm = null, Double? refTimeS = null);
|
|
|
|
/// <summary>
|
|
/// Returning the results of the measurements from start until stop.
|
|
/// </summary>
|
|
/// <param name="refTimeS">Measurement duration is needed explicit for flying start/stop procedure</param>
|
|
/// <param name="refVolumeCm">reference volume is ALWAYS needed for scale and deviation</param>
|
|
/// <returns></returns>
|
|
MeasurementResults GetFinalMeasurementResult(Double? refVolumeCm, Double? refTimeS = null);
|
|
|
|
|
|
/// <summary>
|
|
/// Sets a marker that a mesaurment start looking for an intermediate record
|
|
/// </summary>
|
|
void RequestIntermediateRecord();
|
|
}
|
|
} |