Change scale interface
This commit is contained in:
@ -14,13 +14,13 @@ namespace Elwig.Helpers.Weighing {
|
||||
public string Manufacturer => "Gassner";
|
||||
public int InternalScaleNr => 1;
|
||||
public string Model { get; private set; }
|
||||
public int ScaleNr { get; private set; }
|
||||
public string ScaleId { get; private set; }
|
||||
public bool IsReady { get; private set; }
|
||||
public bool HasFillingClearance { get; private set; }
|
||||
public int? WeightLimit { get; private set; }
|
||||
|
||||
public GassnerScale(int scaleNr, string model, string connection) {
|
||||
ScaleNr = scaleNr;
|
||||
public GassnerScale(string id, string model, string connection) {
|
||||
ScaleId = id;
|
||||
Model = model;
|
||||
IsReady = true;
|
||||
HasFillingClearance = false;
|
||||
|
@ -17,9 +17,9 @@ namespace Elwig.Helpers.Weighing {
|
||||
string Model { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Unique number of the scale
|
||||
/// Unique identificator of the scale
|
||||
/// </summary>
|
||||
int ScaleNr { get; }
|
||||
string ScaleId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Internal identifying number of the scale in its system
|
||||
|
@ -7,7 +7,7 @@ namespace Elwig.Helpers.Weighing {
|
||||
|
||||
public string Manufacturer => "Schember";
|
||||
public string Model => throw new NotImplementedException();
|
||||
public int ScaleNr => throw new NotImplementedException();
|
||||
public string ScaleId => throw new NotImplementedException();
|
||||
public int InternalScaleNr => throw new NotImplementedException();
|
||||
public bool IsReady => throw new NotImplementedException();
|
||||
public bool HasFillingClearance => throw new NotImplementedException();
|
||||
|
@ -22,13 +22,13 @@ namespace Elwig.Helpers.Weighing {
|
||||
public string Manufacturer => "SysTec";
|
||||
public int InternalScaleNr => 1;
|
||||
public string Model { get; private set; }
|
||||
public int ScaleNr { get; private set; }
|
||||
public string ScaleId { get; private set; }
|
||||
public bool IsReady { get; private set; }
|
||||
public bool HasFillingClearance { get; private set; }
|
||||
public int? WeightLimit { get; private set; }
|
||||
|
||||
public SystecScale(int scaleNr, string model, string connection, string? empty = null, string? fill = null, int? limit = null) {
|
||||
ScaleNr = scaleNr;
|
||||
public SystecScale(string id, string model, string connection, string? empty = null, string? fill = null, int? limit = null) {
|
||||
ScaleId = id;
|
||||
Model = model;
|
||||
IsReady = true;
|
||||
HasFillingClearance = false;
|
||||
|
@ -22,5 +22,11 @@ namespace Elwig.Helpers.Weighing {
|
||||
/// Time string provided by the scale
|
||||
/// </summary>
|
||||
public string? Time = null;
|
||||
|
||||
/// <returns><Weight/WeighingId/Date/Time></returns>
|
||||
override public string ToString() {
|
||||
var w = Weight != null ? $"{Weight}kg" : "";
|
||||
return $"<{w}/{WeighingId}/{Date}/{Time}>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user