67 lines
1.9 KiB
C#
67 lines
1.9 KiB
C#
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Elwig.Helpers.Weighing {
|
|
/// <summary>
|
|
/// Interface for controlling a industrial scale
|
|
/// </summary>
|
|
public interface IScale : IDisposable {
|
|
/// <summary>
|
|
/// Manufacturer of the scale
|
|
/// </summary>
|
|
string Manufacturer { get; }
|
|
|
|
/// <summary>
|
|
/// Model of the scale
|
|
/// </summary>
|
|
string Model { get; }
|
|
|
|
/// <summary>
|
|
/// Unique number of the scale
|
|
/// </summary>
|
|
int ScaleNr { get; }
|
|
|
|
/// <summary>
|
|
/// Internal identifying number of the scale in its system
|
|
/// </summary>
|
|
int InternalScaleNr { get; }
|
|
|
|
/// <summary>
|
|
/// Indicates if the scale is currently processing a request or not
|
|
/// </summary>
|
|
bool IsReady { get; }
|
|
|
|
/// <summary>
|
|
/// Indicates if the the clearance for filling the scale container has been granted
|
|
/// </summary>
|
|
bool HasFillingClearance { get; }
|
|
|
|
/// <summary>
|
|
/// Get the current weight on the scale without performing a weighing process
|
|
/// </summary>
|
|
/// <returns>Result of the weighing process (probably without a weighing id)</returns>
|
|
Task<WeighingResult> GetCurrentWeight();
|
|
|
|
/// <summary>
|
|
/// Perform a weighing process
|
|
/// </summary>
|
|
/// <returns>Result of the weighing process (including a weighing id)</returns>
|
|
Task<WeighingResult> Weigh();
|
|
|
|
/// <summary>
|
|
/// Empty the scale container or grant clearance to do so
|
|
/// </summary>
|
|
Task Empty();
|
|
|
|
/// <summary>
|
|
/// Grant clearance to fill the scale container
|
|
/// </summary>
|
|
Task GrantFillingClearance();
|
|
|
|
/// <summary>
|
|
/// Revoke clearance to fill the scale container
|
|
/// </summary>
|
|
Task RevokeFillingClearance();
|
|
}
|
|
}
|