Added scales

This commit is contained in:
2023-04-26 18:50:32 +02:00
parent 0ecba36f51
commit 0621716636
7 changed files with 366 additions and 2 deletions

View File

@ -0,0 +1,66 @@
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();
}
}