using System; using System.Threading.Tasks; namespace Elwig.Helpers.Weighing { /// /// Interface for controlling a industrial scale /// public interface IScale : IDisposable { /// /// Manufacturer of the scale /// string Manufacturer { get; } /// /// Model of the scale /// string Model { get; } /// /// Unique identificator of the scale /// string ScaleId { get; } /// /// Internal identifying number of the scale in its system /// int InternalScaleNr { get; } /// /// Indicates if the scale is currently processing a request or not /// bool IsReady { get; } /// /// Indicates if the the clearance for filling the scale container has been granted /// bool HasFillingClearance { get; } /// /// The maximal configured weight limit of the scale in kg /// int? WeightLimit { get; } /// /// Where to log the requests and responses from the scale to /// string? LogPath { get; } /// /// Get the current weight on the scale without performing a weighing process /// /// Result of the weighing process (probably without a weighing id) Task GetCurrentWeight(); /// /// Perform a weighing process /// /// Result of the weighing process (including a weighing id) Task Weigh(); /// /// Empty the scale container or grant clearance to do so /// Task Empty(); /// /// Grant clearance to fill the scale container /// Task GrantFillingClearance(); /// /// Revoke clearance to fill the scale container /// Task RevokeFillingClearance(); } }