laatzen/Common/Hardware/WaterMeter/WaterMeterCore/IMeterBatch.cs
2021-10-01 11:09:20 +02:00

98 lines
2.7 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace Xylem.Common.Hardware.WaterMeter.WaterMeterCore
{
/// <summary>
/// Can hold various <see cref="IMeter"/>s and hold connection record to relieve the meter.
/// Every contact with meter has to go over <see cref="IMeterBatch"/> even if you have just only one.
/// </summary>
[Guid("3E6F2741-00D3-42FC-9F86-09065D03E35B")
, ComVisible(true)
, InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IMeterBatch : IDisposable
{
/// <summary>
/// holds all <see cref="IMeter"/>
/// Add <see cref="AddMeter"/> and delete with <see cref="RemoveMeter"/>
/// </summary>
void AddMeter(IMeter meterToAdd);
/// <summary>
/// Remove Meter from batch and clear communication
/// </summary>
/// <param name="meterToRemove"> meter to be removed</param>
void RemoveMeter(IMeter meterToRemove);
/// <summary>
/// Get meter from slot number.
/// </summary>
/// <param name="slot"></param>
/// <returns>null if slot has no genesis</returns>
IMeter GetMeter(Int32 slot);
/// <summary>
/// Remove all Meters and comports
/// </summary>
void RemoveAllMeters();
/// <summary>
///
/// </summary>
/// <returns></returns>
IMeter[] GetCurrentMeter();
/// <summary>
/// Detect all meters
/// </summary>
/// <returns></returns>
Int32[] GetCurrentMeterSlots();
/// <summary>
/// login to all meters
/// </summary>
void MetersLogin();
/// <summary>
/// Initialize all meters
/// </summary>
void MetersInit();
/// <summary>
/// Initialize calibration for all meters
/// </summary>
void MetersInitCalibration();
/// <summary>
/// Initialize measurement for all meters
/// </summary>
void MetersInitMeasurement();
/// <summary>
/// Store new calculated calibration to all meters
/// </summary>
void MetersSaveCalculatedCalibration();
/// <summary>
/// Start calibration for all meters
/// </summary>
void MetersStartCalibration();
/// <summary>
/// Start measurement for all meters
/// </summary>
void MetersStartMeasurement();
/// <summary>
/// Stop calibration of all meters
/// </summary>
void MetersStopCalibration();
/// <summary>
/// Stop measurements of all meters
/// </summary>
void MetersStopMeasurement();
}
}