end of 2024
This commit is contained in:
+21
-2
@@ -19,8 +19,27 @@
|
||||
this.parameters = parameters;
|
||||
this.pendingState = SIRTTaskState.Completed;
|
||||
this.Name = "Initial Check";
|
||||
this.Data = new OpticalTelegram { Minutes = parameters.LED_On_Minutes }
|
||||
.Append(new ProvidePin { AuthLevel = AuthLevel.III });
|
||||
|
||||
|
||||
if (parameters.IsFuhzoe)
|
||||
{
|
||||
this.Data = new RequestDebugTelegram()
|
||||
.Append(new ProvidePin
|
||||
{
|
||||
AuthLevel = AuthLevel.III
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Data = new OpticalTelegram
|
||||
{
|
||||
Minutes = parameters.LED_On_Minutes
|
||||
}
|
||||
.Append(new ProvidePin
|
||||
{
|
||||
AuthLevel = AuthLevel.III
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected override void EndProcessResponse(SIRTMessage response)
|
||||
|
||||
+8
-13
@@ -115,18 +115,6 @@
|
||||
|
||||
if (length > 0)
|
||||
{
|
||||
if (!this.IsEncrypted)
|
||||
{
|
||||
var crc = data.ToUInt16BE(length - 2);
|
||||
|
||||
this.IsEncrypted = crc != 0;
|
||||
}
|
||||
|
||||
if (this.IsEncrypted)
|
||||
{
|
||||
data = data.DecryptResponse(this.EncryptionKey);
|
||||
}
|
||||
|
||||
var type = data[0];
|
||||
|
||||
if (type == SIRTMessage.BUP)
|
||||
@@ -145,12 +133,14 @@
|
||||
{
|
||||
this.Label = nameof(SIRTMessage.DEBUG);
|
||||
this.DEBUG = new DEBUG(data, this.P11);
|
||||
this.IsEncrypted = this.DEBUG.Crc != 0;
|
||||
this.Mode = (FactoryState)(this.DEBUG.FactoryState - 1);
|
||||
this.NotifyTelegram(this.DEBUG);
|
||||
}
|
||||
else if (type == SIRTMessage.SEMI)
|
||||
{
|
||||
this.SEMI = new SEMI(data, this.Frequency, this.P11);
|
||||
this.IsEncrypted = this.SEMI.Crc != 0;
|
||||
this.Label = this.SEMI.PAMStatus.ToString();
|
||||
|
||||
if (this.request.Data.Length > 0 && this.request.Data[0] == Pam.GetDebug && this.DEBUG == null)
|
||||
@@ -184,7 +174,12 @@
|
||||
else
|
||||
{
|
||||
this.Label = "NA";
|
||||
}
|
||||
}
|
||||
|
||||
if (this.IsEncrypted)
|
||||
{
|
||||
data = data.DecryptResponse(this.EncryptionKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (response.Cmd == SIRTMessage.ACKNANSW)
|
||||
|
||||
+6
-21
@@ -78,7 +78,9 @@
|
||||
|
||||
public byte DecimalPoint { get; set; }
|
||||
|
||||
public byte Use_CandI_Rules { get; set; }
|
||||
public byte CandIType { get; set; }
|
||||
|
||||
public bool Ruecklaufsperre { get; set; }
|
||||
|
||||
[CompareProperty]
|
||||
public bool Alarm_Low_Battery { get; set; }
|
||||
@@ -317,7 +319,7 @@
|
||||
{
|
||||
Mode = (OTAMode)this.DisableOTA
|
||||
};
|
||||
//features.Debug.ChangeState = new ChangeState
|
||||
//TODO: features.Debug.ChangeState = new ChangeState
|
||||
//{
|
||||
// Mode = FactoryState.Shipment
|
||||
//};
|
||||
@@ -342,11 +344,6 @@
|
||||
N = this.LATWindowsFinalization
|
||||
};
|
||||
}
|
||||
|
||||
if (!this.IsFuhzoe)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
features.ChangeRadioId = new ChangeRadioId(this.ResponseAddress);
|
||||
features.ChangeMeterId = new ChangeMeterId(this.MeterId);
|
||||
@@ -459,7 +456,7 @@
|
||||
features.ChangeMeterReading = new ChangeMeterReading(111111111);
|
||||
features.SetMetrologyParameters = new SetMetrologyParameters
|
||||
{
|
||||
UseCandIRules = this.Use_CandI_Rules == 1,
|
||||
UseCandIRules = this.Ruecklaufsperre,
|
||||
DecimalPoint = (DecimalPointLocations)this.DecimalPoint,
|
||||
FactoryCalibration = this.FactoryCalibration,
|
||||
MeterSize = this.MeterSize,
|
||||
@@ -474,22 +471,10 @@
|
||||
{
|
||||
SetMeterType = new SetMeterType
|
||||
{
|
||||
Type = (MeterTypes)this.Use_CandI_Rules
|
||||
Type = (MeterTypes)this.CandIType
|
||||
},
|
||||
};
|
||||
|
||||
if (this.IsFuhzoe)
|
||||
{
|
||||
features.Debug.RequestDebugTelegram = new RequestDebugTelegram();
|
||||
}
|
||||
else
|
||||
{
|
||||
features.Debug.OpticalTelegram = new OpticalTelegram
|
||||
{
|
||||
Minutes = this.LED_On_Minutes
|
||||
};
|
||||
}
|
||||
|
||||
return features;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user