Weighing: Add ICommandScale and IEventScale

This commit is contained in:
2024-02-10 18:43:45 +01:00
parent 68f1a2c091
commit 9ecad6aa79
8 changed files with 58 additions and 82 deletions

View File

@ -1,44 +1,19 @@
using System;
using System.Threading.Tasks;
namespace Elwig.Helpers.Weighing {
public class InvalidScale : IScale {
public class InvalidScale(string id) : IScale {
public string Manufacturer => "NONE";
public string Model => "NONE";
public string ScaleId { get; private set; }
public string ScaleId => id;
public int InternalScaleNr => 0;
public bool IsReady => false;
public bool HasFillingClearance => false;
public int? WeightLimit => null;
public string? LogPath => null;
public InvalidScale(string id) {
ScaleId = id;
}
public void Dispose() {
GC.SuppressFinalize(this);
}
public Task<WeighingResult> Weigh() {
throw new NotImplementedException();
}
public Task<WeighingResult> GetCurrentWeight() {
throw new NotImplementedException();
}
public Task Empty() {
throw new NotImplementedException();
}
public Task GrantFillingClearance() {
throw new NotImplementedException();
}
public Task RevokeFillingClearance() {
throw new NotImplementedException();
}
}
}