Files
tbf/TBF/BenchControl/ControlBoard/IControlBoard.cs
T

91 lines
3.1 KiB
C#

using System;
using System.Collections.Generic;
using Config.Entities;
using Dirichlet.Numerics;
using TBF.BenchControl.Generic;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.ControlBoard
{
public interface IControlBoard : IDevice, IValveControl
{
void InitializeComponent(object thirdPartyComponent, UInt128 valvesToInvert, double[] tankCapacities);
/// <summary>
/// Display value in a third party component, update UI
/// </summary>
/// <param name="sParam">String parameter</param>
/// <param name="iParam">Integer parameter</param>
/// <param name="value">Value to be displayed</param>
void UpdateUI(string sParam, int iParam, double value);
/// <summary>
/// Called on beginning of a test
/// </summary>
void ClearProcessValues();
///
/// Values valid always
///
UInt128 Route { get; } /// State of valves
UInt64 DigitalInputs { get; } /// Inputs
///
/// Values valid during a test
///
double RefFrequency { get; }
double RefFlow { get; }
///
/// Last test results
///
double TestTime { get; }
int RefPulses { get; }
double TestTimeWM(int wmNr1);
int RefPulsesWM(int wmNr1);
int PulsesWM(int wmNr1);
float ValveOpenCloseTime { get; } /// Start valve open or close time in sec
/// <summary>
/// Select devices used for control and measurement
/// </summary>
/// <param name="outPath"></param>
OutputPath Devices { set; get; }
/// <summary>
/// Returns operation which sets the flow. Events:
/// </summary>
/// <param name="flowLimLo">Lower flow limit</param>
/// <param name="flowLimHi">Upper flow limit</param>
/// <param name="measuredFlow">Reference to calss keeping current flow value</param>
/// <param name="timeout">Timeout in seconds</param>
/// <returns>Operation</returns>
IOperation SetFlowOp(double flowLimLo, double flowLimHi, TBF.Boxes.DoubleBox measuredFlow, int timeout);
IOperation StopFlowRegulationOp();
/// <summary>
/// Start a test, Events: MeasurementStarted
/// </summary>
/// <param name="iParam">Int32 parameter 1</param>
/// <param name="dParam1">Double parameter 1 (alternative lower flow limit)</param>
/// <param name="dParam2">Double parameter 2 (alternative upper flow limit)</param>
/// <returns>Operation</returns>
IOperation StartTestOp(Test test, int iParam = 0, double dParam1 = 0, double dParam2 = 0);
IOperation ReadDiverterTransitionOp(bool isStart, Sequences.Statistics plotter, int batchNr, string testName, int repetition);
/// <summary>
/// Returns operation with events: Event.MeasurementCompleted or Event.None
/// </summary>
/// <returns>Operation</returns>
IOperation QueryMeasurementEndOp();
IOperation StopPreviousOp();
}
}