eRegister calibration initialization all rows added
This commit is contained in:
+187
-134
@@ -1,48 +1,101 @@
|
|||||||
namespace CommonConsole
|
namespace CommonConsole
|
||||||
{
|
{
|
||||||
using Common.Hardware.Interfaces.Ports.Sirt;
|
|
||||||
using Common.Hardware.Interfaces.Ports.Sirt.Parameters;
|
|
||||||
using Common.Hardware.WaterMeter.eRegister;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 0B
|
||||||
|
/// D0
|
||||||
|
/// FF C6 25 F3
|
||||||
|
/// 00
|
||||||
|
/// 0A
|
||||||
|
/// 11 08
|
||||||
|
/// 11 08
|
||||||
|
///
|
||||||
|
/// 04 01 C7 47 9F 77 17 00 6A 00 08 08 00 00 00 00 05 68 46 89 02 01 01 16 00 0A 00 00 02 71 02 71 00 00 00 00 00 00 00 08
|
||||||
|
/// </summary>
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
var programmingBatch = new JusteRegisterProgrammingBatch();
|
var bytes = new[] { 0x08, 0x11};
|
||||||
|
var bits = new Byte[16];
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
if (programmingBatch.StartOnCOMPort("COM6"))
|
foreach (var @byte in bytes)
|
||||||
{
|
{
|
||||||
var task = new JusteRegisterProgrammingTask
|
for (var i = 0; i < 8; i++, x++)
|
||||||
{
|
{
|
||||||
Cmd = JustSirtMessage.W_PAM,
|
bits[x] = (Byte)((@byte >> i) & 1);
|
||||||
P1 = new P811
|
}
|
||||||
{
|
|
||||||
DelPamSemi = true
|
|
||||||
},
|
|
||||||
Address = 319020415,
|
|
||||||
Data = new Byte[]
|
|
||||||
{
|
|
||||||
// Metrology parameters
|
|
||||||
0x92, 0x10, 0x71, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x71, 0x02, 0x00, 0x00,
|
|
||||||
|
|
||||||
// Provide Pin Auth Level III
|
|
||||||
0x43, 0x03, 0x63, 0x93, 0x73, 0x22,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
programmingBatch.Run(task);
|
|
||||||
|
|
||||||
Console.ReadKey();
|
|
||||||
|
|
||||||
programmingBatch.Stop();
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
Array.Reverse(bits);
|
||||||
|
|
||||||
|
var type = bits[15] == 0 ? 'B' : 'R';
|
||||||
|
|
||||||
|
var majorBits = new Byte[8];
|
||||||
|
majorBits[0] = bits[14];
|
||||||
|
majorBits[1] = bits[13];
|
||||||
|
majorBits[2] = bits[12];
|
||||||
|
|
||||||
|
var major = 0;
|
||||||
|
|
||||||
|
for (var i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Not connected!");
|
major |= majorBits[i] << i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var minorBits = new Byte[8];
|
||||||
|
majorBits[0] = bits[11];
|
||||||
|
majorBits[1] = bits[10];
|
||||||
|
majorBits[2] = bits[9];
|
||||||
|
majorBits[2] = bits[8];
|
||||||
|
|
||||||
|
var minor = 0;
|
||||||
|
|
||||||
|
for (var i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
minor |= minorBits[i] << i;
|
||||||
|
}
|
||||||
|
|
||||||
|
Console.WriteLine($"{type}{major}.{minor}.{0x08}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//var programmingBatch = new JusteRegisterProgrammingBatch();
|
||||||
|
|
||||||
|
//if (programmingBatch.StartOnCOMPort("COM6"))
|
||||||
|
//{
|
||||||
|
// var task = new JusteRegisterProgrammingTask
|
||||||
|
// {
|
||||||
|
// Cmd = JustSirtMessage.W_PAM,
|
||||||
|
// P1 = new P811
|
||||||
|
// {
|
||||||
|
// DelPamSemi = true
|
||||||
|
// },
|
||||||
|
// Address = 319020415,
|
||||||
|
// Data = new Byte[]
|
||||||
|
// {
|
||||||
|
// // Metrology parameters
|
||||||
|
// 0x92, 0x10, 0x71, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x71, 0x02, 0x00, 0x00,
|
||||||
|
|
||||||
|
// // Provide Pin Auth Level III
|
||||||
|
// 0x43, 0x03, 0x63, 0x93, 0x73, 0x22,
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// programmingBatch.Run(task);
|
||||||
|
|
||||||
|
// Console.ReadKey();
|
||||||
|
|
||||||
|
// programmingBatch.Stop();
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// Console.WriteLine("Not connected!");
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
// 01020304050607081112131415161718
|
// 01020304050607081112131415161718
|
||||||
// E6C88800DEB868C0D6A84880CE982840
|
// E6C88800DEB868C0D6A84880CE982840
|
||||||
//var encryptionKey = new Byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18 };
|
//var encryptionKey = new Byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18 };
|
||||||
@@ -84,8 +137,8 @@
|
|||||||
//programmingBatch.Run(task);
|
//programmingBatch.Run(task);
|
||||||
//task.Wait();
|
//task.Wait();
|
||||||
|
|
||||||
// 55-81-14-00-FF-C8-1F-0A-0B-07-FA-E3-AA-EA-8A-7B-7B-D9-A7-D7-D5-B8-16
|
// 55 81 14 00 FF C8 1F 0A 0B 07 FA E3 AA EA 8A 7B 7B D9 A7 D7 D5 B8 16
|
||||||
// 55-81-14-00-FF-C8-1F-0A-0B-07-FA-E3-AA-EA-8A-7B-7B-D9-A7-D7-D5-B8-16
|
// 55 81 14 00 FF C8 1F 0A 0B 07 FA E3 AA EA 8A 7B 7B D9 A7 D7 D5 B8 16
|
||||||
|
|
||||||
//var task = new JusteRegisterTask
|
//var task = new JusteRegisterTask
|
||||||
//{
|
//{
|
||||||
@@ -97,13 +150,13 @@
|
|||||||
// Address = 319020415,
|
// Address = 319020415,
|
||||||
// Data = new Byte[]
|
// Data = new Byte[]
|
||||||
// {
|
// {
|
||||||
// // WUP - stay awake
|
// // WUP stay awake
|
||||||
// 0x00, 0x00,
|
// 0x00, 0x00,
|
||||||
|
|
||||||
// // LAT
|
// // LAT
|
||||||
// 0x02, 0x00,
|
// 0x02, 0x00,
|
||||||
|
|
||||||
// // MBUS - 7
|
// // MBUS 7
|
||||||
// 0x05, 0x07,
|
// 0x05, 0x07,
|
||||||
|
|
||||||
// // TX
|
// // TX
|
||||||
@@ -233,132 +286,132 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static byte[] Decrypt(Byte[] key, params Byte[] message)
|
//public static byte[] Decrypt(Byte[] key, params Byte[] message)
|
||||||
{
|
//{
|
||||||
var decryptLength = message.Length;
|
// var decryptLength = message.Length;
|
||||||
var decryptedBytes = new Byte[decryptLength];
|
// var decryptedBytes = new Byte[decryptLength];
|
||||||
|
|
||||||
for (int i = 0; i < decryptLength; i++)
|
// for (int i = 0; i < decryptLength; i++)
|
||||||
{
|
// {
|
||||||
decryptedBytes[i] = message[i];
|
// decryptedBytes[i] = message[i];
|
||||||
}
|
// }
|
||||||
|
|
||||||
var start = 14;
|
// var start = 14;
|
||||||
var end = start + decryptedBytes[7] - 6;
|
// var end = start + decryptedBytes[7] 6;
|
||||||
var token = decryptedBytes[9];
|
// var token = decryptedBytes[9];
|
||||||
|
|
||||||
for (var i = start; i < end; i++)
|
// for (var i = start; i < end; i++)
|
||||||
{
|
// {
|
||||||
token += (Byte)(decryptedBytes[i - (token & 0x3) - 1] >> ((token >> 6) & 0x1));
|
// token += (Byte)(decryptedBytes[i (token & 0x3) 1] >> ((token >> 6) & 0x1));
|
||||||
|
|
||||||
decryptedBytes[i] ^= key[(token >> 2) & 0x0F];
|
// decryptedBytes[i] ^= key[(token >> 2) & 0x0F];
|
||||||
|
|
||||||
if (token > 127)
|
// if (token > 127)
|
||||||
{
|
// {
|
||||||
decryptedBytes[i] = (Byte)~decryptedBytes[i];
|
// decryptedBytes[i] = (Byte)~decryptedBytes[i];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
return decryptedBytes;
|
// return decryptedBytes;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public static byte[] Encrypt(Byte[] key, UInt32 address, params Byte[] telegramBytes)
|
//public static byte[] Encrypt(Byte[] key, UInt32 address, params Byte[] telegramBytes)
|
||||||
{
|
//{
|
||||||
Console.WriteLine(address);
|
// Console.WriteLine(address);
|
||||||
Console.WriteLine(BitConverter.ToString(key));
|
// Console.WriteLine(BitConverter.ToString(key));
|
||||||
Console.WriteLine(BitConverter.ToString(telegramBytes));
|
// Console.WriteLine(BitConverter.ToString(telegramBytes));
|
||||||
|
|
||||||
var telegramLength = telegramBytes.Length;
|
// var telegramLength = telegramBytes.Length;
|
||||||
var telegramIndex = 0;
|
// var telegramIndex = 0;
|
||||||
|
|
||||||
var encryptedBytes = new Byte[telegramLength + 6];
|
// var encryptedBytes = new Byte[telegramLength + 6];
|
||||||
var encryptLength = encryptedBytes.Length;
|
// var encryptLength = encryptedBytes.Length;
|
||||||
var index = 0;
|
// var index = 0;
|
||||||
|
|
||||||
encryptedBytes[index++] = (Byte)(address >> 24);
|
// encryptedBytes[index++] = (Byte)(address >> 24);
|
||||||
encryptedBytes[index++] = (Byte)(address >> 16);
|
// encryptedBytes[index++] = (Byte)(address >> 16);
|
||||||
encryptedBytes[index++] = (Byte)(address >> 8);
|
// encryptedBytes[index++] = (Byte)(address >> 8);
|
||||||
encryptedBytes[index++] = (Byte)(address >> 0);
|
// encryptedBytes[index++] = (Byte)(address >> 0);
|
||||||
|
|
||||||
foreach (var _byte in telegramBytes)
|
// foreach (var _byte in telegramBytes)
|
||||||
{
|
// {
|
||||||
encryptedBytes[index++] = telegramBytes[telegramIndex++];
|
// encryptedBytes[index++] = telegramBytes[telegramIndex++];
|
||||||
}
|
// }
|
||||||
|
|
||||||
var telegramCRC = CalculateCrc(encryptedBytes, 1, (UInt16)(encryptLength - 3));
|
// var telegramCRC = CalculateCrc(encryptedBytes, 1, (UInt16)(encryptLength 3));
|
||||||
|
|
||||||
encryptedBytes[index++] = (Byte)(telegramCRC >> 8);
|
// encryptedBytes[index++] = (Byte)(telegramCRC >> 8);
|
||||||
encryptedBytes[index++] = (Byte)(telegramCRC >> 0);
|
// encryptedBytes[index++] = (Byte)(telegramCRC >> 0);
|
||||||
|
|
||||||
Console.WriteLine(BitConverter.ToString(encryptedBytes));
|
// Console.WriteLine(BitConverter.ToString(encryptedBytes));
|
||||||
|
|
||||||
var token = (Byte)0xFF;
|
// var token = (Byte)0xFF;
|
||||||
var reference = address;
|
// var reference = address;
|
||||||
|
|
||||||
for (var i = 0; i < encryptLength; i++)
|
// for (var i = 0; i < encryptLength; i++)
|
||||||
{
|
// {
|
||||||
// Update pKeyDefinition for this byte
|
// // Update pKeyDefinition for this byte
|
||||||
token += (Byte)(((reference >> ((token & 0x3) << 3)) & 0xFF) >> ((token >> 6) & 1));
|
// token += (Byte)(((reference >> ((token & 0x3) << 3)) & 0xFF) >> ((token >> 6) & 1));
|
||||||
|
|
||||||
// Update the unencrypted reference before the byte gets encrypted
|
// // Update the unencrypted reference before the byte gets encrypted
|
||||||
reference = (reference << 8);
|
// reference = (reference << 8);
|
||||||
reference += encryptedBytes[i];
|
// reference += encryptedBytes[i];
|
||||||
|
|
||||||
// Encrypt the data by applying the resepective key
|
// // Encrypt the data by applying the resepective key
|
||||||
encryptedBytes[i] ^= key[((token >> 2) & 0x0F)];
|
// encryptedBytes[i] ^= key[((token >> 2) & 0x0F)];
|
||||||
|
|
||||||
// Check if data has to be inverted
|
// // Check if data has to be inverted
|
||||||
if (token > 127)
|
// if (token > 127)
|
||||||
{
|
// {
|
||||||
encryptedBytes[i] = (Byte)~encryptedBytes[i];
|
// encryptedBytes[i] = (Byte)~encryptedBytes[i];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
Console.WriteLine(BitConverter.ToString(encryptedBytes));
|
// Console.WriteLine(BitConverter.ToString(encryptedBytes));
|
||||||
Console.WriteLine();
|
// Console.WriteLine();
|
||||||
|
|
||||||
return encryptedBytes;
|
// return encryptedBytes;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public static ushort CalculateCrc(byte[] data, ushort start, ushort length)
|
//public static ushort CalculateCrc(byte[] data, ushort start, ushort length)
|
||||||
{
|
//{
|
||||||
byte zeichen, test;
|
// byte zeichen, test;
|
||||||
ushort crc_result;
|
// ushort crc_result;
|
||||||
ushort ui_index;
|
// ushort ui_index;
|
||||||
byte h;
|
// byte h;
|
||||||
|
|
||||||
crc_result = 0xFFFF;
|
// crc_result = 0xFFFF;
|
||||||
ui_index = start;
|
// ui_index = start;
|
||||||
|
|
||||||
if (data.Length >= length + start)
|
// if (data.Length >= length + start)
|
||||||
{
|
// {
|
||||||
while (ui_index < length + start)
|
// while (ui_index < length + start)
|
||||||
{
|
// {
|
||||||
zeichen = data[ui_index];
|
// zeichen = data[ui_index];
|
||||||
ui_index++;
|
// ui_index++;
|
||||||
|
|
||||||
for (h = 0; h < 8; h++)
|
// for (h = 0; h < 8; h++)
|
||||||
{
|
// {
|
||||||
test = 0;
|
// test = 0;
|
||||||
|
|
||||||
if ((crc_result & 0x8000) != 0)
|
// if ((crc_result & 0x8000) != 0)
|
||||||
{
|
// {
|
||||||
test = 0x80;
|
// test = 0x80;
|
||||||
}
|
// }
|
||||||
|
|
||||||
crc_result <<= 1;
|
// crc_result <<= 1;
|
||||||
|
|
||||||
if (((zeichen & 0x80) ^ test) != 0)
|
// if (((zeichen & 0x80) ^ test) != 0)
|
||||||
{
|
// {
|
||||||
crc_result ^= 0x1021;
|
// crc_result ^= 0x1021;
|
||||||
}
|
// }
|
||||||
zeichen <<= 1;
|
// zeichen <<= 1;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
return crc_result;
|
// return crc_result;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,13 +468,13 @@
|
|||||||
//var connector = EregisterConnector.CreateNew("COM6", 1000);
|
//var connector = EregisterConnector.CreateNew("COM6", 1000);
|
||||||
|
|
||||||
//connector.Add(1, 0319020415, 0319020415);//433
|
//connector.Add(1, 0319020415, 0319020415);//433
|
||||||
//connector.AddHexCommand(1, "00-00");
|
//connector.AddHexCommand(1, "00 00");
|
||||||
|
|
||||||
//connector.Add(2, 0319020441, "4291317405", "4291317405", null, false); // 433
|
//connector.Add(2, 0319020441, "4291317405", "4291317405", null, false); // 433
|
||||||
//connector.InitInspection();
|
//connector.InitInspection();
|
||||||
|
|
||||||
//connector.Add(3, 4291317405, 4291317405);//433
|
//connector.Add(3, 4291317405, 4291317405);//433
|
||||||
//connector.AddHexCommand(3, "00-00");
|
//connector.AddHexCommand(3, "00 00");
|
||||||
|
|
||||||
// connector.RunCommands();
|
// connector.RunCommands();
|
||||||
|
|
||||||
@@ -429,11 +482,11 @@
|
|||||||
//var connector = EregisterConnector.CreateNew("COM6", 1000);
|
//var connector = EregisterConnector.CreateNew("COM6", 1000);
|
||||||
|
|
||||||
//connector.Add(1, 0319020415, 0319020415);//433
|
//connector.Add(1, 0319020415, 0319020415);//433
|
||||||
//connector.AddHexCommand(1, "00-00");
|
//connector.AddHexCommand(1, "00 00");
|
||||||
//connector.Add(2, 0319020441, 0319020441);//433
|
//connector.Add(2, 0319020441, 0319020441);//433
|
||||||
//connector.AddHexCommand(2, "00-00");
|
//connector.AddHexCommand(2, "00 00");
|
||||||
//connector.Add(3, 4291317405, 4291317405);//433
|
//connector.Add(3, 4291317405, 4291317405);//433
|
||||||
//connector.AddHexCommand(3, "00-00");
|
//connector.AddHexCommand(3, "00 00");
|
||||||
|
|
||||||
//connector.InitInspection();
|
//connector.InitInspection();
|
||||||
|
|
||||||
|
|||||||
+29
-12
@@ -12,8 +12,7 @@
|
|||||||
|
|
||||||
this.DebugType = payload[index++];
|
this.DebugType = payload[index++];
|
||||||
this.MeterType = payload[index++];
|
this.MeterType = payload[index++];
|
||||||
this.RadioFirmwareVersion = payload[index++].ToString();
|
this.RadioFirmwareVersion = this.VersionString(payload[index++], payload[index++]);
|
||||||
this.FirmwareVersion = payload[index++].ToString();
|
|
||||||
this.MetrologyFirmwareVersion = this.VersionString(payload[index++], payload[index++]);
|
this.MetrologyFirmwareVersion = this.VersionString(payload[index++], payload[index++]);
|
||||||
this.HardwareVersion = payload[index++].ToString();
|
this.HardwareVersion = payload[index++].ToString();
|
||||||
this.FactoryState = payload[index++];
|
this.FactoryState = payload[index++];
|
||||||
@@ -114,19 +113,37 @@
|
|||||||
/// Bits 8-11 – Minor Version
|
/// Bits 8-11 – Minor Version
|
||||||
/// Bits 0-7 – Patch Version
|
/// Bits 0-7 – Patch Version
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private String VersionString(Byte param, Byte patch)
|
private String VersionString(Byte patch, Byte param)
|
||||||
{
|
{
|
||||||
var bits = param.GetBits();
|
var bits = param.GetBits().Reverse();
|
||||||
var _major = new Byte[8];
|
var type = bits[7] == 0 ? 'B' : 'R';
|
||||||
var _minor = new Byte[8];
|
|
||||||
|
|
||||||
Array.Copy(bits, 0, _major, 0, 4);
|
var majorBits = new Byte[8];
|
||||||
Array.Copy(bits, 4, _minor, 0, 3);
|
majorBits[0] = bits[6];
|
||||||
|
majorBits[1] = bits[5];
|
||||||
var major = _major.ToByte();
|
majorBits[2] = bits[4];
|
||||||
var minor = _minor.ToByte();
|
|
||||||
|
|
||||||
return $"{bits[7]}.{major}.{minor}.{patch}";
|
var major = 0;
|
||||||
|
|
||||||
|
for (var i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
major |= majorBits[i] << i;
|
||||||
|
}
|
||||||
|
|
||||||
|
var minorBits = new Byte[8];
|
||||||
|
majorBits[0] = bits[3];
|
||||||
|
majorBits[1] = bits[2];
|
||||||
|
majorBits[2] = bits[1];
|
||||||
|
majorBits[3] = bits[0];
|
||||||
|
|
||||||
|
var minor = 0;
|
||||||
|
|
||||||
|
for (var i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
minor |= minorBits[i] << i;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $"{type}{major}.{minor}.{patch}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-6
@@ -49,12 +49,11 @@
|
|||||||
this.OnProgress?.Invoke(0, rowno++, $"Parametersatz", JusteRegisterTaskState.Disabled);
|
this.OnProgress?.Invoke(0, rowno++, $"Parametersatz", JusteRegisterTaskState.Disabled);
|
||||||
this.OnProgress?.Invoke(0, rowno++, $"Anzeige-111111111", JusteRegisterTaskState.Disabled);
|
this.OnProgress?.Invoke(0, rowno++, $"Anzeige-111111111", JusteRegisterTaskState.Disabled);
|
||||||
this.OnProgress?.Invoke(0, rowno++, $"Opto ein", JusteRegisterTaskState.Disabled);
|
this.OnProgress?.Invoke(0, rowno++, $"Opto ein", JusteRegisterTaskState.Disabled);
|
||||||
|
this.OnProgress?.Invoke(0, rowno++, $"MBus status = 7", JusteRegisterTaskState.Disabled);
|
||||||
this.OnProgress?.Invoke(0, rowno++, $"MBus status", JusteRegisterTaskState.Disabled);
|
this.OnProgress?.Invoke(0, rowno++, $"Batteriespannung (Volts)", JusteRegisterTaskState.Disabled);
|
||||||
this.OnProgress?.Invoke(0, rowno++, $"Batteriespannung", JusteRegisterTaskState.Disabled);
|
this.OnProgress?.Invoke(0, rowno++, $"Batterielaufzeit (Jahre)", JusteRegisterTaskState.Disabled);
|
||||||
this.OnProgress?.Invoke(0, rowno++, $"Batterie übrig", JusteRegisterTaskState.Disabled);
|
|
||||||
this.OnProgress?.Invoke(0, rowno++, $"FW Version", JusteRegisterTaskState.Disabled);
|
this.OnProgress?.Invoke(0, rowno++, $"FW Version", JusteRegisterTaskState.Disabled);
|
||||||
this.OnProgress?.Invoke(0, rowno++, $"Reboots", JusteRegisterTaskState.Disabled);
|
this.OnProgress?.Invoke(0, rowno++, $"Reboots <= 2", JusteRegisterTaskState.Disabled);
|
||||||
|
|
||||||
foreach (var kvp in this.programmingParameters)
|
foreach (var kvp in this.programmingParameters)
|
||||||
{
|
{
|
||||||
@@ -133,7 +132,7 @@
|
|||||||
{
|
{
|
||||||
Slotno = slotno,
|
Slotno = slotno,
|
||||||
Rowno = rowno++,
|
Rowno = rowno++,
|
||||||
TaskHandler = task4.CheckFWVersion,
|
TaskHandler = task4.CheckRadioFWVersion,
|
||||||
ProgressHandler = this.Task_OnProgress
|
ProgressHandler = this.Task_OnProgress
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -176,9 +176,16 @@
|
|||||||
return new Tuple<String, JusteRegisterTaskState>(label, JusteRegisterTaskState.Success);
|
return new Tuple<String, JusteRegisterTaskState>(label, JusteRegisterTaskState.Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Tuple<String, JusteRegisterTaskState> CheckFWVersion(JusteRegisterParameterSet parameterSet)
|
internal Tuple<String, JusteRegisterTaskState> CheckRadioFWVersion(JusteRegisterParameterSet parameterSet)
|
||||||
{
|
{
|
||||||
var label = $"{this.debugs.LastOrDefault()?.FirmwareVersion} OK";
|
var label = $"{this.debugs.LastOrDefault()?.RadioFirmwareVersion} OK";
|
||||||
|
|
||||||
|
return new Tuple<String, JusteRegisterTaskState>(label, JusteRegisterTaskState.Success);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal Tuple<String, JusteRegisterTaskState> CheckMetrologyFWVersion(JusteRegisterParameterSet arg)
|
||||||
|
{
|
||||||
|
var label = $"{this.debugs.LastOrDefault()?.MetrologyFirmwareVersion} OK";
|
||||||
|
|
||||||
return new Tuple<String, JusteRegisterTaskState>(label, JusteRegisterTaskState.Success);
|
return new Tuple<String, JusteRegisterTaskState>(label, JusteRegisterTaskState.Success);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
public abstract class Payload
|
public abstract class Payload
|
||||||
{
|
{
|
||||||
private readonly String bytes;
|
protected readonly String bytes;
|
||||||
|
|
||||||
protected Payload(Byte[] payload)
|
protected Payload(Byte[] payload)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user