From a7f7aacfe2fa9c540747855387f4e87a6813122a Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Tue, 24 Sep 2024 12:52:55 +0200 Subject: [PATCH 01/44] Cordonel requirements - Skip calibration added --- .../LaaProduction.Data.Cordonel.csproj | 3 +- .../Models/CordonelRequirements.cs | 2 + ...hange.cs => CordonelRequirementsChange.cs} | 2 +- .../Models/CordonelSpecialRequirement.cs | 14 +++++- .../Models/CordonelStandardRequirement.cs | 7 ++- .../CordonelStandardRequirementChange.cs | 27 ---------- .../Repositories/EOLProgressRepository.cs | 28 +++++++++-- .../ProductionOrdersRepository.cs | 8 ++- .../Repositories/RequirementsRepository.cs | 41 +++++++++------- .../SpecialRequirementsRepository.cs | 49 +++++++++++-------- .../StandardRequirementsRepository.cs | 45 ++++++++++------- .../UITranslations.Designer.cs | 18 +++++++ .../UITranslations.de.resx | 6 +++ .../UITranslations.en.resx | 6 +++ .../UITranslations.resx | 6 +++ .../Controllers/HomeController.cs | 2 +- .../Views/SpecialRequirements/Create.cshtml | 10 ++++ .../Views/SpecialRequirements/Index.cshtml | 1 + .../SpecialRequirements/TrContent.cshtml | 11 +++++ .../Views/SpecialRequirements/Update.cshtml | 10 ++++ .../Views/StandardRequirements/Index.cshtml | 1 + .../StandardRequirements/TrContent.cshtml | 11 +++++ .../Views/StandardRequirements/Update.cshtml | 17 +++++++ 23 files changed, 231 insertions(+), 94 deletions(-) rename LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/{CordonelSpecialRequirementChange.cs => CordonelRequirementsChange.cs} (95%) delete mode 100644 LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelStandardRequirementChange.cs diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj index 22e5c4f1..b17eb775 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj @@ -63,10 +63,9 @@ - - + diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs index 14015b17..f7437b84 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs @@ -20,6 +20,8 @@ public Int32? PcbId { get; set; } + public Boolean? SkipCalibration { get; internal set; } + public Boolean? SkipRadioCheck { get; set; } public String FwVersion { get; set; } diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelSpecialRequirementChange.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirementsChange.cs similarity index 95% rename from LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelSpecialRequirementChange.cs rename to LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirementsChange.cs index 6c9f6f23..47ee81d9 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelSpecialRequirementChange.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirementsChange.cs @@ -3,7 +3,7 @@ using System; using System.ComponentModel.DataAnnotations; - public class CordonelSpecialRequirementChange + public class CordonelRequirementsChange { [Display(Name = "Id", Description = "Die in der Datenbank zugewiesene Id. Nicht änderbar!")] public Int32 Id { get; set; } diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelSpecialRequirement.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelSpecialRequirement.cs index c17bd538..7675726c 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelSpecialRequirement.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelSpecialRequirement.cs @@ -15,6 +15,7 @@ private String meterSize; private String fwVersion; private String lutVersion; + private Boolean? skipCalibration; private Boolean? skipRadioCheck; private Double? requiredLifeTimeYearsAssembly; private Double? requiredLifeTimeYearsShipping; @@ -114,6 +115,17 @@ set => this.lutVersion = value; } + [Display(Name = nameof(UITranslations.Requirements_SkipCalibration_Name) + , Description = nameof(UITranslations.Requirements_SkipCalibration_Description) + , ResourceType = typeof(UITranslations))] + public Boolean? SkipCalibration + { + get => this.skipCalibration ?? this.StandardRequirement?.SkipCalibration; + /// SkipRadioCheck true = skip, false or null = do not skip + /// inverted false or null = check, true = skip + set => this.skipCalibration = value; + } + [Display(Name = nameof(UITranslations.Requirements_SkipRadioCheck_Name) , Description = nameof(UITranslations.Requirements_SkipRadioCheck_Description) , ResourceType = typeof(UITranslations))] @@ -233,6 +245,6 @@ [Display(Name = nameof(UITranslations.Requirements_History_Name) , Description = nameof(UITranslations.Requirements_History_Description) , ResourceType = typeof(UITranslations))] - public IEnumerable History { get; set; } + public IEnumerable History { get; set; } } } diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelStandardRequirement.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelStandardRequirement.cs index c4169a0e..b9216b12 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelStandardRequirement.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelStandardRequirement.cs @@ -52,6 +52,11 @@ , ErrorMessageResourceType = typeof(UITranslations))] public String LutCrc { get; set; } + [Display(Name = nameof(UITranslations.Requirements_SkipCalibration_Name) + , Description = nameof(UITranslations.Requirements_SkipCalibration_Description) + , ResourceType = typeof(UITranslations))] + public Boolean? SkipCalibration { get; internal set; } + [Display(Name = nameof(UITranslations.Requirements_SkipRadioCheck_Name) , Description = nameof(UITranslations.Requirements_SkipRadioCheck_Description) , ResourceType = typeof(UITranslations))] @@ -124,6 +129,6 @@ [Display(Name = nameof(UITranslations.Requirements_History_Name) , Description = nameof(UITranslations.Requirements_History_Description) , ResourceType = typeof(UITranslations))] - public IEnumerable History { get; set; } + public IEnumerable History { get; set; } } } diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelStandardRequirementChange.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelStandardRequirementChange.cs deleted file mode 100644 index 2372c78a..00000000 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelStandardRequirementChange.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace LaaProduction.Data.Cordonel.Models -{ - using System; - using System.ComponentModel.DataAnnotations; - - public class CordonelStandardRequirementChange - { - [Display(Name = "Id", Description = "Die in der Datenbank zugewiesene Id. Nicht änderbar!")] - public Int32 Id { get; set; } - - [Display(Name = "Versionsnr.", Description = "Die in der Datenbank zugewiesene Versionsnr. Nicht änderbar!")] - public Int32 Version { get; set; } - - [Display(Name = "Zeitstämpel", Description = "Zeitstämpel der letzten änderung. Nicht änderbar!")] - public DateTime Timestamp { get; set; } - - [Display(Name = "Bearbeiter", Description = "Name des Bearbeiters. Nicht änderbar!")] - [Required] - public String ApprovalName { get; set; } - - [Display(Name = "Kommentar", Description = "Kommentar über die änderungen.")] - public String ApprovalComment { get; set; } - - [Display(Name = "ist zur Produktion freigegeben", Description = "Ist zur Produktion freigegeben.")] - public Boolean IsActive { get; set; } - } -} \ No newline at end of file diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs index de63445b..09ed1db8 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs @@ -258,27 +258,45 @@ }) .ToArray(); + var pcbidString = $"{pcbid}"; + if (cordonelInfoList.Length != 1) { - yield return new KeyValuePair($"{pcbid}", "More than 1 entry in the database is not allowed."); + yield return new KeyValuePair(pcbidString, "More than 1 entry in the database is not allowed."); } var cordonelInfo = cordonelInfoList[0]; if (cordonelInfo.TestStatus != 30) { - yield return new KeyValuePair($"{pcbid}", $"Is not correctly calibrated, status: {cordonelInfo.TestStatus}."); + yield return new KeyValuePair(pcbidString, $"Is not correctly calibrated, status: {cordonelInfo.TestStatus}."); } else if (cordonelInfo.Sealed == false) { - yield return new KeyValuePair($"{pcbid}", $"Is not correctly sealed."); + yield return new KeyValuePair(pcbidString, $"Is not correctly sealed."); } else if (cordonelInfo.Pending == false) { - yield return new KeyValuePair($"{pcbid}", $"Was allready finisched."); + yield return new KeyValuePair(pcbidString, $"Was allready finisched."); } - var requirement = + var requirement = this.dbContext.Requirements.FindByPcbId(pcbidString); + + if (requirement is null) + { + yield return new KeyValuePair(pcbidString, $"Requirements not found."); + } + else if (requirement.StandardId != model.StandardRequirementId + || requirement.StandardVersion != model.StandardRequirementVersion + || requirement.SpecialId != model.SpecialRequirementId + || requirement.SpecialVersion != model.SpecialRequirementVersion) + { + yield return new KeyValuePair(pcbidString, $"Requirements did not match the EOL progress."); + } + else if (requirement.IsStandardActive == false || !requirement.IsSpecialActive == false) + { + yield return new KeyValuePair(pcbidString, $"The bounded requirement is not active."); + } this.sqlConnection .CreateCommand(@" diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/ProductionOrdersRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/ProductionOrdersRepository.cs index c2e81513..0d41bc65 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/ProductionOrdersRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/ProductionOrdersRepository.cs @@ -10,10 +10,14 @@ public class ProductionOrdersRepository : IPORepository { + private readonly CordonelDbContext dbContext; private readonly SqlConnection sqlConnection; - public ProductionOrdersRepository(SqlConnection sqlConnection) - => this.sqlConnection = sqlConnection; + public ProductionOrdersRepository(CordonelDbContext dbContext) + { + this.dbContext = dbContext; + this.sqlConnection = dbContext.SqlConnection; + } public IEnumerator GetEnumerator() => this.sqlConnection diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/RequirementsRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/RequirementsRepository.cs index 45385b58..9dc2c0be 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/RequirementsRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/RequirementsRepository.cs @@ -8,10 +8,14 @@ public class RequirementsRepository : IRequirementsRepository { + private readonly CordonelDbContext dbContext; private readonly SqlConnection sqlConnection; - public RequirementsRepository(SqlConnection sqlConnection) - => this.sqlConnection = sqlConnection; + public RequirementsRepository(CordonelDbContext dbContext) + { + this.dbContext = dbContext; + this.sqlConnection = dbContext.SqlConnection; + } public CordonelRequirements FindByPcbId(String pcbid) => this.sqlConnection @@ -24,6 +28,7 @@ , [cr].[Size] , ISNULL([cr].[PoNr], [aap].[FertigungsauftragNr]) AS [Pono] , ISNULL([cr].[PcbId], [map].[MapPcbIdToSerialNumber_PcbId]) AS [Pcbid] + , [cr].[SkipCalibration] , [cr].[SkipRadioCheck] , [cr].[FwVersion] , [cr].[LutCrc] @@ -67,6 +72,7 @@ , [cr].[Size] , ISNULL([cr].[PoNr], [aap].[FertigungsauftragNr]) AS [Pono] , NULL AS [Pcbid] + , [cr].[SkipCalibration] , [cr].[SkipRadioCheck] , [cr].[FwVersion] , [cr].[LutCrc] @@ -110,21 +116,22 @@ MeterSize = reader.GetValue(5), ProductionOrderNr = reader.GetValue(6), PcbId = reader.GetValue(7), - SkipRadioCheck = reader.GetValue(8), - FwVersion = reader.GetValue(9), - LutCrc = reader.GetValue(10), - RequiredLifeTimeYearsAssembly = reader.GetValue(11), - RequiredLifeTimeYearsShipping = reader.GetValue(12), - MaxDrainedBatteryLoadPercentAssembly = reader.GetValue(13), - MaxDrainedBatteryLoadPercentShipping = reader.GetValue(14), - MaxStorageMonths = reader.GetValue(15), - QuiescentCurrent_uA = reader.GetValue(16), - EstimatedProductionBatteryLoadPercent = reader.GetValue(17), - RequirementTimestamp = reader.GetValue(18), - ApprovalName = reader.GetValue(19), - ApprovalComment = reader.GetValue(20), - IsSpecialActive = reader.GetValue(21), - IsStandardActive = reader.GetValue(22) + SkipCalibration = reader.GetValue(8), + SkipRadioCheck = reader.GetValue(9), + FwVersion = reader.GetValue(10), + LutCrc = reader.GetValue(11), + RequiredLifeTimeYearsAssembly = reader.GetValue(12), + RequiredLifeTimeYearsShipping = reader.GetValue(13), + MaxDrainedBatteryLoadPercentAssembly = reader.GetValue(14), + MaxDrainedBatteryLoadPercentShipping = reader.GetValue(15), + MaxStorageMonths = reader.GetValue(16), + QuiescentCurrent_uA = reader.GetValue(17), + EstimatedProductionBatteryLoadPercent = reader.GetValue(18), + RequirementTimestamp = reader.GetValue(19), + ApprovalName = reader.GetValue(20), + ApprovalComment = reader.GetValue(21), + IsSpecialActive = reader.GetValue(22), + IsStandardActive = reader.GetValue(23) }; } } diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/SpecialRequirementsRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/SpecialRequirementsRepository.cs index 7aa54d08..787487d5 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/SpecialRequirementsRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/SpecialRequirementsRepository.cs @@ -10,13 +10,13 @@ public class SpecialRequirementsRepository : ISpecialRequirementsRepository { + private readonly CordonelDbContext dbContext; private readonly SqlConnection sqlConnection; - private readonly CordonelDbContext cordonelDbContext; - public SpecialRequirementsRepository(SqlConnection sqlConnection, CordonelDbContext cordonelDbContext) + public SpecialRequirementsRepository(CordonelDbContext dbContext) { - this.sqlConnection = sqlConnection; - this.cordonelDbContext = cordonelDbContext; + this.dbContext = dbContext; + this.sqlConnection = dbContext.SqlConnection; } public CordonelSpecialRequirement Add(CordonelSpecialRequirement model) @@ -33,6 +33,7 @@ , [PcbId] , [FwVersion] , [LutCrc] + , [SkipCalibration] , [SkipRadioCheck] , [RequiredLifeTimeYearsAssembly] , [RequiredLifeTimeYearsShipping] @@ -54,6 +55,7 @@ , @{nameof(model.PcbId)} , @{nameof(model.FwVersion)} , @{nameof(model.LutCrc)} + , @{nameof(model.SkipCalibration)} , @{nameof(model.SkipRadioCheck)} , @{nameof(model.RequiredLifeTimeYearsAssembly)} , @{nameof(model.RequiredLifeTimeYearsShipping)} @@ -73,6 +75,7 @@ .SetParameter(nameof(model.PcbId), model.PcbId) .SetParameter(nameof(model.FwVersion), model.FwVersion) .SetParameter(nameof(model.LutCrc), model.LutCrc) + .SetParameter(nameof(model.SkipCalibration), model.SkipCalibration) .SetParameter(nameof(model.SkipRadioCheck), model.SkipRadioCheck) .SetParameter(nameof(model.RequiredLifeTimeYearsAssembly), model.RequiredLifeTimeYearsAssembly) .SetParameter(nameof(model.RequiredLifeTimeYearsShipping), model.RequiredLifeTimeYearsShipping) @@ -119,6 +122,7 @@ , [Special].[PcbId] , [Special].[FwVersion] , [Special].[LutCrc] + , [Special].[SkipCalibration] , [Special].[SkipRadioCheck] , [Special].[RequiredLifeTimeYearsAssembly] , [Special].[RequiredLifeTimeYearsShipping] @@ -165,6 +169,7 @@ , [Special].[PcbId] , [Special].[FwVersion] , [Special].[LutCrc] + , [Special].[SkipCalibration] , [Special].[SkipRadioCheck] , [Special].[RequiredLifeTimeYearsAssembly] , [Special].[RequiredLifeTimeYearsShipping] @@ -235,6 +240,7 @@ , [Latest].[PcbId] , [Latest].[FwVersion] , [Latest].[LutCrc] + , [Latest].[SkipCalibration] , [Latest].[SkipRadioCheck] , [Latest].[RequiredLifeTimeYearsAssembly] , [Latest].[RequiredLifeTimeYearsShipping] @@ -270,6 +276,7 @@ UPDATE [Cordonel_Special_Requirements] SET [FwVersion] = @{nameof(model.FwVersion)} , [LutCrc] = @{nameof(model.LutCrc)} + , [SkipCalibration] = @{nameof(model.SkipCalibration)} , [SkipRadioCheck] = @{nameof(model.SkipRadioCheck)} , [RequiredLifeTimeYearsAssembly] = @{nameof(model.RequiredLifeTimeYearsAssembly)} , [RequiredLifeTimeYearsShipping] = @{nameof(model.RequiredLifeTimeYearsShipping)} @@ -289,6 +296,7 @@ WHERE [Id] = @{nameof(model.Id)})") .SetParameter(nameof(model.FwVersion), model.FwVersion) .SetParameter(nameof(model.LutCrc), model.LutCrc) + .SetParameter(nameof(model.SkipCalibration), model.SkipCalibration) .SetParameter(nameof(model.SkipRadioCheck), model.SkipRadioCheck) .SetParameter(nameof(model.RequiredLifeTimeYearsAssembly), model.RequiredLifeTimeYearsAssembly) .SetParameter(nameof(model.RequiredLifeTimeYearsShipping), model.RequiredLifeTimeYearsShipping) @@ -311,7 +319,7 @@ IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); - private IEnumerable Hostory(Int32 id, Int32 nr) + private IEnumerable Hostory(Int32 id, Int32 nr) => this.sqlConnection .CreateCommand($@" SELECT [Id] @@ -326,7 +334,7 @@ ORDER BY [Version] DESC") .SetParameter(nameof(id), id) .SetParameter(nameof(nr), nr) - .ExecuteReader(x => new CordonelSpecialRequirementChange + .ExecuteReader(x => new CordonelRequirementsChange { Id = x.GetValue(0), Version = x.GetValue(1), @@ -350,22 +358,23 @@ PcbId = reader.GetValue(8), FwVersion = reader.GetValue(9), LutCrc = reader.GetValue(10), - SkipRadioCheck = reader.GetValue(11), - RequiredLifeTimeYearsAssembly = reader.GetValue(12), - RequiredLifeTimeYearsShipping = reader.GetValue(13), - MaxDrainedBatteryLoadPercentAssembly = reader.GetValue(14), - MaxDrainedBatteryLoadPercentShipping = reader.GetValue(15), - MaxStorageMonths = reader.GetValue(16), - MaxStorageMonthsBigOrders = reader.GetValue(17), - QuiescentCurrent_uA = reader.GetValue(18), - EstimatedProductionBatteryLoadPercent = reader.GetValue(19), - Timestamp = reader.GetValue(20), - ApprovalName = reader.GetValue(21), - ApprovalComment = reader.GetValue(22), - IsActive = reader.GetValue(23) + SkipCalibration = reader.GetValue(11), + SkipRadioCheck = reader.GetValue(12), + RequiredLifeTimeYearsAssembly = reader.GetValue(13), + RequiredLifeTimeYearsShipping = reader.GetValue(14), + MaxDrainedBatteryLoadPercentAssembly = reader.GetValue(15), + MaxDrainedBatteryLoadPercentShipping = reader.GetValue(16), + MaxStorageMonths = reader.GetValue(17), + MaxStorageMonthsBigOrders = reader.GetValue(18), + QuiescentCurrent_uA = reader.GetValue(19), + EstimatedProductionBatteryLoadPercent = reader.GetValue(20), + Timestamp = reader.GetValue(21), + ApprovalName = reader.GetValue(22), + ApprovalComment = reader.GetValue(23), + IsActive = reader.GetValue(24) }; private CordonelStandardRequirement StandardRequirement(Int32? standardId) - => this.cordonelDbContext.StandardRequirements.FirstOrDefault(standardId); + => this.dbContext.StandardRequirements.FirstOrDefault(standardId); } } diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/StandardRequirementsRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/StandardRequirementsRepository.cs index ec3ec4cc..98d77d61 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/StandardRequirementsRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/StandardRequirementsRepository.cs @@ -10,10 +10,14 @@ public class StandardRequirementsRepository : IStandardRequirementRepository { + private readonly CordonelDbContext dbContext; private readonly SqlConnection sqlConnection; - public StandardRequirementsRepository(SqlConnection sqlConnection) - => this.sqlConnection = sqlConnection; + public StandardRequirementsRepository(CordonelDbContext dbContext) + { + this.dbContext = dbContext; + this.sqlConnection = dbContext.SqlConnection; + } public CordonelStandardRequirement Add(CordonelStandardRequirement _) => throw new NotImplementedException($"{nameof(CordonelStandardRequirement)} could not be created."); @@ -33,6 +37,7 @@ , [MeterSize] , [FwVersion] , [LutCrc] + , [SkipCalibration] , [SkipRadioCheck] , [RequiredLifeTimeYearsAssembly] , [RequiredLifeTimeYearsShipping] @@ -73,6 +78,7 @@ , [MeterSize] , [FwVersion] , [LutCrc] + , [SkipCalibration] , [SkipRadioCheck] , [RequiredLifeTimeYearsAssembly] , [RequiredLifeTimeYearsShipping] @@ -114,6 +120,7 @@ , [STD].[MeterSize] , [STD].[FwVersion] , [STD].[LutCrc] + , [STD].[SkipCalibration] , [STD].[SkipRadioCheck] , [STD].[RequiredLifeTimeYearsAssembly] , [STD].[RequiredLifeTimeYearsShipping] @@ -153,6 +160,7 @@ , [MeterSize] , [FwVersion] , [LutCrc] + , [SkipCalibration] , [SkipRadioCheck] , [RequiredLifeTimeYearsAssembly] , [RequiredLifeTimeYearsShipping] @@ -184,6 +192,7 @@ UPDATE [Cordonel_Standard_Requirements] SET [FwVersion] = @{nameof(model.FwVersion)} , [LutCrc] = @{nameof(model.LutCrc)} + , [SkipCalibration] = @{nameof(model.SkipCalibration)} , [SkipRadioCheck] = @{nameof(model.SkipRadioCheck)} , [RequiredLifeTimeYearsAssembly] = @{nameof(model.RequiredLifeTimeYearsAssembly)} , [RequiredLifeTimeYearsShipping] = @{nameof(model.RequiredLifeTimeYearsShipping)} @@ -203,6 +212,7 @@ WHERE [Id] = @{nameof(model.Id)})") .SetParameter(nameof(model.FwVersion), model.FwVersion) .SetParameter(nameof(model.LutCrc), model.LutCrc) + .SetParameter(nameof(model.SkipCalibration), model.SkipCalibration) .SetParameter(nameof(model.SkipRadioCheck), model.SkipRadioCheck) .SetParameter(nameof(model.RequiredLifeTimeYearsAssembly), model.RequiredLifeTimeYearsAssembly) .SetParameter(nameof(model.RequiredLifeTimeYearsShipping), model.RequiredLifeTimeYearsShipping) @@ -236,22 +246,23 @@ MeterSize = reader.GetValue(5), FwVersion = reader.GetValue(6), LutCrc = reader.GetValue(7), - SkipRadioCheck = reader.GetValue(8), - RequiredLifeTimeYearsAssembly = reader.GetValue(9), - RequiredLifeTimeYearsShipping = reader.GetValue(10), - MaxDrainedBatteryLoadPercentAssembly = reader.GetValue(11), - MaxDrainedBatteryLoadPercentShipping = reader.GetValue(12), - MaxStorageMonths = reader.GetValue(13), - MaxStorageMonthsBigOrders = reader.GetValue(14), - QuiescentCurrent_uA = reader.GetValue(15), - EstimatedProductionBatteryLoadPercent = reader.GetValue(16), - Timestamp = reader.GetValue(17), - ApprovalName = reader.GetValue(18), - ApprovalComment = reader.GetValue(19), - IsActive = reader.GetValue(20), + SkipCalibration = reader.GetValue(8), + SkipRadioCheck = reader.GetValue(9), + RequiredLifeTimeYearsAssembly = reader.GetValue(10), + RequiredLifeTimeYearsShipping = reader.GetValue(11), + MaxDrainedBatteryLoadPercentAssembly = reader.GetValue(12), + MaxDrainedBatteryLoadPercentShipping = reader.GetValue(13), + MaxStorageMonths = reader.GetValue(14), + MaxStorageMonthsBigOrders = reader.GetValue(15), + QuiescentCurrent_uA = reader.GetValue(16), + EstimatedProductionBatteryLoadPercent = reader.GetValue(17), + Timestamp = reader.GetValue(18), + ApprovalName = reader.GetValue(19), + ApprovalComment = reader.GetValue(20), + IsActive = reader.GetValue(21), }; - private IEnumerable History(Int32 id, Int32 nr) + private IEnumerable History(Int32 id, Int32 nr) => this.sqlConnection .CreateCommand($@" SELECT [Id] @@ -266,7 +277,7 @@ ORDER BY [Version] DESC") .SetParameter(nameof(id), id) .SetParameter(nameof(nr), nr) - .ExecuteReader(reader => new CordonelStandardRequirementChange + .ExecuteReader(reader => new CordonelRequirementsChange { Id = reader.GetValue(0), Version = reader.GetValue(1), diff --git a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.Designer.cs b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.Designer.cs index 47d4e0e6..248cfeb0 100644 --- a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.Designer.cs +++ b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.Designer.cs @@ -519,6 +519,24 @@ namespace LaaProductionWeb.Resources { } } + /// + /// Looks up a localized string similar to Calibration test can be skipped. + /// + public static string Requirements_SkipCalibration_Description { + get { + return ResourceManager.GetString("Requirements_SkipCalibration_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skip calibration. + /// + public static string Requirements_SkipCalibration_Name { + get { + return ResourceManager.GetString("Requirements_SkipCalibration_Name", resourceCulture); + } + } + /// /// Looks up a localized string similar to The radio signal check (RSSI) can be skipped on requirement for the EMEA region. /// diff --git a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.de.resx b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.de.resx index 0c653b2a..4c68b380 100644 --- a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.de.resx +++ b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.de.resx @@ -336,4 +336,10 @@ Standardfreigabe ändern + + Metrologische Prüfung kann übersprungen werden + + + Metrologische Prüfung überspringen + \ No newline at end of file diff --git a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.en.resx b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.en.resx index 2097be33..6dc2fd74 100644 --- a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.en.resx +++ b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.en.resx @@ -336,4 +336,10 @@ Change Standard Requirement + + Calibration test can be skipped + + + Skip calibration + \ No newline at end of file diff --git a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.resx b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.resx index 2097be33..6dc2fd74 100644 --- a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.resx +++ b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.resx @@ -336,4 +336,10 @@ Change Standard Requirement + + Calibration test can be skipped + + + Skip calibration + \ No newline at end of file diff --git a/LaaProductionWeb/LaaProductionWeb/Controllers/HomeController.cs b/LaaProductionWeb/LaaProductionWeb/Controllers/HomeController.cs index 8096536d..e94ccd60 100644 --- a/LaaProductionWeb/LaaProductionWeb/Controllers/HomeController.cs +++ b/LaaProductionWeb/LaaProductionWeb/Controllers/HomeController.cs @@ -67,7 +67,7 @@ } else { - this.HttpContext.SignIn(token.Value); + this.HttpContext.SignIn(token.Value?.Trim('"')); return this.Redirect(this.HttpContext.GetUrlReferer()); } diff --git a/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Create.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Create.cshtml index 4d00b9a5..14d72756 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Create.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Create.cshtml @@ -41,6 +41,16 @@ @Html.PopoverFor(x => x.PcbId) @Html.ValidationMessageFor(x => x.PcbId, null, new { @class = "small text-danger" }) +
+
+
+ @Html.CheckBox(nameof(Model.SkipCalibration), Model.SkipCalibration ?? false, new { @class = "form-check-input", autocomplete = "off" }) + @Html.LabelFor(x => x.SkipCalibration, new { @class = "form-check-label" }) + @Html.ValidationMessageFor(x => x.SkipCalibration, null, new { @class = "small text-danger" }) +
+
+ @Html.PopoverFor(x => x.SkipCalibration) +
diff --git a/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Index.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Index.cshtml index f769278a..98f2318a 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Index.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Index.cshtml @@ -27,6 +27,7 @@ @Html.DisplayNameFor(_ => model.IsActive) @Html.DisplayNameFor(_ => model.FwVersion) @Html.DisplayNameFor(_ => model.LutCrc) + @Html.DisplayNameFor(_ => model.SkipCalibration) @Html.DisplayNameFor(_ => model.SkipRadioCheck) @Html.DisplayNameFor(_ => model.RequiredLifeTimeYearsAssembly) @Html.DisplayNameFor(_ => model.RequiredLifeTimeYearsShipping) diff --git a/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/TrContent.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/TrContent.cshtml index 00f1662a..bb952151 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/TrContent.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/TrContent.cshtml @@ -21,6 +21,17 @@ @Model.FwVersion @Model.LutCrc + + @if (Model.SkipCalibration == true) + { + + } + else + { + + } + + @if (Model.SkipRadioCheck == true) { diff --git a/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Update.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Update.cshtml index babd0f79..1faa80eb 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Update.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/SpecialRequirements/Update.cshtml @@ -29,6 +29,16 @@ @Html.PopoverFor(x => x.PcbId) @Html.ValidationMessageFor(x => x.PcbId, null, new { @class = "small text-danger" })
+
+
+
+ @Html.CheckBox(nameof(Model.SkipCalibration), Model.SkipCalibration ?? false, new { @class = "form-check-input", autocomplete = "off" }) + @Html.LabelFor(x => x.SkipCalibration, new { @class = "form-check-label" }) + @Html.ValidationMessageFor(x => x.SkipCalibration, null, new { @class = "small text-danger" }) +
+
+ @Html.PopoverFor(x => x.SkipCalibration) +
diff --git a/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/Index.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/Index.cshtml index 859bb1dd..09467a9e 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/Index.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/Index.cshtml @@ -21,6 +21,7 @@ @Html.DisplayNameFor(_ => model.IsActive) @Html.DisplayNameFor(_ => model.FwVersion) @Html.DisplayNameFor(_ => model.LutCrc) + @Html.DisplayNameFor(_ => model.SkipCalibration) @Html.DisplayNameFor(_ => model.SkipRadioCheck) @Html.DisplayNameFor(_ => model.RequiredLifeTimeYearsAssembly) @Html.DisplayNameFor(_ => model.RequiredLifeTimeYearsShipping) diff --git a/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/TrContent.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/TrContent.cshtml index 4ab52a7e..cb7779c3 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/TrContent.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/TrContent.cshtml @@ -18,6 +18,17 @@ @Model.FwVersion @Model.LutCrc + + @if (Model.SkipCalibration == true) + { + + } + else + { + + } + + @if (Model.SkipRadioCheck == true) { diff --git a/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/Update.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/Update.cshtml index c31a7a5c..3f358da0 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/Update.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/StandardRequirements/Update.cshtml @@ -71,6 +71,23 @@ @Html.PopoverFor(x => x.Timestamp) @Html.ValidationMessageFor(x => x.Timestamp, null, new { @class = "small text-danger" })
+
+
+
+ @if (Model.SkipCalibration == true) + { + + } + else + { + + } + @Html.LabelFor(x => x.SkipCalibration, new { @class = "form-check-label" }) + @Html.ValidationMessageFor(x => x.SkipCalibration, null, new { @class = "small text-danger" }) +
+
+ @Html.PopoverFor(x => x.SkipCalibration) +
From 87469954807634440185d8dc674e7839c40773f4 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Tue, 24 Sep 2024 15:51:17 +0200 Subject: [PATCH 02/44] new submodule added --- Common/CommonConsole/CommonConsole.csproj | 12 + Common/CommonConsole/Program.cs | 732 +----------------- .../LaaProduction.Data.Cordonel.csproj | 4 + .../Repositories/EOLProgressRepository.cs | 159 ++-- LaaProductionWeb/LaaPackages | 2 +- .../LaaProduction.Console/Program.cs | 13 +- LaaProductionWeb/LaaProductionWeb.sln | 7 + 7 files changed, 138 insertions(+), 791 deletions(-) diff --git a/Common/CommonConsole/CommonConsole.csproj b/Common/CommonConsole/CommonConsole.csproj index a3c10bd1..df9712c2 100644 --- a/Common/CommonConsole/CommonConsole.csproj +++ b/Common/CommonConsole/CommonConsole.csproj @@ -51,8 +51,19 @@ + + + + + + + + + + + @@ -103,5 +114,6 @@ + \ No newline at end of file diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index 0dee9096..6561e07e 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -1,726 +1,46 @@ namespace CommonConsole { - using Common.Hardware.WaterMeter.OmniPlus; + using CommonConsole.Schema; + + using Newtonsoft.Json; using System; using System.Collections.Generic; - using System.Runtime.Serialization; + using System.IO; public class Program { public static void Main() { + var jtext = File.ReadAllText("..\\..\\configuration.json"); + var jmodel = JsonConvert.DeserializeObject(jtext); + var types = new HashSet(); - } - - public class Cordonel : Dictionary - { - [OnDeserialized] - internal void OnDeserialized(StreamingContext _) + foreach (var app in jmodel.Values) { - foreach (var x in this) + if (app.Registers is null) { - x.Value.Name = x.Key; + continue; + } + + foreach (var reg in app.Registers.Values) + { + if (reg.Details is null) + { + continue; + } + + foreach (var detail in reg.Details) + { + types.Add(detail.Type); + } } } - } - public class App - { - public Byte Id { get; set; } - - public String Name { get; set; } - - public V Version { get; set; } - - public Registers Registers { get; set; } - - public Statuses Status { get; set; } - } - - public class V - { - public UInt16? First { get; set; } - - public UInt16? Last { get; set; } - } - - public class Registers : Dictionary - { - [OnDeserialized] - internal void OnDeserialized(StreamingContext _) + foreach (var type in types) { - foreach (var x in this) - { - x.Value.Name = x.Key; - } + Console.WriteLine(type); } } - - public class Register - { - public Byte Id { get; set; } - - public String Name { get; set; } - - public Detail[] Details { get; set; } - } - - public class Detail - { - public V Version { get; set; } - - public String Type { get; set; } - - public String StaticType { get; set; } - - public String Description { get; set; } - - public Privilege Privilege { get; set; } - - public Values Values { get; set; } - } - - public class Values - { - public Object Minimum { get; set; } - - public Object Maximum { get; set; } - - public Object Default { get; set; } - } - - public class Privilege - { - public Privileges Lvl1 { get; set; } - - public Privileges Lvl2 { get; set; } - - public Privileges Lvl3 { get; set; } - - public Privileges Lvl4 { get; set; } - - public Privileges Lvl5 { get; set; } - - public Privileges Lvl6 { get; set; } - - public Privileges Lvl7 { get; set; } - - public Privileges Lvl8 { get; set; } - } - - public enum Privileges - { - NA, - RO, - WO, - RW, - } - - public class Statuses : Dictionary - { - [OnDeserialized] - internal void OnDeserialized(StreamingContext _) - { - foreach (var x in this) - { - x.Value.Name = x.Key; - } - } - } - - public class Status - { - public Byte Id { get; set; } - - public String Name { get; set; } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /// - /// 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 - /// - //var bytes = new[] { 0x08, 0x11 }; - //var bits = new Byte[16]; - //var x = 0; - - //foreach (var @byte in bytes) - //{ - // for (var i = 0; i< 8; i++, x++) - // { - // bits[x] = (Byte) ((@byte >> i) & 1); - // } - //} - - //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++) - //{ - // 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 - // E6C88800DEB868C0D6A84880CE982840 - //var encryptionKey = new Byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18 }; - //var task = new JusteRegisterProgrammingTask - //{ - // Cmd = JustSirtMessage.W_PAM, - // P1 = new P811 - // { - // DelPamSemi = true, - // WakeUpCmd = true - // }, - // Address = 4291305226, - // // Address = 319020415, - // Data = new Byte[] - // { - // // Change Key - // // 0x6C, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - - // // LED on - // // 0x1F, 0x01, 0x08, - - // // Reboot - // 0x0E, 0x00, - - // // Provide Pin Auth Level I - // // 0x43, 0x01, 0x14, 0x30, 0x68, 0xD0, - - // // Provide Pin Auth Level II - // // 0x43, 0x02, 0x14, 0x0E, 0x80, 0x40, - - // // Provide Pin Auth Level III - // 0x43, 0x03, 0x63, 0x93, 0x73, 0x22, - - // // Reset credits - // // 0x1F, 0x01, 0x03, - // }, - // EncryptionKey = encryptionKey - //}; - //programmingBatch.Run(task); - //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 - - //var task = new JusteRegisterTask - //{ - // Cmd = JustSirtMessage.W_PAM, - // P1 = new P811 - // { - // DelPamSemi = true - // }, - // Address = 319020415, - // Data = new Byte[] - // { - // // WUP stay awake - // 0x00, 0x00, - - // // LAT - // 0x02, 0x00, - - // // MBUS 7 - // 0x05, 0x07, - - // // TX - // 0x10, 0x00, 0x03, - - // // Provide Pin Auth Level I - // // 0x43, 0x01, 0x14, 0x30, 0x68, 0xD0, - - // // Provide Pin Auth Level II - // 0x43, 0x02, 0x14, 0x0E, 0x80, 0x40, - - // // Provide Pin Auth Level III - // // 0x43, 0x03, 0x63, 0x93, 0x73, 0x22, - - // // Reset credits - // // 0x1F, 0x01, 0x03, - // } - //}; - //programmingBatch.Run(task); - //task.Wait(); - - //task = new JusteRegisterTask - //{ - // Cmd = JustSirtMessage.W_PAM, - // P1 = new P811 - // { - // DelPamSemi = true - // }, - // Address = 319020415, - // Data = new Byte[] - // { - // // Parametersatz - - - // // Provide Pin Auth Level I - // // 0x43, 0x01, 0x14, 0x30, 0x68, 0xD0, - - // // Provide Pin Auth Level II - // 0x43, 0x02, 0x14, 0x0E, 0x80, 0x40, - - // // Provide Pin Auth Level III - // // 0x43, 0x03, 0x63, 0x93, 0x73, 0x22, - - // // Reset credits - // // 0x1F, 0x01, 0x03, - // } - //}; - //programmingBatch.Run(task); - //task.Wait(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //public static byte[] Decrypt(Byte[] key, params Byte[] message) - //{ - // var decryptLength = message.Length; - // var decryptedBytes = new Byte[decryptLength]; - - // for (int i = 0; i < decryptLength; i++) - // { - // decryptedBytes[i] = message[i]; - // } - - // var start = 14; - // var end = start + decryptedBytes[7] 6; - // var token = decryptedBytes[9]; - - // for (var i = start; i < end; i++) - // { - // token += (Byte)(decryptedBytes[i (token & 0x3) 1] >> ((token >> 6) & 0x1)); - - // decryptedBytes[i] ^= key[(token >> 2) & 0x0F]; - - // if (token > 127) - // { - // decryptedBytes[i] = (Byte)~decryptedBytes[i]; - // } - // } - - // return decryptedBytes; - //} - - //public static byte[] Encrypt(Byte[] key, UInt32 address, params Byte[] telegramBytes) - //{ - // Console.WriteLine(address); - // Console.WriteLine(BitConverter.ToString(key)); - // Console.WriteLine(BitConverter.ToString(telegramBytes)); - - // var telegramLength = telegramBytes.Length; - // var telegramIndex = 0; - - // var encryptedBytes = new Byte[telegramLength + 6]; - // var encryptLength = encryptedBytes.Length; - // var index = 0; - - // encryptedBytes[index++] = (Byte)(address >> 24); - // encryptedBytes[index++] = (Byte)(address >> 16); - // encryptedBytes[index++] = (Byte)(address >> 8); - // encryptedBytes[index++] = (Byte)(address >> 0); - - // foreach (var _byte in telegramBytes) - // { - // encryptedBytes[index++] = telegramBytes[telegramIndex++]; - // } - - // var telegramCRC = CalculateCrc(encryptedBytes, 1, (UInt16)(encryptLength 3)); - - // encryptedBytes[index++] = (Byte)(telegramCRC >> 8); - // encryptedBytes[index++] = (Byte)(telegramCRC >> 0); - - // Console.WriteLine(BitConverter.ToString(encryptedBytes)); - - // var token = (Byte)0xFF; - // var reference = address; - - // for (var i = 0; i < encryptLength; i++) - // { - // // Update pKeyDefinition for this byte - // token += (Byte)(((reference >> ((token & 0x3) << 3)) & 0xFF) >> ((token >> 6) & 1)); - - // // Update the unencrypted reference before the byte gets encrypted - // reference = (reference << 8); - // reference += encryptedBytes[i]; - - // // Encrypt the data by applying the resepective key - // encryptedBytes[i] ^= key[((token >> 2) & 0x0F)]; - - // // Check if data has to be inverted - // if (token > 127) - // { - // encryptedBytes[i] = (Byte)~encryptedBytes[i]; - // } - // } - - // Console.WriteLine(BitConverter.ToString(encryptedBytes)); - // Console.WriteLine(); - - // return encryptedBytes; - //} - - //public static ushort CalculateCrc(byte[] data, ushort start, ushort length) - //{ - // byte zeichen, test; - // ushort crc_result; - // ushort ui_index; - // byte h; - - // crc_result = 0xFFFF; - // ui_index = start; - - // if (data.Length >= length + start) - // { - // while (ui_index < length + start) - // { - // zeichen = data[ui_index]; - // ui_index++; - - // for (h = 0; h < 8; h++) - // { - // test = 0; - - // if ((crc_result & 0x8000) != 0) - // { - // test = 0x80; - // } - - // crc_result <<= 1; - - // if (((zeichen & 0x80) ^ test) != 0) - // { - // crc_result ^= 0x1021; - // } - // zeichen <<= 1; - // } - // } - // } - - // return crc_result; - //} } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -//var connector = EregisterConnector.CreateNew("COM6", 1000); - -//connector.Add(1, 0319020415, 0319020415);//433 -//connector.AddHexCommand(1, "00 00"); - -//connector.Add(2, 0319020441, "4291317405", "4291317405", null, false); // 433 -//connector.InitInspection(); - -//connector.Add(3, 4291317405, 4291317405);//433 -//connector.AddHexCommand(3, "00 00"); - -// connector.RunCommands(); - - -//var connector = EregisterConnector.CreateNew("COM6", 1000); - -//connector.Add(1, 0319020415, 0319020415);//433 -//connector.AddHexCommand(1, "00 00"); -//connector.Add(2, 0319020441, 0319020441);//433 -//connector.AddHexCommand(2, "00 00"); -//connector.Add(3, 4291317405, 4291317405);//433 -//connector.AddHexCommand(3, "00 00"); - -//connector.InitInspection(); - -//var connection = new OmniConnection(); -//connection.UseUniPro("COM16"); - -//var system = connection.ViewSystemParameters(); - -//connection.Disconnect(); -// 0x08, 0x0E, 0x13, 0x03, 0xEE, 0xAC, 0x00, 0x00, 0x01, 0xF4, 0x00, 0x00, 0x92, 0x0A, 0x00, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x13, 0x13, 0x03, 0xEE, 0xAC, 0x07, 0x0E, 0x10, 0xA0, 0x57, 0x4E, 0xDA, 0xC0, 0x00, 0x00, 0x7F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x03, 0x05, 0xA0, 0x0C, 0x03, 0x01, 0x2E, 0x46, 0x7C, 0x76, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x25, 0x14, 0x3B -// 0x0B, 0x10, 0x13, 0x03, 0xEE, 0xAC, 0x00, 0x0A, 0x11, 0x0B, 0x11, 0x08, 0x04, 0x02, 0xC8, 0xF4, 0xFB, 0xA7, 0x18, 0x00, 0x65, 0x00, 0x35, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xEE, 0x34, 0x02, 0x01, 0x01, 0x16, 0x00, 0x25, 0x02, 0x71, 0x00, 0x00, 0x82, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x08, 0xC3 - - - - - - - - - - - - - -//TX|01-01-01-01 -//TX|9B-33-07-0D-0B-08-FD-03-00-00-E1-84-06-00-02-8B-00-54-25 -//TX|01-01-01-01 -//TX|9B-33-06-0D-0A-08-FD-67-00-E8-03-25-00-02-93-59-12 -//RX|9B-43-07-0D-0B-00-01-00-E8-03-25-00-00-00-01-29-00-33-5A -//TX|01-01-01-01 -//TX|9B-33-04-0D-06-08-FD-67-01-01-80-40-7F -//TX|01-01-01-01 -//TX|9B-33-06-0D-0A-08-FD-67-00-06-00-1E-00-01-A7-0C-65 -//TX|01-01-01-01 -//TX|9B-33-04-0D-06-08-FD-67-01-01-80-40-7F -//TX|01-01-01-01 -//TX|9B-33-06-0D-0A-08-FD-67-00-05-00-25-00-01-AD-CC-4A -//TX|01-01-01-01 -//TX|9B-33-04-0D-06-08-FD-67-01-01-80-40-7F - - - - - - - - - - - - - - - - - - - - +} \ No newline at end of file diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj index b17eb775..95c7162d 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj @@ -82,6 +82,10 @@ + + {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB} + LaaPackages.Features.Cordonel + {F90B940C-9A83-496D-AAE0-11CD02CE0A22} LaaPackages.SqlClient diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs index 09ed1db8..a4879c70 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs @@ -1,5 +1,6 @@ namespace LaaProduction.Data.Cordonel.Repositories { + using LaaPackages.Features.Cordonel; using LaaPackages.SqlClient; using LaaProduction.Data.Cordonel.Interfaces; using LaaProduction.Data.Cordonel.Models; @@ -204,8 +205,92 @@ } var pcbid = model.PcbId; + var pcbidString = $"{pcbid}"; + var cordonelInfoList = this.GetCordonelInfoList(pcbid); - var cordonelInfoList = this.sqlConnection + if (cordonelInfoList.Length != 1) + { + yield return new KeyValuePair(pcbidString, "More than 1 entry in the database is not allowed."); + } + + var cordonelInfo = cordonelInfoList[0]; + + if (cordonelInfo.Sealed == false) + { + yield return new KeyValuePair(pcbidString, $"Is not correctly sealed."); + } + else if (cordonelInfo.Pending == false) + { + yield return new KeyValuePair(pcbidString, $"Was allready finisched."); + } + + var requirement = this.dbContext.Requirements.FindByPcbId(pcbidString); + + if (requirement is null) + { + yield return new KeyValuePair(pcbidString, $"Requirements not found."); + } + else if (requirement.StandardId != model.StandardRequirementId + || requirement.StandardVersion != model.StandardRequirementVersion + || requirement.SpecialId != model.SpecialRequirementId + || requirement.SpecialVersion != model.SpecialRequirementVersion) + { + yield return new KeyValuePair(pcbidString, $"Requirements did not match the EOL progress."); + } + else if (requirement.IsStandardActive == false || !requirement.IsSpecialActive == false) + { + yield return new KeyValuePair(pcbidString, $"The bounded requirement is not active."); + } + else if (requirement.SkipCalibration == false && cordonelInfo.TestStatus != 30) + { + yield return new KeyValuePair(pcbidString, $"Is not correctly calibrated, status: {cordonelInfo.TestStatus}."); + } + + // TODO: SELECT FANr, Region, MeterSize, RadioId + var cordonelFeatures = new CordonelAppsDictionary(); + + this.sqlConnection + .CreateCommand($@" + SELECT x.Id + , x.Address + , x.Value + FROM (SELECT rh.ID AS Id + , rh.Address + , rh.Value + , ROW_NUMBER() OVER (PARTITION BY rh.Address ORDER BY rh.date DESC) AS Row + FROM GenesisMeterRegisterHistory AS rh + WHERE rh.PcbId = @{nameof(pcbidString)}) AS x + WHERE x.Row = 1 + ORDER BY x.Address") + .SetParameter(nameof(pcbidString), pcbidString) + .ExecuteReader(reader => + { + var addressBytes = reader.GetValue(1); + + if (addressBytes?.Length == 2) + { + var appId = addressBytes[0]; + var registerId = addressBytes[1]; + var register = cordonelFeatures[appId][registerId]; + + register.HistoryId = reader.GetValue(0); + register.Value = reader.GetValue(2); + } + }); + + this.sqlConnection + .CreateCommand($@" + UPDATE Cordonel_EOL_Progress + SET SAPExportDone = 'OK' + , SentinelCompleted = 'OK' + , SentinelCompletedDate = GETDATE() + WHERE PcbId = @{nameof(pcbid)}") + .SetParameter(nameof(pcbid), pcbid) + .ExecuteNonQuery(); + } + + private CordonelInfo[] GetCordonelInfoList(Int32 pcbid) + => this.sqlConnection .CreateCommand($@" SELECT DISTINCT unn.PoNo @@ -257,77 +342,7 @@ Pending = reader.GetValue(6), }) .ToArray(); - - var pcbidString = $"{pcbid}"; - - if (cordonelInfoList.Length != 1) - { - yield return new KeyValuePair(pcbidString, "More than 1 entry in the database is not allowed."); - } - - var cordonelInfo = cordonelInfoList[0]; - - if (cordonelInfo.TestStatus != 30) - { - yield return new KeyValuePair(pcbidString, $"Is not correctly calibrated, status: {cordonelInfo.TestStatus}."); - } - else if (cordonelInfo.Sealed == false) - { - yield return new KeyValuePair(pcbidString, $"Is not correctly sealed."); - } - else if (cordonelInfo.Pending == false) - { - yield return new KeyValuePair(pcbidString, $"Was allready finisched."); - } - - var requirement = this.dbContext.Requirements.FindByPcbId(pcbidString); - - if (requirement is null) - { - yield return new KeyValuePair(pcbidString, $"Requirements not found."); - } - else if (requirement.StandardId != model.StandardRequirementId - || requirement.StandardVersion != model.StandardRequirementVersion - || requirement.SpecialId != model.SpecialRequirementId - || requirement.SpecialVersion != model.SpecialRequirementVersion) - { - yield return new KeyValuePair(pcbidString, $"Requirements did not match the EOL progress."); - } - else if (requirement.IsStandardActive == false || !requirement.IsSpecialActive == false) - { - yield return new KeyValuePair(pcbidString, $"The bounded requirement is not active."); - } - - this.sqlConnection - .CreateCommand(@" - SELECT x.Address - , x.Value - FROM (SELECT rh.Address - , rh.Value - , ROW_NUMBER() OVER (PARTITION BY rh.Address ORDER BY rh.date DESC) AS Row - FROM GenesisMeterRegisterHistory AS rh - WHERE rh.PcbId = @pcbId) AS x - WHERE x.Row = 1 - ORDER BY x.Address") - .SetParameter(nameof(pcbid), $"{pcbid}") - .ExecuteReader(reader => - { - var addressBytes = reader.GetValue(0); - - return true; - }); - - this.sqlConnection - .CreateCommand($@" - UPDATE Cordonel_EOL_Progress - SET SAPExportDone = 'OK' - , SentinelCompleted = 'OK' - , SentinelCompletedDate = GETDATE() - WHERE PcbId = @{nameof(pcbid)}") - .SetParameter(nameof(pcbid), pcbid) - .ExecuteNonQuery(); - } - } +} public class CordonelInfo { diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index 12daf38d..fcce85cc 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit 12daf38ddfb376d0d00dec96f0e9921f1ae4c9e6 +Subproject commit fcce85ccd447d378c0282edafd6a6c85453a9761 diff --git a/LaaProductionWeb/LaaProduction.Console/Program.cs b/LaaProductionWeb/LaaProduction.Console/Program.cs index 72cc4d1d..ad327a66 100644 --- a/LaaProductionWeb/LaaProduction.Console/Program.cs +++ b/LaaProductionWeb/LaaProduction.Console/Program.cs @@ -1,23 +1,12 @@ namespace LaaProduction.Console { - using LaaProduction.Data.Cordonel.Models; - - using Newtonsoft.Json; - using System; - using System.Net.Http; - using System.Net.Http.Headers; - using System.Threading; public class Program { public static void Main(String[] args) { - var x = new UriBuilder - { - Path = "/sgsdfg/sfdgsdf", - Query = "name=sfsdf" - }.Uri; + } } } \ No newline at end of file diff --git a/LaaProductionWeb/LaaProductionWeb.sln b/LaaProductionWeb/LaaProductionWeb.sln index effb4c56..8ed51e7d 100644 --- a/LaaProductionWeb/LaaProductionWeb.sln +++ b/LaaProductionWeb/LaaProductionWeb.sln @@ -58,6 +58,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaPackages.SqlClient", "La EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaPackages.HttpClient", "LaaPackages\LaaPackages.HttpClient\LaaPackages.HttpClient.csproj", "{C9816412-7752-4F7A-8BD2-765DB6D58B3C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaPackages.Features.Cordonel", "LaaPackages\LaaPackages.Features.Cordonel\LaaPackages.Features.Cordonel.csproj", "{8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -124,6 +126,10 @@ Global {C9816412-7752-4F7A-8BD2-765DB6D58B3C}.Debug|Any CPU.Build.0 = Debug|Any CPU {C9816412-7752-4F7A-8BD2-765DB6D58B3C}.Release|Any CPU.ActiveCfg = Release|Any CPU {C9816412-7752-4F7A-8BD2-765DB6D58B3C}.Release|Any CPU.Build.0 = Release|Any CPU + {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -134,6 +140,7 @@ Global {25BACE1B-1961-411A-8AC0-1375A1898F8F} = {90A75AEB-70C5-42E5-A802-6B744280B8F8} {F90B940C-9A83-496D-AAE0-11CD02CE0A22} = {35CDD71E-6FF8-45F5-B6E1-DF73573B4C26} {C9816412-7752-4F7A-8BD2-765DB6D58B3C} = {35CDD71E-6FF8-45F5-B6E1-DF73573B4C26} + {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB} = {35CDD71E-6FF8-45F5-B6E1-DF73573B4C26} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9D3C9EBA-FB4B-4BF4-8158-4A9FE47D3E88} From 2fd4bd70b1e637ecffdb7bef73601815d7dd0c6c Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Tue, 24 Sep 2024 16:31:11 +0200 Subject: [PATCH 03/44] yield breaks --- .../Interfaces/IEOLProgressRepository[T].cs | 4 +++- .../Repositories/EOLProgressRepository.cs | 17 ++++++++++------ LaaProductionWeb/LaaPackages | 2 +- .../API/Cordonel/EOLProgressController.cs | 20 +++++++++++++------ .../LaaProductionWeb/LaaProductionWeb.csproj | 4 ++++ 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Interfaces/IEOLProgressRepository[T].cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Interfaces/IEOLProgressRepository[T].cs index 317ce670..0630cc24 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Interfaces/IEOLProgressRepository[T].cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Interfaces/IEOLProgressRepository[T].cs @@ -1,10 +1,12 @@ namespace LaaProduction.Data.Cordonel.Interfaces { + using LaaPackages.Features.Cordonel; + using System; using System.Collections.Generic; public interface IEOLProgressRepository : IRepositoryCreate, IRepositoryRead, IRepositoryUpdate, IRepositoryDelete { - IEnumerable> RunSentinel(T pcbId); + IEnumerable> RunSentinel(T model, CordonelAppsDictionary cordonelApps); } } diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs index a4879c70..6ca817a3 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs @@ -197,11 +197,12 @@ } // Test pcb: 233410052 - public IEnumerable> RunSentinel(EOLProgressModel model) + public IEnumerable> RunSentinel(EOLProgressModel model, CordonelAppsDictionary cordonelApps) { if (model is null) { yield return new KeyValuePair("EOLProgressModel", "Empty model is not allowed."); + yield break; } var pcbid = model.PcbId; @@ -211,6 +212,7 @@ if (cordonelInfoList.Length != 1) { yield return new KeyValuePair(pcbidString, "More than 1 entry in the database is not allowed."); + yield break; } var cordonelInfo = cordonelInfoList[0]; @@ -218,10 +220,12 @@ if (cordonelInfo.Sealed == false) { yield return new KeyValuePair(pcbidString, $"Is not correctly sealed."); + yield break; } else if (cordonelInfo.Pending == false) { yield return new KeyValuePair(pcbidString, $"Was allready finisched."); + yield break; } var requirement = this.dbContext.Requirements.FindByPcbId(pcbidString); @@ -229,6 +233,7 @@ if (requirement is null) { yield return new KeyValuePair(pcbidString, $"Requirements not found."); + yield break; } else if (requirement.StandardId != model.StandardRequirementId || requirement.StandardVersion != model.StandardRequirementVersion @@ -236,20 +241,20 @@ || requirement.SpecialVersion != model.SpecialRequirementVersion) { yield return new KeyValuePair(pcbidString, $"Requirements did not match the EOL progress."); + yield break; } else if (requirement.IsStandardActive == false || !requirement.IsSpecialActive == false) { yield return new KeyValuePair(pcbidString, $"The bounded requirement is not active."); + yield break; } else if (requirement.SkipCalibration == false && cordonelInfo.TestStatus != 30) { yield return new KeyValuePair(pcbidString, $"Is not correctly calibrated, status: {cordonelInfo.TestStatus}."); + yield break; } - // TODO: SELECT FANr, Region, MeterSize, RadioId - var cordonelFeatures = new CordonelAppsDictionary(); - - this.sqlConnection + this.sqlConnection .CreateCommand($@" SELECT x.Id , x.Address @@ -271,7 +276,7 @@ { var appId = addressBytes[0]; var registerId = addressBytes[1]; - var register = cordonelFeatures[appId][registerId]; + var register = cordonelApps[appId][registerId]; register.HistoryId = reader.GetValue(0); register.Value = reader.GetValue(2); diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index fcce85cc..ae92ac8c 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit fcce85ccd447d378c0282edafd6a6c85453a9761 +Subproject commit ae92ac8c09229e4f8b3a62892c45c2d4a48067f5 diff --git a/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs b/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs index 2c6b34a3..2ed8b476 100644 --- a/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs +++ b/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs @@ -1,5 +1,7 @@ namespace LaaProductionWeb.API.Cordonel { + using LaaPackages.Features.Cordonel; + using LaaPackages.HttpClient; using LaaProduction.Data.Cordonel; using LaaProduction.Data.Cordonel.Models; using LaaProductionWeb.App_Infrastructure; @@ -40,21 +42,27 @@ [Route("Check/{pcbId}")] public IHttpActionResult Check(Int32 pcbId) { - var actualEOLProgressModel = this.dbcontext.EOLProgress.Read(new EOLProgressModel + var eol = this.dbcontext.EOLProgress.Read(new EOLProgressModel { PcbId = pcbId }); - if (actualEOLProgressModel != null) + if (eol != null) { - this.Validate(actualEOLProgressModel); + this.Validate(eol); if (!this.ModelState.IsValid) { return this.BadRequest(); } - - var errors = this.dbcontext.EOLProgress.RunSentinel(actualEOLProgressModel); + + var apps = WebApiApplication + .GetService() + .Get(request => + { + request.SetPath("/MeterProcessState/api/ConfigurationJson"); + }).Value ?? new CordonelAppsDictionary(); + var errors = this.dbcontext.EOLProgress.RunSentinel(eol, apps); if (errors?.Count() > 0) { @@ -71,7 +79,7 @@ return this.BadRequest($"EOL progress record for pcbid '{pcbId}' dose not exists."); } - return this.Json(actualEOLProgressModel); + return this.Json(eol); } [HttpPost] diff --git a/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj b/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj index 1f8a099c..54bd67cc 100644 --- a/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj +++ b/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj @@ -364,6 +364,10 @@ {CB91E680-2715-4E94-988A-401C0F4A0707} LaaProduction.Data.Omni + + {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB} + LaaPackages.Features.Cordonel + {C9816412-7752-4F7A-8BD2-765DB6D58B3C} LaaPackages.HttpClient From 9869082f2cfc5bde7a1a23527c61915f07d0f1c7 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 08:22:33 +0200 Subject: [PATCH 04/44] just submodules commit --- LaaProductionWeb/LaaPackages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index ae92ac8c..2ebda8bb 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit ae92ac8c09229e4f8b3a62892c45c2d4a48067f5 +Subproject commit 2ebda8bbc7828a435b1b9669effb9c05fbbbb443 From 59bccb355b19cde11f91a330f5c01785cd61b94e Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 08:24:05 +0200 Subject: [PATCH 05/44] missing nugets installed --- LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj | 6 ++++++ LaaProductionWeb/LaaProductionWeb/packages.config | 2 ++ 2 files changed, 8 insertions(+) diff --git a/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj b/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj index 54bd67cc..b4c01bbb 100644 --- a/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj +++ b/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj @@ -99,9 +99,15 @@ ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll + ..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll diff --git a/LaaProductionWeb/LaaProductionWeb/packages.config b/LaaProductionWeb/LaaProductionWeb/packages.config index bd364b16..36dac0e7 100644 --- a/LaaProductionWeb/LaaProductionWeb/packages.config +++ b/LaaProductionWeb/LaaProductionWeb/packages.config @@ -14,11 +14,13 @@ + + From d81f0e34e15c95c6c95f563b25d2be45c2a476fa Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 08:36:18 +0200 Subject: [PATCH 06/44] http headers from laapackages changed --- LaaProductionWeb/LaaPackages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index 2ebda8bb..0508fcf3 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit 2ebda8bbc7828a435b1b9669effb9c05fbbbb443 +Subproject commit 0508fcf3df61d529f18cd3991ee255b9ee62ae96 From 262b8b6c0712b66c0d5b1fdd4bdb48a0d0664cc8 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 08:50:58 +0200 Subject: [PATCH 07/44] internal removed --- .../LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs index f7437b84..899fa468 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs @@ -20,7 +20,7 @@ public Int32? PcbId { get; set; } - public Boolean? SkipCalibration { get; internal set; } + public Boolean? SkipCalibration { get; set; } public Boolean? SkipRadioCheck { get; set; } From d8a16eb95a70baee0f8666838d1189dc0b61add3 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 08:58:58 +0200 Subject: [PATCH 08/44] just test --- .../LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs index 899fa468..ca92fa55 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs @@ -20,6 +20,7 @@ public Int32? PcbId { get; set; } + // Changed from S.Z. public Boolean? SkipCalibration { get; set; } public Boolean? SkipRadioCheck { get; set; } From e4938567ee3dca08319387058434cf42303c5ec6 Mon Sep 17 00:00:00 2001 From: Thomas Wiedebusch Date: Wed, 25 Sep 2024 09:19:43 +0200 Subject: [PATCH 09/44] Added Common\Logic\ProductionOrderCore\TestResults\CalibrationResults --- Common/Logic/ProductionOrderCore/ProductionOrderCore.csproj | 1 + LaaProductionWeb/LaaPackages | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/Logic/ProductionOrderCore/ProductionOrderCore.csproj b/Common/Logic/ProductionOrderCore/ProductionOrderCore.csproj index a37953e0..87b4a0ca 100644 --- a/Common/Logic/ProductionOrderCore/ProductionOrderCore.csproj +++ b/Common/Logic/ProductionOrderCore/ProductionOrderCore.csproj @@ -123,6 +123,7 @@ + diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index 0508fcf3..12daf38d 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit 0508fcf3df61d529f18cd3991ee255b9ee62ae96 +Subproject commit 12daf38ddfb376d0d00dec96f0e9921f1ae4c9e6 From 0ed7d457cb0f04227644e7fd471be09767ea0f0f Mon Sep 17 00:00:00 2001 From: Thomas Wiedebusch Date: Wed, 25 Sep 2024 09:24:43 +0200 Subject: [PATCH 10/44] CalibrationResults file added --- .../TestResults/CalibrationResults.cs | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs diff --git a/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs b/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs new file mode 100644 index 00000000..dc65919d --- /dev/null +++ b/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; + +namespace Xylem.Common.Logic.ProductionOrderCore.TestResults +{ + /// + /// Container for calibration results + /// + public class CalibrationResults + { + /// + /// List of all calibration values needed to be read and compared + /// + public static readonly List CalibrationRegisterNames = new List + { + "GENESISFLOW_CalFactor1", + "GENESISFLOW_CalFactor2", + "GENESISFLOW_CalFactor3", + "GENESISFLOW_ZeroOffset1", + "GENESISFLOW_ZeroOffset2", + "GENESISFLOW_ZeroOffset3", + "GENESISFLOW_FirstHitUpdatePeriod", + "GENESISFLOW_FirstHitShift", + "GENESISFLOW_FirstHitPercent1", + "GENESISFLOW_FirstHitPercent2", + "GENESISFLOW_FirstHitPercent3", + "GENESISFLOW_ToFTempOffset1", + "GENESISFLOW_ToFTempOffset2", + "GENESISFLOW_ToFTempOffset3", + "GENESISFLOW_MeterSize" + }; + + /// + /// ID of DB table + /// + public Int32 Id { get; set; } + + /// + /// Unique identifier for PCB + /// + public String PcbId { get; set;} + + /// + /// Calibration value channel 1 + /// + public Int32 CalFactor1 { get; set;} + + /// + /// Calibration value channel 2 + /// + public Int32 CalFactor2 { get; set;} + + /// + /// Calibration value channel 3 + /// + public Int32 CalFactor3 { get; set;} + + /// + /// Zero offset channel 1 + /// + public Int32 ZeroOffset1{ get; set;} + + /// + /// Zero offset channel 2 + /// + public Int32 ZeroOffset2{ get; set;} + + /// + /// Zero offset channel 3 + /// + public Int32 ZeroOffset3{ get; set;} + + /// + /// First hit update period + /// + public Int32 FirstHitUpdatePer{ get; set;} + + /// + /// First hit shift + /// + public Int32 FirstHitShift { get; set;} + + /// + /// First hit percent channel 1 + /// + public Int32 FirstHitPercent1 { get; set;} + + /// + /// First hit percent channel 2 + /// + public Int32 FirstHitPercent2 { get; set;} + + /// + /// First hit percent channel 3 + /// + public Int32 FirstHitPercent3 { get; set;} + + /// + /// Time of flight temperature offset channel 1 + /// + public Int32 ToFTempOffset1 { get; set;} + + /// + /// Time of flight temperature offset channel 2 + /// + public Int32 ToFTempOffset2 { get; set;} + + /// + /// Time of flight temperature offset channel 3 + /// + public Int32 ToFTempOffset3 { get; set;} + + /// + /// Meter size + /// + public Int32 MeterSize { get; set;} + + /// + /// Test date time + /// + public DateTime Date { get; set;} + + /// + /// Test labeled as succeeded + /// + public Boolean Succeeded { get; set;} + } +} From 190c42676f5441e28b35a8ff0161fcc0b862b321 Mon Sep 17 00:00:00 2001 From: Thomas Wiedebusch Date: Wed, 25 Sep 2024 09:58:21 +0200 Subject: [PATCH 11/44] LaaProductionWeb: - special requirements comments extended for skip calibration --- .../LaaProductionWeb.Resources/UITranslations.de.resx | 4 ++-- .../LaaProductionWeb.Resources/UITranslations.en.resx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.de.resx b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.de.resx index 4c68b380..7f746e42 100644 --- a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.de.resx +++ b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.de.resx @@ -337,9 +337,9 @@ Standardfreigabe ändern - Metrologische Prüfung kann übersprungen werden + ACHTUNG: Der Zähler ist nach dieser Auswahl NICHT kalibriert - Metrologische Prüfung überspringen + Metrologische Prüfung überspringen (Zero Flow/ Kalibrierung) \ No newline at end of file diff --git a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.en.resx b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.en.resx index 6dc2fd74..2d61b2c0 100644 --- a/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.en.resx +++ b/LaaProductionWeb/LaaProductionWeb.Resources/UITranslations.en.resx @@ -337,9 +337,9 @@ Change Standard Requirement - Calibration test can be skipped + ATTENTION: The meter is uncalibrated on selection of the requirement - Skip calibration + Skip metrology test (Zero Flow/ Calibration) \ No newline at end of file From aa80b10f1f48fd88788835a04a8e8435d5a0cf82 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 11:41:45 +0200 Subject: [PATCH 12/44] just commit --- LaaProductionWeb/LaaPackages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index 12daf38d..0508fcf3 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit 12daf38ddfb376d0d00dec96f0e9921f1ae4c9e6 +Subproject commit 0508fcf3df61d529f18cd3991ee255b9ee62ae96 From 9a0bcdb3fe065793935475749e9e178845970454 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 11:43:48 +0200 Subject: [PATCH 13/44] jconfig parsed --- Common/CommonConsole/CommonConsole.csproj | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Common/CommonConsole/CommonConsole.csproj b/Common/CommonConsole/CommonConsole.csproj index df9712c2..d9a0822e 100644 --- a/Common/CommonConsole/CommonConsole.csproj +++ b/Common/CommonConsole/CommonConsole.csproj @@ -51,19 +51,19 @@ - - - - - + + + + + - - - - - - + + + + + + From ebae1847a4b1255e9d13fef6474173e3628375bb Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 11:48:02 +0200 Subject: [PATCH 14/44] comment deleted --- .../LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs index ca92fa55..87be367b 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs @@ -19,8 +19,7 @@ public Int32 ProductionOrderNr { get; set; } public Int32? PcbId { get; set; } - - // Changed from S.Z. + public Boolean? SkipCalibration { get; set; } public Boolean? SkipRadioCheck { get; set; } From f47c57cbdecd43aa343246b3c48c44cfaab4520f Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 14:17:30 +0200 Subject: [PATCH 15/44] jconfig - by default loaded from the databse as fallback from current directory, calibration results class added --- .../TestResults/CalibrationResults.cs | 38 +- .../ConfigurationJsonController.cs | 56 +- .../Controllers/FinalCheckController.cs | 5 +- .../MeterProcessState.csproj | 2 +- .../MeterProcessState/configuration.json | 33462 ++++++++-------- LaaProductionWeb/LaaPackages | 2 +- .../LaaProduction.Console.csproj | 30 +- .../LaaProduction.Console/Program.cs | 44 + .../LaaProduction.Console/app.config | 16 +- .../LaaProduction.Console/packages.config | 3 + 10 files changed, 16908 insertions(+), 16750 deletions(-) diff --git a/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs b/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs index dc65919d..229739eb 100644 --- a/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs +++ b/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs @@ -38,91 +38,91 @@ namespace Xylem.Common.Logic.ProductionOrderCore.TestResults /// /// Unique identifier for PCB /// - public String PcbId { get; set;} + public String PcbId { get; set; } /// /// Calibration value channel 1 /// - public Int32 CalFactor1 { get; set;} + public Int32 CalFactor1 { get; set; } /// /// Calibration value channel 2 /// - public Int32 CalFactor2 { get; set;} + public Int32 CalFactor2 { get; set; } /// /// Calibration value channel 3 /// - public Int32 CalFactor3 { get; set;} + public Int32 CalFactor3 { get; set; } /// /// Zero offset channel 1 /// - public Int32 ZeroOffset1{ get; set;} + public Int32 ZeroOffset1 { get; set; } /// /// Zero offset channel 2 /// - public Int32 ZeroOffset2{ get; set;} + public Int32 ZeroOffset2 { get; set; } /// /// Zero offset channel 3 /// - public Int32 ZeroOffset3{ get; set;} + public Int32 ZeroOffset3 { get; set; } /// /// First hit update period /// - public Int32 FirstHitUpdatePer{ get; set;} + public Int32 FirstHitUpdatePer { get; set; } /// /// First hit shift /// - public Int32 FirstHitShift { get; set;} + public Int32 FirstHitShift { get; set; } /// /// First hit percent channel 1 /// - public Int32 FirstHitPercent1 { get; set;} + public Int32 FirstHitPercent1 { get; set; } /// /// First hit percent channel 2 /// - public Int32 FirstHitPercent2 { get; set;} + public Int32 FirstHitPercent2 { get; set; } /// /// First hit percent channel 3 /// - public Int32 FirstHitPercent3 { get; set;} + public Int32 FirstHitPercent3 { get; set; } /// /// Time of flight temperature offset channel 1 /// - public Int32 ToFTempOffset1 { get; set;} + public Int32 ToFTempOffset1 { get; set; } /// /// Time of flight temperature offset channel 2 /// - public Int32 ToFTempOffset2 { get; set;} - + public Int32 ToFTempOffset2 { get; set; } + /// /// Time of flight temperature offset channel 3 /// - public Int32 ToFTempOffset3 { get; set;} + public Int32 ToFTempOffset3 { get; set; } /// /// Meter size /// - public Int32 MeterSize { get; set;} + public Int32 MeterSize { get; set; } /// /// Test date time /// - public DateTime Date { get; set;} + public DateTime Date { get; set; } /// /// Test labeled as succeeded /// - public Boolean Succeeded { get; set;} + public Boolean Succeeded { get; set; } } } diff --git a/Common/Service/MeterProcessState/Controllers/ConfigurationJsonController.cs b/Common/Service/MeterProcessState/Controllers/ConfigurationJsonController.cs index 851b7c41..aa1f55e1 100644 --- a/Common/Service/MeterProcessState/Controllers/ConfigurationJsonController.cs +++ b/Common/Service/MeterProcessState/Controllers/ConfigurationJsonController.cs @@ -1,33 +1,67 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers { + using global::Common.Logic.Extensions.SQL; + using Newtonsoft.Json; + using System; + using System.Configuration; using System.IO; using System.Text; using System.Web; using System.Web.Http; - [RoutePrefix("api/configurationjson")] + [RoutePrefix("configurationjson")] public class ConfigurationJsonController : ApiController { [HttpGet] [Route] public IHttpActionResult Get() { + var message = String.Empty; + var configurationText = String.Empty; + try { - var currentDirectory = HttpContext.Current.Request.MapPath(".."); - var files = Directory.GetFiles(currentDirectory); - var configurationJsonFilePath = Path.Combine(currentDirectory, "configuration.json"); - var configurationJsonContent = File.ReadAllText(configurationJsonFilePath); - var configurationJson = JsonConvert.DeserializeObject(configurationJsonContent); - var serializerSettings = new JsonSerializerSettings(); - - return this.Json(configurationJson, serializerSettings, Encoding.UTF8); + var connectionString = ConfigurationManager.ConnectionStrings["Default"].ConnectionString; + var configurationBytes = SQLConnection + .CreateSQLConnection(connectionString) + .CreateCommand(@" + SELECT TOP 1 f.FileContent + FROM FileClusterStore AS fcs + JOIN FileMapToCluster AS fmc + ON fcs.FileId = fmc.FileMapToCluster_FileClusterId + JOIN [File] AS f + ON fmc.FileMapToCluster_FileId = f.FileId + WHERE FileCategoryID = 2 + ORDER BY f.FileId DESC") + .FirstOrDefault(x => x.GetValue(0)); + configurationText = Encoding.ASCII.GetString(configurationBytes); } - catch + catch (Exception dbe) { - return this.BadRequest("Unable to find or load ...\\configuration.json"); + message = dbe.Message; + + try + { + var configurationPath = HttpContext.Current.Request.MapPath("configuration.json"); + configurationText = File.ReadAllText(configurationPath); + } + catch (Exception fe) + { + message = fe.Message; + } + } + + try + { + var configurationJson = JsonConvert.DeserializeObject(configurationText); + + return this.Json(configurationJson, new JsonSerializerSettings(), Encoding.UTF8); + } + catch (Exception e) + { + return this.BadRequest($"{e.Message}{Environment.NewLine}{message}"); } } } diff --git a/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs b/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs index 5539a4fb..19c83887 100644 --- a/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs +++ b/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs @@ -14,6 +14,7 @@ using System.Web.Http; using Xylem.Common.Logic.ProductionOrderCore; using Xylem.Common.Logic.ProductionOrderCore.KitronTestResults; using Xylem.Common.Logic.ProductionOrderCore.OrderData; +using Xylem.Common.Logic.ProductionOrderCore.TestResults; using Xylem.Common.Logic.ProductionOrderCore.Vako; using Xylem.Common.Logic.ServiceCore; @@ -1306,7 +1307,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers AND PcbId = @{nameof(pcbId)} ORDER BY date DESC") .SetParameter(nameof(pcbId), pcbId) - .FirstOrDefault(x => new + .FirstOrDefault(x => new CalibrationResults { Id = x.GetValue(0), PcbId = x.GetValue(1), @@ -1316,7 +1317,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers ZeroOffset1 = x.GetValue(5), ZeroOffset2 = x.GetValue(6), ZeroOffset3 = x.GetValue(7), - FirstHitUpdatePeriod = x.GetValue(8), + FirstHitUpdatePer = x.GetValue(8), FirstHitShift = x.GetValue(9), FirstHitPercent1 = x.GetValue(10), FirstHitPercent2 = x.GetValue(11), diff --git a/Common/Service/MeterProcessState/MeterProcessState.csproj b/Common/Service/MeterProcessState/MeterProcessState.csproj index 3ad6ae65..6adf772a 100644 --- a/Common/Service/MeterProcessState/MeterProcessState.csproj +++ b/Common/Service/MeterProcessState/MeterProcessState.csproj @@ -37,7 +37,7 @@ 4 7 bin\Xylem.Common.Service.MeterProcessState.xml - 0049;1591 + IDE0003;IDE0049;CS1591; OnlyFilesToRunTheApp diff --git a/Common/Service/MeterProcessState/configuration.json b/Common/Service/MeterProcessState/configuration.json index b60629a3..4d13c5c1 100644 --- a/Common/Service/MeterProcessState/configuration.json +++ b/Common/Service/MeterProcessState/configuration.json @@ -1,16769 +1,16819 @@ { - "CUSTOMER": { - "id": 9, - "version": { - "first": 1, - "last": 156 - }, - "registers": { - "AlarmStatus0": { - "id": 0, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "8 bit counts corresponding to alarms 0-3.", - "version": { - "first": 1, - "last": 156 - }, - "statictype": "dynamic" - } - ] - }, - "AlarmStatus1": { - "id": 1, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "8 bit counts corresponding to alarms 4-7.", - "version": { - "first": 1, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "TriggerAlarmCancel": { - "id": 2, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Any set bits manually clear the corresponding alarm.", - "version": { - "first": 1, - "last": 110 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Any set bits manually clear the corresponding alarm.", - "version": { - "first": 111, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "AlarmStatus2": { - "id": 3, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "8 bit counts corresponding to alarms 8-11.", - "version": { - "first": 26, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "AlarmStatus3": { - "id": 4, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "8 bit counts corresponding to alarms 12-15.", - "version": { - "first": 26, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "AlarmStatus4": { - "id": 5, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "8 bit counts corresponding to alarms 16-19.", - "version": { - "first": 26, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "AlarmStatus5": { - "id": 6, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "8 bit counts corresponding to alarms 20-23.", - "version": { - "first": 26, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "AlarmStatus6": { - "id": 7, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "8 bit counts corresponding to alarms 24-27.", - "version": { - "first": 26, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "AlarmStatus7": { - "id": 8, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "8 bit counts corresponding to alarms 28-31.", - "version": { - "first": 26, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "AlarmEnableMask": { - "id": 9, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bit set of those alarms which are being monitored.", - "version": { - "first": 26, - "last": 110 - }, - "values": { - "default": 4294967295, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bit set of those alarms which are being monitored.", - "version": { - "first": 111, - "last": 157 - }, - "values": { - "default": 4294967295, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "AlarmBroadcastMask": { - "id": 10, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bit set of those alarms which will generate events.", - "version": { - "first": 26, - "last": 110 - }, - "values": { - "default": 4294967295, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bit set of those alarms which will generate events.", - "version": { - "first": 111, - "last": 157 - }, - "values": { - "default": 4294967295, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "AlarmVisualMask": { - "id": 11, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bit set of those alarms which are displayed with IDs and the alarm icon.", - "version": { - "first": 110, - "last": 110 - }, - "values": { - "default": 4294967295, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bit set of those alarms which are displayed with IDs and the alarm icon.", - "version": { - "first": 111, - "last": 157 - }, - "values": { - "default": 4294967295, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "AlarmVisualAutoClearMask": { - "id": 12, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Alarms that have their display automatically cleared", - "version": { - "first": 110, - "last": 110 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Alarms that have their display automatically cleared", - "version": { - "first": 111, - "last": 157 - }, - "statictype": "static" - } - ] - }, - "ExcessFlowVolumeThreshold": { - "id": 13, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Flow rate above which broken pipe alarm is set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", - "version": { - "first": 61, - "last": 110 - }, - "values": { - "default": 639590, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "approximate" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Flow rate above which broken pipe alarm is set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", - "version": { - "first": 111, - "last": 118 - }, - "values": { - "default": 639590, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "approximate" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Flow rate above which broken pipe alarm is set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", - "version": { - "first": 119, - "last": 132 - }, - "values": { - "default": 639590, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "approximate" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Flow rate above which broken pipe alarm is set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", - "version": { - "first": 133, - "last": 157 - }, - "values": { - "default": 639999, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "approximate" - } - ] - }, - "LeakTimeThreshold": { - "id": 14, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for leak alarm in minutes", - "version": { - "first": 61, - "last": 110 - }, - "values": { - "default": 10080, - "minimum": 0, - "maximum": 69632 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for leak alarm in minutes", - "version": { - "first": 111, - "last": 118 - }, - "values": { - "default": 10080, - "minimum": 0, - "maximum": 69632 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for leak alarm in minutes", - "version": { - "first": 119, - "last": 157 - }, - "values": { - "default": 360, - "minimum": 0, - "maximum": 69632 - }, - "statictype": "static" - } - ] - }, - "ReverseFlowTimeThreshold": { - "id": 15, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Number of measurements in reverse flow required to set reverse flow alarm", - "version": { - "first": 61, - "last": 110 - }, - "values": { - "default": 15, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Number of measurements in reverse flow required to set reverse flow alarm", - "version": { - "first": 111, - "last": 142 - }, - "values": { - "default": 15, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Number of measurements in reverse flow required to set reverse flow alarm", - "version": { - "first": 143, - "last": 157 - }, - "values": { - "default": 15, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - } - ] - }, - "Locale": { - "id": 18, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Timezone in which this application is set to run.", - "version": { - "first": 24, - "last": 157 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "AppArrangement": { - "id": 19, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "A name for the arrangement of applications on the meter", - "version": { - "first": 130, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "RebootCount": { - "id": 20, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of times the meter has rebooted", - "version": { - "first": 73, - "last": 110 - }, - "values": { - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of times the meter has rebooted", - "version": { - "first": 111, - "last": 157 - }, - "values": { - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "ExcessFlowTimeThreshold": { - "id": 21, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for broken pipe alarm in minutes", - "version": { - "first": 80, - "last": 110 - }, - "values": { - "default": 15, - "minimum": 0, - "maximum": 69632 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for broken pipe alarm in minutes", - "version": { - "first": 111, - "last": 118 - }, - "values": { - "default": 15, - "minimum": 0, - "maximum": 69632 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for broken pipe alarm in minutes", - "version": { - "first": 119, - "last": 157 - }, - "values": { - "default": 180, - "minimum": 0, - "maximum": 69632 - }, - "statictype": "static" - } - ] - }, - "LeakFlowThreshold": { - "id": 22, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Flow rate above which leak alarm can be set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", - "version": { - "first": 80, - "last": 110 - }, - "values": { - "default": 12800, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "approximate" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Flow rate above which leak alarm can be set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", - "version": { - "first": 111, - "last": 118 - }, - "values": { - "default": 12800, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "approximate" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Flow rate above which leak alarm can be set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", - "version": { - "first": 119, - "last": 132 - }, - "values": { - "default": 5529, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "approximate" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Flow rate above which leak alarm can be set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", - "version": { - "first": 133, - "last": 157 - }, - "values": { - "default": 6399, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "approximate" - } - ] - }, - "MfgCharge": { - "id": 23, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Charge in uAs available in manufacturing (read only)", - "version": { - "first": 84, - "last": 157 - }, - "values": { - "default": 181440000 - }, - "statictype": "static" - } - ] - }, - "TemperatureHighThreshold": { - "id": 24, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "High temperature alarm threshold in 0.1°C", - "version": { - "first": 88, - "last": 100 - }, - "values": { - "default": 500, - "minimum": 0, - "maximum": 800 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "High temperature alarm threshold in 0.1°C", - "version": { - "first": 101, - "last": 110 - }, - "values": { - "default": 500, - "minimum": 0, - "maximum": 800 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "High temperature alarm threshold in 0.1°C", - "version": { - "first": 111, - "last": 157 - }, - "values": { - "default": 500, - "minimum": 0, - "maximum": 800 - }, - "statictype": "static" - } - ] - }, - "TemperatureHighDelay": { - "id": 25, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for high temperature alarm in seconds", - "version": { - "first": 88, - "last": 110 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for high temperature alarm in seconds", - "version": { - "first": 111, - "last": 157 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - } - ] - }, - "TemperatureLowThreshold": { - "id": 26, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Low temperature alarm threshold in 0.1°C", - "version": { - "first": 88, - "last": 100 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Low temperature alarm threshold in 0.1°C", - "version": { - "first": 101, - "last": 110 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Low temperature alarm threshold in 0.1°C", - "version": { - "first": 111, - "last": 157 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "TemperatureLowDelay": { - "id": 27, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for low temperature alarm in seconds", - "version": { - "first": 88, - "last": 110 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for low temperature alarm in seconds", - "version": { - "first": 111, - "last": 157 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - } - ] - }, - "PressureHighThreshold": { - "id": 28, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "High pressure alarm threshold in Pa", - "version": { - "first": 88, - "last": 110 - }, - "values": { - "default": 1600000, - "minimum": 0, - "maximum": 2550000 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "High pressure alarm threshold in Pa", - "version": { - "first": 111, - "last": 121 - }, - "values": { - "default": 1600000, - "minimum": 0, - "maximum": 2550000 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "High pressure alarm threshold in Pa", - "version": { - "first": 122, - "last": 157 - }, - "values": { - "default": 1600000, - "minimum": 0, - "maximum": 2550000 - }, - "statictype": "static" - } - ] - }, - "PressureHighDelay": { - "id": 29, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for high pressure alarm in seconds", - "version": { - "first": 88, - "last": 110 - }, - "values": { - "default": 300, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for high pressure alarm in seconds", - "version": { - "first": 111, - "last": 118 - }, - "values": { - "default": 300, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for high pressure alarm in seconds", - "version": { - "first": 119, - "last": 157 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - } - ] - }, - "PressureLowThreshold": { - "id": 30, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Low pressure alarm threshold in Pa", - "version": { - "first": 88, - "last": 110 - }, - "values": { - "default": 30000, - "minimum": 0, - "maximum": 2550000 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Low pressure alarm threshold in Pa", - "version": { - "first": 111, - "last": 121 - }, - "values": { - "default": 30000, - "minimum": 0, - "maximum": 2550000 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Low pressure alarm threshold in Pa", - "version": { - "first": 122, - "last": 157 - }, - "values": { - "default": 30000, - "minimum": 0, - "maximum": 2550000 - }, - "statictype": "static" - } - ] - }, - "PressureLowDelay": { - "id": 31, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for low pressure alarm in seconds", - "version": { - "first": 88, - "last": 110 - }, - "values": { - "default": 300, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for low pressure alarm in seconds", - "version": { - "first": 111, - "last": 118 - }, - "values": { - "default": 300, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time threshold for low pressure alarm in seconds", - "version": { - "first": 119, - "last": 157 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 10800 - }, - "statictype": "static" - } - ] - }, - "StoreConfiguration": { - "id": 32, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Store all configuration items in non-volatile memory.", - "version": { - "first": 88, - "last": 130 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Store all configuration items in non-volatile memory.", - "version": { - "first": 131, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "SerialNumber": { - "id": 33, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Customer serial number string", - "version": { - "first": 139, - "last": 157 - }, - "statictype": "static" - } - ] - }, - "BackupCalendarSeconds": { - "id": 34, - "details": [ - { - "type": "time_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "NA", - "lvl8": "NA" - }, - "description": "Internal backup of calendar seconds", - "version": { - "first": 145, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "InstallationTime": { - "id": 35, - "details": [ - { - "type": "time_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time meter was determined to have been installed. 0 means not installed", - "version": { - "first": 147, - "last": 157 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "LocaleDecimalPoint": { - "id": 36, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Read to view the string used as a decimal point for this locale", - "version": { - "first": 151, - "last": 157 - }, - "statictype": "dynamic" - } - ] - }, - "LocaleThousandsSeparator": { - "id": 37, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Read to view the string used as a thousands separarator for this locale", - "version": { - "first": 151, - "last": 157 - }, - "statictype": "dynamic" - } - ] - } - }, - "status": { - "REBOOT": { - "id": 0 - }, - "REBOOT_STOP": { - "id": 1 - }, - "LOW_BATTERY": { - "id": 2 - }, - "LOW_BATTERY_STOP": { - "id": 3 - }, - "VERY_LOW_BATTERY": { - "id": 4 - }, - "VERY_LOW_BATTERY_STOP": { - "id": 5 - }, - "CONFIG_ERROR": { - "id": 6 - }, - "CONFIG_ERROR_STOP": { - "id": 7 - }, - "EMPTY_PIPE": { - "id": 8 - }, - "EMPTY_PIPE_STOP": { - "id": 9 - }, - "MAGNETIC_TAMPER": { - "id": 10 - }, - "MAGNETIC_TAMPER_STOP": { - "id": 11 - }, - "REVERSE_FLOW": { - "id": 12 - }, - "REVERSE_FLOW_STOP": { - "id": 13 - }, - "SUSPECT_LEAK": { - "id": 14 - }, - "SUSPECT_LEAK_STOP": { - "id": 15 - }, - "BROKEN_PIPE": { - "id": 16 - }, - "BROKEN_PIPE_STOP": { - "id": 17 - }, - "LOW_PRESSURE": { - "id": 18 - }, - "LOW_PRESSURE_STOP": { - "id": 19 - }, - "HIGH_PRESSURE": { - "id": 20 - }, - "HIGH_PRESSURE_STOP": { - "id": 21 - }, - "LOW_TEMPERATURE": { - "id": 22 - }, - "LOW_TEMPERATURE_STOP": { - "id": 23 - }, - "HIGH_TEMPERATURE": { - "id": 24 - }, - "HIGH_TEMPERATURE_STOP": { - "id": 25 - }, - "RADIO_ERROR": { - "id": 26 - }, - "RADIO_ERROR_STOP": { - "id": 27 - }, - "METROLOGY_PARAMS": { - "id": 28 - }, - "METROLOGY_PARAMS_STOP": { - "id": 29 - }, - "METROLOGY_MEASURE": { - "id": 30 - }, - "METROLOGY_MEASURE_STOP": { - "id": 31 - }, - "UNALLOCATED_6": { - "id": 32 - }, - "UNALLOCATED_6_STOP": { - "id": 33 - }, - "UNALLOCATED_7": { - "id": 34 - }, - "UNALLOCATED_7_STOP": { - "id": 35 - }, - "UNALLOCATED_8": { - "id": 36 - }, - "UNALLOCATED_8_STOP": { - "id": 37 - }, - "UNALLOCATED_9": { - "id": 38 - }, - "UNALLOCATED_9_STOP": { - "id": 39 - }, - "UNALLOCATED_10": { - "id": 40 - }, - "UNALLOCATED_10_STOP": { - "id": 41 - }, - "UNALLOCATED_11": { - "id": 42 - }, - "UNALLOCATED_11_STOP": { - "id": 43 - }, - "UNALLOCATED_12": { - "id": 44 - }, - "UNALLOCATED_12_STOP": { - "id": 45 - }, - "UNALLOCATED_13": { - "id": 46 - }, - "UNALLOCATED_13_STOP": { - "id": 47 - }, - "UNALLOCATED_14": { - "id": 48 - }, - "UNALLOCATED_14_STOP": { - "id": 49 - }, - "UNALLOCATED_15": { - "id": 50 - }, - "UNALLOCATED_15_STOP": { - "id": 51 - }, - "UNALLOCATED_16": { - "id": 52 - }, - "UNALLOCATED_16_STOP": { - "id": 53 - }, - "UNALLOCATED_17": { - "id": 54 - }, - "UNALLOCATED_17_STOP": { - "id": 55 - }, - "UNALLOCATED_18": { - "id": 56 - }, - "UNALLOCATED_18_STOP": { - "id": 57 - }, - "UNALLOCATED_19": { - "id": 58 - }, - "UNALLOCATED_19_STOP": { - "id": 59 - }, - "UNALLOCATED_20": { - "id": 60 - }, - "UNALLOCATED_20_STOP": { - "id": 61 - }, - "UNALLOCATED_21": { - "id": 62 - }, - "UNALLOCATED_21_STOP": { - "id": 63 - }, - "UNKNOWN_PARAMETER": { - "id": 64 - }, - "LOCALE_UNDEFINED": { - "id": 65 - }, - "NO_SUCH_ALARM": { - "id": 66 - }, - "OUT_OF_RANGE": { - "id": 67 - }, - "NOT_IMPLEMENTED": { - "id": 68 - }, - "BAD_CONFIG": { - "id": 69 - }, - "DID_NOT_STORE": { - "id": 70 - }, - "STORE_PENDING": { - "id": 71 - }, - "STRING_TOO_LONG": { - "id": 72 - } - } + "CUSTOMER": { + "id": 9, + "version": { + "first": 1, + "last": 160 }, - "FUNCTEST": { - "id": 10, - "version": { - "first": null, - "last": 1003 - }, - "registers": { - "GP30Test": { - "id": 0, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "LCDTest": { - "id": 1, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "Iloop": { - "id": 2, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "Pulse": { - "id": 3, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "Pressure": { - "id": 4, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "BatteryVoltage": { - "id": 5, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "SupplyVoltage": { - "id": 6, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "Temperature": { - "id": 7, - "details": [ - { - "type": "int16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "RFID": { - "id": 8, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "OpticalOutput": { - "id": 9, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "Radio": { - "id": 10, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "MultiTest": { - "id": 11, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "NFCUID": { - "id": 12, - "details": [ - { - "type": "uint64_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - }, - "CPUTest": { - "id": 13, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 1003 - }, - "statictype": null - } - ] - } - }, - "status": { - "BAD_CONFIG": { - "id": 0 - }, - "BAD_TEST": { - "id": 1 - }, - "NO_RESULT": { - "id": 2 - } - } - }, - "OPTICALPORT": { - "id": 5, - "version": { - "first": 1, - "last": 55 - }, - "registers": { - "BaudRateCapabilities": { - "id": 0, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Bitmask of supported rates on the given hardware.", - "version": { - "first": 2, - "last": 55 - }, - "statictype": "static" - } - ] - }, - "PacketSizeCapabilities": { - "id": 1, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Bitmask of supported packet sizes.", - "version": { - "first": 2, - "last": 55 - }, - "values": { - "default": 64 - }, - "statictype": "static" - } - ] - }, - "ProtocolVersion": { - "id": 2, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Version number as fixed point 16.16 format BCD.", - "version": { - "first": 2, - "last": 55 - }, - "statictype": "static" - } - ] - }, - "BaudRateSelected": { - "id": 3, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Baud rate in bits per second.", - "version": { - "first": 2, - "last": 55 - }, - "statictype": "dynamic" - } - ] - }, - "PacketSizeSelected": { - "id": 4, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Packet size in bytes.", - "version": { - "first": 2, - "last": 55 - }, - "statictype": "dynamic" - } - ] - }, - "ExternalUartControl": { - "id": 5, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "WO", - "lvl2": "WO", - "lvl3": "WO", - "lvl4": "WO", - "lvl5": "WO", - "lvl6": "WO", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Surrenders the UART to another application", - "version": { - "first": 49, - "last": 55 - }, - "statictype": "dynamic" - } - ] - } - }, - "status": { - "PAYLOAD_COUNT": { - "id": 0 - }, - "INVALID_SUBREASON": { - "id": 1 - }, - "INVALID_BAUDRATE": { - "id": 2 - }, - "INVALID_BUFFERSIZE": { - "id": 3 - }, - "CRCFAILURE": { - "id": 4 - }, - "UNRECOGNISEDCMD": { - "id": 5 - }, - "FRAMING": { - "id": 6 - }, - "OVERFLOW": { - "id": 7 - }, - "PACKETTIMEOUT": { - "id": 8 - }, - "INVALIDESCAPE": { - "id": 9 - }, - "UNKNOWN_PARAMETER": { - "id": 10 - }, - "TRAINING_FAILED": { - "id": 11 - }, - "NOBREAK": { - "id": 12 - } - } - }, - "SENSUSRADIO": { - "id": 16, - "version": { - "first": 100, - "last": 527 - }, - "registers": { - "TxInterval": { - "id": 0, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The SensusRF transmission interval in seconds for the BUPs", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 15, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "OmTxInterval": { - "id": 1, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The Open Metering transmission interval in seconds", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 3600, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "LatInterval": { - "id": 2, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The Listen After Talk interval as number 'n'. After every 'n' BUPs follows a BUP-LAT", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 3, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "WakeupInterval": { - "id": 3, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The Wake Up interval in seconds 's'. Every 's' seconds will the meter sniff for a WakeUp tone. 's' == 0 means active sending and no sniffing", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 3, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "MbusState": { - "id": 4, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The internal MBus state (Open Metering). A bit oriented value. Do not write if you do not know details", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 7, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "FrequencyIndicator": { - "id": 5, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A number that shows the radio frequency used. Normally 433 or 868", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 433, - "minimum": 433, - "maximum": 868 - }, - "statictype": "static" - } - ] - }, - "FrequencyOffset": { - "id": 6, - "details": [ - { - "type": "int16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A radio frequency calibration parameter", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": -32768, - "maximum": 32767 - }, - "statictype": "static" - } - ] - }, - "PowerLevel": { - "id": 7, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A parameter for controling the radio power", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 127 - }, - "statictype": "static" - } - ] - }, - "SystemState": { - "id": 9, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The internal System State of the Radio", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "RadioAddress": { - "id": 10, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The radio address used by the meter", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "UtcTimeOffset": { - "id": 11, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The offset the between meter time and UTC", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": -32768, - "maximum": 32767 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "SentBytesCounter": { - "id": 12, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of bytes sent during meter lifetime", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "dynamic" - } - ] - }, - "ReceivedBytesCounter": { - "id": 13, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of bytes received during meter lifetime", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "dynamic" - } - ] - }, - "ResetCounter": { - "id": 14, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of resets the application SensusRfRadio has performed over lifetime", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "BootLoaderState": { - "id": 15, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An internal state (enum) regarding the firmwware update", - "version": { - "first": 100, - "last": 527 - }, - "statictype": "static" - } - ] - }, - "LeakFlowThreshold": { - "id": 16, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The flow value of the leakage (low flow) detection", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 25, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "LeakFlowTimeThreshold": { - "id": 17, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time value of the leakage (low flow) detection", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 360, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "BrokenPipeFlowThreshold": { - "id": 18, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The flow value of the broken pipe (high flow) detection", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 2500, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "BrokenPipeFlowTimeThreshold": { - "id": 19, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time value of the broken pipe (high flow) detection", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 180, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PressureMaxThreshold": { - "id": 20, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The pressure value of the maximum (high) pressure alarm", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 160, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PressureMinThreshold": { - "id": 21, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The pressure value of the minimum (low) pressure alarm", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 3, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PressureLimitTimeMaxThreshold": { - "id": 22, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time value of the maximum (high) pressure alarm", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PressureLimitTimeMinThreshold": { - "id": 23, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The pressure value of the minimum (low) pressure alarm", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PressureMeasurePeriod": { - "id": 24, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The period in seconds with which the pressure is measured", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 60, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PressureUnit": { - "id": 25, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An enum respresenting the unit of pressure (0 = no pressure sensor)", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 2 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PressureGaugeOffset": { - "id": 26, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The gauge offset of the pressure sensor value in mBar", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "TemperatureMaxThreshold": { - "id": 27, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The temperature value of the maximum (high) temperature alarm", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 50, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "TemperatureMinThreshold": { - "id": 28, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The temperature value of the minimum (low) temperature alarm", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 2, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "TemperatureTimeMaxThreshold": { - "id": 29, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time value of the maximum (high) temperature alarm", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "TemperatureTimeMinThreshold": { - "id": 30, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time value of the minimum (low) temperature alarm", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 600, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "TemperatureMeasurePeriod": { - "id": 31, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The period in seconds with which the temperature is measured (only 60 is valid)", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 60, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "TemperatureUnit": { - "id": 32, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An enum respresenting the unit of temperature (1= Celsius, 2= Fahrenheit)", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 2 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PulseOutWidth": { - "id": 33, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An enumerator defining the currently active PulseWidth (0 ... 8 for non testmode values and 9 ... 15 for testmode)", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 15 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PulseOutDivisor": { - "id": 34, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A number representing the pulse weight multiplicator 1, 10, 100 or 1000", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 1000 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PulseOutMode": { - "id": 35, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An enum (0 to 3) representing the pulse output mode (0= deactivated, ...)", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 3 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "CurrentLoopMax": { - "id": 36, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A parameter regarding the non existing current output", - "version": { - "first": 100, - "last": 527 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "CurrentLoopSource": { - "id": 37, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A parameter regarding the non existing current output", - "version": { - "first": 100, - "last": 527 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "MainAlarmMask": { - "id": 38, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A byte value representing a mask of currently active (1) main alarms. These are the flow and genreral alarms", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 207, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "ExtendedAlarmMask": { - "id": 39, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A byte value representing a mask of currently active (1) extended alarms. These are the temperature and pressure related alarms", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 60, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "HistoricalAlarmsDays": { - "id": 40, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A number of days (0 = off) after which alarms are cleared from the alarm byte values when they are no longer active", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 29, - "minimum": 0, - "maximum": 250 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "TestModeTime": { - "id": 43, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A value in minutes that defines the time the meter will stay in testmode after that mode was started", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "dynamic" - } - ] - }, - "EncryptionKey": { - "id": 44, - "details": [ - { - "type": "uint128_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The SensusRF encryption key (16 bytes) of the meter", - "version": { - "first": 100, - "last": 527 - }, - "statictype": "static" - } - ] - }, - "Authentification": { - "id": 45, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The SensusRF Authentification PINs (3 PINs of 4 byte each) of the meter", - "version": { - "first": 100, - "last": 527 - }, - "statictype": "static" - } - ] - }, - "UpgFWVersion": { - "id": 46, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The version of the complete Meter firmware package as represented by application FlexNetVersion", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - } - ] - }, - "CustomerText": { - "id": 47, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An array of 8 bytes of freely programmable SensusRF customer Text", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "RadioLastReadTime": { - "id": 48, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An uint32_t value representing the meter's system DateTime when the radio had last time sent a telegram", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "dynamic" - } - ] - }, - "LowBatDateTime": { - "id": 49, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An uint32_t value representing the meter's system DateTime when the radio had detected first the low-battery status", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "dynamic" - } - ] - }, - "VeryLowBatDateTime": { - "id": 50, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A copy of the LowBatDateTime", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "dynamic" - } - ] - }, - "Unit": { - "id": 51, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A byte value representing the currently active volume unit used by radio", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 19, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "ExtendedUnitFlags": { - "id": 52, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A byte value representing additional information regarding the unit derived from the volume unit when used for flow or alternate volume", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "OTAControlFlags": { - "id": 53, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A byte value normaly never changed regarding general behavior of the firmware related to Over The Air updates", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "Tfx_Structure": { - "id": 54, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A complex structure of 84 bytes related to the Tfx mode of the meter respectively the volume channel", - "version": { - "first": 100, - "last": 527 - }, - "statictype": "dynamic" - } - ] - }, - "Dewa_Structure": { - "id": 55, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A structure of 4 uint16_t values used for the customer DEWA", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "dynamic" - } - ] - }, - "DataLogContents": { - "id": 56, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A 4 byte bit mask representing whether the individual data items are logged in the periodic logging (1) or not (0)", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 201335811, - "minimum": 3, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "DataLogPeriod": { - "id": 57, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A number in seconds representing the time period for storing data records into the periodic logging file (memory)", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 60, - "minimum": 1, - "maximum": 1440 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "AverageFlowPeriod": { - "id": 58, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A number derived automatically from the DataLogPeriod that determins averaging periods for min and max calculations", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 5, - "minimum": 1, - "maximum": 60 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "FixedDateReadingContents": { - "id": 59, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A 4 byte bit mask representing whether the individual data items are logged in the fixed date logging (1) or not (0)", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 201335811, - "minimum": 3, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "FixedDateDayOfMonth": { - "id": 60, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The day of the month (0 = every day) on which at 00:00 the fixed date logging takes place", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 1, - "minimum": 1, - "maximum": 28 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "MetroRadioLifeTimeCounter": { - "id": 61, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An uint32_t counter used originally for debugging during development. Meanwhile out of use", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "dynamic" - } - ] - }, - "PowerLevelOption": { - "id": 62, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An uint8_t value related to the power level used by the radio when an Irda module is present", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 127 - }, - "statictype": "static" - } - ] - }, - "ImpedanceCodeNew": { - "id": 63, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An uint16_t value used for adjusting the antenna impedance", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 32767 - }, - "statictype": "static" - } - ] - }, - "ImpedanceCodeOption": { - "id": 64, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An uint16_t value used for adjusting the antenna impedance if an Irda module is present", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 32767 - }, - "statictype": "static" - } - ] - }, - "IrDAModulePresent": { - "id": 65, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A parameter of type bool that signals the presence of an Irda module. The value is controlled by the meter", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "dynamic" - } - ] - }, - "StoreConfiguration": { - "id": 66, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write this value to '1' to tell the radio application to store all data into the file system of the meter", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "dynamic" - } - ] - }, - "LifeTimeSeconds": { - "id": 67, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of seconds since the radio left the production (Set to 0 at the end of the production proccess)", - "version": { - "first": 100, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "dynamic" - } - ] - }, - "DutyCycleCredit": { - "id": 68, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A value (counter) used only during development for release testing", - "version": { - "first": 412, - "last": 527 - }, - "values": { - "default": 4320000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "dynamic" - } - ] - }, - "ActivityCredit": { - "id": 69, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A counter used to control the radio activity which must not exceed certain regulatory limits", - "version": { - "first": 412, - "last": 527 - }, - "values": { - "default": 1000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "dynamic" - } - ] - }, - "PersistenceGroup1": { - "id": 70, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Storage item for HistoricalErrorLimitCounters Reverse(1, hi) and Leak(0, lo)", - "version": { - "first": 437, - "last": 527 - }, - "values": { - "default": 16711935, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PersistenceGroup2": { - "id": 71, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Storage item for HistoricalErrorLimitCounters Magnet(3, hi) and Air(2, lo)", - "version": { - "first": 437, - "last": 527 - }, - "values": { - "default": 16711935, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PersistenceGroup3": { - "id": 72, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Storage item for HistoricalErrorLimitCounters PressureMin(5, hi) and PressureMax(4, lo)", - "version": { - "first": 437, - "last": 527 - }, - "values": { - "default": 16711935, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PersistenceGroup4": { - "id": 73, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Storage item for HistoricalErrorLimitCounters TempMin(7, hi) and TempMax(6, lo)", - "version": { - "first": 437, - "last": 527 - }, - "values": { - "default": 16711935, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PressureCalibration": { - "id": 74, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "MMC(is uint32_t type, minimum -18, maximum 127 ok?) An uint16_t value to add an offset to the measured pressure value from -1270 to +1270 mBar for field calibration purposes", - "version": { - "first": 483, - "last": 527 - }, - "values": { - "default": 0, - "minimum": -128, - "maximum": 127 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "TfxSecondaryChannelInfo_1": { - "id": 75, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "a 6 bytes big complex structure for the Tfx settings of the secondary channel 1 (temperature)", - "version": { - "first": 482, - "last": 527 - }, - "values": { - "default": 0, - "minimum": -128, - "maximum": 127 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "TfxSecondaryChannelInfo_2": { - "id": 76, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "a 6 bytes big complex structure for the Tfx settings of the secondary channel 2 (pressure)", - "version": { - "first": 482, - "last": 527 - }, - "values": { - "default": 0, - "minimum": -128, - "maximum": 127 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "OmsLastMessageCounter": { - "id": 77, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "An unit32_t value used to support/control the MB_MODE3_OMSv4B transmission uinque MCR", - "version": { - "first": 499, - "last": 527 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - } - }, - "status": { - "UNKNOWN_PARAMETER": { - "action": "According to the source code no action assigned to this error code", - "description": "It appears to be not used", - "id": 0 - }, - "BAD_CONFIG": { - "action": "Writing a new LOG or FDR content to Radio for forwarding to PeriodicLog", - "description": "A bit mask is written which is not valid (e.g. not all mandatory bits are equal to 1)", - "id": 1 - }, - "NO_CHANGE": { - "action": "Writing a new parameter value so several functions (e.g. Set HistoricalErrorLimitDays)", - "description": "The new value has no effect: New value == Old value)", - "id": 2 - }, - "STORE_PENDING": { - "action": "Writing SENSUSRADIO_STORECONFIGURATION to 1 ...", - "description": "The initiated storing action is still ongoing and the file system is busy. The final status is pending", - "id": 3 - }, - "DID_NOT_STORE": { - "action": "Writing SENSUSRADIO_STORECONFIGURATION to 1 ...", - "description": "This is a final status. The initiated storing action failed. An alternate status would be 'OK'", - "id": 4 - } - } - }, - "CONFIGEXCHANGE": { - "id": 4, - "version": { - "first": 3, - "last": 236 - }, - "registers": { - "Privilege": { - "id": 0, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Written to set the login level, followed by the password. Note, this can be read at any login level including 0.", - "version": { - "first": 3, - "last": 236 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 8 - }, - "statictype": "dynamic" - } - ] - }, - "Password": { - "id": 1, - "details": [ - { - "type": "uint96_t", - "privilege": { - "lvl1": "WO", - "lvl2": "WO", - "lvl3": "WO", - "lvl4": "WO", - "lvl5": "WO", - "lvl6": "WO", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Password for logging in, requires 3 consecutive writes", - "version": { - "first": 3, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "FOpen": { - "id": 2, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Remote file operations, use this to open a file on the meter, handle returned", - "version": { - "first": 20, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "FClose": { - "id": 3, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Remote file operations, use this to close a file on the meter", - "version": { - "first": 20, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "FRead": { - "id": 4, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Remote file operations, use this to read bytes from an open file", - "version": { - "first": 20, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "FWrite": { - "id": 5, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Remote file operations, use this to write bytes to an open file", - "version": { - "first": 20, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "FSeek": { - "id": 6, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Remote file operations, use this to seek within an open file", - "version": { - "first": 20, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "FTell": { - "id": 7, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Remote file operations, use this to determine position within an open file", - "version": { - "first": 20, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "Remove": { - "id": 8, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Remote file operations, use this to delete a file", - "version": { - "first": 20, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "FEOF": { - "id": 9, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Remote file operations, use this determine whether the current position in an open file is the end of the file", - "version": { - "first": 20, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "Catalogue": { - "id": 10, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Returns a list of files in the filesystem that matches a string containing wildcards passed in", - "version": { - "first": 49, - "last": 236 - }, - "statictype": "dynamic" - } - ] - }, - "PCBSerialNumber": { - "id": 12, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "String containing the PCB serial number. Note, this can be read at any login level including 0", - "version": { - "first": 59, - "last": 236 - }, - "statictype": "static" - } - ] - }, - "ConfigAccessRights": { - "id": 13, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bitmask of login levels permitted to manipulate dangerous files", - "version": { - "first": 59, - "last": 236 - }, - "statictype": "static" - } - ] - }, - "FFlush": { - "id": 14, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Remote file operations, use this to flush write buffers to an open file", - "version": { - "first": 66, - "last": 236 - }, - "statictype": "dynamic" - } - ] - } - }, - "status": { - "LOCKED_OUT": { - "id": 0 - }, - "AUTHENTICATION_FAILURE": { - "id": 1 - }, - "ACCESS_DENIED": { - "id": 2 - }, - "UNKNOWN_PARAMETER": { - "id": 3 - }, - "IN_USE": { - "id": 4 - }, - "SIZES_DONT_MATCH": { - "id": 5 - }, - "CANT_READ_CONFIG_FILE": { - "id": 6 - }, - "USER_NOT_KNOWN": { - "id": 7 - }, - "CANT_CREATE_CONFIG_FILE": { - "id": 8 - }, - "STORE_DIDNT_STORE": { - "id": 9 - }, - "STORE_CORRUPT": { - "id": 10 - }, - "EXPECTED_WRITE": { - "id": 11 - }, - "EXPECTED_READ": { - "id": 12 - }, - "STOP_CYCLING": { - "id": 13 - }, - "TOO_MANY_OPEN": { - "id": 14 - }, - "NEVER_OPENED": { - "id": 15 - }, - "FILE_PROTECTED": { - "id": 16 - }, - "PARTIAL_RECALL": { - "id": 17 - }, - "DEFAULT_PASSWORD_USED": { - "id": 18 - } - } - }, - "NFC": { - "id": 21, - "version": { - "first": 1, - "last": 62 - }, - "registers": { - "EraseRMA": { - "id": 0, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RW" - }, - "description": "Writing TRUE to this register erases the RMA area", - "version": { - "first": 7, - "last": 62 - }, - "statictype": "dynamic" - } - ] - }, - "ForceUpdate": { - "id": 1, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write to this to force an update of some data. 0 - NDEF readings, 1 - NDEF details, 2 - RMA details", - "version": { - "first": 49, - "last": 62 - }, - "statictype": "dynamic" - } - ] - } - }, - "status": { - "BAD_CONFIG": { - "id": 0 - }, - "NDEF_WRITE_FAIL": { - "id": 1 - }, - "NDEF_VERIFY_FAIL": { - "id": 2 - }, - "NDEF_UPDATE_FAIL": { - "id": 3 - }, - "RMA_WRITE_FAIL": { - "id": 4 - }, - "RMA_VERIFY_FAIL": { - "id": 5 - }, - "RMA_BAD_ENTRY": { - "id": 6 - }, - "INIT_FAIL": { - "id": 7 - }, - "NDEF_CONFIG_FAIL": { - "id": 8 - }, - "RMA_CONFIG_FAIL": { - "id": 9 - }, - "NDEF_START_FAIL": { - "id": 10 - }, - "RMA_START_FAIL": { - "id": 11 - } - } - }, - "SYSTEM": { + "registers": { + "AlarmStatus0": { "id": 0, - "version": { - "first": 141, - "last": 534 - }, - "registers": { - "TriggerUpgrade": { - "id": 0, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Writing TRUE to this register internally calls SysTriggerUpgrade() then returns the result.", - "version": { - "first": 141, - "last": 534 - }, - "statictype": "dynamic" - } - ] - }, - "CheckPresence": { - "id": 1, - "details": [ - { - "type": "RPC", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Writing an application id number allows the version number of that application to be read back.", - "version": { - "first": 150, - "last": 534 - }, - "statictype": "dynamic" - } - ] - }, - "PCBSerialNumber": { - "id": 2, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "A string reporting the PCB serial number, this string must be set using production equipment.", - "version": { - "first": 169, - "last": 534 - }, - "values": { - "default": "" - }, - "statictype": "static" - } - ] - }, - "CustomerSerialNumber0": { - "id": 3, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A string reported relating to the customer, this string can be written only once after manufacture. If subsequent changes are needed CUSTOMERSERIALNUMBER1 must be used.", - "version": { - "first": 170, - "last": 534 - }, - "values": { - "default": "" - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "CustomerSerialNumber1": { - "id": 4, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A string reported relating to the customer, this string can be written only once after manufacture. If subsequent changes are needed CUSTOMERSERIALNUMBER2 must be used.", - "version": { - "first": 170, - "last": 534 - }, - "values": { - "default": "" - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "CustomerSerialNumber2": { - "id": 5, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A string reported relating to the customer, this string can be written only once after manufacture. If subsequent changes are needed CUSTOMERSERIALNUMBER3 must be used.", - "version": { - "first": 170, - "last": 534 - }, - "values": { - "default": "" - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "CustomerSerialNumber3": { - "id": 6, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A string reported relating to the customer, this string can be written only once after manufacture. This is the last customer serial number change slot.", - "version": { - "first": 170, - "last": 534 - }, - "values": { - "default": "" - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "MonotonicSeconds": { - "id": 7, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "The number of seconds since reboot.", - "version": { - "first": 176, - "last": 534 - }, - "statictype": "dynamic" - } - ] - }, - "CalendarSeconds": { - "id": 8, - "details": [ - { - "type": "time_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of seconds since 01-Jan-2000.", - "version": { - "first": 176, - "last": 534 - }, - "statictype": "dynamic" - } - ] - }, - "CoreRevision": { - "id": 9, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "A string reporting the product version string held in the system core binary.", - "version": { - "first": 196, - "last": 534 - }, - "statictype": "static" - } - ] - }, - "DriveCapacity": { - "id": 10, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Writing a drive number returns the drive capacity in bytes, or 0 if the drive is not ready, or an error if the driver is not configured to be present.", - "version": { - "first": 233, - "last": 534 - }, - "statictype": "dynamic" - } - ] - }, - "ExitReason": { - "id": 11, - "details": [ - { - "type": "status_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Writing an application id number allows the exit error number of that application to be read back.", - "version": { - "first": 258, - "last": 534 - }, - "statictype": "dynamic" - } - ] - }, - "CorePlatform": { - "id": 12, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Reports the instruction set of the hosting microprocessor in b8-15 and allocated platform number in b0-7.", - "version": { - "first": 265, - "last": 534 - }, - "statictype": "static" - } - ] - }, - "CRC": { - "id": 13, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Writing an application id number allows the CRC of that application to be read back.", - "version": { - "first": 279, - "last": 534 - }, - "statictype": "dynamic" - } - ] - }, - "UpgradePermissions": { - "id": 14, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bitfield of permissions releated to firmware upgrade", - "version": { - "first": 470, - "last": 534 - }, - "statictype": "static" - } - ] - }, - "CRC32": { - "id": 15, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Writing an application id number allows the 32 bit CRC of that application to be read back.", - "version": { - "first": 529, - "last": 534 - }, - "statictype": "dynamic" - } - ] - } - }, - "status": { - "OK": { - "id": 0 - }, - "ZERO_APPS": { - "id": 1 - }, - "NO_MEMORY": { - "id": 2 - }, - "NOT_IMPLEMENTED": { - "id": 3 - }, - "BLOCK_NOT_FOUND": { - "id": 4 - }, - "NO_SUCH_VAR": { - "id": 5 - }, - "NO_CLIB": { - "id": 6 - }, - "KEY_FAILURE": { - "id": 7 - }, - "NO_SLOTS_FREE": { - "id": 8 - }, - "VECTOR_OUT_OF_RANGE": { - "id": 9 - }, - "BAD_VECTOR_RELEASE": { - "id": 10 - }, - "DRIVER_BUSY": { - "id": 11 - }, - "OUT_OF_RANGE": { - "id": 12 - }, - "CANT_CANCEL_TICK": { - "id": 13 - }, - "ID_OUT_OF_RANGE": { - "id": 14 - }, - "HANDLE_OUT_OF_RANGE": { - "id": 15 - }, - "INCAPABLE_HARDWARE": { - "id": 16 - }, - "ALREADY_OPEN": { - "id": 17 - }, - "STRING_TOO_LONG": { - "id": 18 - }, - "CORRUPT_CONFIGURATION": { - "id": 19 - }, - "TIMEOUT": { - "id": 20 - }, - "NO_PRIVILEGE": { - "id": 21 - }, - "DEVICE_DORMANT": { - "id": 22 - }, - "MEDIA_FAILURE": { - "id": 23 - }, - "BUFFER_OVERFLOW": { - "id": 24 - }, - "UPGRADE_SYNTAX_ERROR": { - "id": 25 - }, - "UPGRADE_DEPENDENCY_NOT_MET": { - "id": 26 - }, - "UPGRADE_MISSING": { - "id": 27 - }, - "UPGRADE_FRAGMENTED_BY_CLIB": { - "id": 28 - }, - "TRUNCATED": { - "id": 29 - }, - "INVALID_HEADER": { - "id": 30 - }, - "WONT_DELETE_CLIB": { - "id": 31 - }, - "BAD_REGISTER_VALUE": { - "id": 32 - }, - "NO_CHANGE_MADE": { - "id": 33 - }, - "NOT_ATOMIC": { - "id": 34 - }, - "CALENDAR_CHANGED": { - "id": 35 - }, - "WORM_FIELD": { - "id": 36 - }, - "CONVERSION_UNSUPPORTED": { - "id": 37 - }, - "CPU_PERMISSION_FAULT": { - "id": 38 - }, - "CPU_SOFTWARE_FAULT": { - "id": 39 - }, - "CPU_DECODE_FAULT": { - "id": 40 - }, - "CPU_ADDRESS_ACCESS_FAULT": { - "id": 41 - }, - "CPU_UNCAUGHT_FAULT": { - "id": 42 - }, - "ACCURACY_LOST": { - "id": 43 - }, - "EXIT_FAILURE": { - "id": 44 - }, - "CANT_CANCEL_CALLBACK": { - "id": 45 - }, - "RECOVERED_SPACE": { - "id": 46 - }, - "DRIVE_FULL": { - "id": 47 - }, - "NO_FILE_HANDLES_AVAILABLE": { - "id": 48 - }, - "EXCESSIVE_RESTARTS": { - "id": 49 - }, - "MPU_SETUP_FAILED": { - "id": 50 - }, - "DEVICE_NOT_OPEN": { - "id": 51 - }, - "NO_RESPONSE": { - "id": 52 - }, - "EXIT_WATCHDOG": { - "id": 53 - }, - "WONT_DELETE_SPECIAL": { - "id": 54 - }, - "WONT_UPGRADE_SPECIAL": { - "id": 55 - } - } - }, - "METROLOGYASST": { - "id": 18, - "version": { - "first": 4, - "last": 114 - }, - "registers": { - "ILoopMaxFlowRate": { - "id": 0, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The flow rate that gives max output on the current loop", - "version": { - "first": 5, - "last": 36 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The flow rate that gives max output on the current loop", - "version": { - "first": 82, - "last": 114 - }, - "statictype": "static" - } - ] - }, - "StoreConfiguration": { - "id": 1, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Writing TRUE to this register stores the values of the other registers to the non-volatile memory", - "version": { - "first": 7, - "last": 81 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Writing TRUE to this register stores the values of the other registers to the non-volatile memory", - "version": { - "first": 82, - "last": 114 - }, - "statictype": "dynamic" - } - ] - }, - "PulseWeight": { - "id": 2, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Volume represented by one pulse in ml. If this is zero pulse output will not be enabled", - "version": { - "first": 7, - "last": 81 - }, - "values": { - "default": 1000, - "minimum": 1, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Volume represented by one pulse in ml. If this is zero pulse output will not be enabled", - "version": { - "first": 82, - "last": 101 - }, - "values": { - "default": 1000, - "minimum": 1, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Volume represented by one pulse. Units of (2^-5)ml. If this is zero pulse output will not be enabled", - "version": { - "first": 102, - "last": 114 - }, - "values": { - "default": 32000, - "minimum": 1, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "PulseMode": { - "id": 3, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The way pulses are output on the two available channels. This is an enum of type pulse_mode_t.", - "version": { - "first": 7, - "last": 81 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The way pulses are output on the two available channels. This is an enum of type pulse_mode_t.", - "version": { - "first": 82, - "last": 97 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The way pulses are output on the two available channels. This is an enum of type pulse_mode_t.", - "version": { - "first": 98, - "last": 114 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 7 - }, - "statictype": "static" - } - ] - }, - "PulseLength": { - "id": 4, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The length of a pulse. This is an enum of type pulse_length_t.", - "version": { - "first": 7, - "last": 72 - }, - "values": { - "default": 5, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The length of a pulse. This is an enum of type pulse_length_t.", - "version": { - "first": 73, - "last": 81 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The length of a pulse. This is an enum of type pulse_length_t.", - "version": { - "first": 82, - "last": 114 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "FlowUnits": { - "id": 5, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The units of flow rate to display on the LCD. An enum of type displayflowunits_t", - "version": { - "first": 8, - "last": 81 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 8 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The units of flow rate to display on the LCD. An enum of type displayflowunits_t", - "version": { - "first": 82, - "last": 114 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 8 - }, - "statictype": "static" - } - ] - }, - "FlowPoint": { - "id": 6, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Position of the decimal point on the LCD for flow rate. An enum of type displayflowpoint_t", - "version": { - "first": 8, - "last": 81 - }, - "values": { - "default": 2, - "minimum": 0, - "maximum": 4 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Position of the decimal point on the LCD for flow rate. An enum of type displayflowpoint_t", - "version": { - "first": 82, - "last": 114 - }, - "values": { - "default": 2, - "minimum": 0, - "maximum": 4 - }, - "statictype": "static" - } - ] - }, - "ILoopRate": { - "id": 7, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The update rate for the current loop", - "version": { - "first": 9, - "last": 36 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The update rate for the current loop", - "version": { - "first": 82, - "last": 114 - }, - "statictype": "static" - } - ] - }, - "TemperatureUnits": { - "id": 8, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Units for displaying temperature on the LCD. 0 – Celcius, 1 – Fahrenheit.", - "version": { - "first": 13, - "last": 81 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Units for displaying temperature on the LCD. 0 – Celcius, 1 – Fahrenheit.", - "version": { - "first": 82, - "last": 114 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - } - ] - }, - "PressureUnits": { - "id": 9, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Units for displaying pressure on the LCD. 0 – Mpa, 1 – PSI.", - "version": { - "first": 13, - "last": 81 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Units for displaying pressure on the LCD. 0 – Mpa, 1 – PSI.", - "version": { - "first": 82, - "last": 114 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - } - ] - }, - "PressureRate": { - "id": 10, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time between pressure measurements in milliseconds", - "version": { - "first": 13, - "last": 71 - }, - "values": { - "default": 300000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time between pressure measurements in milliseconds", - "version": { - "first": 72, - "last": 81 - }, - "values": { - "default": 60000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time between pressure measurements in milliseconds", - "version": { - "first": 82, - "last": 114 - }, - "values": { - "default": 60000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "PressureOffset": { - "id": 11, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Value in Pa to subtract from measured value to correct for atmospheric pressure", - "version": { - "first": 13, - "last": 58 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Value in Pa to subtract from measured value to correct for atmospheric pressure", - "version": { - "first": 59, - "last": 79 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Value in Pa to subtract from measured value to correct for atmospheric pressure", - "version": { - "first": 80, - "last": 81 - }, - "values": { - "default": 0, - "minimum": -2000000, - "maximum": 2000000 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Value in Pa to subtract from measured value to correct for atmospheric pressure", - "version": { - "first": 82, - "last": 114 - }, - "values": { - "default": 0, - "minimum": -2000000, - "maximum": 2000000 - }, - "statictype": "static" - } - ] - }, - "PressurePresent": { - "id": 12, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Whether there is a pressure sensor present", - "version": { - "first": 63, - "last": 70 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Whether there is a pressure sensor present", - "version": { - "first": 71, - "last": 114 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - } - ] - }, - "PressureMeasure": { - "id": 13, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write TRUE to trigger a pressure measurement, Read to get the latest measured value in Pa", - "version": { - "first": 65, - "last": 114 - }, - "statictype": "dynamic" - } - ] - }, - "LatestFlowRate": { - "id": 14, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Returns the latest flow rate. Write 0 to change scaling to internal scaling, 1 to change to display scaling", - "version": { - "first": 92, - "last": 114 - }, - "statictype": "dynamic" - } - ] - }, - "GenerateFwdPulses": { - "id": 15, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Generate some artificial pulses, used for testing", - "version": { - "first": 97, - "last": 114 - }, - "values": { - "minimum": 0, - "maximum": 255 - }, - "statictype": "dynamic" - } - ] - }, - "GenerateRevPulses": { - "id": 16, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Generate some artificial pulses, used for testing", - "version": { - "first": 97, - "last": 114 - }, - "values": { - "minimum": 0, - "maximum": 255 - }, - "statictype": "dynamic" - } - ] - }, - "PulseEvenDistribution": { - "id": 17, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Boolean value for whether pulse output is to space the pulses evenly (TRUE) or grouped (FALSE)", - "version": { - "first": 98, - "last": 114 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - } - ] - }, - "PulseResolution": { - "id": 18, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "The number of bits of fractional resolution in a pulse event", - "version": { - "first": 98, - "last": 114 - }, - "values": { - "minimum": 0, - "maximum": 7 - }, - "statictype": "dynamic" - } - ] - }, - "PressureCalibration": { - "id": 19, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Value in Pa to add to measured value after recalibration to correct for sensor drift over time", - "version": { - "first": 108, - "last": 111 - }, - "values": { - "default": 0, - "minimum": -1000000, - "maximum": 1000000 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Value in Pa to add to measured value after recalibration to correct for sensor drift over time", - "version": { - "first": 112, - "last": 114 - }, - "values": { - "default": 0, - "minimum": -4000000, - "maximum": 4000000 - }, - "statictype": "static" - } - ] - } - }, - "status": { - "BAD_CONFIG": { - "id": 0 - }, - "DID_NOT_STORE": { - "id": 1 - }, - "PENDING_STORE": { - "id": 2 - } - } - }, - "LOGGER": { - "id": 8, - "version": { - "first": 1, - "last": 18 - }, - "registers": { - "Quota": { - "id": 0, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A quota in bytes for the log. The Logger does not apply any policy to how the quota is allocated, this is left as a restriction to be applied on a product by product basis.", - "version": { - "first": 1, - "last": 18 - }, - "values": { - "default": 4096, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "Drive": { - "id": 1, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The drive to write to.", - "version": { - "first": 1, - "last": 18 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "TriggerLogFlush": { - "id": 2, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Writing TRUE will force a log flush", - "version": { - "first": 7, - "last": 18 - }, - "statictype": "dynamic" - } - ] - }, - "StoreConfiguration": { - "id": 3, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 16, - "last": 18 - }, - "statictype": "dynamic" - } - ] - } - }, - "status": { - "UNKNOWN_PARAMETER": { - "id": 0 - }, - "RESTARTED": { - "id": 1 - }, - "BLOCK_LISTING": { - "id": 2 - }, - "PENDING_STORE": { - "id": 3 - }, - "DID_NOT_STORE": { - "id": 4 - } - } - }, - "TESTMANAGER": { - "id": 98, - "version": { - "first": null, - "last": 36 - }, - "registers": { - "OutputFile": { - "id": 0, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 36 - }, - "statictype": null - } - ] - }, - "TestNumber": { - "id": 1, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 36 - }, - "statictype": null - } - ] - }, - "TestStatus": { - "id": 2, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 36 - }, - "statictype": null - } - ] - }, - "TrapError": { - "id": 3, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 36 - }, - "statictype": null - } - ] - }, - "TestParameter": { - "id": 4, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem ipsum", - "version": { - "first": null, - "last": 36 - }, - "statictype": null - } - ] - } - }, - "status": { - "FAIL": { - "id": 0 - }, - "UNKNOWN_PARAMETER": { - "id": 1 - }, - "READ_ONLY_PARAMETER": { - "id": 2 - }, - "BUSY": { - "id": 3 - }, - "STRING_TOO_LONG": { - "id": 4 - }, - "FOPEN_FAIL": { - "id": 5 - }, - "FSEEK_FAIL": { - "id": 6 - }, - "FWRITE_FAIL": { - "id": 7 - }, - "FCLOSE_FAIL": { - "id": 8 - }, - "MALFORMED_FILENAME": { - "id": 9 - }, - "UNKNOWN_ACTION": { - "id": 10 - }, - "FILEREMOVE_FAIL": { - "id": 11 - }, - "FREAD_FAIL": { - "id": 12 - } - } - }, - "PERIODICLOG": { - "id": 17, - "version": { - "first": 1, - "last": 75 - }, - "registers": { - "DataLogContents": { - "id": 0, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bit Mask of the items to store in LOG memory", - "version": { - "first": 10, - "last": 75 - }, - "values": { - "default": 201335811, - "minimum": 3, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "DataLogPeriod": { - "id": 1, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Storage Period of the LOG memory in minutes", - "version": { - "first": 10, - "last": 75 - }, - "values": { - "default": 60, - "minimum": 1, - "maximum": 1440 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "AverageFlowPeriod": { - "id": 2, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Averiging period for the Min/Max calculation of LOG&FDR memory", - "version": { - "first": 10, - "last": 75 - }, - "values": { - "default": 5, - "minimum": 1, - "maximum": 60 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "FixedDateReadingContents": { - "id": 3, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bit Mask of the items to store in FDR memory", - "version": { - "first": 10, - "last": 75 - }, - "values": { - "default": 201335811, - "minimum": 3, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "FixedDateDayOfMonth": { - "id": 4, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The day of month the FDR storage will take place at 00:00", - "version": { - "first": 10, - "last": 75 - }, - "values": { - "default": 1, - "minimum": 1, - "maximum": 28 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "PeriodicLogLifeTimeCounter": { - "id": 5, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A counter used for internal purposes", - "version": { - "first": 15, - "last": 75 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "dynamic" - } - ] - }, - "ResetCounter": { - "id": 6, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A counter to monitor the application resets", - "version": { - "first": 20, - "last": 75 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - } - }, - "status": { - "FOPEN": { - "action": "Perform a FOPEN to any of the logging files logdata, fdrdata, evtdata ... ", - "description": "FOPEN action failed due to any reason (means fopen error)", - "id": 0 - }, - "BAD_CONFIG": { - "action": "Handle the internal dual logging file access by SensusRfRadio and by PeriodicLogging", - "description": "Mutual Exclude file access failed due to a wrong internal status order", - "id": 1 - }, - "STRING_TOO_LONG": { - "action": "Currently unused or not define action", - "description": "Currently not generated or returned", - "id": 2 - }, - "FILES_IN_USE": { - "action": "Handle the internal dual logging file access by SensusRfRadio and by PeriodicLogging", - "description": "File access denied because the other party has currently access to the file(s)", - "id": 3 - } - } - }, - "POWERMON": { + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "8 bit counts corresponding to alarms 0-3.", + "version": { + "first": 1, + "last": 160 + }, + "statictype": "dynamic" + } + ] + }, + "AlarmStatus1": { "id": 1, - "version": { - "first": 17, - "last": 69 - }, - "registers": { - "BatteryVoltage": { - "id": 0, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Measured battery terminal voltage in 1mV units.", - "version": { - "first": 17, - "last": 69 - }, - "statictype": "dynamic" - } - ] + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" }, - "BatteryManufacturer": { - "id": 1, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "String describing the battery brand.", - "version": { - "first": 17, - "last": 69 - }, - "values": { - "default": "Tadiran" - }, - "statictype": "infrequentlyupdated" - } - ] + "description": "8 bit counts corresponding to alarms 4-7.", + "version": { + "first": 1, + "last": 160 }, - "BatterySize": { - "id": 2, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "One of: 0 = battery absent; 1 = built in; 2 = other; 3 = AA; 4 = AAA; 5 = C; 6 = D; 255 = unknown", - "version": { - "first": 17, - "last": 69 - }, - "values": { - "default": 6, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] + "statictype": "dynamic" + } + ] + }, + "TriggerAlarmCancel": { + "id": 2, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "BatteryQuantity": { - "id": 4, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "The number of installed batteries.", - "version": { - "first": 17, - "last": 59 - }, - "values": { - "default": 1 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of installed batteries.", - "version": { - "first": 60, - "last": 69 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] + "description": "Any set bits manually clear the corresponding alarm.", + "version": { + "first": 1, + "last": 110 }, - "BatteryRatedVoltage": { - "id": 5, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Datasheet terminal voltage in 100mV units as manufactured.", - "version": { - "first": 17, - "last": 69 - }, - "values": { - "default": 36, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "BatteryVoltageMinThreshold": { - "id": 7, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Datasheet terminal voltage in 100mV units below which the cell is considered empty.", - "version": { - "first": 17, - "last": 69 - }, - "values": { - "default": 28, - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] + "description": "Any set bits manually clear the corresponding alarm.", + "version": { + "first": 111, + "last": 160 }, - "BatterySelection": { - "id": 8, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Chosen manufacturer from the internal lookup table of known batteries.", - "version": { - "first": 20, - "last": 69 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - } - ] + "statictype": "dynamic" + } + ] + }, + "AlarmStatus2": { + "id": 3, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" }, - "TotalUsedCharge": { - "id": 9, - "details": [ - { - "type": "uint64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Accumulated charge used in uAs.", - "version": { - "first": 24, - "last": 69 - }, - "statictype": "dynamic" - } - ] + "description": "8 bit counts corresponding to alarms 8-11.", + "version": { + "first": 26, + "last": 160 }, - "TotalUsedSeconds": { - "id": 10, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Elapsed time since manufacture in seconds.", - "version": { - "first": 39, - "last": 69 - }, - "statictype": "dynamic" - } - ] + "statictype": "dynamic" + } + ] + }, + "AlarmStatus3": { + "id": 4, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" }, - "WarnFromClamp": { - "id": 11, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Time in seconds for which the projected end time cannot exceed.", - "version": { - "first": 39, - "last": 69 - }, - "values": { - "default": 473040000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] + "description": "8 bit counts corresponding to alarms 12-15.", + "version": { + "first": 26, + "last": 160 }, - "BatteryMilliAHrRating": { - "id": 12, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "Datasheet capacity in mAh units as manufactured.", - "version": { - "first": 45, - "last": 69 - }, - "values": { - "default": 19000, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "infrequentlyupdated" - } - ] + "statictype": "dynamic" + } + ] + }, + "AlarmStatus4": { + "id": 5, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" }, - "StoreConfiguration": { - "id": 13, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 61, - "last": 69 - }, - "statictype": "dynamic" - } - ] + "description": "8 bit counts corresponding to alarms 16-19.", + "version": { + "first": 26, + "last": 160 }, - "CriticalRepeatLimit": { - "id": 14, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of 15 minute periods of consecutive low battery voltage required for the battery to be deemed critically low", - "version": { - "first": 66, - "last": 69 - }, - "values": { - "default": 96, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - } - }, - "status": { - "TABLE_FULL": { - "id": 0 + "statictype": "dynamic" + } + ] + }, + "AlarmStatus5": { + "id": 6, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" }, - "UNKNOWN_PARAMETER": { - "id": 1 + "description": "8 bit counts corresponding to alarms 20-23.", + "version": { + "first": 26, + "last": 160 }, - "OUT_OF_RANGE": { - "id": 2 + "statictype": "dynamic" + } + ] + }, + "AlarmStatus6": { + "id": 7, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" }, - "STOP_CYCLING": { - "id": 3 + "description": "8 bit counts corresponding to alarms 24-27.", + "version": { + "first": 26, + "last": 160 }, - "TEMPERATURE_LIMIT": { - "id": 4 + "statictype": "dynamic" + } + ] + }, + "AlarmStatus7": { + "id": 8, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" }, - "BATTERY_STATUS_CHANGED": { - "id": 5 + "description": "8 bit counts corresponding to alarms 28-31.", + "version": { + "first": 26, + "last": 160 }, - "BATTERY_CRITICAL": { - "id": 6 + "statictype": "dynamic" + } + ] + }, + "AlarmEnableMask": { + "id": 9, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "PENDING_STORE": { - "id": 7 + "description": "Bit set of those alarms which are being monitored.", + "version": { + "first": 26, + "last": 110 }, - "DID_NOT_STORE": { - "id": 8 - } - } - }, - "GENESISFLOW": { + "values": { + "default": 4294967295, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bit set of those alarms which are being monitored.", + "version": { + "first": 111, + "last": 160 + }, + "values": { + "default": 4294967295, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "AlarmBroadcastMask": { + "id": 10, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bit set of those alarms which will generate events.", + "version": { + "first": 26, + "last": 110 + }, + "values": { + "default": 4294967295, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bit set of those alarms which will generate events.", + "version": { + "first": 111, + "last": 160 + }, + "values": { + "default": 4294967295, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "AlarmVisualMask": { + "id": 11, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bit set of those alarms which are displayed with IDs and the alarm icon.", + "version": { + "first": 110, + "last": 110 + }, + "values": { + "default": 4294967295, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bit set of those alarms which are displayed with IDs and the alarm icon.", + "version": { + "first": 111, + "last": 160 + }, + "values": { + "default": 4294967295, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "AlarmVisualAutoClearMask": { + "id": 12, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Alarms that have their display automatically cleared", + "version": { + "first": 110, + "last": 110 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Alarms that have their display automatically cleared", + "version": { + "first": 111, + "last": 160 + }, + "statictype": "static" + } + ] + }, + "ExcessFlowVolumeThreshold": { + "id": 13, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Flow rate above which broken pipe alarm is set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", + "version": { + "first": 61, + "last": 110 + }, + "values": { + "default": 639590, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "approximate" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Flow rate above which broken pipe alarm is set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", + "version": { + "first": 111, + "last": 118 + }, + "values": { + "default": 639590, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "approximate" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Flow rate above which broken pipe alarm is set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", + "version": { + "first": 119, + "last": 132 + }, + "values": { + "default": 639590, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "approximate" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Flow rate above which broken pipe alarm is set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", + "version": { + "first": 133, + "last": 160 + }, + "values": { + "default": 639999, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "approximate" + } + ] + }, + "LeakTimeThreshold": { + "id": 14, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for leak alarm in minutes", + "version": { + "first": 61, + "last": 110 + }, + "values": { + "default": 10080, + "minimum": 0, + "maximum": 69632 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for leak alarm in minutes", + "version": { + "first": 111, + "last": 118 + }, + "values": { + "default": 10080, + "minimum": 0, + "maximum": 69632 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for leak alarm in minutes", + "version": { + "first": 119, + "last": 160 + }, + "values": { + "default": 360, + "minimum": 0, + "maximum": 69632 + }, + "statictype": "static" + } + ] + }, + "ReverseFlowTimeThreshold": { "id": 15, - "version": { - "first": 7, - "last": 606 - }, - "registers": { - "SampleRate": { - "id": 0, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The rate in Hz that each GP30 takes measurements", - "version": { - "first": 7, - "last": 203 - }, - "values": { - "default": 6, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The rate in Hz that each GP30 takes measurements", - "version": { - "first": 204, - "last": 267 - }, - "values": { - "default": 2, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The rate in Hz that each GP30 takes measurements", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 2, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The rate in Hz that each GP30 takes measurements", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 2, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The rate in Hz that each GP30 takes measurements", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 2, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The rate in Hz that each GP30 takes measurements", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 2, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "FirstHitLvlUp1": { - "id": 1, - "details": [ - { - "type": "int8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", - "version": { - "first": 7, - "last": 267 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - } - ] - }, - "FirstHitLvlUp2": { - "id": 2, - "details": [ - { - "type": "int8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", - "version": { - "first": 7, - "last": 267 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - } - ] - }, - "FirstHitLvlUp3": { - "id": 3, - "details": [ - { - "type": "int8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", - "version": { - "first": 7, - "last": 267 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - } - ] - }, - "FirstHitLvlDown1": { - "id": 4, - "details": [ - { - "type": "int8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", - "version": { - "first": 7, - "last": 267 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - } - ] - }, - "FirstHitLvlDown2": { - "id": 5, - "details": [ - { - "type": "int8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", - "version": { - "first": 7, - "last": 267 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - } - ] - }, - "FirstHitLvlDown3": { - "id": 6, - "details": [ - { - "type": "int8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", - "version": { - "first": 7, - "last": 267 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": -128, - "maximum": 127 - }, - "statictype": "dynamic" - } - ] - }, - "StartHit": { - "id": 7, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The hit number to consider as the first hit", - "version": { - "first": 7, - "last": 267 - }, - "values": { - "default": 6, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The hit number to consider as the first hit", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 6, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The hit number to consider as the first hit", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 6, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The hit number to consider as the first hit", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 6, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The hit number to consider as the first hit", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 6, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "AmplitudePeakDetectEnd": { - "id": 8, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Where to stop running the amplitude peak detection", - "version": { - "first": 7, - "last": 267 - }, - "values": { - "default": 19, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Where to stop running the amplitude peak detection", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 19, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Where to stop running the amplitude peak detection", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 19, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Where to stop running the amplitude peak detection", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 19, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Where to stop running the amplitude peak detection", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 19, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "NumFirePulses": { - "id": 9, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of pulses to fire for a measurement", - "version": { - "first": 7, - "last": 267 - }, - "values": { - "default": 17, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of pulses to fire for a measurement", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 17, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of pulses to fire for a measurement", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 17, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of pulses to fire for a measurement", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 17, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of pulses to fire for a measurement", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 17, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "DisplayPow10": { - "id": 10, - "details": [ - { - "type": "int8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", - "version": { - "first": 36, - "last": 267 - }, - "values": { - "default": -6, - "minimum": -128, - "maximum": 127 - }, - "statictype": "static" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": -6, - "minimum": -128, - "maximum": 127 - }, - "statictype": "static" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": -6, - "minimum": -128, - "maximum": 127 - }, - "statictype": "static" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": -6, - "minimum": -128, - "maximum": 127 - }, - "statictype": "static" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": -6, - "minimum": -128, - "maximum": 127 - }, - "statictype": "static" - } - ] - }, - "DisplayUnits": { - "id": 11, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", - "version": { - "first": 36, - "last": 267 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - } - ] - }, - "MeterSize": { - "id": 12, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The meter pipe size", - "version": { - "first": 45, - "last": 237 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 9 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The meter pipe size", - "version": { - "first": 238, - "last": 267 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 17 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The meter pipe size", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 17 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The meter pipe size", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 17 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The meter pipe size", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 17 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The meter pipe size", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 17 - }, - "statictype": "static" - } - ] - }, - "CalFactor1": { - "id": 13, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 1", - "version": { - "first": 45, - "last": 200 - }, - "values": { - "default": 62500, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 1", - "version": { - "first": 201, - "last": 267 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 1", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 1", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 1", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 1", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - } - ] - }, - "CalFactor2": { - "id": 14, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 2", - "version": { - "first": 45, - "last": 200 - }, - "values": { - "default": 62500, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 2", - "version": { - "first": 201, - "last": 267 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 2", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 2", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 2", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 2", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - } - ] - }, - "CalFactor3": { - "id": 15, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 3", - "version": { - "first": 45, - "last": 200 - }, - "values": { - "default": 62500, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 3", - "version": { - "first": 201, - "last": 267 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 3", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 3", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 3", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration factor for ultrasonic channel 3", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 15625, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - } - ] - }, - "ZeroOffset1": { - "id": 16, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in usual time of flight scaling (ie LS bit is 2^-38 seconds)", - "version": { - "first": 45, - "last": 132 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 133, - "last": 267 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - } - ] - }, - "ZeroOffset2": { - "id": 17, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in usual time of flight scaling (ie LS bit is 2^-38 seconds)", - "version": { - "first": 45, - "last": 132 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 133, - "last": 267 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - } - ] - }, - "ZeroOffset3": { - "id": 18, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in usual time of flight scaling (ie LS bit is 2^-38 seconds)", - "version": { - "first": 45, - "last": 132 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 133, - "last": 267 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "static" - } - ] - }, - "ScaledBilling": { - "id": 19, - "details": [ - { - "type": "int64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "The scaled volume value shown on the display. In the units and precision set by DisplayUnits and DisplayPow10 respectively. Decimal point is not represented in this value", - "version": { - "first": 47, - "last": 315 - }, - "statictype": "dynamic" - }, - { - "type": "int64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "The scaled volume value shown on the display. In the units and precision set by DisplayUnits and DisplayPow10 respectively. Decimal point is not represented in this value", - "version": { - "first": 450, - "last": 463 - }, - "statictype": "dynamic" - }, - { - "type": "int64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "The scaled volume value shown on the display. In the units and precision set by DisplayUnits and DisplayPow10 respectively. Decimal point is not represented in this value", - "version": { - "first": 500, - "last": 509 - }, - "statictype": "dynamic" - }, - { - "type": "int64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "The scaled volume value shown on the display. In the units and precision set by DisplayUnits and DisplayPow10 respectively. Decimal point is not represented in this value", - "version": { - "first": 601, - "last": 606 - }, - "statictype": "dynamic" - } - ] - }, - "ResetAccumulators": { - "id": 20, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "WO", - "lvl2": "WO", - "lvl3": "WO", - "lvl4": "WO", - "lvl5": "WO", - "lvl6": "WO", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write 1 to reset all accumulated volume to zero", - "version": { - "first": 47, - "last": 267 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write 1 to reset all accumulated volume to zero", - "version": { - "first": 268, - "last": 315 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write 1 to reset all accumulated volume to zero", - "version": { - "first": 450, - "last": 463 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write 1 to reset all accumulated volume to zero", - "version": { - "first": 500, - "last": 509 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write 1 to reset all accumulated volume to zero", - "version": { - "first": 601, - "last": 606 - }, - "statictype": "dynamic" - } - ] - }, - "ForwardArrow": { - "id": 21, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", - "version": { - "first": 47, - "last": 267 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 2 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 2 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 2 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 2 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 2 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "LedMode": { - "id": 22, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The type of data output by the green LED", - "version": { - "first": 47, - "last": 203 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The type of data output by the green LED", - "version": { - "first": 204, - "last": 267 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The type of data output by the green LED", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The type of data output by the green LED", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The type of data output by the green LED", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The type of data output by the green LED", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 6 - }, - "statictype": "static" - } - ] - }, - "StoreCalibration": { - "id": 23, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store calibration values to non-volatile storage. Read back for status", - "version": { - "first": 54, - "last": 315 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store calibration values to non-volatile storage. Read back for status", - "version": { - "first": 450, - "last": 463 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store calibration values to non-volatile storage. Read back for status", - "version": { - "first": 500, - "last": 509 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store calibration values to non-volatile storage. Read back for status", - "version": { - "first": 601, - "last": 606 - }, - "statictype": "dynamic" - } - ] - }, - "UnscaledFwd": { - "id": 24, - "details": [ - { - "type": "uint64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The forward flow accumulator volume. The scale depends on the meter size", - "version": { - "first": 54, - "last": 315 - }, - "statictype": "dynamic" - }, - { - "type": "uint64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The forward flow accumulator volume. The scale depends on the meter size", - "version": { - "first": 450, - "last": 463 - }, - "statictype": "dynamic" - }, - { - "type": "uint64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The forward flow accumulator volume. The scale depends on the meter size", - "version": { - "first": 500, - "last": 509 - }, - "statictype": "dynamic" - }, - { - "type": "uint64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The forward flow accumulator volume. The scale depends on the meter size", - "version": { - "first": 601, - "last": 606 - }, - "statictype": "dynamic" - } - ] - }, - "UnscaledRev": { - "id": 25, - "details": [ - { - "type": "uint64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The reverse flow accumulator volume. The scale depends on the meter size", - "version": { - "first": 54, - "last": 315 - }, - "statictype": "dynamic" - }, - { - "type": "uint64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The reverse flow accumulator volume. The scale depends on the meter size", - "version": { - "first": 450, - "last": 463 - }, - "statictype": "dynamic" - }, - { - "type": "uint64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The reverse flow accumulator volume. The scale depends on the meter size", - "version": { - "first": 500, - "last": 509 - }, - "statictype": "dynamic" - }, - { - "type": "uint64_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The reverse flow accumulator volume. The scale depends on the meter size", - "version": { - "first": 601, - "last": 606 - }, - "statictype": "dynamic" - } - ] - }, - "LowFlowThreshold": { - "id": 26, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", - "version": { - "first": 55, - "last": 267 - }, - "values": { - "default": 200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "LowFlowMaxPeriod": { - "id": 27, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", - "version": { - "first": 55, - "last": 267 - }, - "values": { - "default": 3932160, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 3932160, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 3932160, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 3932160, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 3932160, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "UpdateThreshold": { - "id": 28, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", - "version": { - "first": 55, - "last": 267 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "ArrowThreshold": { - "id": 29, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", - "version": { - "first": 55, - "last": 267 - }, - "values": { - "default": 5000000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 5000000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 5000000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 5000000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 5000000, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "FireBuffer1": { - "id": 30, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 1 to be used", - "version": { - "first": 64, - "last": 267 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 1 to be used", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 1 to be used", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 1 to be used", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 1 to be used", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "FireBuffer2": { - "id": 31, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 2 to be used", - "version": { - "first": 64, - "last": 267 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 2 to be used", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 2 to be used", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 2 to be used", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 2 to be used", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "FireBuffer3": { - "id": 32, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 3 to be used", - "version": { - "first": 64, - "last": 267 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 3 to be used", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 3 to be used", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 3 to be used", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The fire buffer within the GP30 on channel 3 to be used", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "TriggerActive": { - "id": 33, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "WO", - "lvl2": "WO", - "lvl3": "WO", - "lvl4": "WO", - "lvl5": "WO", - "lvl6": "WO", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", - "version": { - "first": 75, - "last": 267 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", - "version": { - "first": 268, - "last": 306 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", - "version": { - "first": 307, - "last": 315 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", - "version": { - "first": 450, - "last": 463 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", - "version": { - "first": 500, - "last": 509 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", - "version": { - "first": 601, - "last": 606 - }, - "statictype": "dynamic" - } - ] - }, - "TriggerIdle": { - "id": 34, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 0 to put GenesisFlow in Active mode, otherwise put GenesisFlow in Idle mode. Idle mode displays just the number written to TriggerIdle. No measurements are performed. Read returns the number written", - "version": { - "first": 75, - "last": 315 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "dynamic" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 0 to put GenesisFlow in Active mode, otherwise put GenesisFlow in Idle mode. Idle mode displays just the number written to TriggerIdle. No measurements are performed. Read returns the number written", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "dynamic" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 0 to put GenesisFlow in Active mode, otherwise put GenesisFlow in Idle mode. Idle mode displays just the number written to TriggerIdle. No measurements are performed. Read returns the number written", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "dynamic" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 0 to put GenesisFlow in Active mode, otherwise put GenesisFlow in Idle mode. Idle mode displays just the number written to TriggerIdle. No measurements are performed. Read returns the number written", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "dynamic" - } - ] - }, - "MaxValidDeltaToF": { - "id": 35, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 87, - "last": 267 - }, - "values": { - "default": 247390, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 309237, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 309237, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 309237, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 309237, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "MaxValidToF": { - "id": 36, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 87, - "last": 267 - }, - "values": { - "default": 24739011, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 24739011, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 24739011, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 24739011, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 24739011, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "MinValidToF": { - "id": 37, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 87, - "last": 267 - }, - "values": { - "default": 13743895, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 13743895, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 13743895, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 13743895, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 13743895, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "FirstHitPercent1": { - "id": 38, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", - "version": { - "first": 93, - "last": 267 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "FirstHitPercent2": { - "id": 39, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", - "version": { - "first": 93, - "last": 267 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "FirstHitPercent3": { - "id": 40, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", - "version": { - "first": 93, - "last": 267 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "FirstHitShift": { - "id": 41, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", - "version": { - "first": 93, - "last": 267 - }, - "values": { - "default": 4, - "minimum": 3, - "maximum": 8 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 4, - "minimum": 3, - "maximum": 8 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 4, - "minimum": 3, - "maximum": 8 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 4, - "minimum": 3, - "maximum": 8 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 4, - "minimum": 3, - "maximum": 8 - }, - "statictype": "static" - } - ] - }, - "FirstHitMinimum": { - "id": 42, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum absolute first hit level value", - "version": { - "first": 93, - "last": 267 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum absolute first hit level value", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum absolute first hit level value", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum absolute first hit level value", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum absolute first hit level value", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 20, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "ToFErrorLimit": { - "id": 43, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", - "version": { - "first": 93, - "last": 267 - }, - "values": { - "default": 16, - "minimum": 1, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 16, - "minimum": 1, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 16, - "minimum": 1, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 16, - "minimum": 1, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 16, - "minimum": 1, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "FirstHitUpdatePeriod": { - "id": 44, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The period (in seconds) between first hit level updates", - "version": { - "first": 99, - "last": 267 - }, - "values": { - "default": 10, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The period (in seconds) between first hit level updates", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 10, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The period (in seconds) between first hit level updates", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 10, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The period (in seconds) between first hit level updates", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 10, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The period (in seconds) between first hit level updates", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 10, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "PipeFillingDelay": { - "id": 45, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", - "version": { - "first": 119, - "last": 267 - }, - "values": { - "default": 30, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 30, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 30, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 30, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 30, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "ToFTempOffset1": { - "id": 46, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", - "version": { - "first": 124, - "last": 267 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "ToFTempOffset2": { - "id": 47, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", - "version": { - "first": 124, - "last": 267 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "ToFTempOffset3": { - "id": 48, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", - "version": { - "first": 124, - "last": 267 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": -2147483648, - "maximum": 2147483647 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "ToFTempCalibrate": { - "id": 49, - "details": [ - { - "type": "int32_t", - "privilege": { - "lvl1": "WO", - "lvl2": "WO", - "lvl3": "WO", - "lvl4": "WO", - "lvl5": "WO", - "lvl6": "WO", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", - "version": { - "first": 124, - "last": 204 - }, - "values": { - "minimum": 0, - "maximum": 270336 - }, - "statictype": "dynamic" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", - "version": { - "first": 205, - "last": 315 - }, - "values": { - "minimum": 0, - "maximum": 286720 - }, - "statictype": "dynamic" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "minimum": 0, - "maximum": 286720 - }, - "statictype": "dynamic" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "minimum": 0, - "maximum": 286720 - }, - "statictype": "dynamic" - }, - { - "type": "int32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "minimum": 0, - "maximum": 286720 - }, - "statictype": "dynamic" - } - ] - }, - "StoreConfiguration": { - "id": 50, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 141, - "last": 267 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 268, - "last": 315 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 450, - "last": 463 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 500, - "last": 509 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 601, - "last": 606 - }, - "statictype": "dynamic" - } - ] - }, - "SealDisplay": { - "id": 51, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", - "version": { - "first": 161, - "last": 267 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - } - ] - }, - "TriggerTest": { - "id": 52, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", - "version": { - "first": 162, - "last": 267 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "dynamic" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "dynamic" - } - ] - }, - "MaxValidAmplitude": { - "id": 53, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Maximum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 168, - "last": 267 - }, - "values": { - "default": 2936012800, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Maximum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 2936012800, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Maximum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 2936012800, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Maximum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 2936012800, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Maximum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 2936012800, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "MinValidAmplitude": { - "id": 54, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 168, - "last": 267 - }, - "values": { - "default": 209715200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 209715200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 209715200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 209715200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Minimum amplitude for a valid signal in 2^-22mV units", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 209715200, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "HardErrorLimit": { - "id": 55, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Number of hard errors to allow before declaring a fatal error", - "version": { - "first": 176, - "last": 267 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Number of hard errors to allow before declaring a fatal error", - "version": { - "first": 268, - "last": 315 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Number of hard errors to allow before declaring a fatal error", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Number of hard errors to allow before declaring a fatal error", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Number of hard errors to allow before declaring a fatal error", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 4, - "minimum": 0, - "maximum": 65535 - }, - "statictype": "static" - } - ] - }, - "Timeout": { - "id": 56, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The timeout for an ultrasonic measurement (0 - 128us, 1 - 256us, 2 - 1024us, 3 - 4096us)", - "version": { - "first": 273, - "last": 315 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The timeout for an ultrasonic measurement (0 - 128us, 1 - 256us, 2 - 1024us, 3 - 4096us)", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The timeout for an ultrasonic measurement (0 - 128us, 1 - 256us, 2 - 1024us, 3 - 4096us)", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The timeout for an ultrasonic measurement (0 - 128us, 1 - 256us, 2 - 1024us, 3 - 4096us)", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] - }, - "MaxDeltaToFDeviation": { - "id": 57, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum deviation of a valid delta tof from the recent mean. In 2^-38 seconds units", - "version": { - "first": 280, - "last": 315 - }, - "values": { - "default": 109951, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum deviation of a valid delta tof from the recent mean. In 2^-38 seconds units", - "version": { - "first": 450, - "last": 463 - }, - "values": { - "default": 109951, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum deviation of a valid delta tof from the recent mean. In 2^-38 seconds units", - "version": { - "first": 500, - "last": 509 - }, - "values": { - "default": 109951, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum deviation of a valid delta tof from the recent mean. In 2^-38 seconds units", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 109951, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "MaxTempRange": { - "id": 58, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum range of temperatures between channels before one is rejected. In units of 2^-12 degrees celcius", - "version": { - "first": 289, - "last": 315 - }, - "values": { - "default": 8192, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum range of temperatures between channels before one is rejected. In units of 2^-12 degrees celcius", - "version": { - "first": 451, - "last": 463 - }, - "values": { - "default": 8192, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum range of temperatures between channels before one is rejected. In units of 2^-12 degrees celcius", - "version": { - "first": 504, - "last": 509 - }, - "values": { - "default": 8192, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum range of temperatures between channels before one is rejected. In units of 2^-12 degrees celcius", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 8192, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "MaxDeltaToFRange": { - "id": 59, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum range of delta time of flight between channels before one is rejected. In 2^-38 seconds units", - "version": { - "first": 289, - "last": 315 - }, - "values": { - "default": 137438, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum range of delta time of flight between channels before one is rejected. In 2^-38 seconds units", - "version": { - "first": 451, - "last": 463 - }, - "values": { - "default": 137438, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum range of delta time of flight between channels before one is rejected. In 2^-38 seconds units", - "version": { - "first": 504, - "last": 509 - }, - "values": { - "default": 137438, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The maximum range of delta time of flight between channels before one is rejected. In 2^-38 seconds units", - "version": { - "first": 601, - "last": 606 - }, - "values": { - "default": 137438, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] - }, - "LookupFileCrc": { - "id": 60, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Read for the current loaded lookup table CRC, write to set the expected CRC.", - "version": { - "first": 295, - "last": 315 - }, - "statictype": "dynamic" - } - ] - }, - "DisplayLeadingZeros": { - "id": 61, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Whether to display leading zeros on row 2. If false leading zeros will be replaced with a space", - "version": { - "first": 302, - "last": 315 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - } - ] - }, - "InstallationCorrectionEnabled": { - "id": 62, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Whether the installation correction function is enabled or not", - "version": { - "first": 313, - "last": 315 - }, - "values": { - "default": 1, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - } - ] - }, - "InstallationDetectionThreshold": { - "id": 63, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The threshold in ml for deciding on the meter installation", - "version": { - "first": 313, - "last": 315 - }, - "values": { - "default": 500, - "minimum": 0, - "maximum": 10000000 - }, - "statictype": "static" - } - ] - }, - "InstallationType": { - "id": 64, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The detected installation type, MS 16 bits is the type of installation, LS 16 bits is the proportion of correction to apply", - "version": { - "first": 313, - "last": 315 - }, - "values": { - "minimum": 0, - "maximum": 163840 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "InstallationDetectionStatus": { - "id": 65, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Installation detection percentage complete, returns 100 if installation detection isn't running", - "version": { - "first": 313, - "last": 315 - }, - "values": { - "minimum": 0, - "maximum": 100 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "FractionalBars": { - "id": 66, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RW", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Whether to display bars above the fractional digits on the LCD (if supported)", - "version": { - "first": 313, - "last": 315 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "static" - } - ] - }, - "CalibrationCount": { - "id": 67, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "A count of the relevant calibration values, for internal use", - "version": { - "first": 313, - "last": 315 - }, - "statictype": "infrequentlyupdated" - } - ] - }, - "DelayedLedOff": { - "id": 68, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "WO", - "lvl6": "WO", - "lvl7": "WO", - "lvl8": "WO" - }, - "description": "Write the number of seconds in the future to turn off the LED output. This countdown will be cancelled if LedMode is changed during the delay.", - "version": { - "first": 314, - "last": 315 - }, - "values": { - "minimum": 0, - "maximum": 28800 - }, - "statictype": "static" - } - ] - } - }, - "status": { - "BAD_TEST": { - "id": 0 - }, - "BAD_CONFIG": { - "id": 1 - }, - "DID_NOT_STORE": { - "id": 2 - }, - "STORE_PENDING": { - "id": 3 - }, - "STORE_BUFFER_SIZE": { - "id": 4 - }, - "STRING_TOO_LONG": { - "id": 5 - }, - "BAD_DISPLAY_MODE": { - "id": 6 - }, - "GLASS_TOO_LONG": { - "id": 7 - }, - "SLOT_NOT_YOURS": { - "id": 8 - }, - "SUBLIST_TOO_LONG": { - "id": 9 - }, - "NO_TEMP_SENSOR": { - "id": 10 - }, - "UNDER_TEMP": { - "id": 11 - }, - "LOW_TEMP_WARNING": { - "id": 12 - }, - "HIGH_TEMP_WARNING": { - "id": 13 - }, - "OVER_TEMP": { - "id": 14 - }, - "MISMATCHING_LSB": { - "id": 15 - }, - "OUT_OF_RANGE_PWDIFF": { - "id": 16 - }, - "OUT_OF_RANGE_AMPLITUDE": { - "id": 17 - }, - "OUT_OF_RANGE_TOF": { - "id": 18 - }, - "OUT_OF_RANGE_DTOF": { - "id": 19 - }, - "TOF_TIMEOUT": { - "id": 20 - }, - "CAL_CHANGE": { - "id": 21 - }, - "OUT_OF_RANGE_INTERVAL": { - "id": 22 - }, - "VALIDATE_FAIL": { - "id": 23 - }, - "OUT_OF_RANGE_TEMP": { - "id": 24 - }, - "NOT_READY": { - "id": 25 - }, - "METROLOGY_ERROR": { - "id": 26 - }, - "GP30_ID_ERROR": { - "id": 27 - }, - "GP30_FLAG_ERROR": { - "id": 28 - }, - "GP30_TIMEOUT_ERROR": { - "id": 29 - }, - "GP30_REQUEST_ERROR": { - "id": 30 - }, - "GP30_SEQ_ERROR": { - "id": 31 - }, - "VALUE_SEALED": { - "id": 32 - }, - "IN_TEST_MODE": { - "id": 33 - }, - "UNKNOWN_STATE": { - "id": 34 - }, - "DISPLAY_INIT_SUCCEEDED": { - "id": 35 - }, - "DISPLAY_INIT_FAILED": { - "id": 36 - }, - "GP30_INIT_FAILED": { - "id": 37 - }, - "START_TIMER_SUCCEEDED": { - "id": 38 - }, - "START_TIMER_FAILED": { - "id": 39 - }, - "VOLUME_STORE_FAILED": { - "id": 40 - }, - "EMPTY_PIPE": { - "id": 41 - }, - "PARAMETER_ERROR": { - "id": 42 - }, - "GP30_INTERNAL_ERROR": { - "id": 43 - }, - "GLASS_TOO_SHORT": { - "id": 44 - }, - "STORE_CAL_FAILED": { - "id": 45 - }, - "STORE_CONF_FAILED": { - "id": 46 - }, - "MODE_CHANGE": { - "id": 47 - }, - "BAD_POW10": { - "id": 48 - }, - "BAD_DECIMAL_SEPARATOR": { - "id": 49 - }, - "BAD_UNITS": { - "id": 50 - }, - "BAD_ICONS": { - "id": 51 - }, - "BAD_THOUSAND_SEPARATOR": { - "id": 52 - }, - "NEW_LOCALE_REJECTED": { - "id": 53 - }, - "SET_ACCUMULATORS": { - "id": 54 - }, - "SEAL_OPENED": { - "id": 55 - }, - "CALIBRATION_RECALL_INCOMPLETE": { - "id": 56 - }, - "BAD_AMR_SETTINGS": { - "id": 57 - }, - "SUSPECT_CYCLE_SKIP": { - "id": 58 - }, - "LOOKUP_FILE_LOADED": { - "id": 59 - }, - "LOOKUP_FILE_METERSIZE_CHANGED": { - "id": 60 - }, - "LOOKUP_FILE_FAILURE": { - "id": 61 - }, - "LOOKUP_FILE_INVALID": { - "id": 62 - }, - "LOOKUP_CRC_MISMATCH": { - "id": 63 - }, - "LOOKUP_FILE_UNKNOWN_METERSIZE": { - "id": 64 - }, - "INSTALLATION_HIGH_TIME_DIFF": { - "id": 65 - }, - "INSTALLATION_LOW_FLOW_IGNORE": { - "id": 66 - }, - "INSTALLATION_BAD_CHANNELS": { - "id": 67 - }, - "INSTALLATION_FIXED": { - "id": 68 - } - } - }, - "IRDA": { + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Number of measurements in reverse flow required to set reverse flow alarm", + "version": { + "first": 61, + "last": 110 + }, + "values": { + "default": 15, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Number of measurements in reverse flow required to set reverse flow alarm", + "version": { + "first": 111, + "last": 142 + }, + "values": { + "default": 15, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Number of measurements in reverse flow required to set reverse flow alarm", + "version": { + "first": 143, + "last": 160 + }, + "values": { + "default": 15, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + } + ] + }, + "Locale": { + "id": 18, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Timezone in which this application is set to run.", + "version": { + "first": 24, + "last": 160 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "AppArrangement": { + "id": 19, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "A name for the arrangement of applications on the meter", + "version": { + "first": 130, + "last": 160 + }, + "statictype": "dynamic" + } + ] + }, + "RebootCount": { "id": 20, - "version": { - "first": 10, - "last": 209 - }, - "registers": { - "PulseReportRate": { - "id": 0, - "details": [ - { - "type": "enum8", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The rate at which pulse reports are sent to the IrDA pulse adapter", - "version": { - "first": 10, - "last": 97 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The rate at which pulse reports are sent to the IrDA pulse adapter", - "version": { - "first": 98, - "last": 136 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "enum8", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The rate at which pulse reports are sent to the IrDA pulse adapter", - "version": { - "first": 161, - "last": 210 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 255 - }, - "statictype": "static" - } - ] + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "AdapterPresenceLimit": { - "id": 1, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of 15 minute periods we have to have received no valid IrDA messages to assume there is no adapter present", - "version": { - "first": 18, - "last": 28 - }, - "values": { - "default": 1, - "minimum": 1, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of 15 minute periods we have to have received no valid IrDA messages to assume there is no adapter present", - "version": { - "first": 29, - "last": 97 - }, - "values": { - "default": 3, - "minimum": 1, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of 15 minute periods we have to have received no valid IrDA messages to assume there is no adapter present", - "version": { - "first": 98, - "last": 136 - }, - "values": { - "default": 3, - "minimum": 1, - "maximum": 255 - }, - "statictype": "static" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of 15 minute periods we have to have received no valid IrDA messages to assume there is no adapter present", - "version": { - "first": 161, - "last": 210 - }, - "values": { - "default": 3, - "minimum": 1, - "maximum": 255 - }, - "statictype": "static" - } - ] + "description": "The number of times the meter has rebooted", + "version": { + "first": 73, + "last": 110 }, - "PulseSequence": { - "id": 2, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The present sequence number used in pulse reports", - "version": { - "first": 26, - "last": 97 - }, - "values": { - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The present sequence number used in pulse reports", - "version": { - "first": 98, - "last": 114 - }, - "values": { - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The present sequence number used in pulse reports", - "version": { - "first": 115, - "last": 136 - }, - "values": { - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The present sequence number used in pulse reports", - "version": { - "first": 161, - "last": 210 - }, - "values": { - "minimum": 0, - "maximum": 255 - }, - "statictype": "infrequentlyupdated" - } - ] + "values": { + "minimum": 0, + "maximum": 4294967295 }, - "StoreConfiguration": { - "id": 3, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 26, - "last": 97 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 98, - "last": 136 - }, - "statictype": "dynamic" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "NA", - "lvl4": "NA", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 161, - "last": 210 - }, - "statictype": "dynamic" - } - ] + "statictype": "infrequentlyupdated" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" }, - "AMRDigits": { - "id": 4, - "details": [ - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of digits to use for AMR", - "version": { - "first": 40, - "last": 52 - }, - "values": { - "default": 9, - "minimum": 0, - "maximum": 9 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of digits to use for AMR", - "version": { - "first": 53, - "last": 97 - }, - "values": { - "default": 9, - "minimum": 0, - "maximum": 9 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of digits to use for AMR", - "version": { - "first": 98, - "last": 136 - }, - "values": { - "default": 8, - "minimum": 0, - "maximum": 9 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "uint8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The number of digits to use for AMR", - "version": { - "first": 161, - "last": 210 - }, - "values": { - "default": 8, - "minimum": 0, - "maximum": 9 - }, - "statictype": "infrequentlyupdated" - } - ] + "description": "The number of times the meter has rebooted", + "version": { + "first": 111, + "last": 160 }, - "AMROffset": { - "id": 5, - "details": [ - { - "type": "int8_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The offset of the AMR smallest digit from the right (always negative)", - "version": { - "first": 40, - "last": 97 - }, - "values": { - "default": 0, - "minimum": -9, - "maximum": 0 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The offset of the AMR smallest digit from the right (always negative)", - "version": { - "first": 98, - "last": 136 - }, - "values": { - "default": 0, - "minimum": -9, - "maximum": 0 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "int8_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "The offset of the AMR smallest digit from the right (always negative)", - "version": { - "first": 161, - "last": 210 - }, - "values": { - "default": 0, - "minimum": -9, - "maximum": 0 - }, - "statictype": "infrequentlyupdated" - } - ] + "values": { + "minimum": 0, + "maximum": 4294967295 }, - "UI1203Fields": { - "id": 6, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A bitfield of the optional fields being used for UI-1203", - "version": { - "first": 40, - "last": 97 - }, - "values": { - "default": 268, - "minimum": 0, - "maximum": 268 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A bitfield of the optional fields being used for UI-1203", - "version": { - "first": 98, - "last": 136 - }, - "values": { - "default": 268, - "minimum": 0, - "maximum": 268 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A bitfield of the optional fields being used for UI-1203", - "version": { - "first": 161, - "last": 210 - }, - "values": { - "default": 268, - "minimum": 0, - "maximum": 268 - }, - "statictype": "infrequentlyupdated" - } - ] + "statictype": "infrequentlyupdated" + } + ] + }, + "ExcessFlowTimeThreshold": { + "id": 21, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "MfgDate": { - "id": 7, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A timestamp of meter manufacture in seconds since 1/1/2000 00:00:00 UTC", - "version": { - "first": 43, - "last": 136 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - }, - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "A timestamp of meter manufacture in seconds since 1/1/2000 00:00:00 UTC", - "version": { - "first": 161, - "last": 210 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "static" - } - ] + "description": "Time threshold for broken pipe alarm in minutes", + "version": { + "first": 80, + "last": 110 }, - "DisplayAMRDigits": { - "id": 8, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Whether or not to display AMR digits on the screen", - "version": { - "first": 92, - "last": 97 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Whether or not to display AMR digits on the screen", - "version": { - "first": 98, - "last": 136 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "infrequentlyupdated" - }, - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Whether or not to display AMR digits on the screen", - "version": { - "first": 161, - "last": 210 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "infrequentlyupdated" - } - ] + "values": { + "default": 15, + "minimum": 0, + "maximum": 69632 }, - "AdapterID": { - "id": 9, - "details": [ - { - "type": "string", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "The serial number of the current pulse adapter", - "version": { - "first": 193, - "last": 210 - }, - "statictype": "infrequentlyupdated" - } - ] + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "AdapterFwVersion": { - "id": 10, - "details": [ - { - "type": "uint16_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RO", - "lvl8": "RO" - }, - "description": "The firmware version of the current pulse adapter", - "version": { - "first": 193, - "last": 210 - }, - "statictype": "infrequentlyupdated" - } - ] + "description": "Time threshold for broken pipe alarm in minutes", + "version": { + "first": 111, + "last": 118 }, - "ExtendedResolution": { - "id": 11, - "details": [ - { - "type": "bool_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Boolean controlled by UI-1236 to control resolution of cubic feet unit in some meter size", - "version": { - "first": 210, - "last": 210 - }, - "values": { - "default": 0, - "minimum": 0, - "maximum": 1 - }, - "statictype": "infrequentlyupdated" - } - ] - } - }, - "status": { - "BAD_CONFIG": { - "id": 0 + "values": { + "default": 15, + "minimum": 0, + "maximum": 69632 }, - "BAD_LENGTH": { - "id": 1 + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "OUT_OF_RANGE": { - "id": 2 + "description": "Time threshold for broken pipe alarm in minutes", + "version": { + "first": 119, + "last": 160 }, - "PENDING_STORE": { - "id": 3 + "values": { + "default": 180, + "minimum": 0, + "maximum": 69632 }, - "DID_NOT_STORE": { - "id": 4 - }, - "TOO_MANY_BYTES": { - "id": 5 - } - } - }, - "NA2WALARMS": { - "id": 23, - "version": { - "first": 41, - "last": 102 - }, - "registers": { - "StoreConfiguration": { - "id": 0, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", - "version": { - "first": 41, - "last": 102 - }, - "statictype": "dynamic" - } - ] - }, - "PredefEnable": { - "id": 1, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Bitmask of enabled predefined alarms", - "version": { - "first": 41, - "last": 102 - }, - "values": { - "default": 561047, - "minimum": 0, - "maximum": 4294967295 - }, - "statictype": "infrequentlyupdated" - } - ] - } - }, - "status": { - "SENSOR_INVALID": { - "id": 0 - }, - "UNKNOWN_PARAMETER": { - "id": 1 - }, - "ALARM_INVALID": { - "id": 2 - }, - "UNIMPLEMENTED": { - "id": 3 - }, - "UNCONFIGURED": { - "id": 4 - }, - "CONFIG_INVALID": { - "id": 5 - }, - "NO_LATEST": { - "id": 6 - }, - "FIXED_TYPE": { - "id": 7 - }, - "PREDEF_SET": { - "id": 8 - }, - "USERDEF_VOLUME_SET": { - "id": 9 - }, - "USERDEF_TEMPERATURE_SET": { - "id": 10 - }, - "USERDEF_PRESSURE_SET": { - "id": 11 - }, - "PREDEF_CLEAR": { - "id": 12 - }, - "USERDEF_VOLUME_CLEAR": { - "id": 13 - }, - "USERDEF_TEMPERATURE_CLEAR": { - "id": 14 - }, - "USERDEF_PRESSURE_CLEAR": { - "id": 15 - }, - "DID_NOT_STORE": { - "id": 16 - }, - "STORE_PENDING": { - "id": 17 - }, - "PREDEF_BACKUP_FAILED": { - "id": 18 - }, - "PREDEF_RESTORE_FAILED": { - "id": 19 - }, - "USERDEF_BACKUP_FAILED": { - "id": 20 - }, - "USERDEF_RESTORE_FAILED": { - "id": 21 - }, - "USERDEF_UNSUPPORTED_TYPE_FOR_SENSOR": { - "id": 22 - } - } - }, - "NA2WLOGGER": { + "statictype": "static" + } + ] + }, + "LeakFlowThreshold": { "id": 22, - "version": { - "first": 1, - "last": 199 - }, - "registers": { - "StoreConfiguration": { - "id": 0, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "NA", - "lvl2": "NA", - "lvl3": "RW", - "lvl4": "NA", - "lvl5": "NA", - "lvl6": "NA", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Store all configuration items in non-volatile memory.", - "version": { - "first": 147, - "last": 199 - }, - "statictype": "dynamic" - } - ] + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "LimitLogSize": { - "id": 1, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RO", - "lvl2": "RO", - "lvl3": "RO", - "lvl4": "RO", - "lvl5": "RO", - "lvl6": "RO", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Override the maximum number of entries per log (0 keeps default)", - "version": { - "first": 147, - "last": 199 - }, - "statictype": "static" - } - ] - } - }, - "status": { - "UNKNOWN_PARAMETER": { - "id": 1 + "description": "Flow rate above which leak alarm can be set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", + "version": { + "first": 80, + "last": 110 }, - "NOT_MAIN_LOOP": { - "id": 2 + "values": { + "default": 12800, + "minimum": 0, + "maximum": 4294967295 }, - "LOG_INVALID": { - "id": 3 + "statictype": "approximate" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "LOG_OPEN_FAILED": { - "id": 4 + "description": "Flow rate above which leak alarm can be set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", + "version": { + "first": 111, + "last": 118 }, - "LOG_CLOSE_FAILED": { - "id": 5 + "values": { + "default": 12800, + "minimum": 0, + "maximum": 4294967295 }, - "LOG_REMOVE_FAILED": { - "id": 6 + "statictype": "approximate" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "LOG_FLUSH_FAILED": { - "id": 7 + "description": "Flow rate above which leak alarm can be set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", + "version": { + "first": 119, + "last": 132 }, - "LOG_CLEAR_FAILED": { - "id": 8 + "values": { + "default": 5529, + "minimum": 0, + "maximum": 4294967295 }, - "LOG_BAD_REQUEST": { - "id": 9 + "statictype": "approximate" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "LOG_BAD_LIMIT": { - "id": 10 + "description": "Flow rate above which leak alarm can be set in 1/256 l/h. Due to rounding the value read back may not be exactly the value written. This is why the statictype is given as 'approximate'", + "version": { + "first": 133, + "last": 160 }, - "LOG_BUSY": { - "id": 11 + "values": { + "default": 6399, + "minimum": 0, + "maximum": 4294967295 }, - "QUERY_FAILED": { - "id": 12 + "statictype": "approximate" + } + ] + }, + "MfgCharge": { + "id": 23, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" }, - "QUERY_UNKNOWN_SENSOR": { - "id": 13 + "description": "Charge in uAs available in manufacturing (read only)", + "version": { + "first": 84, + "last": 160 }, - "QUERY_UNKNOWN_LOGFILE": { - "id": 14 + "values": { + "default": 181440000 }, - "QUERY_BAD_ARGS": { - "id": 15 - }, - "QUERY_NOT_ENOUGH_SPACE": { - "id": 16 - }, - "QUERY_NO_RECORDS_FOUND": { - "id": 17 - }, - "QUERY_FILE_READ_PROBLEM": { - "id": 18 - }, - "SETTINGS_STORE_FAILED": { - "id": 19 - }, - "SETTINGS_BAD_SENSORID": { - "id": 20 - }, - "SETTINGS_BAD_PERIOD": { - "id": 21 - }, - "SETTINGS_BAD_CHECKSUM": { - "id": 22 - }, - "SETTINGS_BAD_TIMESTAMP": { - "id": 23 - }, - "FILING_BAD": { - "id": 24 - }, - "BAD_RECORD": { - "id": 25 - }, - "RANGE_SENSORID_BAD": { - "id": 26 - }, - "STORE_PENDING": { - "id": 27 - }, - "DID_NOT_STORE": { - "id": 28 - } - } - }, - "FLEXNETVERSION": { + "statictype": "static" + } + ] + }, + "TemperatureHighThreshold": { "id": 24, - "version": { - "first": 1, - "last": 9999 - } - }, - "FLEXNETSERIAL": { + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "High temperature alarm threshold in 0.1°C", + "version": { + "first": 88, + "last": 100 + }, + "values": { + "default": 500, + "minimum": 0, + "maximum": 800 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "High temperature alarm threshold in 0.1°C", + "version": { + "first": 101, + "last": 110 + }, + "values": { + "default": 500, + "minimum": 0, + "maximum": 800 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "High temperature alarm threshold in 0.1°C", + "version": { + "first": 111, + "last": 160 + }, + "values": { + "default": 500, + "minimum": 0, + "maximum": 800 + }, + "statictype": "static" + } + ] + }, + "TemperatureHighDelay": { + "id": 25, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for high temperature alarm in seconds", + "version": { + "first": 88, + "last": 110 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for high temperature alarm in seconds", + "version": { + "first": 111, + "last": 160 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + } + ] + }, + "TemperatureLowThreshold": { "id": 26, - "version": { - "first": 1, - "last": 20 - }, - "registers": { - "UpgState": { - "id": 0, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem Ipsum", - "version": { - "first": 2, - "last": 20 - }, - "statictype": "dynamic" - } - ] + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" }, - "FwdlState": { - "id": 1, - "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem Ipsum", - "version": { - "first": 2, - "last": 20 - }, - "statictype": "dynamic" - } - ] - } - }, - "status": { - "UNKNOWN_PARAMETER": { - "id": 0 + "description": "Low temperature alarm threshold in 0.1°C", + "version": { + "first": 88, + "last": 100 }, - "TOO_MANY_APPS": { - "id": 1 - } - } + "values": { + "default": 20, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Low temperature alarm threshold in 0.1°C", + "version": { + "first": 101, + "last": 110 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Low temperature alarm threshold in 0.1°C", + "version": { + "first": 111, + "last": 160 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "TemperatureLowDelay": { + "id": 27, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for low temperature alarm in seconds", + "version": { + "first": 88, + "last": 110 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for low temperature alarm in seconds", + "version": { + "first": 111, + "last": 160 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + } + ] + }, + "PressureHighThreshold": { + "id": 28, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "High pressure alarm threshold in Pa", + "version": { + "first": 88, + "last": 110 + }, + "values": { + "default": 1600000, + "minimum": 0, + "maximum": 2550000 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "High pressure alarm threshold in Pa", + "version": { + "first": 111, + "last": 121 + }, + "values": { + "default": 1600000, + "minimum": 0, + "maximum": 2550000 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "High pressure alarm threshold in Pa", + "version": { + "first": 122, + "last": 160 + }, + "values": { + "default": 1600000, + "minimum": 0, + "maximum": 2550000 + }, + "statictype": "static" + } + ] + }, + "PressureHighDelay": { + "id": 29, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for high pressure alarm in seconds", + "version": { + "first": 88, + "last": 110 + }, + "values": { + "default": 300, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for high pressure alarm in seconds", + "version": { + "first": 111, + "last": 118 + }, + "values": { + "default": 300, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for high pressure alarm in seconds", + "version": { + "first": 119, + "last": 160 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + } + ] + }, + "PressureLowThreshold": { + "id": 30, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Low pressure alarm threshold in Pa", + "version": { + "first": 88, + "last": 110 + }, + "values": { + "default": 30000, + "minimum": 0, + "maximum": 2550000 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Low pressure alarm threshold in Pa", + "version": { + "first": 111, + "last": 121 + }, + "values": { + "default": 30000, + "minimum": 0, + "maximum": 2550000 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Low pressure alarm threshold in Pa", + "version": { + "first": 122, + "last": 160 + }, + "values": { + "default": 30000, + "minimum": 0, + "maximum": 2550000 + }, + "statictype": "static" + } + ] + }, + "PressureLowDelay": { + "id": 31, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for low pressure alarm in seconds", + "version": { + "first": 88, + "last": 110 + }, + "values": { + "default": 300, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for low pressure alarm in seconds", + "version": { + "first": 111, + "last": 118 + }, + "values": { + "default": 300, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time threshold for low pressure alarm in seconds", + "version": { + "first": 119, + "last": 160 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 10800 + }, + "statictype": "static" + } + ] + }, + "StoreConfiguration": { + "id": 32, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Store all configuration items in non-volatile memory.", + "version": { + "first": 88, + "last": 130 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Store all configuration items in non-volatile memory.", + "version": { + "first": 131, + "last": 160 + }, + "statictype": "dynamic" + } + ] + }, + "SerialNumber": { + "id": 33, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Customer serial number string", + "version": { + "first": 139, + "last": 160 + }, + "statictype": "static" + } + ] + }, + "BackupCalendarSeconds": { + "id": 34, + "details": [ + { + "type": "time_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "NA", + "lvl8": "NA" + }, + "description": "Internal backup of calendar seconds", + "version": { + "first": 145, + "last": 160 + }, + "statictype": "dynamic" + } + ] + }, + "InstallationTime": { + "id": 35, + "details": [ + { + "type": "time_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time meter was determined to have been installed. 0 means not installed", + "version": { + "first": 147, + "last": 160 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "LocaleDecimalPoint": { + "id": 36, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Read to view the string used as a decimal point for this locale", + "version": { + "first": 151, + "last": 160 + }, + "statictype": "dynamic" + } + ] + }, + "LocaleThousandsSeparator": { + "id": 37, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Read to view the string used as a thousands separarator for this locale", + "version": { + "first": 151, + "last": 160 + }, + "statictype": "dynamic" + } + ] + }, + "InternalLoginTest": { + "id": 38, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Test whether the internal login works. Start test by writing '1' then log out to enable the test to run. Log back in and read back this register for result (see status codes)", + "version": { + "first": null, + "last": null + }, + "values": { + "minimum": 0, + "maximum": 65535 + }, + "statictype": "dynamic" + } + ] + } + }, + "status": { + "REBOOT": { + "id": 0 + }, + "REBOOT_STOP": { + "id": 1 + }, + "LOW_BATTERY": { + "id": 2 + }, + "LOW_BATTERY_STOP": { + "id": 3 + }, + "VERY_LOW_BATTERY": { + "id": 4 + }, + "VERY_LOW_BATTERY_STOP": { + "id": 5 + }, + "CONFIG_ERROR": { + "id": 6 + }, + "CONFIG_ERROR_STOP": { + "id": 7 + }, + "EMPTY_PIPE": { + "id": 8 + }, + "EMPTY_PIPE_STOP": { + "id": 9 + }, + "MAGNETIC_TAMPER": { + "id": 10 + }, + "MAGNETIC_TAMPER_STOP": { + "id": 11 + }, + "REVERSE_FLOW": { + "id": 12 + }, + "REVERSE_FLOW_STOP": { + "id": 13 + }, + "SUSPECT_LEAK": { + "id": 14 + }, + "SUSPECT_LEAK_STOP": { + "id": 15 + }, + "BROKEN_PIPE": { + "id": 16 + }, + "BROKEN_PIPE_STOP": { + "id": 17 + }, + "LOW_PRESSURE": { + "id": 18 + }, + "LOW_PRESSURE_STOP": { + "id": 19 + }, + "HIGH_PRESSURE": { + "id": 20 + }, + "HIGH_PRESSURE_STOP": { + "id": 21 + }, + "LOW_TEMPERATURE": { + "id": 22 + }, + "LOW_TEMPERATURE_STOP": { + "id": 23 + }, + "HIGH_TEMPERATURE": { + "id": 24 + }, + "HIGH_TEMPERATURE_STOP": { + "id": 25 + }, + "RADIO_ERROR": { + "id": 26 + }, + "RADIO_ERROR_STOP": { + "id": 27 + }, + "METROLOGY_PARAMS": { + "id": 28 + }, + "METROLOGY_PARAMS_STOP": { + "id": 29 + }, + "METROLOGY_MEASURE": { + "id": 30 + }, + "METROLOGY_MEASURE_STOP": { + "id": 31 + }, + "UNALLOCATED_6": { + "id": 32 + }, + "UNALLOCATED_6_STOP": { + "id": 33 + }, + "UNALLOCATED_7": { + "id": 34 + }, + "UNALLOCATED_7_STOP": { + "id": 35 + }, + "UNALLOCATED_8": { + "id": 36 + }, + "UNALLOCATED_8_STOP": { + "id": 37 + }, + "UNALLOCATED_9": { + "id": 38 + }, + "UNALLOCATED_9_STOP": { + "id": 39 + }, + "UNALLOCATED_10": { + "id": 40 + }, + "UNALLOCATED_10_STOP": { + "id": 41 + }, + "UNALLOCATED_11": { + "id": 42 + }, + "UNALLOCATED_11_STOP": { + "id": 43 + }, + "UNALLOCATED_12": { + "id": 44 + }, + "UNALLOCATED_12_STOP": { + "id": 45 + }, + "UNALLOCATED_13": { + "id": 46 + }, + "UNALLOCATED_13_STOP": { + "id": 47 + }, + "UNALLOCATED_14": { + "id": 48 + }, + "UNALLOCATED_14_STOP": { + "id": 49 + }, + "UNALLOCATED_15": { + "id": 50 + }, + "UNALLOCATED_15_STOP": { + "id": 51 + }, + "UNALLOCATED_16": { + "id": 52 + }, + "UNALLOCATED_16_STOP": { + "id": 53 + }, + "UNALLOCATED_17": { + "id": 54 + }, + "UNALLOCATED_17_STOP": { + "id": 55 + }, + "UNALLOCATED_18": { + "id": 56 + }, + "UNALLOCATED_18_STOP": { + "id": 57 + }, + "UNALLOCATED_19": { + "id": 58 + }, + "UNALLOCATED_19_STOP": { + "id": 59 + }, + "UNALLOCATED_20": { + "id": 60 + }, + "UNALLOCATED_20_STOP": { + "id": 61 + }, + "UNALLOCATED_21": { + "id": 62 + }, + "UNALLOCATED_21_STOP": { + "id": 63 + }, + "UNKNOWN_PARAMETER": { + "id": 64 + }, + "LOCALE_UNDEFINED": { + "id": 65 + }, + "NO_SUCH_ALARM": { + "id": 66 + }, + "OUT_OF_RANGE": { + "id": 67 + }, + "NOT_IMPLEMENTED": { + "id": 68 + }, + "BAD_CONFIG": { + "id": 69 + }, + "DID_NOT_STORE": { + "id": 70 + }, + "STORE_PENDING": { + "id": 71 + }, + "STRING_TOO_LONG": { + "id": 72 + }, + "TEST_PENDING": { + "id": 73 + }, + "TEST_STARTED": { + "id": 74 + }, + "TEST_OK_SKELETON": { + "id": 75 + }, + "TEST_OK": { + "id": 76 + }, + "DID_NOT_TEST": { + "id": 77 + } } + }, + "FUNCTEST": { + "id": 10, + "version": { + "first": null, + "last": 1003 + }, + "registers": { + "GP30Test": { + "id": 0, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "GP30 test to run.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "LCDTest": { + "id": 1, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "LCD test to run.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "Iloop": { + "id": 2, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Test not supported.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "Pulse": { + "id": 3, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Test not supported.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "Pressure": { + "id": 4, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Test the pressure sensor.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "BatteryVoltage": { + "id": 5, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Read CPU Vbat.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "SupplyVoltage": { + "id": 6, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Read CPU Vcc.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "Temperature": { + "id": 7, + "details": [ + { + "type": "int16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Read CPU Temperature.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "RFID": { + "id": 8, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Test not supported.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "OpticalOutput": { + "id": 9, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Test the pulse output LED.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "Radio": { + "id": 10, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Test the Radio at basic SPI level.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "MultiTest": { + "id": 11, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Run a list of basic tests and display results on LCD.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "NFCUID": { + "id": 12, + "details": [ + { + "type": "uint64_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Return the UID uint8_t array as a uint64_t.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + }, + "CPUTest": { + "id": 13, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Test various aspects of the CPU.", + "version": { + "first": null, + "last": 1003 + }, + "statictype": null + } + ] + } + }, + "status": { + "BAD_CONFIG": { + "id": 0 + }, + "BAD_TEST": { + "id": 1 + }, + "NO_RESULT": { + "id": 2 + } + } + }, + "OPTICALPORT": { + "id": 5, + "version": { + "first": 1, + "last": 55 + }, + "registers": { + "BaudRateCapabilities": { + "id": 0, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Bitmask of supported rates on the given hardware.", + "version": { + "first": 2, + "last": 55 + }, + "statictype": "static" + } + ] + }, + "PacketSizeCapabilities": { + "id": 1, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Bitmask of supported packet sizes.", + "version": { + "first": 2, + "last": 55 + }, + "values": { + "default": 64 + }, + "statictype": "static" + } + ] + }, + "ProtocolVersion": { + "id": 2, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Version number as fixed point 16.16 format BCD.", + "version": { + "first": 2, + "last": 55 + }, + "statictype": "static" + } + ] + }, + "BaudRateSelected": { + "id": 3, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Baud rate in bits per second.", + "version": { + "first": 2, + "last": 55 + }, + "statictype": "dynamic" + } + ] + }, + "PacketSizeSelected": { + "id": 4, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Packet size in bytes.", + "version": { + "first": 2, + "last": 55 + }, + "statictype": "dynamic" + } + ] + }, + "ExternalUartControl": { + "id": 5, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "WO", + "lvl2": "WO", + "lvl3": "WO", + "lvl4": "WO", + "lvl5": "WO", + "lvl6": "WO", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Surrenders the UART to another application", + "version": { + "first": 49, + "last": 55 + }, + "statictype": "dynamic" + } + ] + } + }, + "status": { + "PAYLOAD_COUNT": { + "id": 0 + }, + "INVALID_SUBREASON": { + "id": 1 + }, + "INVALID_BAUDRATE": { + "id": 2 + }, + "INVALID_BUFFERSIZE": { + "id": 3 + }, + "CRCFAILURE": { + "id": 4 + }, + "UNRECOGNISEDCMD": { + "id": 5 + }, + "FRAMING": { + "id": 6 + }, + "OVERFLOW": { + "id": 7 + }, + "PACKETTIMEOUT": { + "id": 8 + }, + "INVALIDESCAPE": { + "id": 9 + }, + "UNKNOWN_PARAMETER": { + "id": 10 + }, + "TRAINING_FAILED": { + "id": 11 + }, + "NOBREAK": { + "id": 12 + } + } + }, + "SENSUSRADIO": { + "id": 16, + "version": { + "first": 100, + "last": 532 + }, + "registers": { + "TxInterval": { + "id": 0, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The SensusRF transmission interval in seconds for the BUPs", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 15, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "OmTxInterval": { + "id": 1, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The Open Metering transmission interval in seconds", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 3600, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "LatInterval": { + "id": 2, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The Listen After Talk interval as number 'n'. After every 'n' BUPs follows a BUP-LAT", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 3, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "WakeupInterval": { + "id": 3, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The Wake Up interval in seconds 's'. Every 's' seconds will the meter sniff for a WakeUp tone. 's' == 0 means active sending and no sniffing", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 3, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "MbusState": { + "id": 4, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The internal MBus state (Open Metering). A bit oriented value. Do not write if you do not know details", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 7, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "FrequencyIndicator": { + "id": 5, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A number that shows the radio frequency used. Normally 433 or 868", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 433, + "minimum": 433, + "maximum": 868 + }, + "statictype": "static" + } + ] + }, + "FrequencyOffset": { + "id": 6, + "details": [ + { + "type": "int16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A radio frequency calibration parameter", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": -32768, + "maximum": 32767 + }, + "statictype": "static" + } + ] + }, + "PowerLevel": { + "id": 7, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A parameter for controling the radio power", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 127 + }, + "statictype": "static" + } + ] + }, + "SystemState": { + "id": 9, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The internal System State of the Radio", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "RadioAddress": { + "id": 10, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The radio address used by the meter", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "UtcTimeOffset": { + "id": 11, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The offset the between meter time and UTC", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": -32768, + "maximum": 32767 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "SentBytesCounter": { + "id": 12, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of bytes sent during meter lifetime", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "dynamic" + } + ] + }, + "ReceivedBytesCounter": { + "id": 13, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of bytes received during meter lifetime", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "dynamic" + } + ] + }, + "ResetCounter": { + "id": 14, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of resets the application SensusRfRadio has performed over lifetime", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "BootLoaderState": { + "id": 15, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An internal state (enum) regarding the firmwware update", + "version": { + "first": 100, + "last": 532 + }, + "statictype": "static" + } + ] + }, + "LeakFlowThreshold": { + "id": 16, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The flow value of the leakage (low flow) detection", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 25, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "LeakFlowTimeThreshold": { + "id": 17, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time value of the leakage (low flow) detection", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 360, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "BrokenPipeFlowThreshold": { + "id": 18, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The flow value of the broken pipe (high flow) detection", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 2500, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "BrokenPipeFlowTimeThreshold": { + "id": 19, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time value of the broken pipe (high flow) detection", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 180, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PressureMaxThreshold": { + "id": 20, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The pressure value of the maximum (high) pressure alarm", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 160, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PressureMinThreshold": { + "id": 21, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The pressure value of the minimum (low) pressure alarm", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 3, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PressureLimitTimeMaxThreshold": { + "id": 22, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time value of the maximum (high) pressure alarm", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PressureLimitTimeMinThreshold": { + "id": 23, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The pressure value of the minimum (low) pressure alarm", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PressureMeasurePeriod": { + "id": 24, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The period in seconds with which the pressure is measured", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 60, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PressureUnit": { + "id": 25, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An enum respresenting the unit of pressure (0 = no pressure sensor)", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 2 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PressureGaugeOffset": { + "id": 26, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The gauge offset of the pressure sensor value in mBar", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "TemperatureMaxThreshold": { + "id": 27, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The temperature value of the maximum (high) temperature alarm", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 50, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "TemperatureMinThreshold": { + "id": 28, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The temperature value of the minimum (low) temperature alarm", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 2, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "TemperatureTimeMaxThreshold": { + "id": 29, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time value of the maximum (high) temperature alarm", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "TemperatureTimeMinThreshold": { + "id": 30, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time value of the minimum (low) temperature alarm", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 600, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "TemperatureMeasurePeriod": { + "id": 31, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The period in seconds with which the temperature is measured (only 60 is valid)", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 60, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "TemperatureUnit": { + "id": 32, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An enum respresenting the unit of temperature (1= Celsius, 2= Fahrenheit)", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 2 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PulseOutWidth": { + "id": 33, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An enumerator defining the currently active PulseWidth (0 ... 8 for non testmode values and 9 ... 15 for testmode)", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 15 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PulseOutDivisor": { + "id": 34, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A number representing the pulse weight multiplicator 1, 10, 100 or 1000", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 1000 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PulseOutMode": { + "id": 35, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An enum (0 to 3) representing the pulse output mode (0= deactivated, ...)", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 3 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "CurrentLoopMax": { + "id": 36, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A parameter regarding the non existing current output", + "version": { + "first": 100, + "last": 532 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "CurrentLoopSource": { + "id": 37, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A parameter regarding the non existing current output", + "version": { + "first": 100, + "last": 532 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "MainAlarmMask": { + "id": 38, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A byte value representing a mask of currently active (1) main alarms. These are the flow and genreral alarms", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 207, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "ExtendedAlarmMask": { + "id": 39, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A byte value representing a mask of currently active (1) extended alarms. These are the temperature and pressure related alarms", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 60, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "HistoricalAlarmsDays": { + "id": 40, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A number of days (0 = off) after which alarms are cleared from the alarm byte values when they are no longer active", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 29, + "minimum": 0, + "maximum": 250 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "TestModeTime": { + "id": 43, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A value in minutes that defines the time the meter will stay in testmode after that mode was started", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "dynamic" + } + ] + }, + "EncryptionKey": { + "id": 44, + "details": [ + { + "type": "uint128_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The SensusRF encryption key (16 bytes) of the meter", + "version": { + "first": 100, + "last": 532 + }, + "statictype": "static" + } + ] + }, + "Authentification": { + "id": 45, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The SensusRF Authentification PINs (3 PINs of 4 byte each) of the meter", + "version": { + "first": 100, + "last": 532 + }, + "statictype": "static" + } + ] + }, + "UpgFWVersion": { + "id": 46, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The version of the complete Meter firmware package as represented by application FlexNetVersion", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + } + ] + }, + "CustomerText": { + "id": 47, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An array of 8 bytes of freely programmable SensusRF customer Text", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "RadioLastReadTime": { + "id": 48, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An uint32_t value representing the meter's system DateTime when the radio had last time sent a telegram", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "dynamic" + } + ] + }, + "LowBatDateTime": { + "id": 49, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An uint32_t value representing the meter's system DateTime when the radio had detected first the low-battery status", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "dynamic" + } + ] + }, + "VeryLowBatDateTime": { + "id": 50, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A copy of the LowBatDateTime", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "dynamic" + } + ] + }, + "Unit": { + "id": 51, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A byte value representing the currently active volume unit used by radio", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 19, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "ExtendedUnitFlags": { + "id": 52, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A byte value representing additional information regarding the unit derived from the volume unit when used for flow or alternate volume", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "OTAControlFlags": { + "id": 53, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A byte value normaly never changed regarding general behavior of the firmware related to Over The Air updates", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "Tfx_Structure": { + "id": 54, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A complex structure of 84 bytes related to the Tfx mode of the meter respectively the volume channel", + "version": { + "first": 100, + "last": 532 + }, + "statictype": "dynamic" + } + ] + }, + "Dewa_Structure": { + "id": 55, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A structure of 4 uint16_t values used for the customer DEWA", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "dynamic" + } + ] + }, + "DataLogContents": { + "id": 56, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A 4 byte bit mask representing whether the individual data items are logged in the periodic logging (1) or not (0)", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 201335811, + "minimum": 3, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "DataLogPeriod": { + "id": 57, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A number in seconds representing the time period for storing data records into the periodic logging file (memory)", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 60, + "minimum": 1, + "maximum": 1440 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "AverageFlowPeriod": { + "id": 58, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A number derived automatically from the DataLogPeriod that determins averaging periods for min and max calculations", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 5, + "minimum": 1, + "maximum": 60 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "FixedDateReadingContents": { + "id": 59, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A 4 byte bit mask representing whether the individual data items are logged in the fixed date logging (1) or not (0)", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 201335811, + "minimum": 3, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "FixedDateDayOfMonth": { + "id": 60, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The day of the month (0 = every day) on which at 00:00 the fixed date logging takes place", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 1, + "minimum": 1, + "maximum": 28 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "MetroRadioLifeTimeCounter": { + "id": 61, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An uint32_t counter used originally for debugging during development. Meanwhile out of use", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "dynamic" + } + ] + }, + "PowerLevelOption": { + "id": 62, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An uint8_t value related to the power level used by the radio when an Irda module is present", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 127 + }, + "statictype": "static" + } + ] + }, + "ImpedanceCodeNew": { + "id": 63, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An uint16_t value used for adjusting the antenna impedance", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 32767 + }, + "statictype": "static" + } + ] + }, + "ImpedanceCodeOption": { + "id": 64, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An uint16_t value used for adjusting the antenna impedance if an Irda module is present", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 32767 + }, + "statictype": "static" + } + ] + }, + "IrDAModulePresent": { + "id": 65, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A parameter of type bool that signals the presence of an Irda module. The value is controlled by the meter", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "dynamic" + } + ] + }, + "StoreConfiguration": { + "id": 66, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write this value to '1' to tell the radio application to store all data into the file system of the meter", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "dynamic" + } + ] + }, + "LifeTimeSeconds": { + "id": 67, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of seconds since the radio left the production (Set to 0 at the end of the production proccess)", + "version": { + "first": 100, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "dynamic" + } + ] + }, + "DutyCycleCredit": { + "id": 68, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A value (counter) used only during development for release testing", + "version": { + "first": 412, + "last": 532 + }, + "values": { + "default": 4320000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "dynamic" + } + ] + }, + "ActivityCredit": { + "id": 69, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A counter used to control the radio activity which must not exceed certain regulatory limits", + "version": { + "first": 412, + "last": 532 + }, + "values": { + "default": 1000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "dynamic" + } + ] + }, + "PersistenceGroup1": { + "id": 70, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Storage item for HistoricalErrorLimitCounters Reverse(1, hi) and Leak(0, lo)", + "version": { + "first": 437, + "last": 532 + }, + "values": { + "default": 16711935, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PersistenceGroup2": { + "id": 71, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Storage item for HistoricalErrorLimitCounters Magnet(3, hi) and Air(2, lo)", + "version": { + "first": 437, + "last": 532 + }, + "values": { + "default": 16711935, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PersistenceGroup3": { + "id": 72, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Storage item for HistoricalErrorLimitCounters PressureMin(5, hi) and PressureMax(4, lo)", + "version": { + "first": 437, + "last": 532 + }, + "values": { + "default": 16711935, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PersistenceGroup4": { + "id": 73, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Storage item for HistoricalErrorLimitCounters TempMin(7, hi) and TempMax(6, lo)", + "version": { + "first": 437, + "last": 532 + }, + "values": { + "default": 16711935, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PressureCalibration": { + "id": 74, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "MMC(is uint32_t type, minimum -18, maximum 127 ok?) An uint16_t value to add an offset to the measured pressure value from -1270 to +1270 mBar for field calibration purposes", + "version": { + "first": 483, + "last": 532 + }, + "values": { + "default": 0, + "minimum": -128, + "maximum": 127 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "TfxSecondaryChannelInfo_1": { + "id": 75, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "a 6 bytes big complex structure for the Tfx settings of the secondary channel 1 (temperature)", + "version": { + "first": 494, + "last": 532 + }, + "values": { + "default": 0, + "minimum": -128, + "maximum": 127 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "TfxSecondaryChannelInfo_2": { + "id": 76, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "a 6 bytes big complex structure for the Tfx settings of the secondary channel 2 (pressure)", + "version": { + "first": 494, + "last": 532 + }, + "values": { + "default": 0, + "minimum": -128, + "maximum": 127 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "OmsLastMessageCounter": { + "id": 77, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "An unit32_t value used to support/control the MB_MODE3_OMSv4B transmission uinque MCR", + "version": { + "first": 499, + "last": 532 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + } + }, + "status": { + "UNKNOWN_PARAMETER": { + "action": "According to the source code no action assigned to this error code", + "description": "It appears to be not used", + "id": 0 + }, + "BAD_CONFIG": { + "action": "Writing a new LOG or FDR content to Radio for forwarding to PeriodicLog", + "description": "A bit mask is written which is not valid (e.g. not all mandatory bits are equal to 1)", + "id": 1 + }, + "NO_CHANGE": { + "action": "Writing a new parameter value so several functions (e.g. Set HistoricalErrorLimitDays)", + "description": "The new value has no effect: New value == Old value)", + "id": 2 + }, + "STORE_PENDING": { + "action": "Writing SENSUSRADIO_STORECONFIGURATION to 1 ...", + "description": "The initiated storing action is still ongoing and the file system is busy. The final status is pending", + "id": 3 + }, + "DID_NOT_STORE": { + "action": "Writing SENSUSRADIO_STORECONFIGURATION to 1 ...", + "description": "This is a final status. The initiated storing action failed. An alternate status would be 'OK'", + "id": 4 + } + } + }, + "CONFIGEXCHANGE": { + "id": 4, + "version": { + "first": 3, + "last": 239 + }, + "registers": { + "Privilege": { + "id": 0, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Written to set the login level, followed by the password. Note, this can be read at any login level including 0.", + "version": { + "first": 3, + "last": 239 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 8 + }, + "statictype": "dynamic" + } + ] + }, + "Password": { + "id": 1, + "details": [ + { + "type": "uint96_t", + "privilege": { + "lvl1": "WO", + "lvl2": "WO", + "lvl3": "WO", + "lvl4": "WO", + "lvl5": "WO", + "lvl6": "WO", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Password for logging in, requires 3 consecutive writes", + "version": { + "first": 3, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "FOpen": { + "id": 2, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Remote file operations, use this to open a file on the meter, handle returned", + "version": { + "first": 20, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "FClose": { + "id": 3, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Remote file operations, use this to close a file on the meter", + "version": { + "first": 20, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "FRead": { + "id": 4, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Remote file operations, use this to read bytes from an open file", + "version": { + "first": 20, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "FWrite": { + "id": 5, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Remote file operations, use this to write bytes to an open file", + "version": { + "first": 20, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "FSeek": { + "id": 6, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Remote file operations, use this to seek within an open file", + "version": { + "first": 20, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "FTell": { + "id": 7, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Remote file operations, use this to determine position within an open file", + "version": { + "first": 20, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "Remove": { + "id": 8, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Remote file operations, use this to delete a file", + "version": { + "first": 20, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "FEOF": { + "id": 9, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Remote file operations, use this determine whether the current position in an open file is the end of the file", + "version": { + "first": 20, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "Catalogue": { + "id": 10, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Returns a list of files in the filesystem that matches a string containing wildcards passed in", + "version": { + "first": 49, + "last": 239 + }, + "statictype": "dynamic" + } + ] + }, + "PCBSerialNumber": { + "id": 12, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "String containing the PCB serial number. Note, this can be read at any login level including 0", + "version": { + "first": 59, + "last": 239 + }, + "statictype": "static" + } + ] + }, + "ConfigAccessRights": { + "id": 13, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bitmask of login levels permitted to manipulate dangerous files", + "version": { + "first": 59, + "last": 239 + }, + "statictype": "static" + } + ] + }, + "FFlush": { + "id": 14, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Remote file operations, use this to flush write buffers to an open file", + "version": { + "first": 66, + "last": 239 + }, + "statictype": "dynamic" + } + ] + } + }, + "status": { + "LOCKED_OUT": { + "id": 0 + }, + "AUTHENTICATION_FAILURE": { + "id": 1 + }, + "ACCESS_DENIED": { + "id": 2 + }, + "UNKNOWN_PARAMETER": { + "id": 3 + }, + "IN_USE": { + "id": 4 + }, + "SIZES_DONT_MATCH": { + "id": 5 + }, + "CANT_READ_CONFIG_FILE": { + "id": 6 + }, + "USER_NOT_KNOWN": { + "id": 7 + }, + "CANT_CREATE_CONFIG_FILE": { + "id": 8 + }, + "STORE_DIDNT_STORE": { + "id": 9 + }, + "STORE_CORRUPT": { + "id": 10 + }, + "EXPECTED_WRITE": { + "id": 11 + }, + "EXPECTED_READ": { + "id": 12 + }, + "STOP_CYCLING": { + "id": 13 + }, + "TOO_MANY_OPEN": { + "id": 14 + }, + "NEVER_OPENED": { + "id": 15 + }, + "FILE_PROTECTED": { + "id": 16 + }, + "PARTIAL_RECALL": { + "id": 17 + }, + "DEFAULT_PASSWORD_USED": { + "id": 18 + } + } + }, + "NFC": { + "id": 21, + "version": { + "first": 1, + "last": 63 + }, + "registers": { + "EraseRMA": { + "id": 0, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RW" + }, + "description": "Writing TRUE to this register erases the RMA area", + "version": { + "first": 7, + "last": 63 + }, + "statictype": "dynamic" + } + ] + }, + "ForceUpdate": { + "id": 1, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write to this to force an update of some data. 0 - NDEF readings, 1 - NDEF details, 2 - RMA details", + "version": { + "first": 49, + "last": 63 + }, + "statictype": "dynamic" + } + ] + } + }, + "status": { + "BAD_CONFIG": { + "id": 0 + }, + "NDEF_WRITE_FAIL": { + "id": 1 + }, + "NDEF_VERIFY_FAIL": { + "id": 2 + }, + "NDEF_UPDATE_FAIL": { + "id": 3 + }, + "RMA_WRITE_FAIL": { + "id": 4 + }, + "RMA_VERIFY_FAIL": { + "id": 5 + }, + "RMA_BAD_ENTRY": { + "id": 6 + }, + "INIT_FAIL": { + "id": 7 + }, + "NDEF_CONFIG_FAIL": { + "id": 8 + }, + "RMA_CONFIG_FAIL": { + "id": 9 + }, + "NDEF_START_FAIL": { + "id": 10 + }, + "RMA_START_FAIL": { + "id": 11 + } + } + }, + "SYSTEM": { + "id": 0, + "version": { + "first": 141, + "last": 538 + }, + "registers": { + "TriggerUpgrade": { + "id": 0, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Writing TRUE to this register internally calls SysTriggerUpgrade() then returns the result.", + "version": { + "first": 141, + "last": 538 + }, + "statictype": "dynamic" + } + ] + }, + "CheckPresence": { + "id": 1, + "details": [ + { + "type": "RPC", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Writing an application id number allows the version number of that application to be read back.", + "version": { + "first": 150, + "last": 538 + }, + "statictype": "dynamic" + } + ] + }, + "PCBSerialNumber": { + "id": 2, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "A string reporting the PCB serial number, this string must be set using production equipment.", + "version": { + "first": 169, + "last": 538 + }, + "values": { + "default": "" + }, + "statictype": "static" + } + ] + }, + "CustomerSerialNumber0": { + "id": 3, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A string reported relating to the customer, this string can be written only once after manufacture. If subsequent changes are needed CUSTOMERSERIALNUMBER1 must be used.", + "version": { + "first": 170, + "last": 538 + }, + "values": { + "default": "" + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "CustomerSerialNumber1": { + "id": 4, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A string reported relating to the customer, this string can be written only once after manufacture. If subsequent changes are needed CUSTOMERSERIALNUMBER2 must be used.", + "version": { + "first": 170, + "last": 538 + }, + "values": { + "default": "" + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "CustomerSerialNumber2": { + "id": 5, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A string reported relating to the customer, this string can be written only once after manufacture. If subsequent changes are needed CUSTOMERSERIALNUMBER3 must be used.", + "version": { + "first": 170, + "last": 538 + }, + "values": { + "default": "" + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "CustomerSerialNumber3": { + "id": 6, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A string reported relating to the customer, this string can be written only once after manufacture. This is the last customer serial number change slot.", + "version": { + "first": 170, + "last": 538 + }, + "values": { + "default": "" + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "MonotonicSeconds": { + "id": 7, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "The number of seconds since reboot.", + "version": { + "first": 176, + "last": 538 + }, + "statictype": "dynamic" + } + ] + }, + "CalendarSeconds": { + "id": 8, + "details": [ + { + "type": "time_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of seconds since 01-Jan-2000.", + "version": { + "first": 176, + "last": 538 + }, + "statictype": "dynamic" + } + ] + }, + "CoreRevision": { + "id": 9, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "A string reporting the product version string held in the system core binary.", + "version": { + "first": 196, + "last": 538 + }, + "statictype": "static" + } + ] + }, + "DriveCapacity": { + "id": 10, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Writing a drive number returns the drive capacity in bytes, or 0 if the drive is not ready, or an error if the driver is not configured to be present.", + "version": { + "first": 233, + "last": 538 + }, + "statictype": "dynamic" + } + ] + }, + "ExitReason": { + "id": 11, + "details": [ + { + "type": "status_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Writing an application id number allows the exit error number of that application to be read back.", + "version": { + "first": 258, + "last": 538 + }, + "statictype": "dynamic" + } + ] + }, + "CorePlatform": { + "id": 12, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Reports the instruction set of the hosting microprocessor in b8-15 and allocated platform number in b0-7.", + "version": { + "first": 265, + "last": 538 + }, + "statictype": "static" + } + ] + }, + "CRC": { + "id": 13, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Writing an application id number allows the CRC of that application to be read back.", + "version": { + "first": 279, + "last": 538 + }, + "statictype": "dynamic" + } + ] + }, + "UpgradePermissions": { + "id": 14, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bitfield of permissions releated to firmware upgrade", + "version": { + "first": 470, + "last": 538 + }, + "statictype": "static" + } + ] + }, + "CRC32": { + "id": 15, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Writing an application id number allows the 32 bit CRC of that application to be read back.", + "version": { + "first": 529, + "last": 538 + }, + "statictype": "dynamic" + } + ] + } + }, + "status": { + "OK": { + "id": 0 + }, + "ZERO_APPS": { + "id": 1 + }, + "NO_MEMORY": { + "id": 2 + }, + "NOT_IMPLEMENTED": { + "id": 3 + }, + "BLOCK_NOT_FOUND": { + "id": 4 + }, + "NO_SUCH_VAR": { + "id": 5 + }, + "NO_CLIB": { + "id": 6 + }, + "KEY_FAILURE": { + "id": 7 + }, + "NO_SLOTS_FREE": { + "id": 8 + }, + "VECTOR_OUT_OF_RANGE": { + "id": 9 + }, + "BAD_VECTOR_RELEASE": { + "id": 10 + }, + "DRIVER_BUSY": { + "id": 11 + }, + "OUT_OF_RANGE": { + "id": 12 + }, + "CANT_CANCEL_TICK": { + "id": 13 + }, + "ID_OUT_OF_RANGE": { + "id": 14 + }, + "HANDLE_OUT_OF_RANGE": { + "id": 15 + }, + "INCAPABLE_HARDWARE": { + "id": 16 + }, + "ALREADY_OPEN": { + "id": 17 + }, + "STRING_TOO_LONG": { + "id": 18 + }, + "CORRUPT_CONFIGURATION": { + "id": 19 + }, + "TIMEOUT": { + "id": 20 + }, + "NO_PRIVILEGE": { + "id": 21 + }, + "DEVICE_DORMANT": { + "id": 22 + }, + "MEDIA_FAILURE": { + "id": 23 + }, + "BUFFER_OVERFLOW": { + "id": 24 + }, + "UPGRADE_SYNTAX_ERROR": { + "id": 25 + }, + "UPGRADE_DEPENDENCY_NOT_MET": { + "id": 26 + }, + "UPGRADE_MISSING": { + "id": 27 + }, + "UPGRADE_FRAGMENTED_BY_CLIB": { + "id": 28 + }, + "TRUNCATED": { + "id": 29 + }, + "INVALID_HEADER": { + "id": 30 + }, + "WONT_DELETE_CLIB": { + "id": 31 + }, + "BAD_REGISTER_VALUE": { + "id": 32 + }, + "NO_CHANGE_MADE": { + "id": 33 + }, + "NOT_ATOMIC": { + "id": 34 + }, + "CALENDAR_CHANGED": { + "id": 35 + }, + "WORM_FIELD": { + "id": 36 + }, + "CONVERSION_UNSUPPORTED": { + "id": 37 + }, + "CPU_PERMISSION_FAULT": { + "id": 38 + }, + "CPU_SOFTWARE_FAULT": { + "id": 39 + }, + "CPU_DECODE_FAULT": { + "id": 40 + }, + "CPU_ADDRESS_ACCESS_FAULT": { + "id": 41 + }, + "CPU_UNCAUGHT_FAULT": { + "id": 42 + }, + "ACCURACY_LOST": { + "id": 43 + }, + "EXIT_FAILURE": { + "id": 44 + }, + "CANT_CANCEL_CALLBACK": { + "id": 45 + }, + "RECOVERED_SPACE": { + "id": 46 + }, + "DRIVE_FULL": { + "id": 47 + }, + "NO_FILE_HANDLES_AVAILABLE": { + "id": 48 + }, + "EXCESSIVE_RESTARTS": { + "id": 49 + }, + "MPU_SETUP_FAILED": { + "id": 50 + }, + "DEVICE_NOT_OPEN": { + "id": 51 + }, + "NO_RESPONSE": { + "id": 52 + }, + "EXIT_WATCHDOG": { + "id": 53 + }, + "WONT_DELETE_SPECIAL": { + "id": 54 + }, + "WONT_UPGRADE_SPECIAL": { + "id": 55 + } + } + }, + "METROLOGYASST": { + "id": 18, + "version": { + "first": 4, + "last": 115 + }, + "registers": { + "ILoopMaxFlowRate": { + "id": 0, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The flow rate that gives max output on the current loop", + "version": { + "first": 5, + "last": 36 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The flow rate that gives max output on the current loop", + "version": { + "first": 82, + "last": 115 + }, + "statictype": "static" + } + ] + }, + "StoreConfiguration": { + "id": 1, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Writing TRUE to this register stores the values of the other registers to the non-volatile memory", + "version": { + "first": 7, + "last": 81 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Writing TRUE to this register stores the values of the other registers to the non-volatile memory", + "version": { + "first": 82, + "last": 115 + }, + "statictype": "dynamic" + } + ] + }, + "PulseWeight": { + "id": 2, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Volume represented by one pulse in ml. If this is zero pulse output will not be enabled", + "version": { + "first": 7, + "last": 81 + }, + "values": { + "default": 1000, + "minimum": 1, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Volume represented by one pulse in ml. If this is zero pulse output will not be enabled", + "version": { + "first": 82, + "last": 101 + }, + "values": { + "default": 1000, + "minimum": 1, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Volume represented by one pulse. Units of (2^-5)ml. If this is zero pulse output will not be enabled", + "version": { + "first": 102, + "last": 115 + }, + "values": { + "default": 32000, + "minimum": 1, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "PulseMode": { + "id": 3, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The way pulses are output on the two available channels. This is an enum of type pulse_mode_t.", + "version": { + "first": 7, + "last": 81 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The way pulses are output on the two available channels. This is an enum of type pulse_mode_t.", + "version": { + "first": 82, + "last": 97 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The way pulses are output on the two available channels. This is an enum of type pulse_mode_t.", + "version": { + "first": 98, + "last": 115 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 7 + }, + "statictype": "static" + } + ] + }, + "PulseLength": { + "id": 4, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The length of a pulse. This is an enum of type pulse_length_t.", + "version": { + "first": 7, + "last": 72 + }, + "values": { + "default": 5, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The length of a pulse. This is an enum of type pulse_length_t.", + "version": { + "first": 73, + "last": 81 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The length of a pulse. This is an enum of type pulse_length_t.", + "version": { + "first": 82, + "last": 115 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "FlowUnits": { + "id": 5, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The units of flow rate to display on the LCD. An enum of type displayflowunits_t", + "version": { + "first": 8, + "last": 81 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 8 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The units of flow rate to display on the LCD. An enum of type displayflowunits_t", + "version": { + "first": 82, + "last": 115 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 8 + }, + "statictype": "static" + } + ] + }, + "FlowPoint": { + "id": 6, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Position of the decimal point on the LCD for flow rate. An enum of type displayflowpoint_t", + "version": { + "first": 8, + "last": 81 + }, + "values": { + "default": 2, + "minimum": 0, + "maximum": 4 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Position of the decimal point on the LCD for flow rate. An enum of type displayflowpoint_t", + "version": { + "first": 82, + "last": 115 + }, + "values": { + "default": 2, + "minimum": 0, + "maximum": 4 + }, + "statictype": "static" + } + ] + }, + "ILoopRate": { + "id": 7, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The update rate for the current loop", + "version": { + "first": 9, + "last": 36 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The update rate for the current loop", + "version": { + "first": 82, + "last": 115 + }, + "statictype": "static" + } + ] + }, + "TemperatureUnits": { + "id": 8, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Units for displaying temperature on the LCD. 0 – Celcius, 1 – Fahrenheit.", + "version": { + "first": 13, + "last": 81 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Units for displaying temperature on the LCD. 0 – Celcius, 1 – Fahrenheit.", + "version": { + "first": 82, + "last": 115 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + } + ] + }, + "PressureUnits": { + "id": 9, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Units for displaying pressure on the LCD. 0 – Mpa, 1 – PSI.", + "version": { + "first": 13, + "last": 81 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Units for displaying pressure on the LCD. 0 – Mpa, 1 – PSI.", + "version": { + "first": 82, + "last": 115 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + } + ] + }, + "PressureRate": { + "id": 10, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time between pressure measurements in milliseconds", + "version": { + "first": 13, + "last": 71 + }, + "values": { + "default": 300000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time between pressure measurements in milliseconds", + "version": { + "first": 72, + "last": 81 + }, + "values": { + "default": 60000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time between pressure measurements in milliseconds", + "version": { + "first": 82, + "last": 115 + }, + "values": { + "default": 60000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "PressureOffset": { + "id": 11, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Value in Pa to subtract from measured value to correct for atmospheric pressure", + "version": { + "first": 13, + "last": 58 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Value in Pa to subtract from measured value to correct for atmospheric pressure", + "version": { + "first": 59, + "last": 79 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Value in Pa to subtract from measured value to correct for atmospheric pressure", + "version": { + "first": 80, + "last": 81 + }, + "values": { + "default": 0, + "minimum": -2000000, + "maximum": 2000000 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Value in Pa to subtract from measured value to correct for atmospheric pressure", + "version": { + "first": 82, + "last": 115 + }, + "values": { + "default": 0, + "minimum": -2000000, + "maximum": 2000000 + }, + "statictype": "static" + } + ] + }, + "PressurePresent": { + "id": 12, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Whether there is a pressure sensor present", + "version": { + "first": 63, + "last": 70 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Whether there is a pressure sensor present", + "version": { + "first": 71, + "last": 115 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + } + ] + }, + "PressureMeasure": { + "id": 13, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write TRUE to trigger a pressure measurement, Read to get the latest measured value in Pa", + "version": { + "first": 65, + "last": 115 + }, + "statictype": "dynamic" + } + ] + }, + "LatestFlowRate": { + "id": 14, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Returns the latest flow rate. Write 0 to change scaling to internal scaling, 1 to change to display scaling", + "version": { + "first": 92, + "last": 115 + }, + "statictype": "dynamic" + } + ] + }, + "GenerateFwdPulses": { + "id": 15, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Generate some artificial pulses, used for testing", + "version": { + "first": 97, + "last": 115 + }, + "values": { + "minimum": 0, + "maximum": 255 + }, + "statictype": "dynamic" + } + ] + }, + "GenerateRevPulses": { + "id": 16, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Generate some artificial pulses, used for testing", + "version": { + "first": 97, + "last": 115 + }, + "values": { + "minimum": 0, + "maximum": 255 + }, + "statictype": "dynamic" + } + ] + }, + "PulseEvenDistribution": { + "id": 17, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Boolean value for whether pulse output is to space the pulses evenly (TRUE) or grouped (FALSE)", + "version": { + "first": 98, + "last": 115 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + } + ] + }, + "PulseResolution": { + "id": 18, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "The number of bits of fractional resolution in a pulse event", + "version": { + "first": 98, + "last": 115 + }, + "values": { + "minimum": 0, + "maximum": 7 + }, + "statictype": "dynamic" + } + ] + }, + "PressureCalibration": { + "id": 19, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Value in Pa to add to measured value after recalibration to correct for sensor drift over time", + "version": { + "first": 108, + "last": 111 + }, + "values": { + "default": 0, + "minimum": -1000000, + "maximum": 1000000 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Value in Pa to add to measured value after recalibration to correct for sensor drift over time", + "version": { + "first": 112, + "last": 115 + }, + "values": { + "default": 0, + "minimum": -4000000, + "maximum": 4000000 + }, + "statictype": "static" + } + ] + } + }, + "status": { + "BAD_CONFIG": { + "id": 0 + }, + "DID_NOT_STORE": { + "id": 1 + }, + "PENDING_STORE": { + "id": 2 + } + } + }, + "LOGGER": { + "id": 8, + "version": { + "first": 1, + "last": 18 + }, + "registers": { + "Quota": { + "id": 0, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A quota in bytes for the log. The Logger does not apply any policy to how the quota is allocated, this is left as a restriction to be applied on a product by product basis.", + "version": { + "first": 1, + "last": 18 + }, + "values": { + "default": 4096, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "Drive": { + "id": 1, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The drive to write to.", + "version": { + "first": 1, + "last": 18 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "TriggerLogFlush": { + "id": 2, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Writing TRUE will force a log flush", + "version": { + "first": 7, + "last": 18 + }, + "statictype": "dynamic" + } + ] + }, + "StoreConfiguration": { + "id": 3, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 16, + "last": 18 + }, + "statictype": "dynamic" + } + ] + } + }, + "status": { + "UNKNOWN_PARAMETER": { + "id": 0 + }, + "RESTARTED": { + "id": 1 + }, + "BLOCK_LISTING": { + "id": 2 + }, + "PENDING_STORE": { + "id": 3 + }, + "DID_NOT_STORE": { + "id": 4 + } + } + }, + "TESTMANAGER": { + "id": 98, + "version": { + "first": null, + "last": 36 + }, + "registers": { + "OutputFile": { + "id": 0, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Access the test log filename.", + "version": { + "first": null, + "last": 36 + }, + "statictype": null + } + ] + }, + "TestNumber": { + "id": 1, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Access the test sequence number.", + "version": { + "first": null, + "last": 36 + }, + "statictype": null + } + ] + }, + "TestStatus": { + "id": 2, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Access the Test Manager state variable.", + "version": { + "first": null, + "last": 36 + }, + "statictype": null + } + ] + }, + "TrapError": { + "id": 3, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Access the last recorded error code.", + "version": { + "first": null, + "last": 36 + }, + "statictype": null + } + ] + }, + "TestParameter": { + "id": 4, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Access the test parameter variable.", + "version": { + "first": null, + "last": 36 + }, + "statictype": null + } + ] + } + }, + "status": { + "FAIL": { + "id": 0 + }, + "UNKNOWN_PARAMETER": { + "id": 1 + }, + "READ_ONLY_PARAMETER": { + "id": 2 + }, + "BUSY": { + "id": 3 + }, + "STRING_TOO_LONG": { + "id": 4 + }, + "FOPEN_FAIL": { + "id": 5 + }, + "FSEEK_FAIL": { + "id": 6 + }, + "FWRITE_FAIL": { + "id": 7 + }, + "FCLOSE_FAIL": { + "id": 8 + }, + "MALFORMED_FILENAME": { + "id": 9 + }, + "UNKNOWN_ACTION": { + "id": 10 + }, + "FILEREMOVE_FAIL": { + "id": 11 + }, + "FREAD_FAIL": { + "id": 12 + } + } + }, + "PERIODICLOG": { + "id": 17, + "version": { + "first": 1, + "last": 75 + }, + "registers": { + "DataLogContents": { + "id": 0, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bit Mask of the items to store in LOG memory", + "version": { + "first": 10, + "last": 75 + }, + "values": { + "default": 201335811, + "minimum": 3, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "DataLogPeriod": { + "id": 1, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Storage Period of the LOG memory in minutes", + "version": { + "first": 10, + "last": 75 + }, + "values": { + "default": 60, + "minimum": 1, + "maximum": 1440 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "AverageFlowPeriod": { + "id": 2, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Averiging period for the Min/Max calculation of LOG&FDR memory", + "version": { + "first": 10, + "last": 75 + }, + "values": { + "default": 5, + "minimum": 1, + "maximum": 60 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "FixedDateReadingContents": { + "id": 3, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bit Mask of the items to store in FDR memory", + "version": { + "first": 10, + "last": 75 + }, + "values": { + "default": 201335811, + "minimum": 3, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "FixedDateDayOfMonth": { + "id": 4, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The day of month the FDR storage will take place at 00:00", + "version": { + "first": 10, + "last": 75 + }, + "values": { + "default": 1, + "minimum": 1, + "maximum": 28 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "PeriodicLogLifeTimeCounter": { + "id": 5, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A counter used for internal purposes", + "version": { + "first": 15, + "last": 75 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "dynamic" + } + ] + }, + "ResetCounter": { + "id": 6, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A counter to monitor the application resets", + "version": { + "first": 20, + "last": 75 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + } + }, + "status": { + "FOPEN": { + "action": "Perform a FOPEN to any of the logging files logdata, fdrdata, evtdata ... ", + "description": "FOPEN action failed due to any reason (means fopen error)", + "id": 0 + }, + "BAD_CONFIG": { + "action": "Handle the internal dual logging file access by SensusRfRadio and by PeriodicLogging", + "description": "Mutual Exclude file access failed due to a wrong internal status order", + "id": 1 + }, + "STRING_TOO_LONG": { + "action": "Currently unused or not define action", + "description": "Currently not generated or returned", + "id": 2 + }, + "FILES_IN_USE": { + "action": "Handle the internal dual logging file access by SensusRfRadio and by PeriodicLogging", + "description": "File access denied because the other party has currently access to the file(s)", + "id": 3 + } + } + }, + "POWERMON": { + "id": 1, + "version": { + "first": 17, + "last": 71 + }, + "registers": { + "BatteryVoltage": { + "id": 0, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Measured battery terminal voltage in 1mV units.", + "version": { + "first": 17, + "last": 71 + }, + "statictype": "dynamic" + } + ] + }, + "BatteryManufacturer": { + "id": 1, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "String describing the battery brand.", + "version": { + "first": 17, + "last": 71 + }, + "values": { + "default": "Tadiran" + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "BatterySize": { + "id": 2, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "One of: 0 = battery absent; 1 = built in; 2 = other; 3 = AA; 4 = AAA; 5 = C; 6 = D; 255 = unknown", + "version": { + "first": 17, + "last": 71 + }, + "values": { + "default": 6, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "BatteryQuantity": { + "id": 4, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "The number of installed batteries.", + "version": { + "first": 17, + "last": 59 + }, + "values": { + "default": 1 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of installed batteries.", + "version": { + "first": 60, + "last": 71 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "BatteryRatedVoltage": { + "id": 5, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Datasheet terminal voltage in 100mV units as manufactured.", + "version": { + "first": 17, + "last": 71 + }, + "values": { + "default": 36, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "BatteryVoltageMinThreshold": { + "id": 7, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Datasheet terminal voltage in 100mV units below which the cell is considered empty.", + "version": { + "first": 17, + "last": 71 + }, + "values": { + "default": 28, + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "BatterySelection": { + "id": 8, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Chosen manufacturer from the internal lookup table of known batteries.", + "version": { + "first": 20, + "last": 71 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + } + ] + }, + "TotalUsedCharge": { + "id": 9, + "details": [ + { + "type": "uint64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Accumulated charge used in uAs.", + "version": { + "first": 24, + "last": 71 + }, + "statictype": "dynamic" + } + ] + }, + "TotalUsedSeconds": { + "id": 10, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Elapsed time since manufacture in seconds.", + "version": { + "first": 39, + "last": 71 + }, + "statictype": "dynamic" + } + ] + }, + "WarnFromClamp": { + "id": 11, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Time in seconds for which the projected end time cannot exceed.", + "version": { + "first": 39, + "last": 71 + }, + "values": { + "default": 473040000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "BatteryMilliAHrRating": { + "id": 12, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "Datasheet capacity in mAh units as manufactured.", + "version": { + "first": 45, + "last": 71 + }, + "values": { + "default": 19000, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "StoreConfiguration": { + "id": 13, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 61, + "last": 71 + }, + "statictype": "dynamic" + } + ] + }, + "CriticalRepeatLimit": { + "id": 14, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of 15 minute periods of consecutive low battery voltage required for the battery to be deemed critically low", + "version": { + "first": 66, + "last": 71 + }, + "values": { + "default": 96, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + } + }, + "status": { + "TABLE_FULL": { + "id": 0 + }, + "UNKNOWN_PARAMETER": { + "id": 1 + }, + "OUT_OF_RANGE": { + "id": 2 + }, + "STOP_CYCLING": { + "id": 3 + }, + "TEMPERATURE_LIMIT": { + "id": 4 + }, + "BATTERY_STATUS_CHANGED": { + "id": 5 + }, + "BATTERY_CRITICAL": { + "id": 6 + }, + "PENDING_STORE": { + "id": 7 + }, + "DID_NOT_STORE": { + "id": 8 + } + } + }, + "GENESISFLOW": { + "id": 15, + "version": { + "first": 7, + "last": 606 + }, + "registers": { + "SampleRate": { + "id": 0, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The rate in Hz that each GP30 takes measurements", + "version": { + "first": 7, + "last": 203 + }, + "values": { + "default": 6, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The rate in Hz that each GP30 takes measurements", + "version": { + "first": 204, + "last": 267 + }, + "values": { + "default": 2, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The rate in Hz that each GP30 takes measurements", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 2, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The rate in Hz that each GP30 takes measurements", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 2, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The rate in Hz that each GP30 takes measurements", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 2, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The rate in Hz that each GP30 takes measurements", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 2, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "FirstHitLvlUp1": { + "id": 1, + "details": [ + { + "type": "int8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", + "version": { + "first": 7, + "last": 267 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + } + ] + }, + "FirstHitLvlUp2": { + "id": 2, + "details": [ + { + "type": "int8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", + "version": { + "first": 7, + "last": 267 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + } + ] + }, + "FirstHitLvlUp3": { + "id": 3, + "details": [ + { + "type": "int8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", + "version": { + "first": 7, + "last": 267 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + } + ] + }, + "FirstHitLvlDown1": { + "id": 4, + "details": [ + { + "type": "int8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", + "version": { + "first": 7, + "last": 267 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + } + ] + }, + "FirstHitLvlDown2": { + "id": 5, + "details": [ + { + "type": "int8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", + "version": { + "first": 7, + "last": 267 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + } + ] + }, + "FirstHitLvlDown3": { + "id": 6, + "details": [ + { + "type": "int8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", + "version": { + "first": 7, + "last": 267 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": -128, + "maximum": 127 + }, + "statictype": "dynamic" + } + ] + }, + "StartHit": { + "id": 7, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The hit number to consider as the first hit", + "version": { + "first": 7, + "last": 267 + }, + "values": { + "default": 6, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The hit number to consider as the first hit", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 6, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The hit number to consider as the first hit", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 6, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The hit number to consider as the first hit", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 6, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The hit number to consider as the first hit", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 6, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "AmplitudePeakDetectEnd": { + "id": 8, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Where to stop running the amplitude peak detection", + "version": { + "first": 7, + "last": 267 + }, + "values": { + "default": 19, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Where to stop running the amplitude peak detection", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 19, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Where to stop running the amplitude peak detection", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 19, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Where to stop running the amplitude peak detection", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 19, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Where to stop running the amplitude peak detection", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 19, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "NumFirePulses": { + "id": 9, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of pulses to fire for a measurement", + "version": { + "first": 7, + "last": 267 + }, + "values": { + "default": 17, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of pulses to fire for a measurement", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 17, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of pulses to fire for a measurement", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 17, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of pulses to fire for a measurement", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 17, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of pulses to fire for a measurement", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 17, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "DisplayPow10": { + "id": 10, + "details": [ + { + "type": "int8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", + "version": { + "first": 36, + "last": 267 + }, + "values": { + "default": -6, + "minimum": -128, + "maximum": 127 + }, + "statictype": "static" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": -6, + "minimum": -128, + "maximum": 127 + }, + "statictype": "static" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": -6, + "minimum": -128, + "maximum": 127 + }, + "statictype": "static" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": -6, + "minimum": -128, + "maximum": 127 + }, + "statictype": "static" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": -6, + "minimum": -128, + "maximum": 127 + }, + "statictype": "static" + } + ] + }, + "DisplayUnits": { + "id": 11, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", + "version": { + "first": 36, + "last": 267 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + } + ] + }, + "MeterSize": { + "id": 12, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The meter pipe size", + "version": { + "first": 45, + "last": 237 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 9 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The meter pipe size", + "version": { + "first": 238, + "last": 267 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 17 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The meter pipe size", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 17 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The meter pipe size", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 17 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The meter pipe size", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 17 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The meter pipe size", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 17 + }, + "statictype": "static" + } + ] + }, + "CalFactor1": { + "id": 13, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 1", + "version": { + "first": 45, + "last": 200 + }, + "values": { + "default": 62500, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 1", + "version": { + "first": 201, + "last": 267 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 1", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 1", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 1", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 1", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + } + ] + }, + "CalFactor2": { + "id": 14, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 2", + "version": { + "first": 45, + "last": 200 + }, + "values": { + "default": 62500, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 2", + "version": { + "first": 201, + "last": 267 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 2", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 2", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 2", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 2", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + } + ] + }, + "CalFactor3": { + "id": 15, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 3", + "version": { + "first": 45, + "last": 200 + }, + "values": { + "default": 62500, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 3", + "version": { + "first": 201, + "last": 267 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 3", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 3", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 3", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration factor for ultrasonic channel 3", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 15625, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + } + ] + }, + "ZeroOffset1": { + "id": 16, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in usual time of flight scaling (ie LS bit is 2^-38 seconds)", + "version": { + "first": 45, + "last": 132 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 133, + "last": 267 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + } + ] + }, + "ZeroOffset2": { + "id": 17, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in usual time of flight scaling (ie LS bit is 2^-38 seconds)", + "version": { + "first": 45, + "last": 132 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 133, + "last": 267 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + } + ] + }, + "ZeroOffset3": { + "id": 18, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in usual time of flight scaling (ie LS bit is 2^-38 seconds)", + "version": { + "first": 45, + "last": 132 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 133, + "last": 267 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "static" + } + ] + }, + "ScaledBilling": { + "id": 19, + "details": [ + { + "type": "int64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "The scaled volume value shown on the display. In the units and precision set by DisplayUnits and DisplayPow10 respectively. Decimal point is not represented in this value", + "version": { + "first": 47, + "last": 316 + }, + "statictype": "dynamic" + }, + { + "type": "int64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "The scaled volume value shown on the display. In the units and precision set by DisplayUnits and DisplayPow10 respectively. Decimal point is not represented in this value", + "version": { + "first": 450, + "last": 463 + }, + "statictype": "dynamic" + }, + { + "type": "int64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "The scaled volume value shown on the display. In the units and precision set by DisplayUnits and DisplayPow10 respectively. Decimal point is not represented in this value", + "version": { + "first": 500, + "last": 509 + }, + "statictype": "dynamic" + }, + { + "type": "int64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "The scaled volume value shown on the display. In the units and precision set by DisplayUnits and DisplayPow10 respectively. Decimal point is not represented in this value", + "version": { + "first": 601, + "last": 606 + }, + "statictype": "dynamic" + } + ] + }, + "ResetAccumulators": { + "id": 20, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "WO", + "lvl2": "WO", + "lvl3": "WO", + "lvl4": "WO", + "lvl5": "WO", + "lvl6": "WO", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write 1 to reset all accumulated volume to zero", + "version": { + "first": 47, + "last": 267 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write 1 to reset all accumulated volume to zero", + "version": { + "first": 268, + "last": 316 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write 1 to reset all accumulated volume to zero", + "version": { + "first": 450, + "last": 463 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write 1 to reset all accumulated volume to zero", + "version": { + "first": 500, + "last": 509 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write 1 to reset all accumulated volume to zero", + "version": { + "first": 601, + "last": 606 + }, + "statictype": "dynamic" + } + ] + }, + "ForwardArrow": { + "id": 21, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", + "version": { + "first": 47, + "last": 267 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 2 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 2 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 2 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 2 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 2 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "LedMode": { + "id": 22, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The type of data output by the green LED", + "version": { + "first": 47, + "last": 203 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The type of data output by the green LED", + "version": { + "first": 204, + "last": 267 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The type of data output by the green LED", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The type of data output by the green LED", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The type of data output by the green LED", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The type of data output by the green LED", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 6 + }, + "statictype": "static" + } + ] + }, + "StoreCalibration": { + "id": 23, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store calibration values to non-volatile storage. Read back for status", + "version": { + "first": 54, + "last": 316 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store calibration values to non-volatile storage. Read back for status", + "version": { + "first": 450, + "last": 463 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store calibration values to non-volatile storage. Read back for status", + "version": { + "first": 500, + "last": 509 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store calibration values to non-volatile storage. Read back for status", + "version": { + "first": 601, + "last": 606 + }, + "statictype": "dynamic" + } + ] + }, + "UnscaledFwd": { + "id": 24, + "details": [ + { + "type": "uint64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The forward flow accumulator volume. The scale depends on the meter size", + "version": { + "first": 54, + "last": 316 + }, + "statictype": "dynamic" + }, + { + "type": "uint64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The forward flow accumulator volume. The scale depends on the meter size", + "version": { + "first": 450, + "last": 463 + }, + "statictype": "dynamic" + }, + { + "type": "uint64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The forward flow accumulator volume. The scale depends on the meter size", + "version": { + "first": 500, + "last": 509 + }, + "statictype": "dynamic" + }, + { + "type": "uint64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The forward flow accumulator volume. The scale depends on the meter size", + "version": { + "first": 601, + "last": 606 + }, + "statictype": "dynamic" + } + ] + }, + "UnscaledRev": { + "id": 25, + "details": [ + { + "type": "uint64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The reverse flow accumulator volume. The scale depends on the meter size", + "version": { + "first": 54, + "last": 316 + }, + "statictype": "dynamic" + }, + { + "type": "uint64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The reverse flow accumulator volume. The scale depends on the meter size", + "version": { + "first": 450, + "last": 463 + }, + "statictype": "dynamic" + }, + { + "type": "uint64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The reverse flow accumulator volume. The scale depends on the meter size", + "version": { + "first": 500, + "last": 509 + }, + "statictype": "dynamic" + }, + { + "type": "uint64_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The reverse flow accumulator volume. The scale depends on the meter size", + "version": { + "first": 601, + "last": 606 + }, + "statictype": "dynamic" + } + ] + }, + "LowFlowThreshold": { + "id": 26, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", + "version": { + "first": 55, + "last": 267 + }, + "values": { + "default": 200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "LowFlowMaxPeriod": { + "id": 27, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", + "version": { + "first": 55, + "last": 267 + }, + "values": { + "default": 3932160, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 3932160, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 3932160, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 3932160, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 3932160, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "UpdateThreshold": { + "id": 28, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", + "version": { + "first": 55, + "last": 267 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "ArrowThreshold": { + "id": 29, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", + "version": { + "first": 55, + "last": 267 + }, + "values": { + "default": 5000000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 5000000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 5000000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 5000000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 5000000, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "FireBuffer1": { + "id": 30, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 1 to be used", + "version": { + "first": 64, + "last": 267 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 1 to be used", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 1 to be used", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 1 to be used", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 1 to be used", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "FireBuffer2": { + "id": 31, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 2 to be used", + "version": { + "first": 64, + "last": 267 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 2 to be used", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 2 to be used", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 2 to be used", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 2 to be used", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "FireBuffer3": { + "id": 32, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 3 to be used", + "version": { + "first": 64, + "last": 267 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 3 to be used", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 3 to be used", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 3 to be used", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The fire buffer within the GP30 on channel 3 to be used", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "TriggerActive": { + "id": 33, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "WO", + "lvl2": "WO", + "lvl3": "WO", + "lvl4": "WO", + "lvl5": "WO", + "lvl6": "WO", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", + "version": { + "first": 75, + "last": 267 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", + "version": { + "first": 268, + "last": 306 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", + "version": { + "first": 307, + "last": 316 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", + "version": { + "first": 450, + "last": 463 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", + "version": { + "first": 500, + "last": 509 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", + "version": { + "first": 601, + "last": 606 + }, + "statictype": "dynamic" + } + ] + }, + "TriggerIdle": { + "id": 34, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 0 to put GenesisFlow in Active mode, otherwise put GenesisFlow in Idle mode. Idle mode displays just the number written to TriggerIdle. No measurements are performed. Read returns the number written", + "version": { + "first": 75, + "last": 316 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "dynamic" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 0 to put GenesisFlow in Active mode, otherwise put GenesisFlow in Idle mode. Idle mode displays just the number written to TriggerIdle. No measurements are performed. Read returns the number written", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "dynamic" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 0 to put GenesisFlow in Active mode, otherwise put GenesisFlow in Idle mode. Idle mode displays just the number written to TriggerIdle. No measurements are performed. Read returns the number written", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "dynamic" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 0 to put GenesisFlow in Active mode, otherwise put GenesisFlow in Idle mode. Idle mode displays just the number written to TriggerIdle. No measurements are performed. Read returns the number written", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "dynamic" + } + ] + }, + "MaxValidDeltaToF": { + "id": 35, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 87, + "last": 267 + }, + "values": { + "default": 247390, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 309237, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 309237, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 309237, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 309237, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "MaxValidToF": { + "id": 36, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 87, + "last": 267 + }, + "values": { + "default": 24739011, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 24739011, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 24739011, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 24739011, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 24739011, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "MinValidToF": { + "id": 37, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 87, + "last": 267 + }, + "values": { + "default": 13743895, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 13743895, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 13743895, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 13743895, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 13743895, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "FirstHitPercent1": { + "id": 38, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", + "version": { + "first": 93, + "last": 267 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "FirstHitPercent2": { + "id": 39, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", + "version": { + "first": 93, + "last": 267 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "FirstHitPercent3": { + "id": 40, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", + "version": { + "first": 93, + "last": 267 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "FirstHitShift": { + "id": 41, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", + "version": { + "first": 93, + "last": 267 + }, + "values": { + "default": 4, + "minimum": 3, + "maximum": 8 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 4, + "minimum": 3, + "maximum": 8 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 4, + "minimum": 3, + "maximum": 8 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 4, + "minimum": 3, + "maximum": 8 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 4, + "minimum": 3, + "maximum": 8 + }, + "statictype": "static" + } + ] + }, + "FirstHitMinimum": { + "id": 42, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum absolute first hit level value", + "version": { + "first": 93, + "last": 267 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum absolute first hit level value", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum absolute first hit level value", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum absolute first hit level value", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum absolute first hit level value", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 20, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "ToFErrorLimit": { + "id": 43, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", + "version": { + "first": 93, + "last": 267 + }, + "values": { + "default": 16, + "minimum": 1, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 16, + "minimum": 1, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 16, + "minimum": 1, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 16, + "minimum": 1, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 16, + "minimum": 1, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "FirstHitUpdatePeriod": { + "id": 44, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The period (in seconds) between first hit level updates", + "version": { + "first": 99, + "last": 267 + }, + "values": { + "default": 10, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The period (in seconds) between first hit level updates", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 10, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The period (in seconds) between first hit level updates", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 10, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The period (in seconds) between first hit level updates", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 10, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The period (in seconds) between first hit level updates", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 10, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "PipeFillingDelay": { + "id": 45, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", + "version": { + "first": 119, + "last": 267 + }, + "values": { + "default": 30, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 30, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 30, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 30, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 30, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "ToFTempOffset1": { + "id": 46, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", + "version": { + "first": 124, + "last": 267 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "ToFTempOffset2": { + "id": 47, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", + "version": { + "first": 124, + "last": 267 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "ToFTempOffset3": { + "id": 48, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", + "version": { + "first": 124, + "last": 267 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": -2147483648, + "maximum": 2147483647 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "ToFTempCalibrate": { + "id": 49, + "details": [ + { + "type": "int32_t", + "privilege": { + "lvl1": "WO", + "lvl2": "WO", + "lvl3": "WO", + "lvl4": "WO", + "lvl5": "WO", + "lvl6": "WO", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", + "version": { + "first": 124, + "last": 204 + }, + "values": { + "minimum": 0, + "maximum": 270336 + }, + "statictype": "dynamic" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", + "version": { + "first": 205, + "last": 316 + }, + "values": { + "minimum": 0, + "maximum": 286720 + }, + "statictype": "dynamic" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "minimum": 0, + "maximum": 286720 + }, + "statictype": "dynamic" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "minimum": 0, + "maximum": 286720 + }, + "statictype": "dynamic" + }, + { + "type": "int32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "minimum": 0, + "maximum": 286720 + }, + "statictype": "dynamic" + } + ] + }, + "StoreConfiguration": { + "id": 50, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 141, + "last": 267 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 268, + "last": 316 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 450, + "last": 463 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 500, + "last": 509 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 601, + "last": 606 + }, + "statictype": "dynamic" + } + ] + }, + "SealDisplay": { + "id": 51, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", + "version": { + "first": 161, + "last": 267 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + } + ] + }, + "TriggerTest": { + "id": 52, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", + "version": { + "first": 162, + "last": 267 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "dynamic" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "dynamic" + } + ] + }, + "MaxValidAmplitude": { + "id": 53, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Maximum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 168, + "last": 267 + }, + "values": { + "default": 2936012800, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Maximum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 2936012800, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Maximum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 2936012800, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Maximum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 2936012800, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Maximum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 2936012800, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "MinValidAmplitude": { + "id": 54, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 168, + "last": 267 + }, + "values": { + "default": 209715200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 209715200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 209715200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 209715200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Minimum amplitude for a valid signal in 2^-22mV units", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 209715200, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "HardErrorLimit": { + "id": 55, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Number of hard errors to allow before declaring a fatal error", + "version": { + "first": 176, + "last": 267 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Number of hard errors to allow before declaring a fatal error", + "version": { + "first": 268, + "last": 316 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Number of hard errors to allow before declaring a fatal error", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Number of hard errors to allow before declaring a fatal error", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Number of hard errors to allow before declaring a fatal error", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 4, + "minimum": 0, + "maximum": 65535 + }, + "statictype": "static" + } + ] + }, + "Timeout": { + "id": 56, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The timeout for an ultrasonic measurement (0 - 128us, 1 - 256us, 2 - 1024us, 3 - 4096us)", + "version": { + "first": 273, + "last": 316 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The timeout for an ultrasonic measurement (0 - 128us, 1 - 256us, 2 - 1024us, 3 - 4096us)", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The timeout for an ultrasonic measurement (0 - 128us, 1 - 256us, 2 - 1024us, 3 - 4096us)", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The timeout for an ultrasonic measurement (0 - 128us, 1 - 256us, 2 - 1024us, 3 - 4096us)", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "MaxDeltaToFDeviation": { + "id": 57, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum deviation of a valid delta tof from the recent mean. In 2^-38 seconds units", + "version": { + "first": 280, + "last": 316 + }, + "values": { + "default": 109951, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum deviation of a valid delta tof from the recent mean. In 2^-38 seconds units", + "version": { + "first": 450, + "last": 463 + }, + "values": { + "default": 109951, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum deviation of a valid delta tof from the recent mean. In 2^-38 seconds units", + "version": { + "first": 500, + "last": 509 + }, + "values": { + "default": 109951, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum deviation of a valid delta tof from the recent mean. In 2^-38 seconds units", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 109951, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "MaxTempRange": { + "id": 58, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum range of temperatures between channels before one is rejected. In units of 2^-12 degrees celcius", + "version": { + "first": 289, + "last": 316 + }, + "values": { + "default": 8192, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum range of temperatures between channels before one is rejected. In units of 2^-12 degrees celcius", + "version": { + "first": 451, + "last": 463 + }, + "values": { + "default": 8192, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum range of temperatures between channels before one is rejected. In units of 2^-12 degrees celcius", + "version": { + "first": 504, + "last": 509 + }, + "values": { + "default": 8192, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum range of temperatures between channels before one is rejected. In units of 2^-12 degrees celcius", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 8192, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "MaxDeltaToFRange": { + "id": 59, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum range of delta time of flight between channels before one is rejected. In 2^-38 seconds units", + "version": { + "first": 289, + "last": 316 + }, + "values": { + "default": 137438, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum range of delta time of flight between channels before one is rejected. In 2^-38 seconds units", + "version": { + "first": 451, + "last": 463 + }, + "values": { + "default": 137438, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum range of delta time of flight between channels before one is rejected. In 2^-38 seconds units", + "version": { + "first": 504, + "last": 509 + }, + "values": { + "default": 137438, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The maximum range of delta time of flight between channels before one is rejected. In 2^-38 seconds units", + "version": { + "first": 601, + "last": 606 + }, + "values": { + "default": 137438, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "LookupFileCrc": { + "id": 60, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Read for the current loaded lookup table CRC, write to set the expected CRC.", + "version": { + "first": 295, + "last": 316 + }, + "statictype": "dynamic" + } + ] + }, + "DisplayLeadingZeros": { + "id": 61, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Whether to display leading zeros on row 2. If false leading zeros will be replaced with a space", + "version": { + "first": 302, + "last": 316 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + } + ] + }, + "InstallationCorrectionEnabled": { + "id": 62, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Whether the installation correction function is enabled or not", + "version": { + "first": 313, + "last": 316 + }, + "values": { + "default": 1, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + } + ] + }, + "InstallationDetectionThreshold": { + "id": 63, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The threshold in ml for deciding on the meter installation", + "version": { + "first": 313, + "last": 316 + }, + "values": { + "default": 500, + "minimum": 0, + "maximum": 10000000 + }, + "statictype": "static" + } + ] + }, + "InstallationType": { + "id": 64, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The detected installation type, MS 16 bits is the type of installation, LS 16 bits is the proportion of correction to apply", + "version": { + "first": 313, + "last": 316 + }, + "values": { + "minimum": 0, + "maximum": 163840 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "InstallationDetectionStatus": { + "id": 65, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Installation detection percentage complete, returns 100 if installation detection isn't running", + "version": { + "first": 313, + "last": 316 + }, + "values": { + "minimum": 0, + "maximum": 100 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "FractionalBars": { + "id": 66, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RW", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Whether to display bars above the fractional digits on the LCD (if supported)", + "version": { + "first": 313, + "last": 316 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "static" + } + ] + }, + "CalibrationCount": { + "id": 67, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "A count of the relevant calibration values, for internal use", + "version": { + "first": 313, + "last": 316 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "DelayedLedOff": { + "id": 68, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "WO", + "lvl6": "WO", + "lvl7": "WO", + "lvl8": "WO" + }, + "description": "Write the number of seconds in the future to turn off the LED output. This countdown will be cancelled if LedMode is changed during the delay.", + "version": { + "first": 314, + "last": 316 + }, + "values": { + "minimum": 0, + "maximum": 28800 + }, + "statictype": "static" + } + ] + } + }, + "status": { + "BAD_TEST": { + "id": 0 + }, + "BAD_CONFIG": { + "id": 1 + }, + "DID_NOT_STORE": { + "id": 2 + }, + "STORE_PENDING": { + "id": 3 + }, + "STORE_BUFFER_SIZE": { + "id": 4 + }, + "STRING_TOO_LONG": { + "id": 5 + }, + "BAD_DISPLAY_MODE": { + "id": 6 + }, + "GLASS_TOO_LONG": { + "id": 7 + }, + "SLOT_NOT_YOURS": { + "id": 8 + }, + "SUBLIST_TOO_LONG": { + "id": 9 + }, + "NO_TEMP_SENSOR": { + "id": 10 + }, + "UNDER_TEMP": { + "id": 11 + }, + "LOW_TEMP_WARNING": { + "id": 12 + }, + "HIGH_TEMP_WARNING": { + "id": 13 + }, + "OVER_TEMP": { + "id": 14 + }, + "MISMATCHING_LSB": { + "id": 15 + }, + "OUT_OF_RANGE_PWDIFF": { + "id": 16 + }, + "OUT_OF_RANGE_AMPLITUDE": { + "id": 17 + }, + "OUT_OF_RANGE_TOF": { + "id": 18 + }, + "OUT_OF_RANGE_DTOF": { + "id": 19 + }, + "TOF_TIMEOUT": { + "id": 20 + }, + "CAL_CHANGE": { + "id": 21 + }, + "OUT_OF_RANGE_INTERVAL": { + "id": 22 + }, + "VALIDATE_FAIL": { + "id": 23 + }, + "OUT_OF_RANGE_TEMP": { + "id": 24 + }, + "NOT_READY": { + "id": 25 + }, + "METROLOGY_ERROR": { + "id": 26 + }, + "GP30_ID_ERROR": { + "id": 27 + }, + "GP30_FLAG_ERROR": { + "id": 28 + }, + "GP30_TIMEOUT_ERROR": { + "id": 29 + }, + "GP30_REQUEST_ERROR": { + "id": 30 + }, + "GP30_SEQ_ERROR": { + "id": 31 + }, + "VALUE_SEALED": { + "id": 32 + }, + "IN_TEST_MODE": { + "id": 33 + }, + "UNKNOWN_STATE": { + "id": 34 + }, + "DISPLAY_INIT_SUCCEEDED": { + "id": 35 + }, + "DISPLAY_INIT_FAILED": { + "id": 36 + }, + "GP30_INIT_FAILED": { + "id": 37 + }, + "START_TIMER_SUCCEEDED": { + "id": 38 + }, + "START_TIMER_FAILED": { + "id": 39 + }, + "VOLUME_STORE_FAILED": { + "id": 40 + }, + "EMPTY_PIPE": { + "id": 41 + }, + "PARAMETER_ERROR": { + "id": 42 + }, + "GP30_INTERNAL_ERROR": { + "id": 43 + }, + "GLASS_TOO_SHORT": { + "id": 44 + }, + "STORE_CAL_FAILED": { + "id": 45 + }, + "STORE_CONF_FAILED": { + "id": 46 + }, + "MODE_CHANGE": { + "id": 47 + }, + "BAD_POW10": { + "id": 48 + }, + "BAD_DECIMAL_SEPARATOR": { + "id": 49 + }, + "BAD_UNITS": { + "id": 50 + }, + "BAD_ICONS": { + "id": 51 + }, + "BAD_THOUSAND_SEPARATOR": { + "id": 52 + }, + "NEW_LOCALE_REJECTED": { + "id": 53 + }, + "SET_ACCUMULATORS": { + "id": 54 + }, + "SEAL_OPENED": { + "id": 55 + }, + "CALIBRATION_RECALL_INCOMPLETE": { + "id": 56 + }, + "BAD_AMR_SETTINGS": { + "id": 57 + }, + "SUSPECT_CYCLE_SKIP": { + "id": 58 + }, + "LOOKUP_FILE_LOADED": { + "id": 59 + }, + "LOOKUP_FILE_METERSIZE_CHANGED": { + "id": 60 + }, + "LOOKUP_FILE_FAILURE": { + "id": 61 + }, + "LOOKUP_FILE_INVALID": { + "id": 62 + }, + "LOOKUP_CRC_MISMATCH": { + "id": 63 + }, + "LOOKUP_FILE_UNKNOWN_METERSIZE": { + "id": 64 + }, + "INSTALLATION_HIGH_TIME_DIFF": { + "id": 65 + }, + "INSTALLATION_LOW_FLOW_IGNORE": { + "id": 66 + }, + "INSTALLATION_BAD_CHANNELS": { + "id": 67 + }, + "INSTALLATION_FIXED": { + "id": 68 + } + } + }, + "IRDA": { + "id": 20, + "version": { + "first": 10, + "last": 211 + }, + "registers": { + "PulseReportRate": { + "id": 0, + "details": [ + { + "type": "enum8", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The rate at which pulse reports are sent to the IrDA pulse adapter", + "version": { + "first": 10, + "last": 97 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The rate at which pulse reports are sent to the IrDA pulse adapter", + "version": { + "first": 98, + "last": 136 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "enum8", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The rate at which pulse reports are sent to the IrDA pulse adapter", + "version": { + "first": 161, + "last": 211 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "AdapterPresenceLimit": { + "id": 1, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of 15 minute periods we have to have received no valid IrDA messages to assume there is no adapter present", + "version": { + "first": 18, + "last": 28 + }, + "values": { + "default": 1, + "minimum": 1, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of 15 minute periods we have to have received no valid IrDA messages to assume there is no adapter present", + "version": { + "first": 29, + "last": 97 + }, + "values": { + "default": 3, + "minimum": 1, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of 15 minute periods we have to have received no valid IrDA messages to assume there is no adapter present", + "version": { + "first": 98, + "last": 136 + }, + "values": { + "default": 3, + "minimum": 1, + "maximum": 255 + }, + "statictype": "static" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of 15 minute periods we have to have received no valid IrDA messages to assume there is no adapter present", + "version": { + "first": 161, + "last": 211 + }, + "values": { + "default": 3, + "minimum": 1, + "maximum": 255 + }, + "statictype": "static" + } + ] + }, + "PulseSequence": { + "id": 2, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The present sequence number used in pulse reports", + "version": { + "first": 26, + "last": 97 + }, + "values": { + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The present sequence number used in pulse reports", + "version": { + "first": 98, + "last": 114 + }, + "values": { + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The present sequence number used in pulse reports", + "version": { + "first": 115, + "last": 136 + }, + "values": { + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The present sequence number used in pulse reports", + "version": { + "first": 161, + "last": 211 + }, + "values": { + "minimum": 0, + "maximum": 255 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "StoreConfiguration": { + "id": 3, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 26, + "last": 97 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 98, + "last": 136 + }, + "statictype": "dynamic" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "NA", + "lvl4": "NA", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 161, + "last": 211 + }, + "statictype": "dynamic" + } + ] + }, + "AMRDigits": { + "id": 4, + "details": [ + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of digits to use for AMR", + "version": { + "first": 40, + "last": 52 + }, + "values": { + "default": 9, + "minimum": 0, + "maximum": 9 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of digits to use for AMR", + "version": { + "first": 53, + "last": 97 + }, + "values": { + "default": 9, + "minimum": 0, + "maximum": 9 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of digits to use for AMR", + "version": { + "first": 98, + "last": 136 + }, + "values": { + "default": 8, + "minimum": 0, + "maximum": 9 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "uint8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The number of digits to use for AMR", + "version": { + "first": 161, + "last": 211 + }, + "values": { + "default": 8, + "minimum": 0, + "maximum": 9 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "AMROffset": { + "id": 5, + "details": [ + { + "type": "int8_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The offset of the AMR smallest digit from the right (always negative)", + "version": { + "first": 40, + "last": 97 + }, + "values": { + "default": 0, + "minimum": -9, + "maximum": 0 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The offset of the AMR smallest digit from the right (always negative)", + "version": { + "first": 98, + "last": 136 + }, + "values": { + "default": 0, + "minimum": -9, + "maximum": 0 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "int8_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "The offset of the AMR smallest digit from the right (always negative)", + "version": { + "first": 161, + "last": 211 + }, + "values": { + "default": 0, + "minimum": -9, + "maximum": 0 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "UI1203Fields": { + "id": 6, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A bitfield of the optional fields being used for UI-1203", + "version": { + "first": 40, + "last": 97 + }, + "values": { + "default": 268, + "minimum": 0, + "maximum": 268 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A bitfield of the optional fields being used for UI-1203", + "version": { + "first": 98, + "last": 136 + }, + "values": { + "default": 268, + "minimum": 0, + "maximum": 268 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A bitfield of the optional fields being used for UI-1203", + "version": { + "first": 161, + "last": 211 + }, + "values": { + "default": 268, + "minimum": 0, + "maximum": 268 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "MfgDate": { + "id": 7, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A timestamp of meter manufacture in seconds since 1/1/2000 00:00:00 UTC", + "version": { + "first": 43, + "last": 136 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + }, + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "A timestamp of meter manufacture in seconds since 1/1/2000 00:00:00 UTC", + "version": { + "first": 161, + "last": 211 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "static" + } + ] + }, + "DisplayAMRDigits": { + "id": 8, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Whether or not to display AMR digits on the screen", + "version": { + "first": 92, + "last": 97 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Whether or not to display AMR digits on the screen", + "version": { + "first": 98, + "last": 136 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "infrequentlyupdated" + }, + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Whether or not to display AMR digits on the screen", + "version": { + "first": 161, + "last": 211 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "AdapterID": { + "id": 9, + "details": [ + { + "type": "string", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "The serial number of the current pulse adapter", + "version": { + "first": 193, + "last": 211 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "AdapterFwVersion": { + "id": 10, + "details": [ + { + "type": "uint16_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RO", + "lvl8": "RO" + }, + "description": "The firmware version of the current pulse adapter", + "version": { + "first": 193, + "last": 211 + }, + "statictype": "infrequentlyupdated" + } + ] + }, + "ExtendedResolution": { + "id": 11, + "details": [ + { + "type": "bool_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Boolean controlled by UI-1236 to control resolution of cubic feet unit in some meter size", + "version": { + "first": 210, + "last": 211 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 1 + }, + "statictype": "infrequentlyupdated" + } + ] + } + }, + "status": { + "BAD_CONFIG": { + "id": 0 + }, + "BAD_LENGTH": { + "id": 1 + }, + "OUT_OF_RANGE": { + "id": 2 + }, + "PENDING_STORE": { + "id": 3 + }, + "DID_NOT_STORE": { + "id": 4 + }, + "TOO_MANY_BYTES": { + "id": 5 + } + } + }, + "NA2WALARMS": { + "id": 23, + "version": { + "first": 41, + "last": 102 + }, + "registers": { + "StoreConfiguration": { + "id": 0, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", + "version": { + "first": 41, + "last": 102 + }, + "statictype": "dynamic" + } + ] + }, + "PredefEnable": { + "id": 1, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Bitmask of enabled predefined alarms", + "version": { + "first": 41, + "last": 102 + }, + "values": { + "default": 561047, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] + } + }, + "status": { + "SENSOR_INVALID": { + "id": 0 + }, + "UNKNOWN_PARAMETER": { + "id": 1 + }, + "ALARM_INVALID": { + "id": 2 + }, + "UNIMPLEMENTED": { + "id": 3 + }, + "UNCONFIGURED": { + "id": 4 + }, + "CONFIG_INVALID": { + "id": 5 + }, + "NO_LATEST": { + "id": 6 + }, + "FIXED_TYPE": { + "id": 7 + }, + "PREDEF_SET": { + "id": 8 + }, + "USERDEF_VOLUME_SET": { + "id": 9 + }, + "USERDEF_TEMPERATURE_SET": { + "id": 10 + }, + "USERDEF_PRESSURE_SET": { + "id": 11 + }, + "PREDEF_CLEAR": { + "id": 12 + }, + "USERDEF_VOLUME_CLEAR": { + "id": 13 + }, + "USERDEF_TEMPERATURE_CLEAR": { + "id": 14 + }, + "USERDEF_PRESSURE_CLEAR": { + "id": 15 + }, + "DID_NOT_STORE": { + "id": 16 + }, + "STORE_PENDING": { + "id": 17 + }, + "PREDEF_BACKUP_FAILED": { + "id": 18 + }, + "PREDEF_RESTORE_FAILED": { + "id": 19 + }, + "USERDEF_BACKUP_FAILED": { + "id": 20 + }, + "USERDEF_RESTORE_FAILED": { + "id": 21 + }, + "USERDEF_UNSUPPORTED_TYPE_FOR_SENSOR": { + "id": 22 + } + } + }, + "NA2WLOGGER": { + "id": 22, + "version": { + "first": 1, + "last": 199 + }, + "registers": { + "StoreConfiguration": { + "id": 0, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "NA", + "lvl2": "NA", + "lvl3": "RW", + "lvl4": "NA", + "lvl5": "NA", + "lvl6": "NA", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Store all configuration items in non-volatile memory.", + "version": { + "first": 147, + "last": 199 + }, + "statictype": "dynamic" + } + ] + }, + "LimitLogSize": { + "id": 1, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RO", + "lvl2": "RO", + "lvl3": "RO", + "lvl4": "RO", + "lvl5": "RO", + "lvl6": "RO", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Override the maximum number of entries per log (0 keeps default)", + "version": { + "first": 147, + "last": 199 + }, + "statictype": "static" + } + ] + } + }, + "status": { + "UNKNOWN_PARAMETER": { + "id": 1 + }, + "NOT_MAIN_LOOP": { + "id": 2 + }, + "LOG_INVALID": { + "id": 3 + }, + "LOG_OPEN_FAILED": { + "id": 4 + }, + "LOG_CLOSE_FAILED": { + "id": 5 + }, + "LOG_REMOVE_FAILED": { + "id": 6 + }, + "LOG_FLUSH_FAILED": { + "id": 7 + }, + "LOG_CLEAR_FAILED": { + "id": 8 + }, + "LOG_BAD_REQUEST": { + "id": 9 + }, + "LOG_BAD_LIMIT": { + "id": 10 + }, + "LOG_BUSY": { + "id": 11 + }, + "QUERY_FAILED": { + "id": 12 + }, + "QUERY_UNKNOWN_SENSOR": { + "id": 13 + }, + "QUERY_UNKNOWN_LOGFILE": { + "id": 14 + }, + "QUERY_BAD_ARGS": { + "id": 15 + }, + "QUERY_NOT_ENOUGH_SPACE": { + "id": 16 + }, + "QUERY_NO_RECORDS_FOUND": { + "id": 17 + }, + "QUERY_FILE_READ_PROBLEM": { + "id": 18 + }, + "SETTINGS_STORE_FAILED": { + "id": 19 + }, + "SETTINGS_BAD_SENSORID": { + "id": 20 + }, + "SETTINGS_BAD_PERIOD": { + "id": 21 + }, + "SETTINGS_BAD_CHECKSUM": { + "id": 22 + }, + "SETTINGS_BAD_TIMESTAMP": { + "id": 23 + }, + "FILING_BAD": { + "id": 24 + }, + "BAD_RECORD": { + "id": 25 + }, + "RANGE_SENSORID_BAD": { + "id": 26 + }, + "STORE_PENDING": { + "id": 27 + }, + "DID_NOT_STORE": { + "id": 28 + } + } + }, + "FLEXNETVERSION": { + "id": 24, + "version": { + "first": 1, + "last": 9999 + } + }, + "FLEXNETSERIAL": { + "id": 26, + "version": { + "first": 1, + "last": 21 + }, + "registers": { + "UpgState": { + "id": 0, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "General UPG states.", + "version": { + "first": 2, + "last": 21 + }, + "statictype": "dynamic" + } + ] + }, + "FwdlState": { + "id": 1, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Specifies the Bootloader State of operation.", + "version": { + "first": 2, + "last": 21 + }, + "statictype": "dynamic" + } + ] + } + }, + "status": { + "UNKNOWN_PARAMETER": { + "id": 0 + }, + "TOO_MANY_APPS": { + "id": 1 + } + } + }, + "HISTOGRAM": { + "id": 27, + "version": { + "first": 1, + "last": 2 + } + } } diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index 0508fcf3..99c93561 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit 0508fcf3df61d529f18cd3991ee255b9ee62ae96 +Subproject commit 99c93561572034cdd1124b0b7e90ed8153261469 diff --git a/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj b/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj index 084a358a..91a9df1e 100644 --- a/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj +++ b/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj @@ -8,7 +8,7 @@ Exe LaaProduction.Console LaaProduction.Console - v4.8.1 + v4.5 512 true @@ -42,8 +42,15 @@ ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + - + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll + + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll + + @@ -64,10 +71,29 @@ {03784923-1FD3-4535-80F5-286728DF62AB} LaaProduction.Data.Cordonel + + {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB} + LaaPackages.Features.Cordonel + + + {C9816412-7752-4F7A-8BD2-765DB6D58B3C} + LaaPackages.HttpClient + + + {F90B940C-9A83-496D-AAE0-11CD02CE0A22} + LaaPackages.SqlClient + del "$(TargetDir)*.pdb" del "$(TargetDir)*.xml" + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/LaaProductionWeb/LaaProduction.Console/Program.cs b/LaaProductionWeb/LaaProduction.Console/Program.cs index ad327a66..2ed1781b 100644 --- a/LaaProductionWeb/LaaProduction.Console/Program.cs +++ b/LaaProductionWeb/LaaProduction.Console/Program.cs @@ -1,12 +1,56 @@ namespace LaaProduction.Console { + using LaaPackages.Features.Cordonel; + using LaaPackages.HttpClient; + using LaaPackages.SqlClient; + using System; public class Program { public static void Main(String[] args) { + var pcbidString = "192000024"; + var cordonelApps = HttpConnection + .CreateHttpConnection("http://10.49.40.25/") + .Get(x => x.SetPath("/MeterProcessState/api/ConfigurationJson")) + ?.Value ?? new CordonelAppsDictionary(); + SqlConnection + .CreateSqlConnection("Server=SLASQL01;Database=Auftrag;User Id=sa;Password=sqlserver") + .CreateCommand($@" + SELECT x.Id + , x.Address + , x.Value + FROM (SELECT gmh.ID AS Id + , CONVERT(VARBINARY(MAX), REPLACE(ISNULL(gmh.Address, '00'), '-', ''), 2) AS Address + , CONVERT(VARBINARY(MAX), REPLACE(REPLACE(ISNULL(gmh.Value, '00'), 'NULL', '00'), '-', ''), 2) AS Value + , ROW_NUMBER() OVER (PARTITION BY gmh.Address ORDER BY gmh.date DESC) AS Row + FROM GenesisMeterRegisterHistory AS gmh + WHERE gmh.PcbId = @{nameof(pcbidString)}) AS x + WHERE x.Row = 1 + ORDER BY x.Address") + .SetParameter(nameof(pcbidString), pcbidString) + .ExecuteReader(reader => + { + var addressBytes = reader.GetValue(1); + if (addressBytes?.Length == 2) + { + var appId = addressBytes[0]; + var registerId = addressBytes[1]; + var register = cordonelApps[appId][registerId]; + + register.HistoryId = reader.GetValue(0); + register.Value = reader.GetValue(2); + } + }); + } + } + + public class MPSConnection : HttpConnection + { + public MPSConnection(string baseURL) : base(baseURL) + { } } } \ No newline at end of file diff --git a/LaaProductionWeb/LaaProduction.Console/app.config b/LaaProductionWeb/LaaProduction.Console/app.config index 099d5353..73cc5790 100644 --- a/LaaProductionWeb/LaaProduction.Console/app.config +++ b/LaaProductionWeb/LaaProduction.Console/app.config @@ -1,19 +1,19 @@ - + - + - - + + - - + + - - + + diff --git a/LaaProductionWeb/LaaProduction.Console/packages.config b/LaaProductionWeb/LaaProduction.Console/packages.config index c865026e..ed80233b 100644 --- a/LaaProductionWeb/LaaProduction.Console/packages.config +++ b/LaaProductionWeb/LaaProduction.Console/packages.config @@ -1,4 +1,7 @@  + + + \ No newline at end of file From 14e07db08ed804803437dfb7fb1e0842515f7678 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 14:19:15 +0200 Subject: [PATCH 16/44] empty console --- Common/CommonConsole/Program.cs | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index 6561e07e..6dcfbb15 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -12,35 +12,6 @@ { public static void Main() { - var jtext = File.ReadAllText("..\\..\\configuration.json"); - var jmodel = JsonConvert.DeserializeObject(jtext); - var types = new HashSet(); - - foreach (var app in jmodel.Values) - { - if (app.Registers is null) - { - continue; - } - - foreach (var reg in app.Registers.Values) - { - if (reg.Details is null) - { - continue; - } - - foreach (var detail in reg.Details) - { - types.Add(detail.Type); - } - } - } - - foreach (var type in types) - { - Console.WriteLine(type); - } } } } \ No newline at end of file From 63cbadd569c5fe46a252aa18a9461198c4370c32 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 14:21:31 +0200 Subject: [PATCH 17/44] PendingEmails proj deleted --> moved in common.services --- LaaProductionWeb/LaaProductionWeb.sln | 6 - .../PendingEmails/PendingEmails.csproj | 62 ------- LaaProductionWeb/PendingEmails/Program.cs | 159 ------------------ .../PendingEmails/Properties/AssemblyInfo.cs | 36 ---- LaaProductionWeb/PendingEmails/app.config | 16 -- 5 files changed, 279 deletions(-) delete mode 100644 LaaProductionWeb/PendingEmails/PendingEmails.csproj delete mode 100644 LaaProductionWeb/PendingEmails/Program.cs delete mode 100644 LaaProductionWeb/PendingEmails/Properties/AssemblyInfo.cs delete mode 100644 LaaProductionWeb/PendingEmails/app.config diff --git a/LaaProductionWeb/LaaProductionWeb.sln b/LaaProductionWeb/LaaProductionWeb.sln index 8ed51e7d..9602a39e 100644 --- a/LaaProductionWeb/LaaProductionWeb.sln +++ b/LaaProductionWeb/LaaProductionWeb.sln @@ -36,8 +36,6 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "LaaProductionVFM", "LaaProd DefaultWebSiteLanguage = "Visual C#" EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PendingEmails", "PendingEmails\PendingEmails.csproj", "{8C2A940A-173C-421D-9FE1-80CC01C8C5F9}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{90A75AEB-70C5-42E5-A802-6B744280B8F8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaProduction.Data.Cordonel", "Data\LaaProduction.Data.Cordonel\LaaProduction.Data.Cordonel.csproj", "{03784923-1FD3-4535-80F5-286728DF62AB}" @@ -90,10 +88,6 @@ Global {9E2662A4-8E1A-4445-B663-0FECEFBF22B0}.Debug|Any CPU.Build.0 = Debug|Any CPU {9E2662A4-8E1A-4445-B663-0FECEFBF22B0}.Release|Any CPU.ActiveCfg = Debug|Any CPU {9E2662A4-8E1A-4445-B663-0FECEFBF22B0}.Release|Any CPU.Build.0 = Debug|Any CPU - {8C2A940A-173C-421D-9FE1-80CC01C8C5F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C2A940A-173C-421D-9FE1-80CC01C8C5F9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C2A940A-173C-421D-9FE1-80CC01C8C5F9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C2A940A-173C-421D-9FE1-80CC01C8C5F9}.Release|Any CPU.Build.0 = Release|Any CPU {03784923-1FD3-4535-80F5-286728DF62AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {03784923-1FD3-4535-80F5-286728DF62AB}.Debug|Any CPU.Build.0 = Debug|Any CPU {03784923-1FD3-4535-80F5-286728DF62AB}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/LaaProductionWeb/PendingEmails/PendingEmails.csproj b/LaaProductionWeb/PendingEmails/PendingEmails.csproj deleted file mode 100644 index d17edc5b..00000000 --- a/LaaProductionWeb/PendingEmails/PendingEmails.csproj +++ /dev/null @@ -1,62 +0,0 @@ - - - - - Debug - AnyCPU - {8C2A940A-173C-421D-9FE1-80CC01C8C5F9} - Exe - PendingEmails - PendingEmails - v4.8.1 - 512 - true - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - IDE0003;IDE0049; - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - - - - - - - - - - - - - - - - - - - del "$(TargetDir)*.pdb" -del "$(TargetDir)*.xml" - - \ No newline at end of file diff --git a/LaaProductionWeb/PendingEmails/Program.cs b/LaaProductionWeb/PendingEmails/Program.cs deleted file mode 100644 index 71f1704b..00000000 --- a/LaaProductionWeb/PendingEmails/Program.cs +++ /dev/null @@ -1,159 +0,0 @@ -namespace PendingEmails -{ - using System; - using System.Collections.Generic; - using System.Data.SqlClient; - using System.IO; - using System.Linq; - using System.Net.Mail; - using System.Threading; - using System.Timers; - using SystemTimersTimer = System.Timers.Timer; - - class Program - { - static readonly SystemTimersTimer timer = new SystemTimersTimer(); - static String logfile = $@"C:\Temp\PendingEmails\emailversand_{DateTime.Now:yyyyMMdd}.txt"; - static String connectionString = "Server=SLASQL01.emea.sensus.net; Database=Auftrag; User ID=ServiceParingfile; Password=ServiceParingfile;"; - - static void Main() - { - try - { - timer.AutoReset = true; - timer.Interval = 300_000; - timer.Elapsed += Timer_Elapsed; - - while (true) - { - Timer_Elapsed(null, null); - timer.Start(); - var awaiter = new ManualResetEventSlim(); - awaiter.Wait(); - timer.Stop(); - } - } - catch (Exception e) - { - Console.WriteLine($"{Environment.NewLine}{e}{Environment.NewLine}"); - File.AppendAllText(logfile, $"{Environment.NewLine}{e}{Environment.NewLine}"); - } - - } - - private static void Timer_Elapsed(Object _, ElapsedEventArgs _1) - { - logfile = $@"C:\Temp\PendingEmails\emailversand_{DateTime.Now:yyyyMMdd}.txt"; - - Console.WriteLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] PREPEARING EMAILS TO SEND ..."); - File.AppendAllText(logfile, $"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] PREPEARING EMAILS TO SEND ... {Environment.NewLine}"); - - using (var connection = new SqlConnection(connectionString)) - { - connection.Open(); - - var updated = new List(); - - using (var command = connection.CreateCommand()) - { - command.CommandText = @" - SELECT [Sender] - , [Subject] - , [Body] - , [Recipients] - , [CC] - , [Id] - FROM [Messages] - WHERE [StationNr] >= 2000 - AND [OutDate] IS NULL - ORDER BY [InDate] DESC"; - - using (var reader = command.ExecuteReader()) - { - while (reader.Read()) - { - try - { - var email = new MailMessage(); - - email.From = new MailAddress("Stoyan.Zlatev@xylem.com"); - email.Subject = $"{reader.GetValue(1)}"; - email.Body = $"{reader.GetValue(2)}"; - - $"{reader.GetValue(3)}" - .Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries) - .Select(x => new MailAddress(x)) - .ToList() - .ForEach(email.To.Add); - - $"{reader.GetValue(4)}" - .Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries) - .Select(x => new MailAddress(x)) - .ToList() - .ForEach(email.CC.Add); - - email.CC.Add(new MailAddress("Stoyan.Zlatev@xylem.com")); - - if (SendEmail(email)) - { - updated.Add(reader.GetInt32(5)); - } - } - catch (Exception e) - { - File.AppendAllText(logfile, $"{Environment.NewLine}{e}{Environment.NewLine}"); - } - } - } - } - - if (updated.Count > 0) - { - try - { - File.AppendAllText(logfile, $"UPDATEING: {String.Join(", ", updated)}{Environment.NewLine}"); - - using (var command = connection.CreateCommand()) - { - command.CommandText = $@" - UPDATE [Messages] - SET [OutDate] = GETDATE() - WHERE [Id] IN ({String.Join(", ", updated)})"; - - command.ExecuteNonQuery(); - } - } - catch (Exception e) - { - File.AppendAllText(logfile, $"{Environment.NewLine}{e}{Environment.NewLine}"); - } - } - else - { - File.AppendAllText(logfile, $"... NO PENDING EMAILS FOUND {Environment.NewLine}"); - } - } - } - - private static Boolean SendEmail(MailMessage email) - { - try - { - using (var smtpClient = new SmtpClient("smtp.xylem.com", 587)) - { - smtpClient.Timeout = 5000; - smtpClient.UseDefaultCredentials = true; - smtpClient.Send(email); - } - - return true; - } - catch (Exception e) - { - File.AppendAllText(logfile, $"{Environment.NewLine}{e}{Environment.NewLine}"); - } - - return false; - } - } -} diff --git a/LaaProductionWeb/PendingEmails/Properties/AssemblyInfo.cs b/LaaProductionWeb/PendingEmails/Properties/AssemblyInfo.cs deleted file mode 100644 index 02c77a6b..00000000 --- a/LaaProductionWeb/PendingEmails/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("PendingEmails")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("PendingEmails")] -[assembly: AssemblyCopyright("Copyright © 2024")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8c2a940a-173c-421d-9fe1-80cc01c8c5f9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/LaaProductionWeb/PendingEmails/app.config b/LaaProductionWeb/PendingEmails/app.config deleted file mode 100644 index 2451b347..00000000 --- a/LaaProductionWeb/PendingEmails/app.config +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - From f2d57aa9045468c209f4adc927eb9725ead6ea6c Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 14:25:38 +0200 Subject: [PATCH 18/44] calibration results - data types & naming changed --- .../TestResults/CalibrationResults.cs | 26 +++++++++---------- .../Controllers/FinalCheckController.cs | 18 ++++++------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs b/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs index 229739eb..a90d7c61 100644 --- a/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs +++ b/Common/Logic/ProductionOrderCore/TestResults/CalibrationResults.cs @@ -1,8 +1,8 @@ -using System; -using System.Collections.Generic; - -namespace Xylem.Common.Logic.ProductionOrderCore.TestResults +namespace Xylem.Common.Logic.ProductionOrderCore.TestResults { + using System; + using System.Collections.Generic; + /// /// Container for calibration results /// @@ -43,17 +43,17 @@ namespace Xylem.Common.Logic.ProductionOrderCore.TestResults /// /// Calibration value channel 1 /// - public Int32 CalFactor1 { get; set; } + public UInt16 CalFactor1 { get; set; } /// /// Calibration value channel 2 /// - public Int32 CalFactor2 { get; set; } + public UInt16 CalFactor2 { get; set; } /// /// Calibration value channel 3 /// - public Int32 CalFactor3 { get; set; } + public UInt16 CalFactor3 { get; set; } /// /// Zero offset channel 1 @@ -73,27 +73,27 @@ namespace Xylem.Common.Logic.ProductionOrderCore.TestResults /// /// First hit update period /// - public Int32 FirstHitUpdatePer { get; set; } + public Byte FirstHitUpdatePeriod { get; set; } /// /// First hit shift /// - public Int32 FirstHitShift { get; set; } + public Byte FirstHitShift { get; set; } /// /// First hit percent channel 1 /// - public Int32 FirstHitPercent1 { get; set; } + public Byte FirstHitPercent1 { get; set; } /// /// First hit percent channel 2 /// - public Int32 FirstHitPercent2 { get; set; } + public Byte FirstHitPercent2 { get; set; } /// /// First hit percent channel 3 /// - public Int32 FirstHitPercent3 { get; set; } + public Byte FirstHitPercent3 { get; set; } /// /// Time of flight temperature offset channel 1 @@ -113,7 +113,7 @@ namespace Xylem.Common.Logic.ProductionOrderCore.TestResults /// /// Meter size /// - public Int32 MeterSize { get; set; } + public Byte MeterSize { get; set; } /// /// Test date time diff --git a/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs b/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs index 19c83887..be5c6536 100644 --- a/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs +++ b/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs @@ -1311,21 +1311,21 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers { Id = x.GetValue(0), PcbId = x.GetValue(1), - CalFactor1 = x.GetValue(2), - CalFactor2 = x.GetValue(3), - CalFactor3 = x.GetValue(4), + CalFactor1 = x.GetValue(2), + CalFactor2 = x.GetValue(3), + CalFactor3 = x.GetValue(4), ZeroOffset1 = x.GetValue(5), ZeroOffset2 = x.GetValue(6), ZeroOffset3 = x.GetValue(7), - FirstHitUpdatePer = x.GetValue(8), - FirstHitShift = x.GetValue(9), - FirstHitPercent1 = x.GetValue(10), - FirstHitPercent2 = x.GetValue(11), - FirstHitPercent3 = x.GetValue(12), + FirstHitUpdatePeriod = x.GetValue(8), + FirstHitShift = x.GetValue(9), + FirstHitPercent1 = x.GetValue(10), + FirstHitPercent2 = x.GetValue(11), + FirstHitPercent3 = x.GetValue(12), ToFTempOffset1 = x.GetValue(13), ToFTempOffset2 = x.GetValue(14), ToFTempOffset3 = x.GetValue(15), - MeterSize = x.GetValue(16), + MeterSize = x.GetValue(16), Date = x.GetValue(17), Succeeded = x.GetValue(18), }); From 51337bf646c436a901b5bdd48a22debce34da082 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 16:02:35 +0200 Subject: [PATCH 19/44] latest requirements --- .../Repositories/EOLProgressRepository.cs | 18 +++++------ .../Repositories/RequirementsRepository.cs | 32 +++++++++++-------- LaaProductionWeb/LaaPackages | 2 +- 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs index 6ca817a3..f1a386b2 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs @@ -243,7 +243,7 @@ yield return new KeyValuePair(pcbidString, $"Requirements did not match the EOL progress."); yield break; } - else if (requirement.IsStandardActive == false || !requirement.IsSpecialActive == false) + else if (requirement.IsStandardActive == false || requirement.SpecialId != null && requirement.IsSpecialActive == false) { yield return new KeyValuePair(pcbidString, $"The bounded requirement is not active."); yield break; @@ -257,14 +257,14 @@ this.sqlConnection .CreateCommand($@" SELECT x.Id - , x.Address + , x.Address , x.Value - FROM (SELECT rh.ID AS Id - , rh.Address - , rh.Value - , ROW_NUMBER() OVER (PARTITION BY rh.Address ORDER BY rh.date DESC) AS Row - FROM GenesisMeterRegisterHistory AS rh - WHERE rh.PcbId = @{nameof(pcbidString)}) AS x + FROM (SELECT gmh.ID AS Id + , CONVERT(VARBINARY(MAX), REPLACE(ISNULL(gmh.Address, '00'), '-', ''), 2) AS Address + , CONVERT(VARBINARY(MAX), REPLACE(REPLACE(ISNULL(gmh.Value, '00'), 'NULL', '00'), '-', ''), 2) AS Value + , ROW_NUMBER() OVER (PARTITION BY gmh.Address ORDER BY gmh.date DESC) AS Row + FROM GenesisMeterRegisterHistory AS gmh + WHERE gmh.PcbId = @{nameof(pcbidString)}) AS x WHERE x.Row = 1 ORDER BY x.Address") .SetParameter(nameof(pcbidString), pcbidString) @@ -304,7 +304,7 @@ , gm.Adresse , MAX(aps.StatusFertigung) OVER (PARTITION BY aps.SerienNr) AS TestStatus , CAST(CASE WHEN pwd.Password <> pwd.KitronSkeletonKey THEN 1 ELSE 0 END AS BIT) AS Sealed - , CAST(CASE WHEN aap.Herkunft = 'AuftragPosition' THEN 1 ELSE 0 END AS BIT) AS Pending + , CAST(CASE WHEN aap.Herkunft = 'AuftragPosition' THEN 1 ELSE 1 END AS BIT) AS Pending FROM (SELECT cap.CordonelAssignedPicking_PcbId AS PcbId , cap.MapPcbIdToSerialNumber_SerialNumber AS SerialNo , cap.CordonelAssignedPicking_FertigungsAuftragsNr AS PoNo diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/RequirementsRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/RequirementsRepository.cs index 9dc2c0be..a18593ed 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/RequirementsRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/RequirementsRepository.cs @@ -20,7 +20,8 @@ public CordonelRequirements FindByPcbId(String pcbid) => this.sqlConnection .CreateCommand($@" - SELECT [cr].[SpecialId] + SELECT TOP 1 + [cr].[SpecialId] , [cr].[SpecialVersion] , [cr].[StandardId] , [cr].[StandardVersion] @@ -37,8 +38,8 @@ , [cr].[MDBLPA] , [cr].[MDBLPS] , CASE WHEN [aap].[Menge] < 6 - THEN [cr].[MSM] - ELSE [cr].[MSMBO] END AS [MaxStorageMonts] + THEN [cr].[MSM] + ELSE [cr].[MSMBO] END AS [MaxStorageMonts] , [cr].[QuiescentCurrent_uA] , [cr].[EPBLP] , [cr].[Timestamp] @@ -55,23 +56,26 @@ JOIN [MapPcbIdToSerialNumber] AS [map] ON [aps].[SerienNr] = [map].[MapPcbIdToSerialNumber_SerialNumber] WHERE [map].[MapPcbIdToSerialNumber_PcbId] = @{nameof(pcbid)} - ORDER BY [cr].[PcbId] DESC - , [cr].[PoNr] DESC - , [aps].[PruefgangDatum] DESC") + ORDER BY [aps].[PruefgangDatum] DESC + , [cr].[StandardId] DESC + , [cr].[StandardVersion] DESC + , [cr].[SpecialId] DESC + , [cr].[SpecialVersion] DESC") .SetParameter(nameof(pcbid), pcbid) .FirstOrDefault(this.ParseCordonelRequirements); public CordonelRequirements FindByPoNo(String pono) => this.sqlConnection .CreateCommand($@" - SELECT [cr].[SpecialId] + SELECT TOP 1 + [cr].[SpecialId] , [cr].[SpecialVersion] , [cr].[StandardId] , [cr].[StandardVersion] , [cr].[Region] , [cr].[Size] , ISNULL([cr].[PoNr], [aap].[FertigungsauftragNr]) AS [Pono] - , NULL AS [Pcbid] + , ISNULL([cr].[PcbId], [map].[MapPcbIdToSerialNumber_PcbId]) AS [Pcbid] , [cr].[SkipCalibration] , [cr].[SkipRadioCheck] , [cr].[FwVersion] @@ -81,8 +85,8 @@ , [cr].[MDBLPA] , [cr].[MDBLPS] , CASE WHEN [aap].[Menge] < 6 - THEN [cr].[MSM] - ELSE [cr].[MSMBO] END AS [MaxStorageMonts] + THEN [cr].[MSM] + ELSE [cr].[MSMBO] END AS [MaxStorageMonts] , [cr].[QuiescentCurrent_uA] , [cr].[EPBLP] , [cr].[Timestamp] @@ -99,9 +103,11 @@ JOIN [MapPcbIdToSerialNumber] AS [map] ON [aps].[SerienNr] = [map].[MapPcbIdToSerialNumber_SerialNumber] WHERE [aap].[FertigungsauftragNr] = @{nameof(pono)} - ORDER BY [cr].[PcbId] DESC - , [cr].[PoNr] DESC - , [aps].[PruefgangDatum] DESC") + ORDER BY [aps].[PruefgangDatum] DESC + , [cr].[StandardId] DESC + , [cr].[StandardVersion] DESC + , [cr].[SpecialId] DESC + , [cr].[SpecialVersion] DESC") .SetParameter(nameof(pono), pono) .FirstOrDefault(this.ParseCordonelRequirements); diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index 99c93561..ece81474 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit 99c93561572034cdd1124b0b7e90ed8153261469 +Subproject commit ece81474c3d99d9479dbbc17241bffb033ae3297 From fe2eb4ccce6d906b4e01fab70f32228e7323475c Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 25 Sep 2024 16:14:50 +0200 Subject: [PATCH 20/44] =?UTF-8?q?klammern=20k=C3=B6nnen=20bleiben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WaterMeter/Genesis/GenesisStatus/GenesisStatus.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Common/Hardware/WaterMeter/Genesis/GenesisStatus/GenesisStatus.csproj b/Common/Hardware/WaterMeter/Genesis/GenesisStatus/GenesisStatus.csproj index cc389b4d..9794b409 100644 --- a/Common/Hardware/WaterMeter/Genesis/GenesisStatus/GenesisStatus.csproj +++ b/Common/Hardware/WaterMeter/Genesis/GenesisStatus/GenesisStatus.csproj @@ -21,6 +21,7 @@ DEBUG;TRACE prompt 4 + IDE0047; pdbonly From 8b154b2a92c48b94a3de6da539f07e281d5268b3 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Thu, 26 Sep 2024 15:55:58 +0200 Subject: [PATCH 21/44] Sentinel up to battery --- Common/CommonConsole/CommonConsole.csproj | 14 -- Common/CommonConsole/Program.cs | 15 +- .../Models/CordonelRequirements.cs | 35 ++-- .../Models/EOLProgressModel.cs | 24 +-- .../Repositories/EOLProgressRepository.cs | 152 ++++++++++++++++-- LaaProductionWeb/LaaPackages | 2 +- .../LaaProduction.Console/Program.cs | 46 +----- .../API/Cordonel/EOLProgressController.cs | 1 - 8 files changed, 182 insertions(+), 107 deletions(-) diff --git a/Common/CommonConsole/CommonConsole.csproj b/Common/CommonConsole/CommonConsole.csproj index d9a0822e..763a69e3 100644 --- a/Common/CommonConsole/CommonConsole.csproj +++ b/Common/CommonConsole/CommonConsole.csproj @@ -51,19 +51,8 @@ - - - - - - - - - - - @@ -111,9 +100,6 @@ Common.Utils.Extensions - - - \ No newline at end of file diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index 6dcfbb15..b91c0256 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -1,17 +1,14 @@ -namespace CommonConsole +using System.Text; + +namespace CommonConsole { - using CommonConsole.Schema; - - using Newtonsoft.Json; - - using System; - using System.Collections.Generic; - using System.IO; - public class Program { public static void Main() { + var bytes = new byte[] { 0x43, 0x6F, 0x72, 0x64, 0x6F, 0x6E, 0x65, 0x6C, 0x20, 0x31, 0x2E, 0x35, 0x36, 0x00, 0x4E, 0xE4 }; + + System.Console.WriteLine(Encoding.ASCII.GetString(bytes)); } } } \ No newline at end of file diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs index 87be367b..2b838da9 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelRequirements.cs @@ -4,28 +4,40 @@ public class CordonelRequirements { + // Done public Int32? SpecialId { get; set; } - + + // Done public Int32? SpecialVersion { get; set; } + // Done public Int32? StandardId { get; set; } - + + // Done public Int32? StandardVersion { get; set; } - + + // Done public String Region { get; set; } - + + // Done public String MeterSize { get; set; } - public Int32 ProductionOrderNr { get; set; } + // TODO: How to check? + public Int32 ProductionOrderNr { get; set; } + // TODO: How to check? public Int32? PcbId { get; set; } + // Done public Boolean? SkipCalibration { get; set; } + // Done public Boolean? SkipRadioCheck { get; set; } + // Done public String FwVersion { get; set; } - + + // Done public String LutCrc { get; set; } public Double? RequiredLifeTimeYearsAssembly { get; set; } @@ -43,15 +55,20 @@ public Double? EstimatedProductionBatteryLoadPercent { get; set; } public DateTime? KitronProductionDate { get; set; } - + + // Not relevant public DateTime? RequirementTimestamp { get; set; } - + + // Not relevant public String ApprovalName { get; set; } - + + // Not relevant public String ApprovalComment { get; set; } + // Done public Boolean? IsSpecialActive { get; set; } + // Done public Boolean? IsStandardActive { get; set; } } } \ No newline at end of file diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/EOLProgressModel.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/EOLProgressModel.cs index e19a0889..25f59da5 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/EOLProgressModel.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/EOLProgressModel.cs @@ -23,68 +23,68 @@ public DateTime? StartDate { get; set; } /// - /// Requirement ID if standard requirement should be used, else leave as is (null) + /// Requirement ID if standard requirement should be used, else leave as is (null). Done! /// [NotNull] public Int32? StandardRequirementId { get; set; } /// - /// Version if standard requirement should be used, else leave as is (null) + /// Version if standard requirement should be used, else leave as is (null). Done! /// [NotNull] public Int32? StandardRequirementVersion { get; set; } /// - /// Requirement ID if special requirement should be used, else leave as is (null) + /// Requirement ID if special requirement should be used, else leave as is (null). Done! /// public Int32? SpecialRequirementId { get; set; } /// - /// Version if special requirement should be used, else leave as is (null) + /// Version if special requirement should be used, else leave as is (null). Done! /// public Int32? SpecialRequirementVersion { get; set; } /// - /// Requirement could be loaded for this device + /// Requirement could be loaded for this device. Done! /// [NotFailed] public EOLStatus RequirementRequestChecked { get; set; } /// - /// Requirement PcbId equals PcbId of EOLProgress and Cordonel + /// Requirement PcbId equals PcbId of EOLProgress and Cordonel. How? /// [NotFailed] public EOLStatus RequirementPcbIdChecked { get; set; } /// - /// Requirement order equals Cordonel order + /// Requirement order equals Cordonel order. How? /// [NotFailed] public EOLStatus RequirementOrderChecked { get; set; } /// - /// Requirement region equals Cordonel region + /// Requirement region equals Cordonel region. Done! /// [NotFailed] public EOLStatus RequirementRegionChecked { get; set; } /// /// Installed LUT CRC, should never be null or empty - /// will only be set if requirement LUT CRC is equal to Cordonel LUT CRC + /// will only be set if requirement LUT CRC is equal to Cordonel LUT CRC. Done! /// [NotNull] public String ProductionStatusLutCrc { get; set; } /// /// Installed FW, should never be null or empty, - /// will only be set if requirement FW is equal to Cordonel FW + /// will only be set if requirement FW is equal to Cordonel FW. Done! /// [NotNull] public String ProductionStatusFwVersion { get; set; } /// /// Detected meter size, should never be null or empty - /// will only be set if requirement MeterSIze is equal to Cordonel MeterSize + /// will only be set if requirement MeterSIze is equal to Cordonel MeterSize. Done! /// [NotNull] public String ProductionStatusMeterSize { get; set; } @@ -150,7 +150,7 @@ public EOLStatus ParametrizationCompareChecked { get; set; } /// - /// Id for radio check, can be null for NA region or if radio check has been skipped by requirement + /// Id for radio check, can be null for NA region or if radio check has been skipped by requirement. Done! /// [NotNull] public Int64? RadioCheckId { get; set; } diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs index f1a386b2..e4b4f83a 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; + using System.Globalization; using System.Linq; public class EOLProgressRepository : IEOLProgressRepository @@ -195,13 +196,12 @@ return deleted; } - - // Test pcb: 233410052 + public IEnumerable> RunSentinel(EOLProgressModel model, CordonelAppsDictionary cordonelApps) { if (model is null) { - yield return new KeyValuePair("EOLProgressModel", "Empty model is not allowed."); + yield return new KeyValuePair("EOLProgressModel", "Is missing."); yield break; } @@ -211,7 +211,7 @@ if (cordonelInfoList.Length != 1) { - yield return new KeyValuePair(pcbidString, "More than 1 entry in the database is not allowed."); + yield return new KeyValuePair(pcbidString, "More than 1 entry found."); yield break; } @@ -219,12 +219,7 @@ if (cordonelInfo.Sealed == false) { - yield return new KeyValuePair(pcbidString, $"Is not correctly sealed."); - yield break; - } - else if (cordonelInfo.Pending == false) - { - yield return new KeyValuePair(pcbidString, $"Was allready finisched."); + yield return new KeyValuePair(pcbidString, $"Is not sealed."); yield break; } @@ -245,7 +240,7 @@ } else if (requirement.IsStandardActive == false || requirement.SpecialId != null && requirement.IsSpecialActive == false) { - yield return new KeyValuePair(pcbidString, $"The bounded requirement is not active."); + yield return new KeyValuePair(pcbidString, $"One or both of the bounded requirements are not active."); yield break; } else if (requirement.SkipCalibration == false && cordonelInfo.TestStatus != 30) @@ -253,15 +248,15 @@ yield return new KeyValuePair(pcbidString, $"Is not correctly calibrated, status: {cordonelInfo.TestStatus}."); yield break; } - + this.sqlConnection .CreateCommand($@" SELECT x.Id - , x.Address - , x.Value + , CONVERT(VARBINARY(MAX), REPLACE(ISNULL(x.Address, '00'), '-', ''), 2) AS Address + , CONVERT(VARBINARY(MAX), REPLACE(REPLACE(ISNULL(x.Value, '00'), 'NULL', '00'), '-', ''), 2) AS Value FROM (SELECT gmh.ID AS Id - , CONVERT(VARBINARY(MAX), REPLACE(ISNULL(gmh.Address, '00'), '-', ''), 2) AS Address - , CONVERT(VARBINARY(MAX), REPLACE(REPLACE(ISNULL(gmh.Value, '00'), 'NULL', '00'), '-', ''), 2) AS Value + , gmh.Address + , gmh.Value , ROW_NUMBER() OVER (PARTITION BY gmh.Address ORDER BY gmh.date DESC) AS Row FROM GenesisMeterRegisterHistory AS gmh WHERE gmh.PcbId = @{nameof(pcbidString)}) AS x @@ -283,6 +278,131 @@ } }); + var meterSize = default(Byte); + var hasRadio = default(Boolean); + + this.sqlConnection + .CreateCommand($@" + SELECT cms.Dn_InternalId + , CAST(CASE WHEN vmm.Radio = 'Z' THEN 0 ELSE 1 END AS BIT) HasRadio + FROM (SELECT DISTINCT TOP 1 + (SELECT DISTINCT TOP 1 vm.Charcode + FROM VAKO_Merkmale AS vm + WHERE SUBSTRING(idn.VakoCode, 1, LEN(vm.Basis)) = vm.Basis + AND SUBSTRING(idn.VakoCode, vm.Stelle, vm.Laenge) = vm.Charcode + AND vm.Bezeichnung = 'NW') AS DN + , (SELECT DISTINCT TOP 1 vm.Wert + FROM VAKO_Merkmale AS vm + WHERE SUBSTRING(idn.VakoCode, 1, LEN(vm.Basis)) = vm.Basis + AND SUBSTRING(idn.VakoCode, vm.Stelle, vm.Laenge) = vm.Charcode + AND vm.Bezeichnung = 'Funkfrequenz') AS Radio + FROM MapPcbIdToSerialNumber AS map + JOIN AuftragPositionSerienNr AS aps + ON map.MapPcbIdToSerialNumber_SerialNumber = aps.SerienNr + JOIN AlleAuftragPositionen AS aap + ON aps.AuftragNr = aap.AuftragNr + AND aps.PositionNr = aap.PositionNr + JOIN Identnr AS idn + ON aap.IdentNr = idn.IdentNr + WHERE map.MapPcbIdToSerialNumber_PcbId = 212120036) AS vmm + JOIN CordonelMeterSizes AS cms + ON vmm.DN = cms.Dn_VakoID") + .SetParameter(nameof(pcbid), pcbid) + .FirstOrDefault(reader => + { + meterSize = reader.GetValue(0); + hasRadio = reader.GetValue(1); + }); + + var meterSizeRegister = cordonelApps[Apps.GENESISFLOW][GENESISFLOW.MeterSize]; + + if (meterSizeRegister.IsEquals(meterSize)) + { + yield return new KeyValuePair(pcbidString, $"Wrong meter size: {meterSize} - expected was {meterSizeRegister.Value}."); + yield break; + } + + if (hasRadio) + { + var radioCheckId = model.RadioCheckId; + + if (radioCheckId is null) + { + yield return new KeyValuePair(pcbidString, $"RSSI test id was null."); + yield break; + } + + var radioCheckState = this.sqlConnection + .CreateCommand($@" + SELECT Result + FROM Cordonel_Radio_RSSI_History + WHERE id = @{nameof(radioCheckId)} + ORDER BY Datum DESC") + .SetParameter(nameof(radioCheckId), radioCheckId) + .FirstOrDefault(reader => reader.GetValue(0)); + + if (radioCheckState == false) + { + yield return new KeyValuePair(pcbidString, $"RSSI test failed - id: {radioCheckId}."); + yield break; + } + + var rssiCheckId = this.sqlConnection + .CreateCommand($@" + SELECT id + FROM Cordonel_Radio_RSSI_History + WHERE RadioAdress = @{nameof(cordonelInfo.Address)} + AND Result = 1 + ORDER BY Datum DESC") + .SetParameter(nameof(cordonelInfo.Address), cordonelInfo.Address) + .FirstOrDefault(reader => reader.GetValue(0)); + + if (rssiCheckId != radioCheckId) + { + yield return new KeyValuePair(pcbidString, $"RSSI test id ambiguous between {rssiCheckId}(latest) and {radioCheckId}(EOL)."); + yield break; + } + } + + var version = this.sqlConnection + .CreateCommand($@" + SELECT TOP 1 Version + FROM CordonelProgress AS cp + JOIN CordonelAppVersion AS cv + ON cp.Id = cv.ProgressId + AND appid = 24 + WHERE cp.PcbId = @{nameof(pcbid)} + ORDER BY 1 DESC") + .SetParameter(nameof(pcbid), pcbid) + .FirstOrDefault(reader => reader.GetValue(0)); + + if (requirement.FwVersion != version) + { + yield return new KeyValuePair(pcbidString, $"FW version ambiguous between {requirement.FwVersion}(requirement) and {version}(db)."); + yield break; + } + + var requiremetLutCrc = requirement.LutCrc; + var lutCrcString = $"{requiremetLutCrc}".Replace("0x", String.Empty).Trim(); + + if (UInt16.TryParse(lutCrcString, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out var lutCRCValue)) + { + var lutCRCRegister = cordonelApps[Apps.GENESISFLOW][GENESISFLOW.LookupFileCrc]; + + if (!lutCRCRegister.IsEquals(lutCRCValue)) + { + var registerLutCrc = lutCRCRegister.GetValue(); + + yield return new KeyValuePair(pcbidString, $"LUT CRC ambiguous between {requiremetLutCrc}(requirement) and 0x{registerLutCrc:X2}(register)."); + yield break; + } + } + else + { + yield return new KeyValuePair(pcbidString, $"LUT CRC {requiremetLutCrc} is not valid."); + yield break; + } + this.sqlConnection .CreateCommand($@" UPDATE Cordonel_EOL_Progress diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index ece81474..3837dad0 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit ece81474c3d99d9479dbbc17241bffb033ae3297 +Subproject commit 3837dad0a935fb89c06cb8410e1d35e60acf0448 diff --git a/LaaProductionWeb/LaaProduction.Console/Program.cs b/LaaProductionWeb/LaaProduction.Console/Program.cs index 2ed1781b..306278da 100644 --- a/LaaProductionWeb/LaaProduction.Console/Program.cs +++ b/LaaProductionWeb/LaaProduction.Console/Program.cs @@ -1,56 +1,12 @@ namespace LaaProduction.Console { - using LaaPackages.Features.Cordonel; - using LaaPackages.HttpClient; - using LaaPackages.SqlClient; - using System; public class Program { public static void Main(String[] args) { - var pcbidString = "192000024"; - var cordonelApps = HttpConnection - .CreateHttpConnection("http://10.49.40.25/") - .Get(x => x.SetPath("/MeterProcessState/api/ConfigurationJson")) - ?.Value ?? new CordonelAppsDictionary(); - SqlConnection - .CreateSqlConnection("Server=SLASQL01;Database=Auftrag;User Id=sa;Password=sqlserver") - .CreateCommand($@" - SELECT x.Id - , x.Address - , x.Value - FROM (SELECT gmh.ID AS Id - , CONVERT(VARBINARY(MAX), REPLACE(ISNULL(gmh.Address, '00'), '-', ''), 2) AS Address - , CONVERT(VARBINARY(MAX), REPLACE(REPLACE(ISNULL(gmh.Value, '00'), 'NULL', '00'), '-', ''), 2) AS Value - , ROW_NUMBER() OVER (PARTITION BY gmh.Address ORDER BY gmh.date DESC) AS Row - FROM GenesisMeterRegisterHistory AS gmh - WHERE gmh.PcbId = @{nameof(pcbidString)}) AS x - WHERE x.Row = 1 - ORDER BY x.Address") - .SetParameter(nameof(pcbidString), pcbidString) - .ExecuteReader(reader => - { - var addressBytes = reader.GetValue(1); - - if (addressBytes?.Length == 2) - { - var appId = addressBytes[0]; - var registerId = addressBytes[1]; - var register = cordonelApps[appId][registerId]; - - register.HistoryId = reader.GetValue(0); - register.Value = reader.GetValue(2); - } - }); - } - } - - public class MPSConnection : HttpConnection - { - public MPSConnection(string baseURL) : base(baseURL) - { + Console.WriteLine(typeof(Program).Namespace); } } } \ No newline at end of file diff --git a/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs b/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs index 2ed8b476..34efe9f8 100644 --- a/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs +++ b/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs @@ -1,7 +1,6 @@ namespace LaaProductionWeb.API.Cordonel { using LaaPackages.Features.Cordonel; - using LaaPackages.HttpClient; using LaaProduction.Data.Cordonel; using LaaProduction.Data.Cordonel.Models; using LaaProductionWeb.App_Infrastructure; From 157bfe416897e8d14bcf5745375e6c1a5e95645d Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Thu, 26 Sep 2024 15:57:56 +0200 Subject: [PATCH 22/44] just program --- Common/CommonConsole/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index b91c0256..768adfd7 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -1,7 +1,7 @@ -using System.Text; - -namespace CommonConsole +namespace CommonConsole { + using System.Text; + public class Program { public static void Main() From d188985f48e7416abc6e8b625f40e0ecdff07cc0 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Mon, 7 Oct 2024 08:42:01 +0200 Subject: [PATCH 23/44] battery and life time calculation --- .../LaaProduction.Data.Cordonel.csproj | 1 + .../Models/CordonelInfo.cs | 19 ++++ .../Repositories/EOLProgressRepository.cs | 88 +++++++++++++++---- 3 files changed, 91 insertions(+), 17 deletions(-) create mode 100644 LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelInfo.cs diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj index 95c7162d..5011ba29 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj @@ -60,6 +60,7 @@ + diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelInfo.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelInfo.cs new file mode 100644 index 00000000..a38f99eb --- /dev/null +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/CordonelInfo.cs @@ -0,0 +1,19 @@ +namespace LaaProduction.Data.Cordonel.Models +{ + public class CordonelInfo + { + public int Pono { get; set; } + + public int Serialno { get; set; } + + public int PcbId { get; set; } + + public long Address { get; set; } + + public byte TestStatus { get; set; } + + public bool Sealed { get; set; } + + public bool Pending { get; set; } + } +} diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs index e4b4f83a..79b669ff 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs @@ -196,7 +196,7 @@ return deleted; } - + public IEnumerable> RunSentinel(EOLProgressModel model, CordonelAppsDictionary cordonelApps) { if (model is null) @@ -231,9 +231,9 @@ yield break; } else if (requirement.StandardId != model.StandardRequirementId - || requirement.StandardVersion != model.StandardRequirementVersion - || requirement.SpecialId != model.SpecialRequirementId - || requirement.SpecialVersion != model.SpecialRequirementVersion) + || requirement.StandardVersion != model.StandardRequirementVersion + || requirement.SpecialId != model.SpecialRequirementId + || requirement.SpecialVersion != model.SpecialRequirementVersion) { yield return new KeyValuePair(pcbidString, $"Requirements did not match the EOL progress."); yield break; @@ -248,8 +248,8 @@ yield return new KeyValuePair(pcbidString, $"Is not correctly calibrated, status: {cordonelInfo.TestStatus}."); yield break; } - - this.sqlConnection + + this.sqlConnection .CreateCommand($@" SELECT x.Id , CONVERT(VARBINARY(MAX), REPLACE(ISNULL(x.Address, '00'), '-', ''), 2) AS Address @@ -304,7 +304,7 @@ AND aps.PositionNr = aap.PositionNr JOIN Identnr AS idn ON aap.IdentNr = idn.IdentNr - WHERE map.MapPcbIdToSerialNumber_PcbId = 212120036) AS vmm + WHERE map.MapPcbIdToSerialNumber_PcbId = @{nameof(pcbid)}) AS vmm JOIN CordonelMeterSizes AS cms ON vmm.DN = cms.Dn_VakoID") .SetParameter(nameof(pcbid), pcbid) @@ -467,22 +467,76 @@ Pending = reader.GetValue(6), }) .ToArray(); -} - public class CordonelInfo - { - public int Pono { get; set; } + private Boolean CheckBatteryAndLifeTime(EOLProgressModel eolModel, CordonelRequirements requirements) + { + // Check battery load in percent and compare with requirements for limits for drained battery load + // For the alternative calculation based quiescent current and production supplement this will be used. + // Build message for required versus calculated life time + //ProductionStatus.QuiescentCurrent_uA = ProductionRequirements.QuiescentCurrent_uA; + //ProductionStatus.EstimatedProductionBatteryLoadPercent = + // ProductionRequirements.EstimatedProductionBatteryLoadPercent; - public int Serialno { get; set; } + //var threshold = ProductionStatus.AlternativeRequiredBatteryLoadPercent ?? + // ProductionRequirements.MaxDrainedBatteryLoadPercentShipping; - public int PcbId { get; set; } + //var alternativeCalculation = ProductionStatus.AlternativeRequiredBatteryLoadPercent == null ? "" : + // $"({Resources.StrMsgAlternativeDrainedBatteryCalculation})"; - public long Address { get; set; } + //var batteryLoad = $"{Resources.StrMsgDrainedBatteryAtEol}: " + + // // Actual calculated battery load based on readings from meter + // $"{ProductionStatus.DrainedBatteryLoadPercent:F2} %" + + // $" - {Resources.StrMsgRequirementLimtDrainedBatteryAtEol}: " + + // // Required battery load from standard or special requirement + // $"{threshold:F2} % {alternativeCalculation}"; - public byte TestStatus { get; set; } + //eolModel.ProductionStatusDrainedBatteryLoad = ProductionStatus.DrainedBatteryLoadPercent; - public bool Sealed { get; set; } + //if (ProductionStatus.AlternativeRequiredBatteryLoadPercent != null && + // ProductionStatus.DrainedBatteryLoadPercent > + // ProductionStatus.AlternativeRequiredBatteryLoadPercent) + //{ + // // errorMsg = $"{Resources.StrErrorMsg}: {batteryLoad}"; + // eolModel.ProductionStatusBatteryLoadChecked = EOLStatus.FAIL; - public bool Pending { get; set; } + // return false; // ExitWithErrorAndUserWindow(errorMsg); + //} + + //if (ProductionStatus.DrainedBatteryLoadPercent > + // ProductionRequirements.MaxDrainedBatteryLoadPercentShipping) + //{ + // // errorMsg = $"{Resources.StrErrorMsg}: {batteryLoad}"; + // eolModel.ProductionStatusBatteryLoadChecked = EOLStatus.FAIL; + + // return false; // ExitWithErrorAndUserWindow(errorMsg); + //} + //eolModel.ProductionStatusBatteryLoadChecked = EOLStatus.OK; + //// SuccessMsgDispatcher($"{Resources.StrSuccessMsg}: {batteryLoad}"); + + //// Build message for required versus calculated life time + //var lifeTime = $"{Resources.StrMsgRemainingLifeTimeAtEol}: " + + // // Actual calculated life time based on readings from meter + // $"{ProductionStatus.RemainingLifeTimeYears:F2} " + + // $"{Resources.StrMsgYears}" + + // $" - {Resources.StrMsgRequiredLifeTimeAtEol}: " + + // // Required life time from special or standard requirement + // $"{ProductionRequirements.RequiredLifeTimeYearsShipping:F2} " + + // $"{Resources.StrMsgYears}"; + //// Check required years for shipping + //// EolProgress.ProductionStatusRemainingLifeTime = ProductionStatus.RemainingLifeTimeYears; + + //if (ProductionStatus.RemainingLifeTimeYears < ProductionRequirements.RequiredLifeTimeYearsShipping) + //{ + // // errorMsg = $"{Resources.StrErrorMsg}: {lifeTime}"; + // eolModel.ProductionStatusRemainingLifeTimeChecked = EOLStatus.FAIL; + + // return false; // ExitWithErrorAndUserWindow(errorMsg); + //} + + //// SuccessMsgDispatcher($"{Resources.StrSuccessMsg}: {lifeTime}"); + //eolModel.ProductionStatusRemainingLifeTimeChecked = EOLStatus.OK; + + return true; + } } } \ No newline at end of file From 2042ffd959dc127395c8ff7bd0a20c66b766c7ec Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Mon, 7 Oct 2024 08:55:21 +0200 Subject: [PATCH 24/44] branch changing --- .../Repositories/EOLProgressRepository.cs | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs index 79b669ff..1e0c0c70 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs @@ -470,71 +470,6 @@ private Boolean CheckBatteryAndLifeTime(EOLProgressModel eolModel, CordonelRequirements requirements) { - // Check battery load in percent and compare with requirements for limits for drained battery load - // For the alternative calculation based quiescent current and production supplement this will be used. - // Build message for required versus calculated life time - //ProductionStatus.QuiescentCurrent_uA = ProductionRequirements.QuiescentCurrent_uA; - //ProductionStatus.EstimatedProductionBatteryLoadPercent = - // ProductionRequirements.EstimatedProductionBatteryLoadPercent; - - //var threshold = ProductionStatus.AlternativeRequiredBatteryLoadPercent ?? - // ProductionRequirements.MaxDrainedBatteryLoadPercentShipping; - - //var alternativeCalculation = ProductionStatus.AlternativeRequiredBatteryLoadPercent == null ? "" : - // $"({Resources.StrMsgAlternativeDrainedBatteryCalculation})"; - - //var batteryLoad = $"{Resources.StrMsgDrainedBatteryAtEol}: " + - // // Actual calculated battery load based on readings from meter - // $"{ProductionStatus.DrainedBatteryLoadPercent:F2} %" + - // $" - {Resources.StrMsgRequirementLimtDrainedBatteryAtEol}: " + - // // Required battery load from standard or special requirement - // $"{threshold:F2} % {alternativeCalculation}"; - - //eolModel.ProductionStatusDrainedBatteryLoad = ProductionStatus.DrainedBatteryLoadPercent; - - //if (ProductionStatus.AlternativeRequiredBatteryLoadPercent != null && - // ProductionStatus.DrainedBatteryLoadPercent > - // ProductionStatus.AlternativeRequiredBatteryLoadPercent) - //{ - // // errorMsg = $"{Resources.StrErrorMsg}: {batteryLoad}"; - // eolModel.ProductionStatusBatteryLoadChecked = EOLStatus.FAIL; - - // return false; // ExitWithErrorAndUserWindow(errorMsg); - //} - - //if (ProductionStatus.DrainedBatteryLoadPercent > - // ProductionRequirements.MaxDrainedBatteryLoadPercentShipping) - //{ - // // errorMsg = $"{Resources.StrErrorMsg}: {batteryLoad}"; - // eolModel.ProductionStatusBatteryLoadChecked = EOLStatus.FAIL; - - // return false; // ExitWithErrorAndUserWindow(errorMsg); - //} - //eolModel.ProductionStatusBatteryLoadChecked = EOLStatus.OK; - //// SuccessMsgDispatcher($"{Resources.StrSuccessMsg}: {batteryLoad}"); - - //// Build message for required versus calculated life time - //var lifeTime = $"{Resources.StrMsgRemainingLifeTimeAtEol}: " + - // // Actual calculated life time based on readings from meter - // $"{ProductionStatus.RemainingLifeTimeYears:F2} " + - // $"{Resources.StrMsgYears}" + - // $" - {Resources.StrMsgRequiredLifeTimeAtEol}: " + - // // Required life time from special or standard requirement - // $"{ProductionRequirements.RequiredLifeTimeYearsShipping:F2} " + - // $"{Resources.StrMsgYears}"; - //// Check required years for shipping - //// EolProgress.ProductionStatusRemainingLifeTime = ProductionStatus.RemainingLifeTimeYears; - - //if (ProductionStatus.RemainingLifeTimeYears < ProductionRequirements.RequiredLifeTimeYearsShipping) - //{ - // // errorMsg = $"{Resources.StrErrorMsg}: {lifeTime}"; - // eolModel.ProductionStatusRemainingLifeTimeChecked = EOLStatus.FAIL; - - // return false; // ExitWithErrorAndUserWindow(errorMsg); - //} - - //// SuccessMsgDispatcher($"{Resources.StrSuccessMsg}: {lifeTime}"); - //eolModel.ProductionStatusRemainingLifeTimeChecked = EOLStatus.OK; return true; } From 8e4dab5b5d5ac6d149aa5040860d02335a5ebe3e Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Mon, 7 Oct 2024 10:30:40 +0200 Subject: [PATCH 25/44] battery check done. TODO: SAP export --- .../Repositories/EOLProgressRepository.cs | 107 +++++++++++++++--- LaaProductionWeb/LaaPackages | 2 +- LaaProductionWeb/LaaProductionWeb.sln | 7 ++ 3 files changed, 100 insertions(+), 16 deletions(-) diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs index 1e0c0c70..fd8e01a5 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs @@ -223,27 +223,27 @@ yield break; } - var requirement = this.dbContext.Requirements.FindByPcbId(pcbidString); + var requirements = this.dbContext.Requirements.FindByPcbId(pcbidString); - if (requirement is null) + if (requirements is null) { yield return new KeyValuePair(pcbidString, $"Requirements not found."); yield break; } - else if (requirement.StandardId != model.StandardRequirementId - || requirement.StandardVersion != model.StandardRequirementVersion - || requirement.SpecialId != model.SpecialRequirementId - || requirement.SpecialVersion != model.SpecialRequirementVersion) + else if (requirements.StandardId != model.StandardRequirementId + || requirements.StandardVersion != model.StandardRequirementVersion + || requirements.SpecialId != model.SpecialRequirementId + || requirements.SpecialVersion != model.SpecialRequirementVersion) { yield return new KeyValuePair(pcbidString, $"Requirements did not match the EOL progress."); yield break; } - else if (requirement.IsStandardActive == false || requirement.SpecialId != null && requirement.IsSpecialActive == false) + else if (requirements.IsStandardActive == false || requirements.SpecialId != null && requirements.IsSpecialActive == false) { yield return new KeyValuePair(pcbidString, $"One or both of the bounded requirements are not active."); yield break; } - else if (requirement.SkipCalibration == false && cordonelInfo.TestStatus != 30) + else if (requirements.SkipCalibration == false && cordonelInfo.TestStatus != 30) { yield return new KeyValuePair(pcbidString, $"Is not correctly calibrated, status: {cordonelInfo.TestStatus}."); yield break; @@ -357,7 +357,12 @@ .SetParameter(nameof(cordonelInfo.Address), cordonelInfo.Address) .FirstOrDefault(reader => reader.GetValue(0)); - if (rssiCheckId != radioCheckId) + if (rssiCheckId is null) + { + yield return new KeyValuePair(pcbidString, $"RSSI test is required."); + yield break; + } + else if (rssiCheckId != radioCheckId) { yield return new KeyValuePair(pcbidString, $"RSSI test id ambiguous between {rssiCheckId}(latest) and {radioCheckId}(EOL)."); yield break; @@ -370,19 +375,25 @@ FROM CordonelProgress AS cp JOIN CordonelAppVersion AS cv ON cp.Id = cv.ProgressId - AND appid = 24 + AND appid = @appid WHERE cp.PcbId = @{nameof(pcbid)} ORDER BY 1 DESC") .SetParameter(nameof(pcbid), pcbid) + .SetParameter("appid", Apps.FLEXNETVERSION) .FirstOrDefault(reader => reader.GetValue(0)); - if (requirement.FwVersion != version) + if (String.IsNullOrWhiteSpace(version)) { - yield return new KeyValuePair(pcbidString, $"FW version ambiguous between {requirement.FwVersion}(requirement) and {version}(db)."); + yield return new KeyValuePair(pcbidString, $"FW version not found."); + yield break; + } + else if (requirements.FwVersion != version) + { + yield return new KeyValuePair(pcbidString, $"FW version ambiguous between {requirements.FwVersion}(requirement) and {version}(db)."); yield break; } - var requiremetLutCrc = requirement.LutCrc; + var requiremetLutCrc = requirements.LutCrc; var lutCrcString = $"{requiremetLutCrc}".Replace("0x", String.Empty).Trim(); if (UInt16.TryParse(lutCrcString, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out var lutCRCValue)) @@ -403,6 +414,12 @@ yield break; } + if (!this.CheckBatteryAndLifeTime(cordonelApps, requirements)) + { + yield break; + } + + // TODO: Make SAP export this.sqlConnection .CreateCommand($@" UPDATE Cordonel_EOL_Progress @@ -468,10 +485,70 @@ }) .ToArray(); - private Boolean CheckBatteryAndLifeTime(EOLProgressModel eolModel, CordonelRequirements requirements) + private Boolean CheckBatteryAndLifeTime(CordonelAppsDictionary cordonelApps, CordonelRequirements requirements) { + var succeeded = true; + var powermon = cordonelApps[Apps.POWERMON]; + var exceededLifeTime_seconds = powermon[POWERMON.TotalUsedSeconds].GetValue(); + var drainedBatteryLoad_uAs = powermon[POWERMON.TotalUsedCharge].GetValue(); + var batteryQuantity = powermon[POWERMON.BatteryQuantity].GetValue(); + var initialBatteryLoad_mAh = powermon[POWERMON.BatteryMilliAHrRating].GetValue(); - return true; + // Calculate the initial overall battery load of all batteries in uAs as the drained load uses this unit. + var initialBatteryLoad_uAs = 1000 * 3600 * initialBatteryLoad_mAh * batteryQuantity; + + // Relation of drained to initial load, set the battery to fully unloaded for failed check to force a recalculation + var drainedBatteryLoad_rel = 1.0; + + if (initialBatteryLoad_uAs != 0) + { + drainedBatteryLoad_rel = (Double)drainedBatteryLoad_uAs / initialBatteryLoad_uAs; + } + else + { + succeeded = false; + } + + var drainedBatteryLoadPercent = drainedBatteryLoad_rel * 100; + + // The estimated life time uses the drained load over the actual exceeded life time and assumes, that further on + // an identical load will be consumed over the remaining life cycle. The initial load will be multiplied with the + // drained load relation. Set the estimated time to the exceeded time to force a recalculation on failed input. + var estimatedLifeTime_seconds = (Double)exceededLifeTime_seconds; + + if (drainedBatteryLoad_rel != 0.0) + { + estimatedLifeTime_seconds = exceededLifeTime_seconds / drainedBatteryLoad_rel; + } + else + { + succeeded = false; + } + + var remainingLifetimeSeconds = estimatedLifeTime_seconds - exceededLifeTime_seconds; + + // convert the seconds to years + var remainingLifeTimeYears = remainingLifetimeSeconds / 3600 / 24 / 365.25; + var quiescentCurrent_uA = requirements.QuiescentCurrent_uA ?? default(Double); + var estimatedProductionBatteryLoad_percent = requirements.EstimatedProductionBatteryLoadPercent ?? default(Double); + + // Calculate an alternative threshold for remaining battery load based on the quiescent current and a supplement + // for production purpose. Those values can be assigned in the Cordonel requirements. + if (quiescentCurrent_uA > 0) + { + var alternativeRequiredBatteryLoadPercent = estimatedProductionBatteryLoad_percent + + exceededLifeTime_seconds + * quiescentCurrent_uA + / initialBatteryLoad_uAs + * 100; + // TODO: is check succesfull + } + else + { + // TODO: is check succesfull + } + + return succeeded; } } } \ No newline at end of file diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index 3837dad0..2bcec981 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit 3837dad0a935fb89c06cb8410e1d35e60acf0448 +Subproject commit 2bcec981f7f692e716154e9211f14c3ee4fd70c3 diff --git a/LaaProductionWeb/LaaProductionWeb.sln b/LaaProductionWeb/LaaProductionWeb.sln index 9602a39e..446646e7 100644 --- a/LaaProductionWeb/LaaProductionWeb.sln +++ b/LaaProductionWeb/LaaProductionWeb.sln @@ -58,6 +58,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaPackages.HttpClient", "L EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaPackages.Features.Cordonel", "LaaPackages\LaaPackages.Features.Cordonel\LaaPackages.Features.Cordonel.csproj", "{8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaPackages.Extensions", "LaaPackages\LaaPackages.Extensions\LaaPackages.Extensions.csproj", "{15A06398-ECB6-49C9-ACB4-52A495A886A6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -124,6 +126,10 @@ Global {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}.Debug|Any CPU.Build.0 = Debug|Any CPU {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}.Release|Any CPU.ActiveCfg = Release|Any CPU {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}.Release|Any CPU.Build.0 = Release|Any CPU + {15A06398-ECB6-49C9-ACB4-52A495A886A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15A06398-ECB6-49C9-ACB4-52A495A886A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15A06398-ECB6-49C9-ACB4-52A495A886A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15A06398-ECB6-49C9-ACB4-52A495A886A6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -135,6 +141,7 @@ Global {F90B940C-9A83-496D-AAE0-11CD02CE0A22} = {35CDD71E-6FF8-45F5-B6E1-DF73573B4C26} {C9816412-7752-4F7A-8BD2-765DB6D58B3C} = {35CDD71E-6FF8-45F5-B6E1-DF73573B4C26} {8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB} = {35CDD71E-6FF8-45F5-B6E1-DF73573B4C26} + {15A06398-ECB6-49C9-ACB4-52A495A886A6} = {35CDD71E-6FF8-45F5-B6E1-DF73573B4C26} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9D3C9EBA-FB4B-4BF4-8158-4A9FE47D3E88} From c6c1b7e08df3cd0091e3dcd253361804e4be9c5c Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 9 Oct 2024 13:31:14 +0200 Subject: [PATCH 26/44] =?UTF-8?q?funkschl=C3=BCssel=20f=C3=BCr=20eregister?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common/CommonConsole/Program.cs | 4 - .../CordonelDbContext.cs | 87 +++++++++++ .../LaaProduction.Data.Cordonel.csproj | 1 + .../Models/GenesisFlowModel.cs | 147 ++++++++++++++++++ .../Repositories/EOLProgressRepository.cs | 54 +++---- LaaProductionWeb/LaaPackages | 2 +- .../LaaProduction.Console.csproj | 1 + .../LaaProduction.Console/Program.cs | 19 ++- .../API/Cordonel/EOLProgressController.cs | 63 +++++++- .../API/Search/SearchController.cs | 43 +++++ .../App_Infrastructure/RoutePrefixes.cs | 2 + .../Controllers/SearchController.cs | 64 ++++++-- .../LaaProductionWeb/LaaProductionWeb.csproj | 1 + .../Views/Search/Passwords.cshtml | 8 +- LaaProductionWeb/LaaProductionWeb/web.config | 4 +- 15 files changed, 439 insertions(+), 61 deletions(-) create mode 100644 LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/GenesisFlowModel.cs create mode 100644 LaaProductionWeb/LaaProductionWeb/API/Search/SearchController.cs diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index 768adfd7..478b0e74 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -1,14 +1,10 @@ namespace CommonConsole { - using System.Text; - public class Program { public static void Main() { - var bytes = new byte[] { 0x43, 0x6F, 0x72, 0x64, 0x6F, 0x6E, 0x65, 0x6C, 0x20, 0x31, 0x2E, 0x35, 0x36, 0x00, 0x4E, 0xE4 }; - System.Console.WriteLine(Encoding.ASCII.GetString(bytes)); } } } \ No newline at end of file diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/CordonelDbContext.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/CordonelDbContext.cs index 1784f7d2..d2001e81 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/CordonelDbContext.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/CordonelDbContext.cs @@ -1,5 +1,6 @@ namespace LaaProduction.Data.Cordonel { + using LaaPackages.Features.Cordonel; using LaaPackages.SqlClient; using LaaProduction.Data.Cordonel.Interfaces; using LaaProduction.Data.Cordonel.Models; @@ -30,5 +31,91 @@ public ISpecialRequirementsRepository SpecialRequirements { get; } public IStandardRequirementRepository StandardRequirements { get; } + + public CordonelAppsDictionary GetLatestAppsWithValues(Object pcbid, CordonelAppsDictionary appsDictionary) + { + var pcbidString = pcbid?.ToString(); + + this.SqlConnection + .CreateCommand($@" + SELECT x.Id + , CONVERT(VARBINARY(MAX), REPLACE(ISNULL(x.Address, '00'), '-', ''), 2) AS Address + , CONVERT(VARBINARY(MAX), REPLACE(REPLACE(ISNULL(x.Value, '00'), 'NULL', '00'), '-', ''), 2) AS Value + FROM (SELECT gmh.ID AS Id + , gmh.Address + , gmh.Value + , ROW_NUMBER() OVER (PARTITION BY gmh.Address ORDER BY gmh.date DESC) AS Row + FROM GenesisMeterRegisterHistory AS gmh + WHERE gmh.PcbId = @{nameof(pcbidString)}) AS x + WHERE x.Row = 1 + ORDER BY x.Address") + .SetParameter(nameof(pcbidString), pcbidString) + .ExecuteReader(reader => + { + var addressBytes = reader.GetValue(1); + + if (addressBytes?.Length == 2) + { + var appId = addressBytes[0]; + var registerId = addressBytes[1]; + var register = appsDictionary[appId][registerId]; + + register.HistoryId = reader.GetValue(0); + register.Value = reader.GetValue(2); + } + }); + + return appsDictionary; + } + + public GenesisFlowModel GetLatestGenesisFlowValues(Object pcbid) + => this.SqlConnection + .CreateCommand($@" + SELECT TOP 1 + ID + , PcbId + , CalFactor1 + , CalFactor2 + , CalFactor3 + , ZeroOffset1 + , ZeroOffset2 + , ZeroOffset3 + , FirstHitUpdatePeriod + , FirstHitShift + , FirstHitPercent1 + , FirstHitPercent2 + , FirstHitPercent3 + , ToFTempOffset1 + , ToFTempOffset2 + , ToFTempOffset3 + , MeterSize + , date + , successful + FROM CordonelMeterCalibrationResults + WHERE PcbId = @{nameof(pcbid)} + ORDER BY date DESC") + .SetParameter(nameof(pcbid), pcbid?.ToString()) + .FirstOrDefault(reader => new GenesisFlowModel + { + Id = reader.GetValue(0), + PcbId = reader.GetValue(1), + CalFactor1 = reader.GetValue(2), + CalFactor2 = reader.GetValue(3), + CalFactor3 = reader.GetValue(4), + ZeroOffset1 = reader.GetValue(5), + ZeroOffset2 = reader.GetValue(6), + ZeroOffset3 = reader.GetValue(7), + FirstHitUpdatePeriod = reader.GetValue(8), + FirstHitShift = reader.GetValue(9), + FirstHitPercent1 = reader.GetValue(10), + FirstHitPercent2 = reader.GetValue(11), + FirstHitPercent3 = reader.GetValue(12), + ToFTempOffset1 = reader.GetValue(13), + ToFTempOffset2 = reader.GetValue(14), + ToFTempOffset3 = reader.GetValue(15), + MeterSize = reader.GetValue(16), + Date = reader.GetValue(17), + Successful = reader.GetValue(18), + }); } } diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj index 5011ba29..92ad2059 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/LaaProduction.Data.Cordonel.csproj @@ -72,6 +72,7 @@ + diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/GenesisFlowModel.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/GenesisFlowModel.cs new file mode 100644 index 00000000..b4478774 --- /dev/null +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Models/GenesisFlowModel.cs @@ -0,0 +1,147 @@ +namespace LaaProduction.Data.Cordonel.Models +{ + using LaaPackages.Features.Cordonel; + + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using System.Reflection; + + public class GenesisFlowModel + { + public Int32 Id { get; set; } + + public String PcbId { get; set; } + + public Int32 CalFactor1 { get; set; } + + public Int32 CalFactor2 { get; set; } + + public Int32 CalFactor3 { get; set; } + + public Int32 ZeroOffset1 { get; set; } + + public Int32 ZeroOffset2 { get; set; } + + public Int32 ZeroOffset3 { get; set; } + + public Int32 FirstHitUpdatePeriod { get; set; } + + public Int32 FirstHitShift { get; set; } + + public Int32 FirstHitPercent1 { get; set; } + + public Int32 FirstHitPercent2 { get; set; } + + public Int32 FirstHitPercent3 { get; set; } + + public Int32 ToFTempOffset1 { get; set; } + + public Int32 ToFTempOffset2 { get; set; } + + public Int32 ToFTempOffset3 { get; set; } + + public Int32 MeterSize { get; set; } + + public DateTime Date { get; set; } + + public Boolean Successful { get; set; } + + public IEnumerable> IsEquals(CordonelAppsDictionary appsDictionary) + { + if (!this.Successful) + { + yield return new KeyValuePair(this.PcbId, "Genesis flow is not successful."); + } + + var genesisFlow = appsDictionary[Apps.GENESISFLOW]; + var calFactor1 = genesisFlow[GENESISFLOW.CalFactor1].GetValue(); + var calFactor2 = genesisFlow[GENESISFLOW.CalFactor2].GetValue(); + var calFactor3 = genesisFlow[GENESISFLOW.CalFactor3].GetValue(); + var zeroOffset1 = genesisFlow[GENESISFLOW.ZeroOffset1].GetValue(); + var zeroOffset2 = genesisFlow[GENESISFLOW.ZeroOffset2].GetValue(); + var zeroOffset3 = genesisFlow[GENESISFLOW.ZeroOffset3].GetValue(); + var firstHitUpdatePeriod = genesisFlow[GENESISFLOW.FirstHitUpdatePeriod].GetValue(); + var firstHitShift = genesisFlow[GENESISFLOW.FirstHitShift].GetValue(); + var firstHitPercent1 = genesisFlow[GENESISFLOW.FirstHitPercent1].GetValue(); + var firstHitPercent2 = genesisFlow[GENESISFLOW.FirstHitPercent2].GetValue(); + var firstHitPercent3 = genesisFlow[GENESISFLOW.FirstHitPercent3].GetValue(); + var toFTempOffset1 = genesisFlow[GENESISFLOW.ToFTempOffset1].GetValue(); + var toFTempOffset2 = genesisFlow[GENESISFLOW.ToFTempOffset2].GetValue(); + var toFTempOffset3 = genesisFlow[GENESISFLOW.ToFTempOffset3].GetValue(); + + yield return this.ErrorIf(x => x.CalFactor1 != calFactor1); + yield return this.ErrorIf(x => x.CalFactor2 != calFactor2); + yield return this.ErrorIf(x => x.CalFactor3 != calFactor3); + yield return this.ErrorIf(x => x.ZeroOffset1 != zeroOffset1); + yield return this.ErrorIf(x => x.ZeroOffset2 != zeroOffset2); + yield return this.ErrorIf(x => x.ZeroOffset3 != zeroOffset3); + yield return this.ErrorIf(x => x.FirstHitUpdatePeriod != firstHitUpdatePeriod); + yield return this.ErrorIf(x => x.FirstHitShift != firstHitShift); + yield return this.ErrorIf(x => x.FirstHitPercent1 != firstHitPercent1); + yield return this.ErrorIf(x => x.FirstHitPercent2 != firstHitPercent2); + yield return this.ErrorIf(x => x.FirstHitPercent3 != firstHitPercent3); + yield return this.ErrorIf(x => x.ToFTempOffset1 != toFTempOffset1); + yield return this.ErrorIf(x => x.ToFTempOffset2 != toFTempOffset2); + yield return this.ErrorIf(x => x.ToFTempOffset3 != toFTempOffset3); + } + + public IEnumerable> IsZeroFlowEquals(CordonelAppsDictionary appsDictionary) + { + if (!this.Successful) + { + yield return new KeyValuePair(this.PcbId, "Genesis flow is not successful."); + } + + var genesisFlow = appsDictionary[Apps.GENESISFLOW]; + var zeroOffset1 = genesisFlow[GENESISFLOW.ZeroOffset1].GetValue(); + var zeroOffset2 = genesisFlow[GENESISFLOW.ZeroOffset2].GetValue(); + var zeroOffset3 = genesisFlow[GENESISFLOW.ZeroOffset3].GetValue(); + + yield return this.ErrorIf(x => x.ZeroOffset1 != zeroOffset1); + yield return this.ErrorIf(x => x.ZeroOffset2 != zeroOffset2); + yield return this.ErrorIf(x => x.ZeroOffset3 != zeroOffset3); + } + + public IEnumerable> IsCalibrationEquals(CordonelAppsDictionary appsDictionary) + { + if (!this.Successful) + { + yield return new KeyValuePair(this.PcbId, "Genesis flow is not successful."); + } + + var genesisFlow = appsDictionary[Apps.GENESISFLOW]; + var calFactor1 = genesisFlow[GENESISFLOW.CalFactor1].GetValue(); + var calFactor2 = genesisFlow[GENESISFLOW.CalFactor2].GetValue(); + var calFactor3 = genesisFlow[GENESISFLOW.CalFactor3].GetValue(); + + yield return this.ErrorIf(x => x.CalFactor1 != calFactor1); + yield return this.ErrorIf(x => x.CalFactor2 != calFactor2); + yield return this.ErrorIf(x => x.CalFactor3 != calFactor3); + } + + private KeyValuePair ErrorIf(Expression> expression) + { + var succeeded = expression.Compile().Invoke(this); + + if (!succeeded) + { + var binaryExpression = expression.Body as BinaryExpression; + var leftMember = binaryExpression?.Left as MemberExpression; + var leftPropertyInfo = leftMember?.Member as PropertyInfo; + var name = leftPropertyInfo.Name; + var valueL = leftPropertyInfo.GetValue(this); + var valueR = Expression + .Lambda(binaryExpression?.Right) + ?.Compile() + ?.DynamicInvoke(); + + return new KeyValuePair(this.PcbId, $"Calibration result compared to register value: {name} - {valueL} != {valueR}."); + } + else + { + return new KeyValuePair(); + } + } + } +} diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs index fd8e01a5..40a81aaa 100644 --- a/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs +++ b/LaaProductionWeb/Data/LaaProduction.Data.Cordonel/Repositories/EOLProgressRepository.cs @@ -196,8 +196,8 @@ return deleted; } - - public IEnumerable> RunSentinel(EOLProgressModel model, CordonelAppsDictionary cordonelApps) + + public IEnumerable> RunSentinel(EOLProgressModel model, CordonelAppsDictionary appsDictionary) { if (model is null) { @@ -249,34 +249,7 @@ yield break; } - this.sqlConnection - .CreateCommand($@" - SELECT x.Id - , CONVERT(VARBINARY(MAX), REPLACE(ISNULL(x.Address, '00'), '-', ''), 2) AS Address - , CONVERT(VARBINARY(MAX), REPLACE(REPLACE(ISNULL(x.Value, '00'), 'NULL', '00'), '-', ''), 2) AS Value - FROM (SELECT gmh.ID AS Id - , gmh.Address - , gmh.Value - , ROW_NUMBER() OVER (PARTITION BY gmh.Address ORDER BY gmh.date DESC) AS Row - FROM GenesisMeterRegisterHistory AS gmh - WHERE gmh.PcbId = @{nameof(pcbidString)}) AS x - WHERE x.Row = 1 - ORDER BY x.Address") - .SetParameter(nameof(pcbidString), pcbidString) - .ExecuteReader(reader => - { - var addressBytes = reader.GetValue(1); - - if (addressBytes?.Length == 2) - { - var appId = addressBytes[0]; - var registerId = addressBytes[1]; - var register = cordonelApps[appId][registerId]; - - register.HistoryId = reader.GetValue(0); - register.Value = reader.GetValue(2); - } - }); + appsDictionary = this.dbContext.GetLatestAppsWithValues(pcbidString, appsDictionary); var meterSize = default(Byte); var hasRadio = default(Boolean); @@ -314,7 +287,7 @@ hasRadio = reader.GetValue(1); }); - var meterSizeRegister = cordonelApps[Apps.GENESISFLOW][GENESISFLOW.MeterSize]; + var meterSizeRegister = appsDictionary[Apps.GENESISFLOW][GENESISFLOW.MeterSize]; if (meterSizeRegister.IsEquals(meterSize)) { @@ -322,6 +295,21 @@ yield break; } + var genesisFlow = this.dbContext.GetLatestGenesisFlowValues(pcbidString); + var genesisFlowComparisonErrors = genesisFlow + .IsEquals(appsDictionary) + .Where(x => String.IsNullOrWhiteSpace(x.Key)); + + if (genesisFlowComparisonErrors?.Any() == true) + { + foreach (var error in genesisFlowComparisonErrors) + { + yield return error; + } + + yield break; + } + if (hasRadio) { var radioCheckId = model.RadioCheckId; @@ -398,7 +386,7 @@ if (UInt16.TryParse(lutCrcString, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out var lutCRCValue)) { - var lutCRCRegister = cordonelApps[Apps.GENESISFLOW][GENESISFLOW.LookupFileCrc]; + var lutCRCRegister = appsDictionary[Apps.GENESISFLOW][GENESISFLOW.LookupFileCrc]; if (!lutCRCRegister.IsEquals(lutCRCValue)) { @@ -414,7 +402,7 @@ yield break; } - if (!this.CheckBatteryAndLifeTime(cordonelApps, requirements)) + if (!this.CheckBatteryAndLifeTime(appsDictionary, requirements)) { yield break; } diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index 2bcec981..0bd11ec9 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit 2bcec981f7f692e716154e9211f14c3ee4fd70c3 +Subproject commit 0bd11ec9087e6fa3a47cb0d3e65af2846c184b1b diff --git a/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj b/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj index 91a9df1e..f44e7731 100644 --- a/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj +++ b/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj @@ -44,6 +44,7 @@ + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll diff --git a/LaaProductionWeb/LaaProduction.Console/Program.cs b/LaaProductionWeb/LaaProduction.Console/Program.cs index 306278da..cc45b91a 100644 --- a/LaaProductionWeb/LaaProduction.Console/Program.cs +++ b/LaaProductionWeb/LaaProduction.Console/Program.cs @@ -1,12 +1,29 @@ namespace LaaProduction.Console { using System; + using System.Net; + using System.Net.Http; public class Program { + const string URL_PATTERN = "https://nodes.sms-esaap.com/keygenproxy/api/v2/keys/devices?orderNumber={0}&radioaddress={1}"; + const string X_NODE_TOKEN_HEADER = "X-Node-Token"; + const string X_NODE_TOKEN = "d5b8c0b2-81f6-4421-80d0-44eb2093e616"; + public static void Main(String[] args) { - Console.WriteLine(typeof(Program).Namespace); + using (var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, String.Format(URL_PATTERN, 3233972, 10309029807))) + { + httpRequestMessage.Headers.Add(X_NODE_TOKEN_HEADER, X_NODE_TOKEN); + + ServicePointManager.Expect100Continue = true; + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + + using (var httpResponseMessage = new HttpClient().SendAsync(httpRequestMessage).Result) + { + var content = httpResponseMessage?.Content?.ReadAsStringAsync()?.Result?.Trim('"'); + } + } } } } \ No newline at end of file diff --git a/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs b/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs index 34efe9f8..a94c52b9 100644 --- a/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs +++ b/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs @@ -55,12 +55,7 @@ return this.BadRequest(); } - var apps = WebApiApplication - .GetService() - .Get(request => - { - request.SetPath("/MeterProcessState/api/ConfigurationJson"); - }).Value ?? new CordonelAppsDictionary(); + var apps = this.GetConfigurationJson(); var errors = this.dbcontext.EOLProgress.RunSentinel(eol, apps); if (errors?.Count() > 0) @@ -116,5 +111,61 @@ return this.Json(actualEOLProgressModel); } + + [HttpGet] + [Route("Check/ZeroFlow/{pcbId}")] + public IHttpActionResult CheckZeroFlow(Int32 pcbid) + { + var apps = this.GetConfigurationJson(); + apps = this.dbcontext.GetLatestAppsWithValues(pcbid, apps); + var genesisFlow = this.dbcontext.GetLatestGenesisFlowValues(pcbid); + + foreach (var kvp in genesisFlow.IsZeroFlowEquals(apps)) + { + if (!String.IsNullOrWhiteSpace(kvp.Key)) + { + this.ModelState.AddModelError(kvp.Key, kvp.Value); + } + } + + if (!this.ModelState.IsValid) + { + return this.BadRequest(); + } + + return this.Ok(); + } + + [HttpGet] + [Route("Check/Calibration/{pcbId}")] + public IHttpActionResult CheckCalibration(Int32 pcbid) + { + var apps = this.GetConfigurationJson(); + apps = this.dbcontext.GetLatestAppsWithValues(pcbid, apps); + var genesisFlow = this.dbcontext.GetLatestGenesisFlowValues(pcbid); + + foreach (var kvp in genesisFlow.IsCalibrationEquals(apps)) + { + if (!String.IsNullOrWhiteSpace(kvp.Key)) + { + this.ModelState.AddModelError(kvp.Key, kvp.Value); + } + } + + if (!this.ModelState.IsValid) + { + return this.BadRequest(); + } + + return this.Ok(); + } + + private CordonelAppsDictionary GetConfigurationJson() + => WebApiApplication + .GetService() + .Get(request => + { + request.SetPath("/MeterProcessState/api/ConfigurationJson"); + }).Value ?? new CordonelAppsDictionary(); } } \ No newline at end of file diff --git a/LaaProductionWeb/LaaProductionWeb/API/Search/SearchController.cs b/LaaProductionWeb/LaaProductionWeb/API/Search/SearchController.cs new file mode 100644 index 00000000..29c4d68b --- /dev/null +++ b/LaaProductionWeb/LaaProductionWeb/API/Search/SearchController.cs @@ -0,0 +1,43 @@ +namespace LaaProductionWeb.API.Search +{ + using LaaPackages.SqlClient; + using LaaProductionWeb.App_Infrastructure; + + using System; + using System.Web.Http; + + [AuthorizeBearer] + [RoutePrefix("api/search")] + public class SearchController : ApiController + { + private readonly SqlConnection sqlConnection; + + public SearchController() => this.sqlConnection = WebApiApplication.GetService(); + + [HttpGet] + [Route("pono/eregister/address/{address}")] + public IHttpActionResult PonoByEregisterRadioAddress(Int64 address) + { + var pono = this.sqlConnection + .CreateCommand($@" + SELECT DISTINCT TOP 1 + aap.FertigungsauftragNr + FROM eRegister AS er + JOIN AuftragPositionSerienNr As aps + ON er.Seriennummer = aps.SerienNr + JOIN AlleAuftragPositionen AS aap + ON aps.AuftragNr = aap.AuftragNr + AND aps.PositionNr = aap.PositionNr + WHERE er.Adresse = @{nameof(address)}") + .SetParameter(nameof(address), address) + .FirstOrDefault(x => x.GetValue(0)); + + if (pono is null) + { + return this.BadRequest(); + } + + return this.Ok(pono); + } + } +} diff --git a/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/RoutePrefixes.cs b/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/RoutePrefixes.cs index dd42b5ee..dc6970ce 100644 --- a/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/RoutePrefixes.cs +++ b/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/RoutePrefixes.cs @@ -32,6 +32,8 @@ namespace LaaProductionWeb.App_Infrastructure public const String API_PRODUCTION_VFM = "api/production/vfm"; + public const String API_SEARCH_SEARCH = "api/search/search"; + public const String API_SEARCH_WILDCARD = "api/search/wildcard"; } } diff --git a/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs b/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs index 54b02f4e..268e5f25 100644 --- a/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs +++ b/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.Linq; using System.Net; + using System.Net.Http; using System.Web.Mvc; using Hash256 = System.Security.Cryptography.SHA256; @@ -141,8 +142,6 @@ { fields = WebUtility.UrlEncode(String.Join(",", model.Fields.Where(x => x.Value).Select(x => x.Key))); } - - // http://10.49.40.25/MeterProcessState/api/FinalCheck/GetEncryptionKey?PcbID=45451 var filter = new { model.Token, fields }; var results = this.http @@ -166,7 +165,7 @@ } [HttpGet] - public String FS(String pcbid) + public String FS(String token, Boolean ispcb = false) { var userId = this.User?.Identity?.Name; var email = this.ordersService.GetUserEmail(userId); @@ -180,14 +179,55 @@ try { - var http = WebApiApplication.GetService(); - var _result = http.Get(request => request - .SetPath($"/MeterProcessState/api/FinalCheck/GetEncryptionKey") - .SetQueryParameter(nameof(pcbid), pcbid)); - - if (_result.Succeeded) + if (ispcb) { - result = _result.Value?.ToUpper(); + var _result = this.http + .Get(request => request + .SetPath($"/MeterProcessState/api/FinalCheck/GetEncryptionKey") + .SetQueryParameter(nameof(token), token)); + + if (_result.Succeeded) + { + result = _result.Value?.ToUpper(); + } + } + else + { + const String UrlFormat = "https://nodes.sms-esaap.com/keygenproxy/api/v2/keys/devices?orderNumber={0}&radioaddress={1}"; + const String XNodeTokenHeaderName = "X-Node-Token"; + const String XNodeTokenHeaderValue = "d5b8c0b2-81f6-4421-80d0-44eb2093e616"; + + var ponr = this.http + .SetBearer(this.bearer) + .Get(request => request + .SetPath($"api/search/pono/eregister/address/{token}")) + .Value; + + using (var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, String.Format(UrlFormat, ponr, token))) + { + httpRequestMessage.Headers.Add(XNodeTokenHeaderName, XNodeTokenHeaderValue); + + var expect100Continue = ServicePointManager.Expect100Continue; + var securityProtokol = ServicePointManager.SecurityProtocol; + + ServicePointManager.Expect100Continue = true; + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + + using (var httpResponseMessage = new HttpClient().SendAsync(httpRequestMessage).Result) + { + if (httpResponseMessage.IsSuccessStatusCode) + { + result = httpResponseMessage.Content?.ReadAsStringAsync()?.Result?.Trim('"'); + } + else + { + result = httpResponseMessage.StatusCode.ToString(); + } + } + + ServicePointManager.Expect100Continue = expect100Continue; + ServicePointManager.SecurityProtocol = securityProtokol; + } } } catch (Exception e) @@ -202,7 +242,7 @@ request.SetPath(RoutePrefixes.API_SEND.ToURL("email")); request.SetJsonBody(new SendModel { - Body = $"MitarbeiterNr: {userId} => PcbID: {pcbid}", + Body = $"MitarbeiterNr: {userId} => PcbID: {token}", CC = new String[] { "Roland.Drabesch@xylem.com", "Stoyan.Zlatev@xylem.com" }, IPAddress = HttpContext.Request.UserHostAddress, IsHtml = false, @@ -215,7 +255,7 @@ }); }); } - catch (Exception e) + catch (Exception e) // http://sla12iis01.emea.sensus.net/LaaProductionWeb/Search/Passwords { this.http.Post(request => { diff --git a/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj b/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj index b4c01bbb..f23bc973 100644 --- a/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj +++ b/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj @@ -210,6 +210,7 @@ + diff --git a/LaaProductionWeb/LaaProductionWeb/Views/Search/Passwords.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/Search/Passwords.cshtml index fd2ba950..3b42dae2 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/Search/Passwords.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/Search/Passwords.cshtml @@ -68,6 +68,10 @@ { @kvp.Value } + else if (kvp.Key.Equals("ErRadioAddress", StringComparison.OrdinalIgnoreCase)) + { + @kvp.Value + } else { @kvp.Value @@ -165,9 +169,9 @@ fs_modal.classList.add('show'); } - function td_clicked(pcbid) { + function td_clicked(token) { loader.style.display = 'flex'; - fetch(`@this.Url.Action("FS", "Search")?pcbid=${pcbid}`) + fetch(`@this.Url.Action("FS", "Search")?token=${token}`) .then(response => response.text()) .then(function (text) { loader.style.display = 'none'; diff --git a/LaaProductionWeb/LaaProductionWeb/web.config b/LaaProductionWeb/LaaProductionWeb/web.config index 2856a359..6f328779 100644 --- a/LaaProductionWeb/LaaProductionWeb/web.config +++ b/LaaProductionWeb/LaaProductionWeb/web.config @@ -6,8 +6,8 @@ - - + + From e597afbfbeea6e8b57641b72b29cea8e8769626d Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 9 Oct 2024 14:05:37 +0200 Subject: [PATCH 27/44] search pono by er radio address --- .../LaaProductionWeb/App_Infrastructure/HttpExtensions.cs | 3 +-- .../LaaProductionWeb/Controllers/SearchController.cs | 2 +- LaaProductionWeb/LaaProductionWeb/web.config | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/HttpExtensions.cs b/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/HttpExtensions.cs index 6c78523b..68bb12df 100644 --- a/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/HttpExtensions.cs +++ b/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/HttpExtensions.cs @@ -210,8 +210,7 @@ { return default(String); } - - sessionUser.Secure = true; + sessionUser.Expires = DateTime.UtcNow.AddMinutes(Appsettings.LoginTimeout); httpContext.Response.SetCookie(sessionUser); diff --git a/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs b/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs index 268e5f25..42f2adcf 100644 --- a/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs +++ b/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs @@ -200,7 +200,7 @@ var ponr = this.http .SetBearer(this.bearer) .Get(request => request - .SetPath($"api/search/pono/eregister/address/{token}")) + .SetPath($"/LaaProductionWeb/api/search/pono/eregister/address/{token}")) .Value; using (var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, String.Format(UrlFormat, ponr, token))) diff --git a/LaaProductionWeb/LaaProductionWeb/web.config b/LaaProductionWeb/LaaProductionWeb/web.config index 6f328779..2856a359 100644 --- a/LaaProductionWeb/LaaProductionWeb/web.config +++ b/LaaProductionWeb/LaaProductionWeb/web.config @@ -6,8 +6,8 @@ - - + + From d61ed7351211983249583d316b955598a0531cdc Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Thu, 10 Oct 2024 14:35:22 +0200 Subject: [PATCH 28/44] eRegister radio key for serialno & key type --- .../LaaProduction.Console/Program.cs | 2 +- .../API/Eregister/RadioKeyController.cs | 152 ++++++++++++++++++ .../App_Infrastructure/RoutePrefixes.cs | 2 + .../LaaProductionWeb/LaaProductionWeb.csproj | 1 + 4 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs diff --git a/LaaProductionWeb/LaaProduction.Console/Program.cs b/LaaProductionWeb/LaaProduction.Console/Program.cs index cc45b91a..56d52cde 100644 --- a/LaaProductionWeb/LaaProduction.Console/Program.cs +++ b/LaaProductionWeb/LaaProduction.Console/Program.cs @@ -12,7 +12,7 @@ public static void Main(String[] args) { - using (var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, String.Format(URL_PATTERN, 3233972, 10309029807))) + using (var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, String.Format(URL_PATTERN, 3014757, 10309000709))) { httpRequestMessage.Headers.Add(X_NODE_TOKEN_HEADER, X_NODE_TOKEN); diff --git a/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs b/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs new file mode 100644 index 00000000..68d2f675 --- /dev/null +++ b/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs @@ -0,0 +1,152 @@ +namespace LaaProductionWeb.API.Eregister +{ + using LaaPackages.SqlClient; + using LaaProductionWeb.App_Infrastructure; + + using System; + using System.Net; + using System.Net.Http; + using System.Web.Http; + + [RoutePrefix(RoutePrefixes.API_EREGISTER_RADIOKEY)] + public class RadioKeyController : ApiController + { + const String SENSUS_STANDARD = "E6C88800DEB868C0D6A84880CE982840"; + + [HttpGet] + public IHttpActionResult Get(Int32 serialno, Byte radioKeyType = 0) + { + var radioKey = default(String); + + if (radioKeyType == 1) + { + radioKey = SENSUS_STANDARD; + } + else if (radioKeyType == 2) + { + radioKey = this.GetOrdernoAndAddress(serialno, out var orderno, out var address); + + if (String.IsNullOrWhiteSpace(radioKey)) + { + radioKey = this.GetRadioKeyV2(orderno, address); + } + else + { + return this.BadRequest(radioKey); + } + } + else if (radioKeyType == 3) + { + radioKey = this.GetRadioKeyCSD(serialno); + } + + return this.Ok(radioKey); + } + + private String GetOrdernoAndAddress(Int32 serialno, out Int32 orderno, out Int64 address) + { + orderno = 0; + address = 0; + + var result = default(String); + + try + { + var _orderno = 0; + var _address = 0L; + + WebApiApplication + .GetService() + .CreateCommand($@" + SELECT DISTINCT TOP 1 + aap.FertigungsauftragNr + , er.Adresse + FROM eRegister AS er + JOIN AuftragPositionSerienNr AS aps + ON er.Seriennummer = aps.SerienNr + JOIN AlleAuftragPositionen AS aap + ON aps.AuftragNr = aap.AuftragNr + AND aps.PositionNr = aap.PositionNr + WHERE er.Seriennummer = @{nameof(serialno)}") + .SetParameter(nameof(serialno), serialno) + .FirstOrDefault(reader => + { + _orderno = reader.GetValue(0); + _address = reader.GetValue(1); + }); + + orderno = _orderno; + address = _address; + } + catch (Exception e) + { + result = e.Message; + } + + return result; + } + + private string GetRadioKeyCSD(Int32 serialno) + { + var radioKey = default(String); + + try + { + radioKey = WebApiApplication + .GetService() + .CreateCommand($@" + SELECT DISTINCT + errk.Radiokey + FROM AlleAuftragPositionSerienNr AS aaps + JOIN AlleAuftragPositionVakoMerkmale AS aapvm + ON aaps.FertigungsauftragNr = aapvm.FertigungsauftragNr + JOIN eRegister_CSD_Radiokey AS errk + ON aapvm.Wert LIKE '%' + errk.CSD + '%' + WHERE aaps.SerienNr = @{nameof(serialno)}") + .SetParameter(nameof(serialno), serialno) + .FirstOrDefault(reader => reader.GetValue(0)); + } + catch (Exception e) + { + radioKey = e.Message; + } + + return radioKey; + } + + private string GetRadioKeyV2(Int32 orderno, Int64 address) + { + var radioKey = default(String); + + try + { + var requestURI = String.Format("https://nodes.sms-esaap.com/keygenproxy/api/v2/keys/devices?orderNumber={0}&radioaddress={1}", orderno, address); + + using (var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, String.Format(requestURI, orderno, address))) + { + httpRequestMessage.Headers.Add("X-Node-Token", "d5b8c0b2-81f6-4421-80d0-44eb2093e616"); + + var expect100Continue = ServicePointManager.Expect100Continue; + var securityProtocol = ServicePointManager.SecurityProtocol; + + ServicePointManager.Expect100Continue = true; + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + + using (var httpResponseMessage = new HttpClient().SendAsync(httpRequestMessage).Result) + { + radioKey = httpResponseMessage?.Content?.ReadAsStringAsync()?.Result?.Trim('"'); + } + + ServicePointManager.Expect100Continue = expect100Continue; + ServicePointManager.SecurityProtocol = securityProtocol; + } + } + catch (Exception e) + { + radioKey = e.Message; + } + + return radioKey; + } + } +} diff --git a/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/RoutePrefixes.cs b/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/RoutePrefixes.cs index dc6970ce..e622f71e 100644 --- a/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/RoutePrefixes.cs +++ b/LaaProductionWeb/LaaProductionWeb/App_Infrastructure/RoutePrefixes.cs @@ -20,6 +20,8 @@ namespace LaaProductionWeb.App_Infrastructure public const String API_CORDONEL_STANDARDREQUIREMENTS = "api/cordonel/standardrequirements"; + public const String API_EREGISTER_RADIOKEY = "api/eregister/radiokey"; + public const String API_OMNI_INSPECTION = "api/omni/inspection"; public const String API_PERSONALIZATION_EMPLOYEES = "api/personalization/employees"; diff --git a/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj b/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj index f23bc973..bcb75a1a 100644 --- a/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj +++ b/LaaProductionWeb/LaaProductionWeb/LaaProductionWeb.csproj @@ -203,6 +203,7 @@ + From 55b25af756ec0fc7a99c96f456d6325e45174a70 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Thu, 10 Oct 2024 14:42:36 +0200 Subject: [PATCH 29/44] parameters source specified --- .../LaaProductionWeb/API/Eregister/RadioKeyController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs b/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs index 68d2f675..256bd1ac 100644 --- a/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs +++ b/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs @@ -14,7 +14,8 @@ const String SENSUS_STANDARD = "E6C88800DEB868C0D6A84880CE982840"; [HttpGet] - public IHttpActionResult Get(Int32 serialno, Byte radioKeyType = 0) + [Route] + public IHttpActionResult Get([FromUri] Int32 serialno, [FromUri] Byte radioKeyType = 0) { var radioKey = default(String); From 4c230b97cfac4063d1534f33c84bc6647e6b7637 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Mon, 14 Oct 2024 08:43:56 +0200 Subject: [PATCH 30/44] =?UTF-8?q?eregister=20pr=C3=BCfung=20abschluss=20pa?= =?UTF-8?q?rameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common/CommonConsole/Program.cs | 28 ++ .../JustSirtMessage.cs | 4 +- .../Parameters/P811.cs | 11 + ...erRegisters.csproj.CoreCompileInputs.cache | 2 +- .../{AlarmMask.cs => AlarmsMask.cs} | 6 +- .../ChangeCustomerText.cs | 3 + .../ChangeDataLoggerSettings.cs | 31 ++ .../ChangeFixedDateReading.cs | 29 ++ .../ChangeMeterId.cs | 22 ++ .../ChangeMeterReading.cs | 3 + ...Windows.cs => ChangeNumberOfLatWindows.cs} | 7 +- .../ChangeRadioId.cs | 3 + .../ChangeSensusRFEncryptionKey.cs | 10 + .../ChangeTransmissionInterval.cs | 22 ++ .../ChangeWakeUp.cs | 11 + ...dware.WaterMeter.eRegister.Features.csproj | 18 +- .../DeactivateAlarms.cs | 2 +- .../DebugCmd.cs | 4 +- .../DisableOTA.cs | 10 + .../Pam.cs | 86 ++--- .../ParameterizeBrokenPipeDetection.cs | 15 + .../ParameterizeLeakageDetection.cs | 15 + .../ResetAlarms.cs | 15 + .../SetActivationByThreshold.cs | 10 + .../SetAlarms.cs | 2 +- .../SetHistoricalErrorLimit.cs | 18 ++ .../SetMetrologyParameters.cs | 2 +- ...SetOpenMeteringTransmitionIntervalWMBus.cs | 22 ++ .../SetPowerLevel.cs | 8 +- .../SingleBytePam.cs | 24 ++ .../WMBusMode.cs | 9 +- .../WMBusTransmition.cs | 9 - ...ommon.Hardware.WaterMeter.eRegister.csproj | 9 +- .../Data/BUP.cs | 4 +- .../ParameterSet.cs | 237 +++++++++++++- .../ProgrammingBatch.cs | 8 +- .../packages.config | 5 +- Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj | 6 +- .../Common.UI.WPF/Infrastructure/Auftrag.cs | 3 - .../Properties/Resources.Designer.cs | 44 ++- .../Properties/Settings.Designer.cs | 22 +- .../Common.UI.WPF/ViewModels/MainWindowVM.cs | 3 +- Common/Ui/Common.UI.WPF/app.config | 8 +- Common/Ui/Common.UI.WPF/packages.config | 4 + .../BytesExtensions.cs | 302 +++++++++++------- .../Common.Utils.Extensions.csproj | 1 + 46 files changed, 870 insertions(+), 247 deletions(-) rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/{AlarmMask.cs => AlarmsMask.cs} (89%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeDataLoggerSettings.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReading.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterId.cs rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/{ChangeLATWindows.cs => ChangeNumberOfLatWindows.cs} (53%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeTransmissionInterval.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTA.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ParameterizeBrokenPipeDetection.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ParameterizeLeakageDetection.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ResetAlarms.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivationByThreshold.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetHistoricalErrorLimit.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetOpenMeteringTransmitionIntervalWMBus.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SingleBytePam.cs delete mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusTransmition.cs create mode 100644 Common/Ui/Common.UI.WPF/packages.config diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index 478b0e74..ce74a109 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -1,10 +1,38 @@ namespace CommonConsole { + using System; + public class Program { public static void Main() { + var bytes = new Byte[] { 0x00, 0x00, 0x00, 0x05 }; + var index = 0; + var valueMSB = 0; + + valueMSB ^= bytes[index++] << 24; + valueMSB ^= bytes[index++] << 16; + valueMSB ^= bytes[index++] << 08; + valueMSB ^= bytes[index++] << 00; + + index = 3; + var valueLSB = 0; + + valueLSB ^= bytes[index--] << 24; + valueLSB ^= bytes[index--] << 16; + valueLSB ^= bytes[index--] << 08; + valueLSB ^= bytes[index--] << 00; + + Console.WriteLine($"{nameof(valueMSB)} == {nameof(valueLSB)} => {valueMSB} == {valueLSB} = {valueMSB == valueLSB}"); + + var _lsb = BitConverter.ToInt32(bytes, 0); + + Array.Reverse(bytes); + + var _msb = BitConverter.ToInt32(bytes, 0); + + Console.WriteLine($"{nameof(_msb)} == {nameof(_lsb)} => {_msb} == {_lsb} = {_msb == _lsb}"); } } } \ No newline at end of file diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs index 60dc011b..8a91f8a2 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs @@ -63,7 +63,7 @@ address ^= (UInt32)this.bytes[4] << 24; address ^= (UInt32)this.bytes[5] << 16; address ^= (UInt32)this.bytes[6] << 8; - address ^= (UInt32)this.bytes[7] << 0; + address ^= (UInt32)this.bytes[7]; return address; } @@ -72,7 +72,7 @@ this.bytes[4] = (Byte)(value >> 24); this.bytes[5] = (Byte)(value >> 16); this.bytes[6] = (Byte)(value >> 8); - this.bytes[7] = (Byte)(value >> 0); + this.bytes[7] = (Byte)value; } } diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P811.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P811.cs index 1560ca73..5986d6ce 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P811.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P811.cs @@ -232,6 +232,17 @@ set => this.bits[7] = (Byte)(value ? 1 : 0); } + public static P811 DelPamAfterSemi => new P811 + { + DelPamSemi = true + }; + + public static P811 WupDelPamAfterSemi => new P811 + { + WakeUpCmd = true, + DelPamSemi = true + }; + public static implicit operator Byte(P811 param) => param.bits.GetByte(); diff --git a/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache b/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache index 8d4994b0..8865d283 100644 --- a/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache +++ b/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -8fbe991b217e7692af4817ad205b768685aa5a72 +89102b0142e574de38a9f47d370f3334e5e6c268 diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmMask.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmsMask.cs similarity index 89% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmMask.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmsMask.cs index 0be6b448..fa00176a 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmMask.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmsMask.cs @@ -4,14 +4,14 @@ using System; - public class AlarmMask : Pam + public class AlarmsMask : Pam { private readonly Byte[] bits; - protected AlarmMask(Int32 length, Byte cmd) : base(length, cmd) + protected AlarmsMask(Int32 length, Byte cmd) : base(length, cmd) => this.bits = new Byte[8]; - public AlarmMask(Byte value) : base(2, 0) + public AlarmsMask(Byte value, Byte cmd = DeactivateAlarms) : base(2, cmd) => this.bits = value.GetBits(); public Boolean SpecificError diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeCustomerText.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeCustomerText.cs index 34b99749..155f3cee 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeCustomerText.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeCustomerText.cs @@ -9,6 +9,9 @@ { } + public ChangeCustomerText(String text) : this() + => this.Text = text; + public String Text { get => Encoding.ASCII.GetString(this.bytes, 1, 9); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeDataLoggerSettings.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeDataLoggerSettings.cs new file mode 100644 index 00000000..538c9bb5 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeDataLoggerSettings.cs @@ -0,0 +1,31 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using Common.Utils.Extensions; + + using System; + + public class ChangeDataLoggerSettings : Pam + { + public ChangeDataLoggerSettings() : base(5, ChangeDataLoggerSettings) + { + } + + public UInt16 TimeInterval + { + get => this.bytes.ToUInt16BE(1); + set => value.GetBytesBE().CopyTo(this.bytes, 1); + } + + public Byte TimeOfMinimumFlow + { + get => this.bytes[3]; + set => this.bytes[3] = value; + } + + public Byte MinimumFlow + { + get => this.bytes[4]; + set => this.bytes[4] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReading.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReading.cs new file mode 100644 index 00000000..b168b409 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReading.cs @@ -0,0 +1,29 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class ChangeFixedDateReading : Pam + { + public ChangeFixedDateReading() : base(4, ChangeFixedDateReading) + { + } + + public Byte DayOfMonth + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + + public Byte SettingI + { + get => this.bytes[2]; + set => this.bytes[2] = value; + } + + public Byte SettingII + { + get => this.bytes[3]; + set => this.bytes[3] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterId.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterId.cs new file mode 100644 index 00000000..769a91a1 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterId.cs @@ -0,0 +1,22 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using Common.Utils.Extensions; + + using System; + + public class ChangeMeterId : Pam + { + public ChangeMeterId() : base(5, ChangeMeterId) + { + } + + public ChangeMeterId(UInt32 meterId) : this() + => this.MeterId = meterId; + + public UInt32 MeterId + { + get => this.bytes.ToUInt32BE(1); + set => BitConverter.GetBytes(value).CopyTo(this.bytes, 1); + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterReading.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterReading.cs index 52ff5c87..9137052a 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterReading.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterReading.cs @@ -10,6 +10,9 @@ { } + public ChangeMeterReading(UInt32 value) : this() + => this.Value = value; + public UInt32 Value { get => this.bytes.ToUInt32BigEndian(1); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeLATWindows.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeNumberOfLatWindows.cs similarity index 53% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeLATWindows.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeNumberOfLatWindows.cs index 8bfefdcd..fdc08e4d 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeLATWindows.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeNumberOfLatWindows.cs @@ -2,12 +2,15 @@ { using System; - public class ChangeLATWindows : Pam + public class ChangeNumberOfLatWindows : Pam { - public ChangeLATWindows() : base(2, ChangeLATWindowsN) + public ChangeNumberOfLatWindows() : base(2, ChangeLATWindowsN) { } + public ChangeNumberOfLatWindows(Byte n) : this() + => this.N = n; + public Byte N { get => this.bytes[1]; diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeRadioId.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeRadioId.cs index af1b8de9..44d3da30 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeRadioId.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeRadioId.cs @@ -10,6 +10,9 @@ { } + public ChangeRadioId(UInt32 address) : this() + => this.Address = address; + public UInt32 Address { get => this.bytes.ToUInt32BigEndian(1); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs new file mode 100644 index 00000000..8b6c19e7 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs @@ -0,0 +1,10 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class ChangeSensusRFEncryptionKey : Pam + { + public ChangeSensusRFEncryptionKey(Byte[] encryptionKey) : base(17, ChangeSensusRFEncryptionKey) + => encryptionKey.CopyTo(this.bytes, 1); + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeTransmissionInterval.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeTransmissionInterval.cs new file mode 100644 index 00000000..ad467cce --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeTransmissionInterval.cs @@ -0,0 +1,22 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using Common.Utils.Extensions; + + using System; + + public class ChangeTransmissionInterval : Pam + { + public ChangeTransmissionInterval() : base(3, ChangeTransmitionInterval) + { + } + + public ChangeTransmissionInterval(Byte seconds) : this() + => this.Seconds = seconds; + + public UInt16 Seconds + { + get => this.bytes.ToUInt16BE(1); + set => value.GetBytesBE().CopyTo(this.bytes, 1); + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeWakeUp.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeWakeUp.cs index 9653d75b..8127277d 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeWakeUp.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeWakeUp.cs @@ -8,10 +8,21 @@ { } + public ChangeWakeUp(WakeUpMode mode) : base(2, ChangeWakeUpMode) + => this.Mode = mode; + public WakeUpMode Mode { get => (WakeUpMode)this.bytes[1]; set => this.bytes[1] = (Byte)value; } + + public static ChangeWakeUp AutoOff => WakeUpMode.SleepAutoOff; + + public static ChangeWakeUp AutoOn => WakeUpMode.SleepAutoOn; + + public static ChangeWakeUp StayAwake => WakeUpMode.StayAwake; + + public static implicit operator ChangeWakeUp(WakeUpMode mode) => new ChangeWakeUp(mode); } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj index d383e469..611efe47 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj @@ -42,15 +42,23 @@ - + + + + + + + + + @@ -62,11 +70,13 @@ + + - + @@ -78,14 +88,16 @@ + + - + diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateAlarms.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateAlarms.cs index 5e00480e..690038d0 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateAlarms.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateAlarms.cs @@ -1,6 +1,6 @@ namespace Common.Hardware.WaterMeter.eRegister.Features { - public class DeactivateAlarms : AlarmMask + public class DeactivateAlarms : AlarmsMask { public DeactivateAlarms() : base(2, DeactivateAlarms) { diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DebugCmd.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DebugCmd.cs index 760d8d0e..93de7b62 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DebugCmd.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DebugCmd.cs @@ -45,13 +45,13 @@ /// 0 – Set to Default Rotations value of 8 (8*10) Rotations /// 1 - 255 Increments of 10 * setting which translates to(10 to 2550) Rotations. /// - internal const Byte ActivationByFlow = 15; + internal const Byte SetActivationByThreshold = 15; /// /// 1 – Disables Firmware Update. /// 2 – Enable Firmware Update (Only available in Beta Firmware and when the unit is not Sealed (Production Mode)). /// - internal const Byte OTAFWUpdate = 16; + internal const Byte DisableOTA = 16; /// /// 0 – Residential Meter: Meter Type reported in SEMI is set to 10 and Flow Reporting is limited to +/-32767. diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTA.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTA.cs new file mode 100644 index 00000000..a5753f28 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTA.cs @@ -0,0 +1,10 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class DisableOTA : DebugCmd + { + public DisableOTA(Byte parameter) : base(DisableOTA) + => this.bytes[1] = parameter; + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Pam.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Pam.cs index d60d600c..ac1f63eb 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Pam.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Pam.cs @@ -34,216 +34,216 @@ /// /// 0 Change Wake Up 1 no 2 /// - protected const Byte ChangeWakeUpMode = 0; + public const Byte ChangeWakeUpMode = 0; /// /// 1 Set power level 1 no (Production Mode for SensusRF Power Level) 3 (For setting FlexNet Power Level) /// - protected const Byte SetPowerLevel = 1; + public const Byte SetPowerLevel = 1; /// /// 2* Change number of LAT Windows N 1 no 2 /// - protected const Byte ChangeLATWindowsN = 2; + public const Byte ChangeLATWindowsN = 2; /// /// 3 Reset Alarms 1 no 1 /// - protected const Byte ResetAlarms = 3; + public const Byte ResetAlarms = 3; /// /// 4 Deactivate Transmitter 1 yes 2 /// - protected const Byte DeactivateTransmitter = 4; + public const Byte DeactivateTransmitter = 4; /// /// 5* Wireless MBus Mode 1 no 2 /// - protected const Byte WirelessMBusMode = 5; + public const Byte ChangeWirelessMBusMode = 5; /// /// 6* Deactivate Alarms 1 no 0 /// - protected const Byte DeactivateAlarms = 6; + public const Byte DeactivateAlarms = 6; /// /// 7* Change Number of Dials 1 no 0 /// - protected const Byte ChangeNimberOfDeals = 7; + public const Byte ChangeNimberOfDeals = 7; /// /// 10 Parameterize LeakageDetection 1 no 0 /// - protected const Byte SetLeakageDetection = 10; + public const Byte ParameterizeLeakageDetection = 10; /// /// 11 Parameterize BrokenPipe-Detection 1 no 0 /// - protected const Byte SetBrokenPipeDetection = 11; + public const Byte ParameterizeBrokenPipeDetection = 11; /// /// 12* Set historical error limit (alarm persistence) 1 no 1 /// - protected const Byte SetHistoricalErrorLimit = 12; + public const Byte SetHistoricalErrorLimit = 12; /// /// 14 Reset 1 yes 3 /// - protected const Byte Reset = 14; + public const Byte Reset = 14; /// /// 16* Change Transmission Interval 2 no 2 /// - protected const Byte ChangeTransmitionInterval = 16; + public const Byte ChangeTransmitionInterval = 16; /// /// 17* Open Metering Transmission Interval (Wireless MBus) 2 no 2 /// - protected const Byte WMBusTransmisionInterval = 17; + public const Byte WMBusTransmisionInterval = 17; /// /// 19 Send Bubble Up Burst 2 yes 3 /// - protected const Byte SendBUPBurst = 19; + public const Byte SendBUPBurst = 19; /// /// 20 Set frequency offset 2 yes 3 /// - protected const Byte SetFrequencyOffset = 20; + public const Byte SetFrequencyOffset = 20; /// /// 21 Activate Metrology Test Mode 2 no 1 /// - protected const Byte ActivateTestMode = 21; + public const Byte ActivateTestMode = 21; /// /// 22 Set Reboot Count 2 no? (Production Mode) 3 /// - protected const Byte RebootsCounter = 22; + public const Byte RebootsCounter = 22; /// /// 31 Get debug 2 yes 3 /// - protected const Byte GetDebug = 31; + public const Byte GetDebug = 31; /// /// 32 Change Fixed Date Reading Settings 3 no 0 /// - protected const Byte ChangeFixedDateReading = 32; + public const Byte ChangeFixedDateReading = 32; /// /// 33 Get Customer Debug 2 yes 2 /// - protected const Byte RequestCustomerDebug = 33; + public const Byte RequestCustomerDebug = 33; /// /// 48 Change Meter Reading 4 no(Production Mode) 3 /// - protected const Byte ChangeMeterReading = 48; + public const Byte ChangeMeterReading = 48; /// /// 49 Change Meter-ID 4 no(Production Mode) 3 /// - protected const Byte ChangeMeterId = 49; + public const Byte ChangeMeterId = 49; /// /// 50 Set date and time 4 no 1 /// - protected const Byte SetDatetime = 50; + public const Byte SetDatetime = 50; /// /// 51 Change settings for data logger 4 no 0 /// - protected const Byte ChangeDataLoggerSettings = 51; + public const Byte ChangeDataLoggerSettings = 51; /// /// 52 Set Battery Seconds (Time Alive) 4 no 3 /// - protected const Byte SetBatterySeconds = 52; + public const Byte SetBatterySeconds = 52; /// /// 53 Change Radio ID 4 no 3 /// - protected const Byte ChangeRadioId = 53; + public const Byte ChangeRadioId = 53; /// /// 54 Set PCB ID 4 no? (Serial Only, Production Mode) 3 /// - protected const Byte SetPCB = 54; + public const Byte SetPCB = 54; /// /// 64 Request Fixed Date Reading 5 yes 0 /// - protected const Byte RequestFixedDateReading = 64; + public const Byte RequestFixedDateReading = 64; /// /// 65 Request Logging Data 5 yes 0 /// - protected const Byte RequestLoggingData = 65; + public const Byte RequestLoggingData = 65; /// /// 66 Change PIN 5 yes 1, 2, 3 /// - protected const Byte ChangePin = 66; + public const Byte ChangePin = 66; /// /// 67* Provide PIN 5 no 0 /// - protected const Byte ProvidePin = 67; + public const Byte ProvidePin = 67; /// /// 68 Send Test Pattern 6 yes 3 /// - protected const Byte SendTestPattern = 68; + public const Byte SendTestPattern = 68; /// /// 69 Request Memory Dump 6 yes 3 /// - protected const Byte MemoryDump = 69; + public const Byte MemoryDump = 69; /// /// 72 Send Sequence of Test-Telegrams 7 yes 3 /// - protected const Byte SendTestTelegrams = 72; + public const Byte SendTestTelegrams = 72; /// /// 73 Receive Sequence of Test-Telegrams 7 yes 3 /// - protected const Byte ReceiveTestTelegrams = 73; + public const Byte ReceiveTestTelegrams = 73; /// /// 80 Change Customer Text 9 no 2 /// - protected const Byte ChangeCustomerText = 80; + public const Byte ChangeCustomerText = 80; /// /// 108 Change SensusRF Encryption Key 16 no 2 /// - protected const Byte ChangeSensusRFEncKey = 108; + public const Byte ChangeSensusRFEncryptionKey = 108; /// /// 144 Encapsulated FlexNet variable yes 0 /// - protected const Byte EncapsulatedFlexNet = 144; + public const Byte EncapsulatedFlexNet = 144; /// /// 145 Set TFX Parameters TBD no 0 Yes /// - protected const Byte TFXParameters = 145; + public const Byte TFXParameters = 145; /// /// 146 Set Metrology Parameters 16 yes(Production Mode) 3 /// - protected const Byte MetrologyParameters = 146; + public const Byte MetrologyParameters = 146; /// /// 147 Ping variable yes 0 Yes /// - protected const Byte Ping = 147; + public const Byte Ping = 147; /// /// 148 Set Variable PCB ID variable no 3 /// - protected const Byte VariablePCB = 148; + public const Byte VariablePCB = 148; } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ParameterizeBrokenPipeDetection.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ParameterizeBrokenPipeDetection.cs new file mode 100644 index 00000000..3cf29546 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ParameterizeBrokenPipeDetection.cs @@ -0,0 +1,15 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class ParameterizeBrokenPipeDetection : SingleBytePam + { + public ParameterizeBrokenPipeDetection() : base(ParameterizeBrokenPipeDetection) + { + } + + public ParameterizeBrokenPipeDetection(Byte value) : base(value, ParameterizeBrokenPipeDetection) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ParameterizeLeakageDetection.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ParameterizeLeakageDetection.cs new file mode 100644 index 00000000..301685fd --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ParameterizeLeakageDetection.cs @@ -0,0 +1,15 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class ParameterizeLeakageDetection : SingleBytePam + { + public ParameterizeLeakageDetection() : base(ParameterizeLeakageDetection) + { + } + + public ParameterizeLeakageDetection(Byte value) : base(value, ParameterizeLeakageDetection) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ResetAlarms.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ResetAlarms.cs new file mode 100644 index 00000000..328b0f19 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ResetAlarms.cs @@ -0,0 +1,15 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class ResetAlarms : SingleBytePam + { + public ResetAlarms() : base(ResetAlarms) + { + } + + public ResetAlarms(Byte value = Byte.MaxValue) : base(value, ResetAlarms) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivationByThreshold.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivationByThreshold.cs new file mode 100644 index 00000000..05d03a86 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivationByThreshold.cs @@ -0,0 +1,10 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class SetActivationByThreshold : DebugCmd + { + public SetActivationByThreshold(Byte parameter) : base(SetActivationByThreshold) + => this.bytes[1] = parameter; + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetAlarms.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetAlarms.cs index b850458d..2e50908c 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetAlarms.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetAlarms.cs @@ -1,6 +1,6 @@ namespace Common.Hardware.WaterMeter.eRegister.Features { - public class SetAlarms : AlarmMask + public class SetAlarms : AlarmsMask { public SetAlarms() : base(2, DebugCmd.SetAlarms) { diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetHistoricalErrorLimit.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetHistoricalErrorLimit.cs new file mode 100644 index 00000000..30e5c5c6 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetHistoricalErrorLimit.cs @@ -0,0 +1,18 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + /// + /// Set historical error limit (alarm persistence) + /// + public class SetHistoricalErrorLimit : SingleBytePam + { + public SetHistoricalErrorLimit() : base(SetHistoricalErrorLimit) + { + } + + public SetHistoricalErrorLimit(Byte value) : base(value, SetHistoricalErrorLimit) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs index 3c108db6..79ba8b31 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs @@ -37,7 +37,7 @@ set => this.bytes[11] = value; } - public Byte P11 + public Byte CandIRule { get => this.bitsFromByte11.ToByte(); set => this.bitsFromByte11 = value.GetBits(); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetOpenMeteringTransmitionIntervalWMBus.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetOpenMeteringTransmitionIntervalWMBus.cs new file mode 100644 index 00000000..7734a7b2 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetOpenMeteringTransmitionIntervalWMBus.cs @@ -0,0 +1,22 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using Common.Utils.Extensions; + + using System; + + public class SetOpenMeteringTransmitionIntervalWMBus : Pam + { + public SetOpenMeteringTransmitionIntervalWMBus() : base(3, WMBusTransmisionInterval) + { + } + + public SetOpenMeteringTransmitionIntervalWMBus(UInt16 seconds) : this() + => this.Seconds = seconds; + + public UInt16 Seconds + { + get => this.bytes.ToUInt16BE(1); + set => value.GetBytesBE().CopyTo(this.bytes, 1); + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPowerLevel.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPowerLevel.cs index ef2194c2..1119c79e 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPowerLevel.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPowerLevel.cs @@ -2,9 +2,13 @@ { using System; - public class SetPowerLevel : Pam + public class SetPowerLevel : SingleBytePam { - public SetPowerLevel() : base(2, SetPowerLevel) + public SetPowerLevel() : base(SetPowerLevel) + { + } + + public SetPowerLevel(Byte value) : base(value, SetPowerLevel) { } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SingleBytePam.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SingleBytePam.cs new file mode 100644 index 00000000..75fdacd2 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SingleBytePam.cs @@ -0,0 +1,24 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class SingleBytePam : Pam + { + const Int32 CmdLength = 2; + + public SingleBytePam(Byte cmd) : base(CmdLength, cmd) + { + } + + public SingleBytePam(Byte value, Byte cmd) : this(cmd) + { + this.Value = value; + } + + public Byte Value + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusMode.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusMode.cs index b7fadd24..4d94bc9c 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusMode.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusMode.cs @@ -7,10 +7,17 @@ public class WMBusMode : Pam { private readonly Byte[] bits; + private Byte mBusStatus; - public WMBusMode() : base(2, WirelessMBusMode) + public WMBusMode() : base(2, ChangeWirelessMBusMode) => this.bits = new Byte[8]; + public WMBusMode(Byte mBusStatus) : base(2, ChangeWirelessMBusMode) + { + this.bytes[1] = mBusStatus; + this.bits = mBusStatus.GetBits(); + } + public Boolean CustomerSelection { get => this.bits[7] == 1; diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusTransmition.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusTransmition.cs deleted file mode 100644 index e89bdd27..00000000 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusTransmition.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Common.Hardware.WaterMeter.eRegister.Features -{ - public class WMBusTransmition : ChangeTransmission - { - public WMBusTransmition() : base(3, WMBusTransmisionInterval) - { - } - } -} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj index 56b20a09..6fbdf7db 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj @@ -8,9 +8,10 @@ Library Common.Hardware.WaterMeter.eRegister Common.Hardware.WaterMeter.eRegister - v4.0 + v4.5 512 true + AnyCPU @@ -22,6 +23,7 @@ prompt 4 IDE0003;IDE0049; + false AnyCPU @@ -31,6 +33,7 @@ TRACE prompt 4 + false @@ -40,11 +43,13 @@ ..\..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll - ..\..\..\..\packages\NLog.5.3.2\lib\net35\NLog.dll + ..\..\..\..\packages\NLog.5.3.4\lib\net45\NLog.dll + + diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Data/BUP.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Data/BUP.cs index b0efd4a6..a64cee67 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Data/BUP.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Data/BUP.cs @@ -12,13 +12,13 @@ var index = 6; this.Reading = payload.ToUInt32BigEndian((index += 4) - 4); - this.Alarm = new AlarmMask(payload[index++]); + this.Alarm = new AlarmsMask(payload[index++]); this.Crc = payload.ToUInt16BigEndian((index += 2) - 2); } public UInt32 Reading { get; } - public AlarmMask Alarm { get; } + public AlarmsMask Alarm { get; } public UInt16 Crc { get; protected set; } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs index bdaa0ca6..f021825e 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs @@ -6,6 +6,9 @@ using Common.Utils.Extensions; using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Text; public class ParameterSet { @@ -19,14 +22,84 @@ public Boolean IsSealed { get; set; } - public Byte[] RadioKey { get; set; } + public Byte[] EncryptionKey { get; private set; } public UInt32 RadioAddress { get; set; } public UInt32 FinalAddress { get; set; } + public Byte MeterMode { get; private set; } + + public Byte PowerModeSensusRF { get; private set; } + + public Byte PowerModeFlexNet { get; private set; } + public Byte[] Parameters { get; set; } + public Int32 VolumePerPulse { get; private set; } + + public Int32 OffsetFactor { get; private set; } + + public Byte OffsetTime { get; private set; } + + public Byte FactoryCalibration { get; private set; } + + public Byte CandIRules { get; private set; } + + public Byte MeterSize { get; private set; } + + public Int32 VolumePerLedPulse { get; private set; } + + public UInt32 DisplayVolume { get; private set; } + + public UInt32 MeterId { get; private set; } + + public Byte AlarmsMask { get; private set; } + + public String CustomerText { get; private set; } + + public Byte DecimalPoint { get; private set; } + + public Int32 StandardVolume { get; private set; } + + public Byte LeakageDetection { get; private set; } + + public Byte BrokenPipeDetection { get; private set; } + + public Byte HistoricalErrorLimit { get; private set; } + + public UInt16 DataLoggerTimeInterval { get; private set; } + + public Byte DataLoggerMinFlowTime { get; private set; } + + public Byte DataLoggerMinFlow { get; private set; } + + public Byte FixedDateReadingDay { get; private set; } + + public Byte FixedDateReadingSettingI { get; private set; } + + public Byte FixedDateReadingSettingII { get; private set; } + + public Byte MBusStatus { get; private set; } + + public Int32 UTCSeconds { get; private set; } + + public Int16 TransmissionInterval { get; private set; } + + public Byte NumberOfLatWindows { get; private set; } + + public Int32 RadioKeyType { get; private set; } + + public Byte OTASettings { get; private set; } + + public Byte ActivationByFlow { get; private set; } + + public UInt16 OpenMeteringTransmissionInterval { get; private set; } + + public Byte TransmissionIntervalLast { get; private set; } + + public Int16 WUP { get; private set; } + internal ProgrammingTask BuildWupTxLatMBusTask() => new ProgrammingTask { @@ -45,7 +118,7 @@ 0x10, 0x00, 0x03, // TX interval 0x43, 0x02, 0x14, 0x0E, 0x80, 0x40, // Pin level II }, - EncryptionKey = this.IsSealed ? this.RadioKey : null + EncryptionKey = this.IsSealed ? this.EncryptionKey : null }; internal ProgrammingTask BuildTestParametersTask() @@ -59,19 +132,19 @@ Address = this.RadioAddress, Data = new SetMetrologyParameters { - Vpp = this.Parameters.Int32BigEndian(3), - OffsetFactor = this.Parameters.Int32BigEndian(7), - OffsetTime = this.Parameters.Byte(11), - FactoryCalibration = this.Parameters.Byte(12), - P11 = this.Parameters.Byte(13), - MeterSize = this.Parameters.Byte(14), - VppLED = this.Parameters.Int32BigEndian(15), + Vpp = this.VolumePerPulse, + OffsetFactor = this.OffsetFactor, + OffsetTime = this.OffsetTime, + FactoryCalibration = this.FactoryCalibration, + CandIRule = this.CandIRules, + MeterSize = this.MeterSize, + VppLED = this.VolumePerLedPulse, } .Append(new ProvidePin { AuthLevel = Features.AuthLevel.III }), - EncryptionKey = this.IsSealed ? this.RadioKey : null + EncryptionKey = this.IsSealed ? this.EncryptionKey : null }; internal ProgrammingTask BuildSetupDisplayTask() @@ -88,7 +161,7 @@ 0x30, 0x06, 0x9F, 0x6B, 0xC7, // Display: 111111111 0x43, 0x03, 0x63, 0x93, 0x73, 0x22 // Pin level III }, - EncryptionKey = this.IsSealed ? this.RadioKey : null + EncryptionKey = this.IsSealed ? this.EncryptionKey : null }; internal ProgrammingTask BuildOptoOnTask() @@ -107,7 +180,147 @@ { AuthLevel = Features.AuthLevel.III }), - EncryptionKey = this.IsSealed ? this.RadioKey : null + EncryptionKey = this.IsSealed ? this.EncryptionKey : null }; + + internal void ParseParameters() + { + var length = this.Parameters?.Length ?? 0; + + if (length <= 0) + { + return; + } + else if (length == 20) + { + // 0 1 2 3 - 6 7 - 10 11 12 13 14 15 - 18 19 + // LL Pm SM VolPerPu OffFactr ot FC 11 MS VpLEDPul RK + // 12 92 10 82710000 00000000 05 00 00 28 02710000 01 + + this.VolumePerPulse = this.Parameters.ToInt32BE(3); + this.OffsetFactor = this.Parameters.ToInt32BE(7); + this.OffsetTime = this.Parameters[11]; + this.FactoryCalibration = this.Parameters[12]; + this.CandIRules = this.Parameters[13]; + this.MeterSize = this.Parameters[14]; + this.VolumePerLedPulse = this.Parameters.ToInt32BE(15); + this.RadioKeyType = this.Parameters[19]; + + } + else if (length == 55) + { + this.DisplayVolume = this.Parameters.ToUInt32BE(0); + this.MeterId = this.Parameters.ToUInt32BE(4); + this.AlarmsMask = this.Parameters[8]; + this.CustomerText = Encoding.ASCII.GetString(this.Parameters, 9, 9); + this.DecimalPoint = this.Parameters[18]; + this.StandardVolume = this.Parameters.ToInt32BE(19); + this.LeakageDetection = this.Parameters[23]; + this.BrokenPipeDetection = this.Parameters[24]; + this.HistoricalErrorLimit = this.Parameters[25]; + this.DataLoggerTimeInterval = this.Parameters.ToUInt16BE(26); + this.DataLoggerMinFlowTime = this.Parameters[28]; + this.DataLoggerMinFlow = this.Parameters[29]; + this.FixedDateReadingDay = this.Parameters[30]; + this.FixedDateReadingSettingI = this.Parameters[31]; + this.FixedDateReadingSettingII = this.Parameters[32]; + this.MBusStatus = this.Parameters[33]; + this.UTCSeconds = this.Parameters.ToInt32BE(34); + this.TransmissionInterval = this.Parameters.ToInt16BE(38); + this.NumberOfLatWindows = this.Parameters[40]; + this.RadioKeyType = this.Parameters[41]; + this.FinalAddress = this.Parameters.ToUInt32BE(42); + this.MeterMode = this.Parameters[46]; + this.PowerModeSensusRF = this.Parameters[47]; + this.PowerModeFlexNet = this.Parameters[48]; + this.OTASettings = this.Parameters[49]; + this.ActivationByFlow = this.Parameters[50]; + this.OpenMeteringTransmissionInterval = this.Parameters.ToUInt16BE(51); + this.TransmissionIntervalLast = this.Parameters[53]; + this.WUP = this.Parameters.ToInt16BE(54); + } + + var uri = $"http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/eregister/radiokey?serialno={this.Serialno}&radioKeyType={this.RadioKeyType}"; + + using (var request = new HttpRequestMessage(HttpMethod.Get, uri)) + { + using (var response = new HttpClient().SendAsync(request).Result) + { + if (response.IsSuccessStatusCode) + { + var radioKey = response?.Content?.ReadAsStringAsync()?.Result; + + if (!String.IsNullOrWhiteSpace(radioKey)) + { + this.EncryptionKey = radioKey.ToBytes(); + } + } + } + } + + var httpClient = new HttpClient(); + } + + internal IEnumerable BuildFinalProgrammingTasks() + { + yield return new ProgrammingTask + { + Cmd = JustSirtMessage.W_PAM, + Address = this.RadioAddress, + P1 = P811.WupDelPamAfterSemi, + Data = ChangeWakeUp.StayAwake + // Pin level 2 ^ + // Pin level 3 - only production mode + .Append(new ChangeMeterId(this.MeterId)) + // Pin level 3 - only production mode + .Append(new ChangeMeterReading(this.DisplayVolume)) + // Pin level 2 + .Append(new ChangeCustomerText($"{this.Serialno}")) + // Pin level 0 + .Append(new AlarmsMask(this.AlarmsMask, Pam.DeactivateAlarms)) + // Pin level 1 + .Append(new ResetAlarms()) + // Pin level 0 + .Append(new ParameterizeLeakageDetection(this.LeakageDetection)) + // Pin level 0 + .Append(new ParameterizeBrokenPipeDetection(this.BrokenPipeDetection)) + // Pin level 1 + .Append(new SetHistoricalErrorLimit(this.HistoricalErrorLimit)) + // Pin level 0 + .Append(new ChangeDataLoggerSettings + { + TimeInterval = this.DataLoggerTimeInterval, + TimeOfMinimumFlow = this.DataLoggerMinFlowTime, + MinimumFlow = this.DataLoggerMinFlow + }) + // Pin level 0 + .Append(new ChangeFixedDateReading + { + DayOfMonth = this.FixedDateReadingDay, + SettingI = this.FixedDateReadingSettingI, + SettingII = this.FixedDateReadingSettingII + }) + // Pin level 2 + .Append(new WMBusMode(this.MBusStatus)) + // Pin level 0 + .Append(new SetPowerLevel(this.PowerModeSensusRF)) + // Pin level 3 - only production mode + .Append(new SetPowerLevel(this.PowerModeFlexNet)) + // Pin level 3 - single cmd + .Append(new DisableOTA(this.OTASettings)) + // Pin level 3 - single cmd + .Append(new SetActivationByThreshold(this.OTASettings)) + // Pin level 2 + .Append(new SetOpenMeteringTransmitionIntervalWMBus(this.OpenMeteringTransmissionInterval)) + // Pin level 2 + .Append(new ChangeTransmissionInterval(this.TransmissionIntervalLast)) + // Pin level 2 + .Append(new ChangeNumberOfLatWindows(this.NumberOfLatWindows)) + // Pin level 2 + .Append(new ChangeSensusRFEncryptionKey(this.EncryptionKey)) + // Pin level 3 + .Append(new ChangeRadioId(this.FinalAddress)) + }; + } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs index b211e86c..7f4e964b 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs @@ -26,8 +26,12 @@ public event Action OnProgress; - public void AddOrReplace(ParameterSet parameterSet) - => this.programmingParameters[parameterSet.Slotno] = parameterSet; + public void AddOrReplace(ParameterSet parameterSet) + { + parameterSet.ParseParameters(); + + this.programmingParameters[parameterSet.Slotno] = parameterSet; + } public void InitializeCalibration() { diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/packages.config b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/packages.config index ec30915e..1184d2ba 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/packages.config +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/packages.config @@ -1,5 +1,6 @@  - - + + + \ No newline at end of file diff --git a/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj b/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj index dd703dd1..eb5c925f 100644 --- a/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj +++ b/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj @@ -8,11 +8,12 @@ WinExe Common.UI.WPF Common.UI.WPF - v4.0 + v4.5 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 true + AnyCPU @@ -24,6 +25,7 @@ prompt 4 IDE0003;IDE0049;IDE1006; + false AnyCPU @@ -33,6 +35,7 @@ TRACE prompt 4 + false @@ -120,6 +123,7 @@ Resources.Designer.cs + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/Common/Ui/Common.UI.WPF/Infrastructure/Auftrag.cs b/Common/Ui/Common.UI.WPF/Infrastructure/Auftrag.cs index 9362b757..c3c385fd 100644 --- a/Common/Ui/Common.UI.WPF/Infrastructure/Auftrag.cs +++ b/Common/Ui/Common.UI.WPF/Infrastructure/Auftrag.cs @@ -21,7 +21,6 @@ , RadioAddress , FinalAddress , IsSealed - , RadioKey , Parameters FROM eRegister_Shared WHERE P2000_Shared_Id = @{nameof(scharedId)} @@ -38,7 +37,6 @@ , RadioAddress , FinalAddress , IsSealed - , RadioKey , Parameters FROM eRegister_Shared WHERE P2000_Shared_Id = @{nameof(scharedId)} @@ -94,7 +92,6 @@ RadioAddress = reader.GetValue(3), FinalAddress = reader.GetValue(4), IsSealed = reader.GetValue(5), - RadioKey = reader.GetValue(6), Parameters = reader.GetValue(7), }; } diff --git a/Common/Ui/Common.UI.WPF/Properties/Resources.Designer.cs b/Common/Ui/Common.UI.WPF/Properties/Resources.Designer.cs index 5ac9c091..ee6b8bb7 100644 --- a/Common/Ui/Common.UI.WPF/Properties/Resources.Designer.cs +++ b/Common/Ui/Common.UI.WPF/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Common.UI.WPF.Properties -{ - - +namespace Common.UI.WPF.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace Common.UI.WPF.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Common.UI.WPF.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/Common/Ui/Common.UI.WPF/Properties/Settings.Designer.cs b/Common/Ui/Common.UI.WPF/Properties/Settings.Designer.cs index 9c1d7a1e..da481d00 100644 --- a/Common/Ui/Common.UI.WPF/Properties/Settings.Designer.cs +++ b/Common/Ui/Common.UI.WPF/Properties/Settings.Designer.cs @@ -8,21 +8,17 @@ // //------------------------------------------------------------------------------ -namespace Common.UI.WPF.Properties -{ - - +namespace Common.UI.WPF.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/Common/Ui/Common.UI.WPF/ViewModels/MainWindowVM.cs b/Common/Ui/Common.UI.WPF/ViewModels/MainWindowVM.cs index ce30c19d..03f86858 100644 --- a/Common/Ui/Common.UI.WPF/ViewModels/MainWindowVM.cs +++ b/Common/Ui/Common.UI.WPF/ViewModels/MainWindowVM.cs @@ -8,8 +8,7 @@ public class MainWindowVM : VM { private readonly IMainModel model = new MainWindowModel(); - - private P2000Action action; + private readonly P2000Action action; public MainWindowVM() : base() { diff --git a/Common/Ui/Common.UI.WPF/app.config b/Common/Ui/Common.UI.WPF/app.config index 57e33b68..3bcf1bad 100644 --- a/Common/Ui/Common.UI.WPF/app.config +++ b/Common/Ui/Common.UI.WPF/app.config @@ -1,4 +1,4 @@ - + @@ -8,9 +8,9 @@ - - + + - \ No newline at end of file + diff --git a/Common/Ui/Common.UI.WPF/packages.config b/Common/Ui/Common.UI.WPF/packages.config new file mode 100644 index 00000000..457087d7 --- /dev/null +++ b/Common/Ui/Common.UI.WPF/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs b/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs index 187d8d1c..446ea43c 100644 --- a/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs +++ b/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs @@ -5,46 +5,180 @@ public static class BytesExtensions { - public static Int32 Int32BigEndian(this Byte[] bytes, Int32 start) + public static Int16 ToInt16BE(this Byte[] bytes, Int32 start) { - var _bytes = new Byte[4]; + var result = default(Int16); - if (bytes.Length >= start + 4) - { - Array.Copy(bytes, start, _bytes, 0, 4); - Array.Reverse(_bytes); - } + result ^= (Int16)(bytes[start++] << 8); + result ^= bytes[start++]; - return BitConverter.ToInt32(_bytes, 0); + return result; } - public static Byte Byte(this Byte[] bytes, Int32 start) + public static Int32 ToInt32BE(this Byte[] bytes, Int32 start) { - var _byte = default(Byte); + var result = default(Int32); - if (bytes.Length > start) - { - _byte = bytes[start]; - } + result ^= bytes[start++] << 24; + result ^= bytes[start++] << 16; + result ^= bytes[start++] << 8; + result ^= bytes[start++]; - return _byte; + return result; + } + + public static Int64 ToInt64BE(this Byte[] bytes, Int32 start) + { + var result = default(Int64); + + result ^= bytes[start++] << 56; + result ^= bytes[start++] << 48; + result ^= bytes[start++] << 40; + result ^= bytes[start++] << 32; + result ^= bytes[start++] << 24; + result ^= bytes[start++] << 16; + result ^= bytes[start++] << 8; + result ^= bytes[start++]; + + return result; + } + public static UInt16 ToUInt16BE(this Byte[] bytes, Int32 start) + { + var result = default(UInt16); + + result ^= (UInt16)(bytes[start++] << 8); + result ^= bytes[start++]; + + return result; + } + + public static UInt32 ToUInt32BE(this Byte[] bytes, Int32 start) + { + var result = default(UInt32); + + result ^= (UInt32)(bytes[start++] << 24); + result ^= (UInt32)(bytes[start++] << 16); + result ^= (UInt32)(bytes[start++] << 8); + result ^= bytes[start++]; + + return result; + } + + public static UInt64 ToUInt64BE(this Byte[] bytes, Int32 start) + { + var result = default(UInt64); + + result ^= (UInt64)(bytes[start++] << 56); + result ^= (UInt64)(bytes[start++] << 48); + result ^= (UInt64)(bytes[start++] << 40); + result ^= (UInt64)(bytes[start++] << 32); + result ^= (UInt64)(bytes[start++] << 24); + result ^= (UInt64)(bytes[start++] << 16); + result ^= (UInt64)(bytes[start++] << 8); + result ^= bytes[start++]; + + return result; + } + + public static Int16 ToInt16LE(this Byte[] bytes, Int32 start) + { + var result = default(Int16); + + start += 2; + + result ^= (Int16)(bytes[start--] << 8); + result ^= bytes[start--]; + + return result; + } + + public static Int32 ToInt32LE(this Byte[] bytes, Int32 start) + { + var result = default(Int32); + + start += 4; + + result ^= bytes[start--] << 24; + result ^= bytes[start--] << 16; + result ^= bytes[start--] << 8; + result ^= bytes[start--]; + + return result; + } + + public static Int64 ToInt64LE(this Byte[] bytes, Int32 start) + { + var result = default(Int64); + + start += 8; + + result ^= bytes[start--] << 56; + result ^= bytes[start--] << 48; + result ^= bytes[start--] << 40; + result ^= bytes[start--] << 32; + result ^= bytes[start--] << 24; + result ^= bytes[start--] << 16; + result ^= bytes[start--] << 8; + result ^= bytes[start--]; + + return result; + } + public static UInt16 ToUInt16LE(this Byte[] bytes, Int32 start) + { + var result = default(UInt16); + + start += 2; + + result ^= (UInt16)(bytes[start--] << 8); + result ^= bytes[start--]; + + return result; + } + + public static UInt32 ToUInt32LE(this Byte[] bytes, Int32 start) + { + var result = default(UInt32); + + start += 4; + + result ^= (UInt32)(bytes[start--] << 24); + result ^= (UInt32)(bytes[start--] << 16); + result ^= (UInt32)(bytes[start--] << 8); + result ^= bytes[start--]; + + return result; + } + + public static UInt64 ToUInt64LE(this Byte[] bytes, Int32 start) + { + var result = default(UInt64); + + start += 8; + + result ^= (UInt64)(bytes[start--] << 56); + result ^= (UInt64)(bytes[start--] << 48); + result ^= (UInt64)(bytes[start--] << 40); + result ^= (UInt64)(bytes[start--] << 32); + result ^= (UInt64)(bytes[start--] << 24); + result ^= (UInt64)(bytes[start--] << 16); + result ^= (UInt64)(bytes[start--] << 8); + result ^= bytes[start--]; + + return result; + } + + public static Byte[] GetBytesBE(this UInt16 value) + { + var bytes = new Byte[2]; + + bytes[0] = (Byte)(value >> 8); + bytes[1] = (Byte)value; + + return bytes; } - - - public const Int32 Int16Size = sizeof(Int16); - public const Int32 Int32Size = sizeof(Int32); - public const Int32 Int64Size = sizeof(Int64); - - public const Int32 UInt16Size = sizeof(UInt16); - public const Int32 UInt32Size = sizeof(UInt32); - public const Int32 UInt64Size = sizeof(UInt64); - - public const Int32 SingleSize = sizeof(Single); - public const Int32 DoubleSize = sizeof(Double); - public static Byte[] GetBits(this Byte _byte) { var bits = new Byte[8]; @@ -89,43 +223,50 @@ return (Byte)sum; } - public static Byte[] GetBytes(this String hexString) + public static Byte[] ToBytes(this String hexString) { - var bytes = default(Byte[]); + var bytes = new List(); - if (!string.IsNullOrWhiteSpace(hexString)) + if (!String.IsNullOrWhiteSpace(hexString)) { - hexString = hexString.ToUpper(); + var first = true; + var x = 0; - var stringLength = hexString.Length; - var byteList = new List(); - var hexByte = default(String); - - for (var charIndex = 0; charIndex < stringLength; charIndex++) + foreach (var hex in hexString) { - var _char = hexString[charIndex]; - - if (('0' <= _char && _char <= '9') || ('A' <= _char && _char <= 'F')) + if ('0' <= hex && hex <= '9') { - hexByte += _char; + x += hex - '0'; + } + else if ('A' <= hex && hex <= 'F') + { + x += hex - 'A' + 10; + } + else if ('a' <= hex && hex <= 'f') + { + x = hex - 'a' + 10; + } + else + { + continue; } - if (hexByte?.Length == 2) + if (first) { - var _byte = Convert.ToByte(hexByte, 16); - hexByte = default(String); - - byteList.Add(_byte); + x *= 16; } - } + else + { + bytes.Add((Byte)x); - if (hexByte is null) - { - bytes = byteList.ToArray(); + x = 0; + } + + first = !first; } } - return bytes; + return bytes.ToArray(); } public static Byte[] GetReversed(this Byte[] bytes, Int32 start, Int32 size) @@ -138,62 +279,27 @@ return _bytes; } - public static Int16 ToInt16BigEndian(this Byte[] bytes, Int32 start) - { - var _bytes = bytes.GetReversed(start, Int16Size); - - return BitConverter.ToInt16(_bytes, 0); - } - public static Int32 ToInt32BigEndian(this Byte[] bytes, Int32 start) { - var _bytes = bytes.GetReversed(start, Int32Size); + var _bytes = bytes.GetReversed(start, sizeof(Int32)); return BitConverter.ToInt32(_bytes, 0); } - public static Int64 ToInt64BigEndian(this Byte[] bytes, Int32 start) - { - var _bytes = bytes.GetReversed(start, Int64Size); - - return BitConverter.ToInt64(_bytes, 0); - } - public static UInt16 ToUInt16BigEndian(this Byte[] bytes, Int32 start) { - var _bytes = bytes.GetReversed(start, UInt16Size); + var _bytes = bytes.GetReversed(start, sizeof(UInt16)); return BitConverter.ToUInt16(_bytes, 0); } public static UInt32 ToUInt32BigEndian(this Byte[] bytes, Int32 start) { - var _bytes = bytes.GetReversed(start, UInt32Size); + var _bytes = bytes.GetReversed(start, sizeof(UInt32)); return BitConverter.ToUInt32(_bytes, 0); } - public static UInt64 ToUInt64BigEndian(this Byte[] bytes, Int32 start) - { - var _bytes = bytes.GetReversed(start, UInt64Size); - - return BitConverter.ToUInt64(_bytes, 0); - } - - public static Single ToSingleBigEndian(this Byte[] bytes, Int32 start) - { - var _bytes = bytes.GetReversed(start, SingleSize); - - return BitConverter.ToSingle(_bytes, 0); - } - - public static Double ToDobleBigEndian(this Byte[] bytes, Int32 start) - { - var _bytes = bytes.GetReversed(start, DoubleSize); - - return BitConverter.ToDouble(_bytes, 0); - } - public static Byte[] Reverse(this Byte[] bytes) { Array.Reverse(bytes); @@ -201,28 +307,10 @@ return bytes; } - public static Byte[] ToBigEndianBytes(this Int16 value) - => BitConverter.GetBytes(value).Reverse(); - public static Byte[] ToBigEndianBytes(this Int32 value) => BitConverter.GetBytes(value).Reverse(); - public static Byte[] ToBigEndianBytes(this Int64 value) - => BitConverter.GetBytes(value).Reverse(); - - public static Byte[] ToBigEndianBytes(this UInt16 value) - => BitConverter.GetBytes(value).Reverse(); - public static Byte[] ToBigEndianBytes(this UInt32 value) => BitConverter.GetBytes(value).Reverse(); - - public static Byte[] ToBigEndianBytes(this UInt64 value) - => BitConverter.GetBytes(value).Reverse(); - - public static Byte[] ToBigEndianBytes(this Single value) - => BitConverter.GetBytes(value).Reverse(); - - public static Byte[] ToBigEndianBytes(this Double value) - => BitConverter.GetBytes(value).Reverse(); } } diff --git a/Common/Utils/Common.Utils.Extensions/Common.Utils.Extensions.csproj b/Common/Utils/Common.Utils.Extensions/Common.Utils.Extensions.csproj index 3d381444..06cc7cbb 100644 --- a/Common/Utils/Common.Utils.Extensions/Common.Utils.Extensions.csproj +++ b/Common/Utils/Common.Utils.Extensions/Common.Utils.Extensions.csproj @@ -21,6 +21,7 @@ DEBUG;TRACE prompt 4 + IDE0003;IDE0049; AnyCPU From 4cc1be93264c891010128248ec504b23411dd269 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Mon, 14 Oct 2024 15:02:21 +0200 Subject: [PATCH 31/44] refactoring - builds ok --- Common/Common.sln | 67 ----- Common/CommonConsole/CommonConsole.csproj | 5 +- Common/CommonConsole/Program.cs | 113 ++++++-- ...mmon.Hardware.Interfaces.Ports.SIRT.csproj | 28 +- .../JustSirtBroadcaster.cs | 166 +++++++++++ .../JustSirtMessage.cs | 2 +- .../JustSirtProxy.cs | 2 +- .../JustSirtTask.cs | 142 +++++++++ .../JustTaskStatus.cs | 15 + .../Parameters/AuthLevel.cs | 45 --- .../Parameters/BluetoothOperating.cs | 6 +- .../Parameters/ByteExtensions.cs | 31 -- .../Parameters/OperatingModes.cs | 2 +- .../Parameters/P11.cs | 6 +- .../Parameters/P12.cs | 6 +- .../Parameters/P811.cs | 17 +- .../Parameters/PAMStatus.cs | 65 +++++ .../Parameters/PamTimeout.cs | 2 +- .../Parameters/RFModuleOperating.cs | 8 +- .../Parameters/SirtOperating.cs | 6 +- .../Requests/ReadPamRequest.cs | 35 --- .../Requests/ReadRegRequest.cs | 23 -- .../Requests/WritePamRequest.cs | 87 ------ .../Requests/WriteRegRequest.cs | 24 -- .../Responses/AcknOrAnswerResponse.cs | 58 ---- .../Responses/FromAirResponse.cs | 112 ------- .../SIRTRequest.cs | 29 -- .../SIRTResponse.cs | 33 --- .../SIRTTask[TRequest].cs | 47 --- .../SirtBroadcaster.cs | 220 -------------- .../SirtConstants.cs | 30 -- .../SirtMessage.cs | 139 --------- .../SirtTask.cs | 97 ------- .../Tasks/ActivateSIRTTask.cs | 35 --- .../Tasks/DeleteFromPamPoolTask.cs | 17 -- .../Tasks/IdentifySIRTTask.cs | 49 ---- .../Tasks/ReadPamPoolTask.cs | 68 ----- .../Tasks/WritePamTask.cs | 74 ----- ...re.Interfaces.Ports.SirtBroadcaster.csproj | 1 - .../Parameters/BluetoothOperating.cs | 4 +- .../Parameters/ByteExtensions.cs | 31 -- .../Parameters/P11.cs | 4 +- .../Parameters/P12.cs | 4 +- .../Parameters/P811.cs | 4 +- .../Parameters/RFModuleOperating.cs | 6 +- .../Parameters/SirtOperating.cs | 4 +- .../ActivateMetrologyTestMode.cs | 19 ++ .../ActivationByFlow.cs | 17 -- .../AlarmsMask.cs | 6 +- .../AuthLevel.cs | 6 +- ...g.cs => ChangeFixedDateReadingSettings.cs} | 4 +- .../ChangeMeterReading.cs | 4 +- .../ChangeNumberOfDeals.cs | 1 - .../ChangePin.cs | 29 ++ .../ChangeSensusRFEncryptionKey.cs | 33 ++- .../{State.cs => ChangeState.cs} | 4 +- .../ChangeTransmission.cs | 70 ----- ...dware.WaterMeter.eRegister.Features.csproj | 43 ++- .../CustomerDebug.cs | 2 +- .../DeactivateTransmitter.cs | 15 + .../DebugCmd.cs | 36 +++ .../DisableOTA.cs | 10 - .../DisableOTAFirmwareUpdate.cs | 20 ++ .../FactoryComplete.cs | 9 + .../GetCustomerDebug.cs | 9 + .../GetDebug.cs | 20 -- .../OTAFWUpdate.cs | 17 -- .../OTAMode.cs | 10 + ...> OpenMeteringTransmitionIntervalWMBus.cs} | 6 +- .../Pam.cs | 20 +- .../Ping.cs | 14 + .../ReceiveSequenceOfTestTelegrams.cs | 54 ++++ .../RequestDebugTelegram.cs | 9 + .../RequestFixedDateReading.cs | 42 +++ .../RequestLoggingData.cs | 42 +++ .../RequestMemoryDump.cs | 47 +++ .../SendBubbleUpBurst.cs | 19 ++ .../SendSequenceOfTestTelegrams.cs | 54 ++++ .../SendTestPattern.cs | 48 +++ .../SerialOutput.cs | 9 + .../SetActivationByThreshold.cs | 12 +- .../SetActivityCreditLimits.cs | 22 ++ .../SetAlarms.cs | 10 +- .../SetBatteryUsageTestOffset.cs | 23 ++ .../SetBytterySeconds.cs | 4 +- .../SetDateAndTime.cs | 19 ++ .../SetFrequencyOffset.cs | 19 ++ .../{MeterType.cs => SetMeterType.cs} | 4 +- .../SetMetrologyParameters.cs | 2 +- .../{SetPCB.cs => SetPcbId.cs} | 4 +- .../SetPowerLevel.cs | 15 +- .../{RebootsCounter.cs => SetRebootCount.cs} | 4 +- .../SetSpecificError.cs | 9 + .../SetTFXParameters.cs | 2 +- .../SetTestFastActivityBupTiming.cs | 21 ++ .../SetVariablePcbId.cs | 9 + .../{WMBusMode.cs => WirelessMBusMode.cs} | 9 +- ...ommon.Hardware.WaterMeter.eRegister.csproj | 9 +- .../Data/SEMI.cs | 3 +- .../Eregister.cs | 274 ++++++++++++++++++ .../EregisterDebug.cs | 86 ++++++ .../EregisterPam.cs | 18 ++ .../PamTypeAttribute.cs | 20 ++ .../ParameterSet.cs | 17 +- .../ProgrammingBatch.cs | 2 +- .../ProgrammingTask.cs | 5 +- Common/OmniPlus/InspectionUI/App.config | 28 +- .../OmniPlus/InspectionUI/InspectionUI.csproj | 3 +- Common/OmniPlus/InspectionUI/packages.config | 6 +- Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj | 5 - .../ViewModels/CompilerServices.cs | 17 -- Common/Ui/GenesisToolBox/FrmTempMeter.cs | 22 +- .../Ui/GenesisToolBox/GenesisToolBox.csproj | 4 +- .../BytesExtensions.cs | 14 +- 114 files changed, 1730 insertions(+), 1708 deletions(-) create mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtBroadcaster.cs create mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtTask.cs create mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustTaskStatus.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/AuthLevel.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/ByteExtensions.cs create mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/PAMStatus.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/ReadPamRequest.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/ReadRegRequest.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/WritePamRequest.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/WriteRegRequest.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Responses/AcknOrAnswerResponse.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Responses/FromAirResponse.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTRequest.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTResponse.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTTask[TRequest].cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtBroadcaster.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtConstants.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtMessage.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/ActivateSIRTTask.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/DeleteFromPamPoolTask.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/IdentifySIRTTask.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/ReadPamPoolTask.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/WritePamTask.cs delete mode 100644 Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/ByteExtensions.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ActivateMetrologyTestMode.cs delete mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ActivationByFlow.cs rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/{ChangeFixedDateReading.cs => ChangeFixedDateReadingSettings.cs} (77%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangePin.cs rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/{State.cs => ChangeState.cs} (81%) delete mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeTransmission.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateTransmitter.cs delete mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTA.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTAFirmwareUpdate.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/FactoryComplete.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/GetCustomerDebug.cs delete mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/GetDebug.cs delete mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OTAFWUpdate.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OTAMode.cs rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/{SetOpenMeteringTransmitionIntervalWMBus.cs => OpenMeteringTransmitionIntervalWMBus.cs} (59%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Ping.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ReceiveSequenceOfTestTelegrams.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestDebugTelegram.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestFixedDateReading.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestLoggingData.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestMemoryDump.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendBubbleUpBurst.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendSequenceOfTestTelegrams.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendTestPattern.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SerialOutput.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivityCreditLimits.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetBatteryUsageTestOffset.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetDateAndTime.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetFrequencyOffset.cs rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/{MeterType.cs => SetMeterType.cs} (74%) rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/{SetPCB.cs => SetPcbId.cs} (80%) rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/{RebootsCounter.cs => SetRebootCount.cs} (79%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetSpecificError.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetTestFastActivityBupTiming.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetVariablePcbId.cs rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/{WMBusMode.cs => WirelessMBusMode.cs} (89%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/PamTypeAttribute.cs delete mode 100644 Common/Ui/Common.UI.WPF/ViewModels/CompilerServices.cs diff --git a/Common/Common.sln b/Common/Common.sln index 21dceb97..887f6e64 100644 --- a/Common/Common.sln +++ b/Common/Common.sln @@ -239,8 +239,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api_doc", "api_doc", "{E608 Hardware\WaterMeter\MagFlux\MagFluxApi\api_doc\SensorInfo.cs = Hardware\WaterMeter\MagFlux\MagFluxApi\api_doc\SensorInfo.cs EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Hardware.Interfaces.Ports.SirtBroadcaster", "Hardware\Interfaces\Ports\Common.Hardware.Interfaces.Ports.SirtBroadcaster\Common.Hardware.Interfaces.Ports.SirtBroadcaster.csproj", "{F408DE9E-01E6-4CFF-AE79-B572B0674FA2}" -EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution Utils\DateTimeServerShared\DateTimeServerShared.projitems*{4806d89a-fbfb-41bc-aaa7-2242444bf55a}*SharedItemsImports = 4 @@ -5459,70 +5457,6 @@ Global {F7316525-FF8E-4651-BA67-3C9B948D1E91}.XP32bit|x64.Build.0 = Release|Any CPU {F7316525-FF8E-4651-BA67-3C9B948D1E91}.XP32bit|x86.ActiveCfg = Release|Any CPU {F7316525-FF8E-4651-BA67-3C9B948D1E91}.XP32bit|x86.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}._MANUAL_CONTROL|Any CPU.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}._MANUAL_CONTROL|x64.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}._MANUAL_CONTROL|x64.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}._MANUAL_CONTROL|x86.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}._MANUAL_CONTROL|x86.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.COM|Any CPU.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.COM|Any CPU.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.COM|Mixed Platforms.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.COM|Mixed Platforms.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.COM|x64.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.COM|x64.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.COM|x86.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.COM|x86.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Debug|x64.ActiveCfg = Debug|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Debug|x64.Build.0 = Debug|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Debug|x86.ActiveCfg = Debug|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Debug|x86.Build.0 = Debug|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.GenesisDisplayTool_V01|Any CPU.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.GenesisDisplayTool_V01|Any CPU.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.GenesisDisplayTool_V01|Mixed Platforms.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.GenesisDisplayTool_V01|Mixed Platforms.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.GenesisDisplayTool_V01|x64.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.GenesisDisplayTool_V01|x64.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.GenesisDisplayTool_V01|x86.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.GenesisDisplayTool_V01|x86.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.PerformTest|Any CPU.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.PerformTest|Any CPU.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.PerformTest|Mixed Platforms.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.PerformTest|Mixed Platforms.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.PerformTest|x64.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.PerformTest|x64.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.PerformTest|x86.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.PerformTest|x86.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Release|Any CPU.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Release|x64.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Release|x64.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Release|x86.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.Release|x86.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.ReleaseTest|x64.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.ReleaseTest|x64.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.ReleaseTest|x86.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.ReleaseTest|x86.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.XP32bit|Any CPU.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.XP32bit|Any CPU.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.XP32bit|x64.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.XP32bit|x64.Build.0 = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.XP32bit|x86.ActiveCfg = Release|Any CPU - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2}.XP32bit|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -5626,7 +5560,6 @@ Global {F7316525-FF8E-4651-BA67-3C9B948D1E91} = {03D4F23E-7E4A-4091-BC96-036C996D351A} {56768A27-D0E4-430E-8E75-AFC7319F189A} = {C9393A97-C0BB-4D59-A879-B572BE04CE15} {E6081C0A-8452-44B4-8EB4-E0CAE9119830} = {56768A27-D0E4-430E-8E75-AFC7319F189A} - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2} = {B9444AB7-1EB1-484A-8DE6-4EEE03498CD7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4BCB7B69-696C-436A-86F7-C91EA5588164} diff --git a/Common/CommonConsole/CommonConsole.csproj b/Common/CommonConsole/CommonConsole.csproj index 763a69e3..d5c05ce5 100644 --- a/Common/CommonConsole/CommonConsole.csproj +++ b/Common/CommonConsole/CommonConsole.csproj @@ -24,6 +24,7 @@ prompt 4 false + IDE003;IDE0049; AnyCPU @@ -55,10 +56,6 @@ - - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2} - Common.Hardware.Interfaces.Ports.SirtBroadcaster - {B23BFAF9-08AE-4311-8C08-FB2BB49EA2AD} Common.Hardware.Interfaces.Ports.Sirt diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index ce74a109..8ea99ce5 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -1,38 +1,101 @@ namespace CommonConsole { + using Common.Hardware.WaterMeter.eRegister; + using Common.Hardware.WaterMeter.eRegister.Features; + using System; public class Program { public static void Main() { - var bytes = new Byte[] { 0x00, 0x00, 0x00, 0x05 }; + var eregister = EregisterModel(); - var index = 0; - var valueMSB = 0; + var pams = eregister.BuildPams(); - valueMSB ^= bytes[index++] << 24; - valueMSB ^= bytes[index++] << 16; - valueMSB ^= bytes[index++] << 08; - valueMSB ^= bytes[index++] << 00; - - index = 3; - var valueLSB = 0; - - valueLSB ^= bytes[index--] << 24; - valueLSB ^= bytes[index--] << 16; - valueLSB ^= bytes[index--] << 08; - valueLSB ^= bytes[index--] << 00; - - Console.WriteLine($"{nameof(valueMSB)} == {nameof(valueLSB)} => {valueMSB} == {valueLSB} = {valueMSB == valueLSB}"); - - var _lsb = BitConverter.ToInt32(bytes, 0); - - Array.Reverse(bytes); - - var _msb = BitConverter.ToInt32(bytes, 0); - - Console.WriteLine($"{nameof(_msb)} == {nameof(_lsb)} => {_msb} == {_lsb} = {_msb == _lsb}"); + foreach (var pam in pams) + { + Console.WriteLine($"{pam.Name}: {BitConverter.ToString(pam.CommandBytes.ToArray()).Replace("-", String.Empty)}"); + } } + + private static Eregister EregisterModel() => new Eregister + { + ChangeWakeUp = new ChangeWakeUp + { + Mode = WakeUpMode.StayAwake + }, + ChangeMeterReading = new ChangeMeterReading + { + DisplayVolume = 500 + }, + ChangeCustomerText = new ChangeCustomerText + { + Text = "242300147" + }, + DeactivateAlarms = new DeactivateAlarms + { + Backflow = true, + MagneticTamper = true, + SpecificError = true, + }, + ResetAlarms = new ResetAlarms + { + Value = byte.MaxValue + }, + ParameterizeLeakageDetection = new ParameterizeLeakageDetection + { + Value = 10, + }, + ParameterizeBrokenPipeDetection = new ParameterizeBrokenPipeDetection + { + Value = 50 + }, + SetHistoricalErrorLimit = new SetHistoricalErrorLimit + { + Value = 50 + }, + ChangeDataLoggerSettings = new ChangeDataLoggerSettings + { + MinimumFlow = 10, + TimeInterval = 1440, + TimeOfMinimumFlow = 1 + }, + WirelessMBusMode = new WirelessMBusMode + { + WMBusEnabled = true, + InstallationModeEnabled = true, + EncryptionEnabled = true, + }, + SetPowerLevelSensusRF = new SetPowerLevel + { + Mode = PowerLevelModes.SensusRF, + PowerLevel = 10 + }, + SetPowerLevelFlexNet = new SetPowerLevel + { + Mode = PowerLevelModes.FlexNet, + PowerLevel = 10 + }, + Debug = new EregisterDebug + { + DisableOTAFirmwareUpdate = new DisableOTAFirmwareUpdate + { + Mode = OTAMode.DisableFWUpdate + }, + SetActivationByThreshold = new SetActivationByThreshold + { + Rotations = 1 + } + }, + OpenMeteringTransmitionIntervalWMBus = new OpenMeteringTransmitionIntervalWMBus + { + Seconds = 15 + }, + ChangeNumberOfLatWindows = new ChangeNumberOfLatWindows + { + N = 3 + } + }; } } \ No newline at end of file diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj index f9f5ff7f..aae88833 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj @@ -41,39 +41,27 @@ + - + + - + - - - - - - - - - - - - - - - - - - + + {05F0CCAF-9F2B-45F9-A7F8-12F29AD182F3} + Common.Utils.Extensions + {91DEF0C0-AA4F-40AE-8F18-CB717FDE7E7F} Crc16Ccitt diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtBroadcaster.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtBroadcaster.cs new file mode 100644 index 00000000..b3078ae4 --- /dev/null +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtBroadcaster.cs @@ -0,0 +1,166 @@ +namespace Common.Hardware.Interfaces.Ports.SIRT +{ + using System; + using System.Collections.Concurrent; + using System.Threading; + + public class JustSirtBroadcaster + { + private static readonly ConcurrentDictionary runningTasks + = new ConcurrentDictionary(); + private readonly JustSirtProxy proxy; + + public JustSirtBroadcaster(String portName) + { + this.proxy = new JustSirtProxy(portName); + this.proxy.MessageReceived += this.Proxy_MessageReceived; + } + + public event Action Logging + { + add => this.proxy.Logging += value; + remove => this.proxy.Logging -= value; + } + + public String SirtId { get; private set; } + + public Int32 MHz { get; private set; } + + public void Log(Object value) => this.proxy.Log(value); + + public Boolean TryActivate() + { + var activated = this.proxy.TryOpen(); + + if (activated) + { + runningTasks.Clear(); + } + + var awaiter = new ManualResetEventSlim(); + + var task = JustSirtTask.ActivateSIRT; + task.Cancelled += _ => awaiter.Set(); + task.Completed += _task => + { + activated = _task.TaskStatus == JustTaskStatus.Completed; + + if (activated) + { + awaiter.Set(); + } + }; + task = runningTasks.AddOrUpdate(task.Address, task, (a, t) => task); + + task.PrepareForRun(); + this.proxy.WriteBytes(task); + this.Log(task); + awaiter.Wait(); + awaiter.Reset(); + + if (activated) + { + task = JustSirtTask.IdentifySIRT; + task.Cancelled += _ => awaiter.Set(); + task.Completed += _task => + { + activated = _task.TaskStatus == JustTaskStatus.Completed; + + if (activated) + { + awaiter.Set(); + } + }; + task = runningTasks.AddOrUpdate(task.Address, task, (a, t) => task); + + task.PrepareForRun(); + this.proxy.WriteBytes(task); + this.Log(task); + awaiter.Wait(); + awaiter.Reset(); + + if (activated) + { + this.SirtId = BitConverter.ToString(task.LastPayload); + this.MHz = this.SirtId[10] == '0' ? 868 : 433; + } + } + + return activated; + } + + public Boolean TryDeactivate() + { + this.proxy.MessageReceived -= this.Proxy_MessageReceived; + + return this.proxy.TryClose(); + } + + public JustTaskStatus TryRun(JustSirtTask task) + { + if (!this.proxy.IsOpen) + { + return JustTaskStatus.ProxyNotOpen; + } + + var address = task.Address; + + if (runningTasks.TryGetValue(address, out var runningTask) && runningTask != null) + { + return JustTaskStatus.InRunningTasks; + } + + var countInPamPool = 0; + + foreach (var _task in runningTasks.Values) + { + if (_task != null && _task.Cmd == JustSirtMessage.W_PAM) + { + countInPamPool++; + } + } + + if (countInPamPool >= 5) + { + return JustTaskStatus.PamPoolIsFull; + } + + task = runningTasks.AddOrUpdate(address, task, (a, t) => task); + + if (task.TaskStatus == JustTaskStatus.Completed) + { + this.Task_DismissFromRunningTasks(task); + + return JustTaskStatus.Completed; + } + + task.Cancelled += this.Task_DismissFromRunningTasks; + task.Completed += this.Task_DismissFromRunningTasks; + + task.PrepareForRun(); + this.proxy.WriteBytes(task); + this.Log($"{task.Address}|{BitConverter.ToString(task)}"); + + return JustTaskStatus.Sent; + } + + private void Proxy_MessageReceived(JustSirtMessage message) + { + var address = message.Address; + + if (runningTasks.TryGetValue(address, out var task) && task != null) + { + task.ReceiveMessage(message, this.MHz); + this.Log($"{address}|{message}"); + } + } + + private void Task_DismissFromRunningTasks(JustSirtTask task) + { + task.Cancelled -= this.Task_DismissFromRunningTasks; + task.Completed -= this.Task_DismissFromRunningTasks; + + runningTasks.TryRemove(task.Address, out var _); + } + } +} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs index 8a91f8a2..e868a598 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs @@ -1,4 +1,4 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt +namespace Common.Hardware.Interfaces.Ports.SIRT { using System; diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtProxy.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtProxy.cs index 5b3ba0a5..8b872724 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtProxy.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtProxy.cs @@ -1,4 +1,4 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt +namespace Common.Hardware.Interfaces.Ports.SIRT { using System; using System.Collections.Generic; diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtTask.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtTask.cs new file mode 100644 index 00000000..da171d71 --- /dev/null +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtTask.cs @@ -0,0 +1,142 @@ +namespace Common.Hardware.Interfaces.Ports.SIRT +{ + using Common.Hardware.Interfaces.Ports.SIRT.Parameters; + + using System; + using System.Collections.Concurrent; + using System.Timers; + + public class JustSirtTask + { + private readonly Timer timer = new Timer(); + private readonly JustSirtMessage request = new JustSirtMessage(); + private readonly ConcurrentStack responses = new ConcurrentStack(); + + public event Action Completed; + public event Action Cancelled; + + public Byte Cmd + { + get => this.request.Cmd; + set => this.request.Cmd = value; + } + + public Byte P1 + { + get => this.request.P1; + set => this.request.P1 = value; + } + + public Byte P2 + { + get => this.request.P2; + set => this.request.P2 = value; + } + + public UInt32 Address + { + get => this.request.Address; + set => this.request.Address = value; + } + + public Byte[] Data + { + get => this.request.Data; + set => this.request.Data = value; + } + + public JustTaskStatus TaskStatus { get; protected set; } + + public Byte[] LastPayload + => this.responses.TryPeek(out var response) + ? response.Data + : default(Byte[]); + + public virtual void ReceiveMessage(JustSirtMessage response, Int32 mhz) + { + this.responses.Push(response); + + if (this.TaskStatus != JustTaskStatus.Completed) + { + this.TaskStatus = JustTaskStatus.Running; + + if (this.request.Cmd == JustSirtMessage.W_PAM) + { + if (response.Cmd == JustSirtMessage.FROMAIR && response.Data[0] == JustSirtMessage.SEMI) + { + this.TaskStatus = JustTaskStatus.Completed; + } + } + else if (response.Cmd == JustSirtMessage.ACKNANSW) + { + this.TaskStatus = JustTaskStatus.Completed; + } + } + + if (this.TaskStatus == JustTaskStatus.Completed) + { + this.Completed?.Invoke(this); + this.timer.Stop(); + } + } + + public virtual void PrepareForRun() + { + this.responses.Clear(); + this.TaskStatus = JustTaskStatus.Pending; + this.timer.AutoReset = false; + this.timer.Interval = 10_000; + this.timer.Elapsed += (sender, _1) => + { + this.TaskStatus = JustTaskStatus.Cancelled; + + this.Cancelled?.Invoke(this); + }; + this.timer.Start(); + } + + public virtual Byte[] ToByteArray() + => this.request.ToByteArray(); + + public override String ToString() + => BitConverter.ToString(this.ToByteArray()); + + public static implicit operator Byte[] (JustSirtTask task) + => task?.ToByteArray() ?? new Byte[] { }; + + public static readonly JustSirtTask ActivateSIRT = new JustSirtTask + { + Cmd = JustSirtMessage.W_REG, + Address = 0x20000000, + P2 = 0x05, + Data = new Byte[] + { + new SirtOperating { /* default */ }, + new BluetoothOperating { BtOff = true }, + new RFModuleOperating { RfOff = true }, + new RFModuleOperating { OpMode = OperatingModes.ReceiveF1TransmitSensusRFF3 }, + new PamTimeout { Minutes = 1 } + } + }; + + public static readonly JustSirtTask IdentifySIRT = new JustSirtTask + { + Cmd = JustSirtMessage.R_REG, + Address = 0x11001820, + P2 = 0x08 + }; + + public static readonly JustSirtTask ReadPamPool = new JustSirtTask + { + Cmd = JustSirtMessage.R_PAM, + Address = 0xFFFFFFFF + }; + + public static JustSirtTask DeleteFromPamPool(UInt32 address) => new JustSirtTask + { + Cmd = JustSirtMessage.W_PAM, + P1 = new P811 { DelPamAdr = true }, + Address = address + }; +} +} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustTaskStatus.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustTaskStatus.cs new file mode 100644 index 00000000..baf4dbb6 --- /dev/null +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustTaskStatus.cs @@ -0,0 +1,15 @@ +namespace Common.Hardware.Interfaces.Ports.SIRT +{ + public enum JustTaskStatus + { + Pending = 0, + Running = 1, + Completed = 2, + Cancelled = 3, + InRunningTasks = 4, + PamPoolIsFull = 5, + InPamPool = 6, + Sent = 7, + ProxyNotOpen = 8, + } +} \ No newline at end of file diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/AuthLevel.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/AuthLevel.cs deleted file mode 100644 index b44d72cb..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/AuthLevel.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters -{ - using System; - - public class AuthLevel - { - public enum Level : UInt64 - { - I = 0x004301143068D0, - II = 0x004302140E8040, - III = 0x00430363937322, - } - - private readonly Level pin; - private readonly Byte[] bytes; - - private AuthLevel(Level pin) - { - this.pin = pin; - this.bytes = new Byte[6]; - - var bytes = BitConverter.GetBytes((UInt64)this.pin); - Array.Copy(bytes, 0, this.bytes, 0, this.bytes.Length); - } - - public static readonly AuthLevel I = Level.I; - public static readonly AuthLevel II = Level.II; - public static readonly AuthLevel III = Level.III; - - public override String ToString() - => BitConverter.ToString(this.bytes); - - public static implicit operator AuthLevel(Level level) - => new AuthLevel(level); - - public static implicit operator UInt64(AuthLevel level) - => (UInt64)level.pin; - - public static implicit operator Byte[](AuthLevel level) - => level.bytes; - - public static implicit operator String (AuthLevel level) - => level.ToString(); - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/BluetoothOperating.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/BluetoothOperating.cs index 99808a1e..6055bdd8 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/BluetoothOperating.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/BluetoothOperating.cs @@ -1,5 +1,7 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters +namespace Common.Hardware.Interfaces.Ports.SIRT.Parameters { + using Common.Utils.Extensions; + using System; public class BluetoothOperating @@ -55,7 +57,7 @@ } public static implicit operator Byte(BluetoothOperating param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator BluetoothOperating(Byte _byte) => new BluetoothOperating(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/ByteExtensions.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/ByteExtensions.cs deleted file mode 100644 index 126d2107..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/ByteExtensions.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters -{ - using System; - - public static class ByteExtensions - { - public static Byte[] GetBits(this Byte @byte) - { - var bits = new Byte[8]; - - for (int i = 0; i < 8; i++) - { - bits[i] = (Byte)((@byte >> i) & 1); - } - - return bits; - } - - public static Byte GetByte(this Byte[] bits) - { - var @byte = default(int); - - for (int i = 0; i < 8; i++) - { - @byte |= bits[i] << i; - } - - return (Byte)@byte; - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/OperatingModes.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/OperatingModes.cs index d3f71913..40e3c564 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/OperatingModes.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/OperatingModes.cs @@ -1,4 +1,4 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters +namespace Common.Hardware.Interfaces.Ports.SIRT.Parameters { public enum OperatingModes { diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P11.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P11.cs index 5190ae48..e886d0fa 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P11.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P11.cs @@ -1,5 +1,7 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters +namespace Common.Hardware.Interfaces.Ports.SIRT.Parameters { + using Common.Utils.Extensions; + using System; /// @@ -170,7 +172,7 @@ } public static implicit operator Byte(P11 param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator P11(Byte _byte) => new P11(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P12.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P12.cs index 84df10ad..1e806fd4 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P12.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P12.cs @@ -1,5 +1,7 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters +namespace Common.Hardware.Interfaces.Ports.SIRT.Parameters { + using Common.Utils.Extensions; + using System; /// @@ -162,7 +164,7 @@ } public static implicit operator Byte(P12 param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator P12(Byte _byte) => new P12(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P811.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P811.cs index 5986d6ce..c864493b 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P811.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/P811.cs @@ -1,5 +1,7 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters +namespace Common.Hardware.Interfaces.Ports.SIRT.Parameters { + using Common.Utils.Extensions; + using System; /// @@ -232,19 +234,8 @@ set => this.bits[7] = (Byte)(value ? 1 : 0); } - public static P811 DelPamAfterSemi => new P811 - { - DelPamSemi = true - }; - - public static P811 WupDelPamAfterSemi => new P811 - { - WakeUpCmd = true, - DelPamSemi = true - }; - public static implicit operator Byte(P811 param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator P811(Byte _byte) => new P811(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/PAMStatus.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/PAMStatus.cs new file mode 100644 index 00000000..937770ab --- /dev/null +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/PAMStatus.cs @@ -0,0 +1,65 @@ +namespace Common.Hardware.Interfaces.Ports.SIRT.Parameters +{ + using Common.Utils.Extensions; + + using System; + + public class PAMStatus + { + private readonly Byte[] bits; + + public PAMStatus(Byte _byte) + => this.bits = _byte.GetBits(); + + public Boolean CMD_UNKNOWN => this.bits[0] == 1; + + public Boolean WRONG_AUTH => this.bits[1] == 1; + + public Boolean EXPIRED_AUTH => this.bits[2] == 1; + + public Boolean MIXED_TYPES => this.bits[3] == 1; + + public Boolean OUT_OF_RANGE => this.bits[4] == 1; + + public override String ToString() + { + var status = nameof(OK); + var value = this.bits.ToByte(); + + if ((value & 1) == 1) + { + status = nameof(CMD_UNKNOWN); + } + + if ((value & 2) == 2) + { + status = nameof(WRONG_AUTH); + } + + if ((value & 4) == 4) + { + status = nameof(EXPIRED_AUTH); + } + + if ((value & 8) == 8) + { + status = nameof(MIXED_TYPES); + } + + if ((value & 16) == 16) + { + status = nameof(OUT_OF_RANGE); + } + + return status; + } + + public static Byte OK = 0; + + public static implicit operator Byte(PAMStatus status) + => status?.bits?.ToByte() ?? 0xFF; + + public static implicit operator String(PAMStatus status) + => status?.ToString(); + } +} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/PamTimeout.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/PamTimeout.cs index c4de0a52..82439494 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/PamTimeout.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/PamTimeout.cs @@ -1,4 +1,4 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters +namespace Common.Hardware.Interfaces.Ports.SIRT.Parameters { using System; diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/RFModuleOperating.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/RFModuleOperating.cs index 46e6ab45..4263312b 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/RFModuleOperating.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/RFModuleOperating.cs @@ -1,5 +1,7 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters +namespace Common.Hardware.Interfaces.Ports.SIRT.Parameters { + using Common.Utils.Extensions; + using System; public class RFModuleOperating @@ -21,7 +23,7 @@ Array.Copy(this.bits, 0, bits, 0, 4); - return (OperatingModes)bits.GetByte(); + return (OperatingModes)bits.ToByte(); } set { @@ -68,7 +70,7 @@ } public static implicit operator Byte(RFModuleOperating param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator RFModuleOperating(Byte _byte) => new RFModuleOperating(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/SirtOperating.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/SirtOperating.cs index 3f1ae2c3..6cb49d51 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/SirtOperating.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Parameters/SirtOperating.cs @@ -1,5 +1,7 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Parameters +namespace Common.Hardware.Interfaces.Ports.SIRT { + using Common.Utils.Extensions; + using System; public class SirtOperating @@ -128,7 +130,7 @@ } public static implicit operator Byte(SirtOperating param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator SirtOperating(Byte _byte) => new SirtOperating(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/ReadPamRequest.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/ReadPamRequest.cs deleted file mode 100644 index 163d86b0..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/ReadPamRequest.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Requests -{ - using Common.Hardware.Interfaces.Ports.Sirt; - - using System; - - public class ReadPamRequest : SIRTRequest - { - /// - /// - /// - /// true - /// shows content of PAM structure of this address - /// - /// - /// false - /// show stored PAM for this address - /// - /// - /// - public Boolean PamStruct - { - get => this.message.P1 == 1; - set => this.message.P1 = (Byte)(value ? 1 : 0); - } - - protected override Byte[] ToByteArray() - { - this.message.Start = SIRTConstants.Pc2Sirt; - this.message.Cmd = SIRTConstants.ReadPam; - - return this.message.ToByteArray(); - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/ReadRegRequest.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/ReadRegRequest.cs deleted file mode 100644 index ffa8a30c..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/ReadRegRequest.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Requests -{ - using Common.Hardware.Interfaces.Ports.Sirt; - - using System; - - public class ReadRegRequest : SIRTRequest - { - public Byte ReadLength - { - get => this.message.P2; - set => this.message.P2 = value; - } - - protected override Byte[] ToByteArray() - { - this.message.Start = SIRTConstants.Pc2Sirt; - this.message.Cmd = SIRTConstants.ReadReg; - - return this.message.ToByteArray(); - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/WritePamRequest.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/WritePamRequest.cs deleted file mode 100644 index 4a8ad6de..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/WritePamRequest.cs +++ /dev/null @@ -1,87 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Requests -{ - using Common.Hardware.Interfaces.Ports.Sirt; - using Common.Hardware.Interfaces.Ports.Sirt.Parameters; - - using System; - - public class WritePamRequest : SIRTRequest - { - private readonly P811 parameter811 = default(Byte); - - public WritePamRequest() - => this.parameter811 = this.message.P1; - - /// - /// - /// - public Boolean WakeUpModul - { - get => this.parameter811.WakeUpModul; - set => this.parameter811.WakeUpModul = value; - } - - /// - /// - /// - public Boolean WakeUpCmd - { - get => this.parameter811.WakeUpCmd; - set => this.parameter811.WakeUpCmd = value; - } - - /// - /// - /// - public Boolean IgnoreTimeout - { - get => this.parameter811.IgnoreTimeout; - set => this.parameter811.IgnoreTimeout = value; - } - - /// - /// - /// - public Boolean DelPamSemi - { - get => this.parameter811.DelPamSemi; - set => this.parameter811.DelPamSemi = value; - } - - /// - /// - /// - public Boolean DelPamTx - { - get => this.parameter811.DelPamTx; - set => this.parameter811.DelPamTx = value; - } - - /// - /// - /// - public Boolean DelPamAdr - { - get => this.parameter811.DelPamAdr; - set => this.parameter811.DelPamAdr = value; - } - - /// - /// - /// - public Boolean DelPamAll - { - get => this.parameter811.DelPamAll; - set => this.parameter811.DelPamAll = value; - } - - protected override Byte[] ToByteArray() - { - this.message.Start = SIRTConstants.Pc2Sirt; - this.message.Cmd = SIRTConstants.WritePam; - this.message.P1 = this.parameter811; - - return this.message.ToByteArray(); - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/WriteRegRequest.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/WriteRegRequest.cs deleted file mode 100644 index 2884faef..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Requests/WriteRegRequest.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Requests -{ - using Common.Hardware.Interfaces.Ports.Sirt; - - using System; - - public class WriteRegRequest : SIRTRequest - { - public Byte WriteLength - { - get => this.message.P2; - set => this.message.P2 = value; - } - - protected override Byte[] ToByteArray() - { - this.message.Start = SIRTConstants.Pc2Sirt; - this.message.Cmd = SIRTConstants.WriteReg; - this.message.P2 = this.message.Length; - - return this.message.ToByteArray(); - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Responses/AcknOrAnswerResponse.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Responses/AcknOrAnswerResponse.cs deleted file mode 100644 index 85edc932..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Responses/AcknOrAnswerResponse.cs +++ /dev/null @@ -1,58 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Responses -{ - using Common.Hardware.Interfaces.Ports.Sirt.Parameters; - - using System; - - public class AcknOrAnswerResponse : SIRTResponse - { - private readonly P12 parameterP12; - - public AcknOrAnswerResponse(Byte[] bytes) : base(bytes) - => this.parameterP12 = this.message.P1; - - /// - /// - /// - public Boolean BufFull => this.parameterP12.BufFull; - - /// - /// - /// - public Boolean OsBusy => this.parameterP12.OsBusy; - - /// - /// - /// - public Boolean WrongCRC => this.parameterP12.WrongCRC; - - /// - /// - /// - public Boolean CmdNotExecuted => this.parameterP12.CmdNotExecuted; - - /// - /// - /// - public Boolean CmdUnknown => this.parameterP12.CmdUnknown; - - /// - /// - /// - public Boolean NoEntry => this.parameterP12.NoEntry; - - /// - /// - /// - public Boolean ByteUnknown => this.parameterP12.ByteUnknown; - - /// - /// - /// - public Boolean WildCardAddr => this.parameterP12.WildCardAddr; - - public String LastCmd => this.message.P2.ToString("X2"); - - public override Boolean IsCrcValid => base.IsCrcValid && (this.parameterP12 == 0 || this.parameterP12 == 128); - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Responses/FromAirResponse.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Responses/FromAirResponse.cs deleted file mode 100644 index f047291f..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Responses/FromAirResponse.cs +++ /dev/null @@ -1,112 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Responses -{ - using Common.Hardware.Interfaces.Ports.Sirt.Parameters; - - using System; - - public class FromAirResponse : SIRTResponse - { - private readonly P11 parameterP11; - - private UInt16 mhz; - - public FromAirResponse(Byte[] bytes) : base(bytes) - => this.parameterP11 = this.message.P1; - - /// - /// - /// - public Boolean SrcChannel => this.parameterP11.SrcChannel; - - /// - /// - /// - public Boolean BothValid => this.parameterP11.BothValid; - - /// - /// - /// - public Boolean InvalidMod1 => this.parameterP11.InvalidMod1; - - /// - /// - /// - public Boolean InvalidMod2 => this.parameterP11.InvalidMod2; - - /// - /// - /// - public Boolean LenOverflow => this.parameterP11.LenOverflow; - - /// - /// - /// - public Boolean Attention => this.parameterP11.Attention; - - /// - /// - /// - public Boolean ModeRF => this.parameterP11.ModeRF; - - /// - /// - /// - public Boolean ModeSensus => this.parameterP11.ModeSensus; - - public UInt16 MHz - { - get => this.mhz; - set - { - this.mhz = value; - this.ReceivePowerDbm = this.CalculateReceivePowerDbm(this.mhz, this.message.P2); - this.ReceivePowerPer = this.CalculateReceivePowerPer(this.mhz, this.message.P2); - } - } - - public Double ReceivePowerDbm { get; private set; } - - public Double ReceivePowerPer { get; private set; } - - private Double CalculateReceivePowerDbm(Int32 MHz, Byte rssi) - { - var value = default(Double); - - if (MHz == 433) - { - value = rssi * 0.5 - 140; - } - else if (MHz == 868) - { - value = rssi * 0.5 - 131.3; - } - - return value; - } - - private Double CalculateReceivePowerPer(Int32 MHz, Byte rssi) - { - var value = default(Double); - - if (MHz == 433) - { - value = -57.6667 + 0.7333 * rssi; - } - else if (MHz == 868) - { - value = -40.316 + 0.66 * rssi; - } - - if (value > 100) - { - value = 100; - } - else if (value < 0) - { - value = 0; - } - - return value; - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTRequest.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTRequest.cs deleted file mode 100644 index f69f0a82..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt -{ - using System; - - public abstract class SIRTRequest - { - internal readonly SIRTMessage message = new SIRTMessage(); - - public UInt32 Address - { - get => this.message.Address; - set => this.message.Address = value; - } - - public Byte[] Payload - { - get => this.message.Payload; - set => this.message.Payload = value; - } - - public override String ToString() - => BitConverter.ToString(this); - - protected abstract Byte[] ToByteArray(); - - public static implicit operator Byte[] (SIRTRequest request) - => request.ToByteArray(); - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTResponse.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTResponse.cs deleted file mode 100644 index 9f6183e9..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTResponse.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt -{ - using System; - - using Xylem.Common.Utils.Crc16Ccitt; - - public class SIRTResponse - { - internal readonly SIRTMessage message; - - public SIRTResponse(Byte[] bytes) - { - this.message = new SIRTMessage(bytes); - - var existingCRC = this.message.CRC; - var calculatedCRC = Crc16Ccitt.CalculateCRC1021LSBFirst(bytes, 1, bytes.Length - 3); - - this.IsCrcValid = existingCRC[0] == calculatedCRC[1] - && existingCRC[1] == calculatedCRC[0]; - } - - public Byte ResponseType => this.message.Cmd; - - public UInt32 Address => this.message.Address; - - public Byte[] Payload => this.message.Payload; - - public virtual Boolean IsCrcValid { get; } - - public static implicit operator Byte[] (SIRTResponse response) - => response?.message.Bytes ?? new Byte[0]; - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTTask[TRequest].cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTTask[TRequest].cs deleted file mode 100644 index 0df55bcc..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRTTask[TRequest].cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt -{ - using Common.Hardware.Interfaces.Ports.Sirt.Responses; - - using System; - - public abstract class SIRTTask : SIRTTask where TRequest : SIRTRequest, new() - { - protected readonly TRequest request; - - protected SIRTTask(UInt32 timeout) : base(timeout) - { - this.request = new TRequest(); - this.Cmd = this.request.message.Cmd; - } - - public override UInt32 Address - { - get => this.request.Address; - set => this.request.Address = value; - } - - internal override void BeginAddResponse(AcknOrAnswerResponse response) - { - this.BeginAddResponse(); - - var done = this.AcknOrAnswerReceived(response); - - this.EndAddResponse(done); - } - - internal override void BeginAddResponse(FromAirResponse response) - { - this.BeginAddResponse(); - - var done = this.FromAirReceived(response); - - this.EndAddResponse(done); - } - - protected virtual Boolean AcknOrAnswerReceived(AcknOrAnswerResponse response) => false; - - protected virtual Boolean FromAirReceived(FromAirResponse response) => false; - - protected override Byte[] GetRequestBytes() => this.request; - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtBroadcaster.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtBroadcaster.cs deleted file mode 100644 index 81a5dd56..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtBroadcaster.cs +++ /dev/null @@ -1,220 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt -{ - using Common.Hardware.Interfaces.Ports.Sirt.Responses; - using Common.Hardware.Interfaces.Ports.Sirt.Tasks; - - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - public class SIRTBroadcaster : SirtSerialPort - { - private readonly ConcurrentDictionary> tasks; - - private CancellationTokenSource cancellationTokenSource; - private CancellationToken cancellationToken; - - public SIRTBroadcaster(SerialPortSettings settings) : base(settings) - { - this.tasks = new ConcurrentDictionary>(); - - this.DataReceived += this.SirtBroadcaster_DataReceived; - } - - public event Action Activated; - public event Action EndpointAvailable; - - public String SIRTID { get; private set; } - - public UInt16 MHz { get; private set; } - - public void Add(SIRTTask task) - { - task.AddressChanged += this.MoveToNewAddress; - task.Cancelled += _task => _task.Retry(60); - task.Done += this.RemoveSucceededAndExecuteNext; - - this.tasks - .GetOrAdd(task.Address, new Queue()) - .Enqueue(task); - } - - public override void Close() - { - try - { - this.cancellationTokenSource.Cancel(); - } - catch (Exception e) - { - this.LogMessage(e.ToString()); - } - - base.Close(); - } - - public override void Open() - { - this.cancellationTokenSource = new CancellationTokenSource(); - this.cancellationToken = this.cancellationTokenSource.Token; - - base.Open(); - this.ActivateSIRT(); - this.StartTasksExecutionAsync(); - // this.StartPamPoolTrackingAsync(); - } - - private void ActivateSIRT() - { - var manuelResetEventSlim = new ManualResetEventSlim(); - var activationTask = new ActivateSIRTTask(); - activationTask.Cancelled += _ => manuelResetEventSlim.Set(); - activationTask.Done += _ => manuelResetEventSlim.Set(); - - this.Add(activationTask); - this.Write(activationTask); - manuelResetEventSlim.Wait(); - manuelResetEventSlim.Reset(); - tasks.TryRemove(activationTask.Address, out var _); - - var identificationTask = new IdentifySIRTTask(); - identificationTask.Cancelled += task => manuelResetEventSlim.Set(); - identificationTask.Done += task => manuelResetEventSlim.Set(); - identificationTask.Identified += sirtID => - { - this.SIRTID = sirtID; - - if (!String.IsNullOrWhiteSpace(this.SIRTID)) - { - this.MHz = (UInt16)(this.SIRTID[10] == '1' ? 433 : 868); - } - }; - - this.Add(identificationTask); - this.Write(identificationTask); - manuelResetEventSlim.Wait(); - manuelResetEventSlim.Reset(); - tasks.TryRemove(identificationTask.Address, out var _); - - var deleteFromPamPool = new DeleteFromPamPoolTask(0xFFFFFFFF); - deleteFromPamPool.Cancelled += x => this.RemoveCancelled(x); - deleteFromPamPool.Done += x => manuelResetEventSlim.Set(); - - this.Write(deleteFromPamPool); - this.Activated?.Invoke(this.SIRTID, this.MHz); - } - - private void SirtBroadcaster_DataReceived(Byte[] data) - { - var address = default(UInt32); - var dataType = data[1]; - - if (dataType == SIRTConstants.FromAir) - { - var response = new FromAirResponse(data); - response.MHz = this.MHz; - address = response.Address; - - if (this.tasks.TryGetValue(address, out var queue) && queue.Count > 0) - { - queue.Peek()?.BeginAddResponse(response); - } - } - else if (dataType == SIRTConstants.AcknOrAnswer) - { - var response = new AcknOrAnswerResponse(data); - address = response.Address; - - if (this.tasks.TryGetValue(address, out var queue) && queue.Count > 0) - { - queue.Peek()?.BeginAddResponse(response); - } - } - else - { - var response = new SIRTResponse(data); - address = response.Address; - } - - this.EndpointAvailable?.Invoke(address); - } - - private void StartTasksExecutionAsync() - { - Task.Factory.StartNew(state => - { - if (state is SIRTBroadcaster broadcaster) - { - var tasks = broadcaster.tasks; - - while (true) - { - foreach (var address in tasks.Keys) - { - if (tasks.TryGetValue(address, out var queue)) - { - if (queue.Count > 0) - { - var peek = queue.Peek(); - - if (peek != null && !peek.IsRunning) - { - this.Write(peek); - - peek.IsRunning = true; - } - } - } - } - } - } - }, this, this.cancellationToken); - } - - private void MoveToNewAddress(UInt32 oldAddress, UInt32 newAddress) - { - if (this.tasks.TryRemove(oldAddress, out var queue)) - { - this.tasks.GetOrAdd(newAddress, queue); - } - } - - private void RemoveSucceededAndExecuteNext(SIRTTask task) - { - if (this.tasks.TryGetValue(task.Address, out var queue)) - { - if (queue.Count > 0) - { - var peek = queue.Peek(); - - if (peek.IsDone) - { - queue.Dequeue(); - } - } - } - } - - private void RemoveCancelled(SIRTTask task) - { - if (this.tasks.TryGetValue(task.Address, out var queue)) - { - if (queue.Count > 0) - { - var peek = queue.Peek(); - var manuelResetEventSlim = new ManualResetEventSlim(); - var deleteFromPamPool = new DeleteFromPamPoolTask(task.Address); - - this.Write(deleteFromPamPool); - - if (!peek.IsCancelled) - { - task.Retry(60); - } - } - } - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtConstants.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtConstants.cs deleted file mode 100644 index b32094de..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtConstants.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt -{ - using System; - - public static class SIRTConstants - { - public const Int32 CmdIndex = 1; - public const Int32 LengthIndex = 8; - public const Int32 MinLength = 12; - - public const Byte AcknOrAnswer = 0x12; - public const Byte FromAir = 0x11; - public const Byte Pc2Sirt = 0x55; - public const Byte ReadPam = 0x82; - public const Byte ReadReg = 0x87; - public const Byte Sirt2Pc = 0xFF; - public const Byte StopByte = 0x16; - public const Byte WritePam = 0x81; - public const Byte WriteReg = 0x84; - - public const Byte Bup = 0x00; - public const Byte Lat = 0x01; - public const Byte Semi = 0x08; - public const Byte Logger = 0x09; - public const Byte Test = 0x0A; - public const Byte Debug = 0x0B; - public const Byte EncFlexNet = 0x10; - public const Byte Pam = 0x20; - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtMessage.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtMessage.cs deleted file mode 100644 index 84efb828..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtMessage.cs +++ /dev/null @@ -1,139 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt -{ - using System; - - using Xylem.Common.Utils.Crc16Ccitt; - - internal class SIRTMessage - { - private Byte[] bytes; - private Int32 bytesLength; - - public SIRTMessage() - { - this.bytes = new Byte[SIRTConstants.MinLength]; - this.bytesLength = this.bytes.Length; - } - - public SIRTMessage(Byte[] bytes) - { - this.bytes = bytes; - this.bytesLength = this.bytes.Length; - } - - public Byte Start - { - get => this.bytes[0]; - set => this.bytes[0] = value; - } - - public Byte Cmd - { - get => this.bytes[1]; - set => this.bytes[1] = value; - } - - public Byte P1 - { - get => this.bytes[2]; - set => this.bytes[2] = value; - } - - public Byte P2 - { - get => this.bytes[3]; - set => this.bytes[3] = value; - } - - public UInt32 Address - { - get - { - var address = new Byte[4]; - - Array.Copy(this.bytes, 4, address, 0, 4); - Array.Reverse(address); - - return BitConverter.ToUInt32(address, 0); - } - set - { - var address = BitConverter.GetBytes(value); - - Array.Reverse(address); - Array.Copy(address, 0, this.bytes, 4, 4); - } - } - - public Byte Length - { - get => this.bytes[8]; - set - { - this.bytes[8] = value; - var newLength = SIRTConstants.MinLength + value; - - Array.Resize(ref this.bytes, newLength); - this.bytesLength = this.bytes.Length; - } - } - - public Byte[] Payload - { - get - { - var payload = new Byte[this.Length]; - - Array.Copy(this.bytes, 9, payload, 0, this.Length); - - return payload; - } - set - { - if (value is null) - { - value = new Byte[0]; - } - - this.Length = (Byte)value.Length; - var newLength = SIRTConstants.MinLength + this.Length; - - Array.Resize(ref this.bytes, newLength); - Array.Copy(value, 0, this.bytes, 9, this.Length); - - this.bytesLength = this.bytes.Length; - } - } - - internal Byte[] CRC => new Byte[] - { - this.bytes[this.bytesLength - 3], - this.bytes[this.bytesLength - 2] - }; - - internal Byte[] Bytes => this.bytes; - - public override String ToString() - => BitConverter.ToString(this.ToByteArray()); - - internal Byte[] ToByteArray() - { - var crc = Crc16Ccitt.CalculateCRC1021LSBFirst(this.bytes, 1, this.bytes.Length - 3); - - this.bytes[this.bytesLength - 3] = crc[1]; - this.bytes[this.bytesLength - 2] = crc[0]; - this.bytes[this.bytesLength - 1] = SIRTConstants.StopByte; - - return this.bytes; - } - - public static implicit operator SIRTMessage(Byte[] bytes) - => new SIRTMessage(bytes); - - public static implicit operator Byte[](SIRTMessage message) - => message.ToByteArray(); - - public static implicit operator String (SIRTMessage message) - => message.ToString(); - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs deleted file mode 100644 index ef5eb16e..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs +++ /dev/null @@ -1,97 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt -{ - using Common.Hardware.Interfaces.Ports.Sirt.Requests; - using Common.Hardware.Interfaces.Ports.Sirt.Responses; - - using System; - - public abstract class SIRTTask - { - protected const UInt32 TIMEOUT_SECONDS = 15; - - protected readonly UInt32 timeout; - protected readonly DateTime created; - protected readonly ReadRegRequest readRegRequest; - protected readonly ReadPamRequest readPamRequest; - protected readonly WriteRegRequest writeRegRequest; - - protected SIRTTask(UInt32 timeout) - { - this.timeout = timeout; - this.created = DateTime.Now; - this.Timestamp = DateTime.MinValue; - } - - public event Action Done; - public event Action Cancelled; - public event Action AddressChanged; - public event Action TRXLogging; - - public virtual UInt32 Address { get; set; } - - public Boolean IsRunning { get; internal set; } - - public Byte Cmd { get; protected set; } - - public DateTime Timestamp { get; protected set; } - - public Boolean IsDone { get; protected set; } - - public Boolean IsCancelled { get; protected set; } - - internal abstract void BeginAddResponse(AcknOrAnswerResponse response); - - internal abstract void BeginAddResponse(FromAirResponse response); - - internal void Retry(Double seconds) - { - if (this.IsDone || (DateTime.Now - this.created).TotalSeconds > seconds) - { - this.IsCancelled = true; - } - else - { - this.IsCancelled = false; - this.IsRunning = false; - } - } - - protected void BeginAddResponse() - { - if (this.Timestamp == DateTime.MinValue) - { - this.Timestamp = DateTime.Now; - } - } - - protected void EndAddResponse(Boolean done) - { - if (done) - { - this.NotifyDone(); - } - else if ((DateTime.Now - this.Timestamp).TotalSeconds > this.timeout) - { - this.NotifyCancelled(); - } - } - - protected abstract Byte[] GetRequestBytes(); - - protected void NotifyAddressChanged(UInt32 oldAddress, UInt32 newAddress) - => this.AddressChanged?.Invoke(oldAddress, newAddress); - - protected void NotifyCancelled() => this.Cancelled?.Invoke(this); - - protected void NotifyDone() - { - this.IsDone = true; - - this.Done?.Invoke(this); - } - - protected void NotifyTRX(Byte[] bytes) => this.TRXLogging?.Invoke(bytes); - - public static implicit operator Byte[] (SIRTTask task) => task.GetRequestBytes(); - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/ActivateSIRTTask.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/ActivateSIRTTask.cs deleted file mode 100644 index 90e854ed..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/ActivateSIRTTask.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Tasks -{ - using Common.Hardware.Interfaces.Ports.Sirt.Parameters; - using Common.Hardware.Interfaces.Ports.Sirt.Requests; - using Common.Hardware.Interfaces.Ports.Sirt.Responses; - - using System; - - internal class ActivateSIRTTask : SIRTTask - { - private UInt32 address; - - public ActivateSIRTTask() : base(TIMEOUT_SECONDS) - { - this.request.Address = 0x20000000; - this.address = this.request.Address; - this.request.Payload = new Byte[] - { - new SirtOperating { /* standard */ }, - new BluetoothOperating { BtOff = true }, - new RFModuleOperating { RfOff = true }, - new RFModuleOperating { OpMode = OperatingModes.ReceiveF1TransmitSensusRFF3 }, - new PamTimeout { Minutes = 1 } - }; - } - - public override UInt32 Address - { - get => this.address; - set => this.address = value; - } - - protected override Boolean AcknOrAnswerReceived(AcknOrAnswerResponse response) => response.IsCrcValid; - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/DeleteFromPamPoolTask.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/DeleteFromPamPoolTask.cs deleted file mode 100644 index ecaacb53..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/DeleteFromPamPoolTask.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Tasks -{ - using System; - - using Common.Hardware.Interfaces.Ports.Sirt.Responses; - - public class DeleteFromPamPoolTask : WritePamTask - { - public DeleteFromPamPoolTask(UInt32 address) - { - this.Address = address; - this.request.DelPamAdr = true; - } - - protected override Boolean AcknOrAnswerReceived(AcknOrAnswerResponse response) => true; - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/IdentifySIRTTask.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/IdentifySIRTTask.cs deleted file mode 100644 index 21cf0319..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/IdentifySIRTTask.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Tasks -{ - using Common.Hardware.Interfaces.Ports.Sirt.Requests; - using Common.Hardware.Interfaces.Ports.Sirt.Responses; - - using System; - - internal class IdentifySIRTTask : SIRTTask - { - private UInt32 address; - - public IdentifySIRTTask() : base(TIMEOUT_SECONDS) - { - this.request.Address = 0x11001820; - this.address = this.request.Address; - this.request.ReadLength = 8; - } - - public event Action Identified; - - public override UInt32 Address - { - get => this.address; - set => this.address = value; - } - - protected override Boolean AcknOrAnswerReceived(AcknOrAnswerResponse response) - { - if (!response.IsCrcValid) - { - this.NotifyCancelled(); - - return false; - } - - var payload = response.Payload; - var identified = payload.Length > 0; - - if (identified && this.Identified != null) - { - var sirtID = BitConverter.ToString(payload); - - this.Identified.Invoke(sirtID); - } - - return identified; - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/ReadPamPoolTask.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/ReadPamPoolTask.cs deleted file mode 100644 index d4c24c25..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/ReadPamPoolTask.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt.Tasks -{ - using Common.Hardware.Interfaces.Ports.Sirt.Requests; - using Common.Hardware.Interfaces.Ports.Sirt.Responses; - - using System; - - internal class ReadPamPoolTask : SIRTTask - { - private UInt32 address; - - public ReadPamPoolTask() : base(TIMEOUT_SECONDS) - { - this.request.Address = 0xFFFFFFFF; - this.address = this.request.Address; - } - - public event Action AddressesParsed; - - public override UInt32 Address - { - get => this.address; - set => this.address = value; - } - - protected override Boolean AcknOrAnswerReceived(AcknOrAnswerResponse response) - { - if (!response.IsCrcValid) - { - this.NotifyCancelled(); - - return false; - } - - var payload = response.Payload; - var length = payload.Length; - var parsed = false; - - if (length == 20) - { - var bytes = new Byte[4]; - var addresses = new UInt32[5]; - - for (var i = 0; i < length; i += 4) - { - Array.Clear(bytes, 0, 4); - Array.Copy(payload, i, bytes, 0, 4); - Array.Reverse(bytes); - - var address = BitConverter.ToUInt32(bytes, 0); - - if (address == UInt32.MaxValue) - { - address = 0; - } - - addresses[i / 4] = address; - } - - this.AddressesParsed?.Invoke(addresses); - - parsed = true; - } - - return parsed; - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/WritePamTask.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/WritePamTask.cs deleted file mode 100644 index 2fce37d7..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Tasks/WritePamTask.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.Sirt -{ - using Common.Hardware.Interfaces.Ports.Sirt.Requests; - - using System; - - public class WritePamTask : SIRTTask - { - public WritePamTask() : base(TIMEOUT_SECONDS) - { - - } - - public WritePamTask(UInt32 timeout) : base(timeout) - { - - } - - public override UInt32 Address - { - get => this.request.Address; - set => this.request.Address = value; - } - - - public Boolean WakeUpModul - { - get => this.request.WakeUpModul; - set => this.request.WakeUpModul = value; - } - - public Boolean WakeUpCmd - { - get => this.request.WakeUpCmd; - set => this.request.WakeUpCmd = value; - } - - public Boolean IgnoreTimeout - { - get => this.request.IgnoreTimeout; - set => this.request.IgnoreTimeout = value; - } - - public Boolean DelPamSemi - { - get => this.request.DelPamSemi; - set => this.request.DelPamSemi = value; - } - - public Boolean DelPamTx - { - get => this.request.DelPamTx; - set => this.request.DelPamTx = value; - } - - public Boolean DelPamAdr - { - get => this.request.DelPamAdr; - set => this.request.DelPamAdr = value; - } - - public Boolean DelPamAll - { - get => this.request.DelPamAll; - set => this.request.DelPamAll = value; - } - - public Byte[] Payload - { - get => this.request.Payload; - set => this.request.Payload = value; - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Common.Hardware.Interfaces.Ports.SirtBroadcaster.csproj b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Common.Hardware.Interfaces.Ports.SirtBroadcaster.csproj index 27f8de1f..7b4751f1 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Common.Hardware.Interfaces.Ports.SirtBroadcaster.csproj +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Common.Hardware.Interfaces.Ports.SirtBroadcaster.csproj @@ -51,7 +51,6 @@ - diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/BluetoothOperating.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/BluetoothOperating.cs index b06d1b6e..8310c1e1 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/BluetoothOperating.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/BluetoothOperating.cs @@ -1,5 +1,7 @@ namespace Common.Hardware.Interfaces.Ports.SirtBroadcaster.Parameters { + using Common.Utils.Extensions; + using System; public class BluetoothOperating @@ -55,7 +57,7 @@ } public static implicit operator Byte(BluetoothOperating param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator BluetoothOperating(Byte _byte) => new BluetoothOperating(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/ByteExtensions.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/ByteExtensions.cs deleted file mode 100644 index 1eea4a9b..00000000 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/ByteExtensions.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace Common.Hardware.Interfaces.Ports.SirtBroadcaster.Parameters -{ - using System; - - public static class ByteExtensions - { - public static Byte[] GetBits(this Byte @byte) - { - var bits = new Byte[8]; - - for (int i = 0; i < 8; i++) - { - bits[i] = (Byte)((@byte >> i) & 1); - } - - return bits; - } - - public static Byte GetByte(this Byte[] bits) - { - var @byte = default(int); - - for (int i = 0; i < 8; i++) - { - @byte |= bits[i] << i; - } - - return (Byte)@byte; - } - } -} diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P11.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P11.cs index 6d6f1b1b..cbefaaef 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P11.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P11.cs @@ -1,5 +1,7 @@ namespace Common.Hardware.Interfaces.Ports.SirtBroadcaster.Parameters { + using Common.Utils.Extensions; + using System; /// @@ -170,7 +172,7 @@ } public static implicit operator Byte(P11 param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator P11(Byte _byte) => new P11(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P12.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P12.cs index 6e435376..d4e11a98 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P12.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P12.cs @@ -1,5 +1,7 @@ namespace Common.Hardware.Interfaces.Ports.SirtBroadcaster.Parameters { + using Common.Utils.Extensions; + using System; /// @@ -162,7 +164,7 @@ } public static implicit operator Byte(P12 param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator P12(Byte _byte) => new P12(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P811.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P811.cs index bafefbac..6a5fddc9 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P811.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/P811.cs @@ -1,5 +1,7 @@ namespace Common.Hardware.Interfaces.Ports.SirtBroadcaster.Parameters { + using Common.Utils.Extensions; + using System; /// @@ -233,7 +235,7 @@ } public static implicit operator Byte(P811 param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator P811(Byte _byte) => new P811(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/RFModuleOperating.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/RFModuleOperating.cs index 37c5fe33..d44e4d20 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/RFModuleOperating.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/RFModuleOperating.cs @@ -1,5 +1,7 @@ namespace Common.Hardware.Interfaces.Ports.SirtBroadcaster.Parameters { + using Common.Utils.Extensions; + using System; public class RFModuleOperating @@ -21,7 +23,7 @@ Array.Copy(this.bits, 0, bits, 0, 4); - return (OperatingModes)bits.GetByte(); + return (OperatingModes)bits.ToByte(); } set { @@ -68,7 +70,7 @@ } public static implicit operator Byte(RFModuleOperating param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator RFModuleOperating(Byte _byte) => new RFModuleOperating(_byte.GetBits()); diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/SirtOperating.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/SirtOperating.cs index 93446ba5..02ec7b79 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/SirtOperating.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SirtBroadcaster/Parameters/SirtOperating.cs @@ -1,5 +1,7 @@ namespace Common.Hardware.Interfaces.Ports.SirtBroadcaster.Parameters { + using Common.Utils.Extensions; + using System; public class SirtOperating @@ -128,7 +130,7 @@ } public static implicit operator Byte(SirtOperating param) - => param.bits.GetByte(); + => param.bits.ToByte(); public static implicit operator SirtOperating(Byte _byte) => new SirtOperating(_byte.GetBits()); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ActivateMetrologyTestMode.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ActivateMetrologyTestMode.cs new file mode 100644 index 00000000..ac17c3ed --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ActivateMetrologyTestMode.cs @@ -0,0 +1,19 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using Common.Utils.Extensions; + + using System; + + public class ActivateMetrologyTestMode : Pam + { + public ActivateMetrologyTestMode() : base(3, ActivateMetrologyTestMode) + { + } + + public UInt16 Mode + { + get => this.bytes.ToUInt16BE(1); + set => value.GetBytesBE().CopyTo(this.bytes, 1); + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ActivationByFlow.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ActivationByFlow.cs deleted file mode 100644 index 15185832..00000000 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ActivationByFlow.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Common.Hardware.WaterMeter.eRegister.Features -{ - using System; - - public class ActivationByFlow : DebugCmd - { - public ActivationByFlow() : base(ActivationByFlow) - { - } - - public Byte RotationsX10 - { - get => this.bytes[0]; - set => this.bytes[0] = value; - } - } -} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmsMask.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmsMask.cs index fa00176a..a8dcf92e 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmsMask.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AlarmsMask.cs @@ -6,7 +6,7 @@ public class AlarmsMask : Pam { - private readonly Byte[] bits; + protected readonly Byte[] bits; protected AlarmsMask(Int32 length, Byte cmd) : base(length, cmd) => this.bits = new Byte[8]; @@ -32,7 +32,7 @@ set => this.bits[2] = (Byte)(value ? 1 : 0); } - public Boolean Byckflow + public Boolean Backflow { get => this.bits[3] == 1; set => this.bits[3] = (Byte)(value ? 1 : 0); @@ -62,7 +62,7 @@ set => this.bits[7] = (Byte)(value ? 1 : 0); } - protected override Byte[] ToByteArray() + public override Byte[] ToByteArray() { this.bytes[1] = this.bits.ToByte(); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AuthLevel.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AuthLevel.cs index fe744517..d1f47486 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AuthLevel.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/AuthLevel.cs @@ -5,8 +5,8 @@ public enum AuthLevel : UInt64 { O = 0x00_00_00_00_00_00_00_00, - I = 0x00_00_00_0D_68_30_14_01, - II = 0x00_00_00_40_80_0E_14_02, - III = 0x00_00_00_22_73_93_63_03, + I = 0x01_00_00_0D_68_30_14_01, + II = 0x02_00_00_40_80_0E_14_02, + III = 0x03_00_00_22_73_93_63_03, } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReading.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReadingSettings.cs similarity index 77% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReading.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReadingSettings.cs index b168b409..7e76ca2f 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReading.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeFixedDateReadingSettings.cs @@ -2,9 +2,9 @@ { using System; - public class ChangeFixedDateReading : Pam + public class ChangeFixedDateReadingSettings : Pam { - public ChangeFixedDateReading() : base(4, ChangeFixedDateReading) + public ChangeFixedDateReadingSettings() : base(4, ChangeFixedDateReadingSettings) { } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterReading.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterReading.cs index 9137052a..185beac9 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterReading.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeMeterReading.cs @@ -11,9 +11,9 @@ } public ChangeMeterReading(UInt32 value) : this() - => this.Value = value; + => this.DisplayVolume = value; - public UInt32 Value + public UInt32 DisplayVolume { get => this.bytes.ToUInt32BigEndian(1); set => value.ToBigEndianBytes().CopyTo(this.bytes, 1); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeNumberOfDeals.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeNumberOfDeals.cs index 814207cd..6f483c86 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeNumberOfDeals.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeNumberOfDeals.cs @@ -4,7 +4,6 @@ public partial class ChangeNumberOfDeals : Pam { - public ChangeNumberOfDeals() : base(2, ChangeNimberOfDeals) { } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangePin.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangePin.cs new file mode 100644 index 00000000..e5498922 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangePin.cs @@ -0,0 +1,29 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class ChangePin : Pam + { + public ChangePin() : base(6, ChangePin) + { + } + + public AuthLevel AuthLevel + { + get + { + var bytes = new Byte[8]; + + Array.Copy(this.bytes, 1, bytes, 0, 5); + + return (AuthLevel)BitConverter.ToUInt64(bytes, 0); + } + set + { + var bytes = BitConverter.GetBytes((UInt64)value); + + Array.Copy(bytes, 0, this.bytes, 1, 5); + } + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs index 8b6c19e7..0dbeeb1d 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs @@ -1,10 +1,41 @@ namespace Common.Hardware.WaterMeter.eRegister.Features { + using Common.Utils.Extensions; + using System; public class ChangeSensusRFEncryptionKey : Pam { - public ChangeSensusRFEncryptionKey(Byte[] encryptionKey) : base(17, ChangeSensusRFEncryptionKey) + public ChangeSensusRFEncryptionKey() : base(17, ChangeSensusRFEncryptionKey) + { + } + + public ChangeSensusRFEncryptionKey(Byte[] encryptionKey) : this() => encryptionKey.CopyTo(this.bytes, 1); + + public Byte[] Key + { + get + { + var key = new Byte[16]; + + Array.Copy(this.bytes, 1, key, 0, 16); + + return key; + } + set + { + if (value?.Length == 16) + { + value.CopyTo(this.bytes, 1); + } + } + } + + public String HexKey + { + get => BitConverter.ToString(this.Key).Replace("-", String.Empty); + set => this.Key = value.ToBytes(); + } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/State.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeState.cs similarity index 81% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/State.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeState.cs index f66fbdb3..bb364b69 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/State.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeState.cs @@ -2,7 +2,7 @@ { using System; - public class State : DebugCmd + public class ChangeState : DebugCmd { public enum Modes : Byte { @@ -10,7 +10,7 @@ Shipment = 1, } - public State() : base(State) + public ChangeState() : base(State) { } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeTransmission.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeTransmission.cs deleted file mode 100644 index c951eeba..00000000 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeTransmission.cs +++ /dev/null @@ -1,70 +0,0 @@ -namespace Common.Hardware.WaterMeter.eRegister.Features -{ - using System; - - public class ChangeTransmission : Pam - { - private Byte oldn; - private Byte newn; - private Byte oldt; - private Byte newt; - - protected ChangeTransmission(Int32 length, Byte cmd) : base(length, cmd) - { - } - - public ChangeTransmission() : base(3, ChangeTransmitionInterval) - { - } - - public Byte LatWindowIntervalCount - { - get => this.bytes[1]; - set - { - this.oldn = this.newn; - this.newn = value; - - if (this.IsValid) - { - this.bytes[2] = this.newn; - } - else - { - this.newn = this.oldn; - this.oldn = this.bytes[2]; - } - } - } - - public Byte LatTXIntervalSeconds - { - get => this.bytes[2]; - set - { - this.oldt = this.newt; - this.newt = value; - - if (this.IsValid) - { - this.bytes[2] = this.newt; - } - else - { - this.newt = this.oldt; - this.oldt = this.bytes[2]; - } - } - } - - protected Boolean IsValid - { - get - { - var x = this.newt * (this.newn + 1); - - return 0 < x && x <= 3600; - } - } - } -} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj index 611efe47..c7efe4fa 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj @@ -41,63 +41,82 @@ - + + - + + - + + + + + - + - + + + + + + + + + + + - - - + + + - + + + + - + - - + + diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/CustomerDebug.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/CustomerDebug.cs index c8064b76..1830a10a 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/CustomerDebug.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/CustomerDebug.cs @@ -2,7 +2,7 @@ { public class CustomerDebug : Pam { - public CustomerDebug() : base(3, RequestCustomerDebug) + public CustomerDebug() : base(3, GetCustomerDebug) { } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateTransmitter.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateTransmitter.cs new file mode 100644 index 00000000..99e9395b --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateTransmitter.cs @@ -0,0 +1,15 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class DeactivateTransmitter : SingleBytePam + { + public DeactivateTransmitter() : base(DeactivateTransmitter) + { + } + + public DeactivateTransmitter(Byte value) : base(value, DeactivateTransmitter) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DebugCmd.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DebugCmd.cs index 93de7b62..0419fe84 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DebugCmd.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DebugCmd.cs @@ -9,6 +9,11 @@ public static implicit operator Byte[] (DebugCmd cmd) => cmd.bytes; + /// + /// No action accept sending Debug Telegram + /// + protected const Byte RequestDebugTelegram = 0; + /// /// Change from Production Mode to Shipment Mode. 1 = Shipment /// @@ -25,22 +30,53 @@ /// protected const Byte DisableCredits = 4; + /// + /// Toggles routing received packets out the serial port + /// + protected const Byte SerialOutput = 5; + /// /// Bit field following the Alarm Byte definition. 1 indicates setting the alarm. /// Only currently enabled Alarms can be set. /// internal const Byte SetAlarms = 6; + /// + /// Turns on the indicated Specific Error Flag + /// + protected const Byte SetSpecificError = 7; + /// /// Number of minutes to send LED data 0 will shut down the optical data. /// internal const Byte OpticalTelegram = 8; + /// + /// Restores most NV to default except radio ID, PCB ID, calibrations and metrology data Beta FW only + /// + protected const Byte FactoryComplete = 9; + /// /// Restores counter settings controlled changed by the Deactivate Counter command. /// internal const Byte EnableCredits = 10; + /// + /// Used to offset the present battery consumption level to allow simulation of Low Battery, + /// Very Low Battery and End of Life testing.Not intended to be used except in a test environment. + /// + protected const Byte SetBatteryUsageTestOffset = 11; + + /// + /// Used for testing OTA software updates. Not intended to be used except in a test environment. + /// + protected const Byte SetTestFastActivityBupTiming = 12; + + /// + /// Used to change the number of activity credits allowed in a 24 hour period for each mode of operation. + /// + protected const Byte SetActivityCreditLimits = 13; + /// /// 0 – Set to Default Rotations value of 8 (8*10) Rotations /// 1 - 255 Increments of 10 * setting which translates to(10 to 2550) Rotations. diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTA.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTA.cs deleted file mode 100644 index a5753f28..00000000 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTA.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Common.Hardware.WaterMeter.eRegister.Features -{ - using System; - - public class DisableOTA : DebugCmd - { - public DisableOTA(Byte parameter) : base(DisableOTA) - => this.bytes[1] = parameter; - } -} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTAFirmwareUpdate.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTAFirmwareUpdate.cs new file mode 100644 index 00000000..523b9a49 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DisableOTAFirmwareUpdate.cs @@ -0,0 +1,20 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class DisableOTAFirmwareUpdate : DebugCmd + { + public DisableOTAFirmwareUpdate() : base(DisableOTA) + { + } + + public DisableOTAFirmwareUpdate(Byte parameter) : this() + => this.bytes[1] = parameter; + + public OTAMode Mode + { + get => (OTAMode)this.bytes[1]; + set => this.bytes[1] = (Byte)value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/FactoryComplete.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/FactoryComplete.cs new file mode 100644 index 00000000..58499c04 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/FactoryComplete.cs @@ -0,0 +1,9 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + public class FactoryComplete : DebugCmd + { + public FactoryComplete() : base(FactoryComplete) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/GetCustomerDebug.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/GetCustomerDebug.cs new file mode 100644 index 00000000..e17ce560 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/GetCustomerDebug.cs @@ -0,0 +1,9 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + public class GetCustomerDebug : Pam + { + public GetCustomerDebug() : base(3, GetCustomerDebug) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/GetDebug.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/GetDebug.cs deleted file mode 100644 index e8be8340..00000000 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/GetDebug.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Common.Hardware.WaterMeter.eRegister.Features -{ - using System; - - public class GetDebug : Pam - { - public GetDebug() : base(3, GetDebug) - { - } - - public DebugCmd Cmd { get; set; } - - protected override Byte[] ToByteArray() - { - Array.Copy(this.Cmd, 0, this.bytes, 1, 2); - - return base.ToByteArray(); - } - } -} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OTAFWUpdate.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OTAFWUpdate.cs deleted file mode 100644 index 5a557044..00000000 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OTAFWUpdate.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Common.Hardware.WaterMeter.eRegister.Features -{ - using System; - - public class OTAFWUpdate : DebugCmd - { - protected OTAFWUpdate() : base(OTAFWUpdate) - { - } - - public Boolean Enabled - { - get => this.bytes[0] == 2; - set => this.bytes[0] = (Byte)(value ? 2 : 1); - } - } -} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OTAMode.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OTAMode.cs new file mode 100644 index 00000000..8c674cb5 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OTAMode.cs @@ -0,0 +1,10 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public enum OTAMode : Byte + { + DisableFWUpdate = 1, + EnableFWUpdate = 2, + } +} \ No newline at end of file diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetOpenMeteringTransmitionIntervalWMBus.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OpenMeteringTransmitionIntervalWMBus.cs similarity index 59% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetOpenMeteringTransmitionIntervalWMBus.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OpenMeteringTransmitionIntervalWMBus.cs index 7734a7b2..9079b0f5 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetOpenMeteringTransmitionIntervalWMBus.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OpenMeteringTransmitionIntervalWMBus.cs @@ -4,13 +4,13 @@ using System; - public class SetOpenMeteringTransmitionIntervalWMBus : Pam + public class OpenMeteringTransmitionIntervalWMBus : Pam { - public SetOpenMeteringTransmitionIntervalWMBus() : base(3, WMBusTransmisionInterval) + public OpenMeteringTransmitionIntervalWMBus() : base(3, WMBusTransmisionInterval) { } - public SetOpenMeteringTransmitionIntervalWMBus(UInt16 seconds) : this() + public OpenMeteringTransmitionIntervalWMBus(UInt16 seconds) : this() => this.Seconds = seconds; public UInt16 Seconds diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Pam.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Pam.cs index ac1f63eb..e6f0cde0 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Pam.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Pam.cs @@ -25,7 +25,7 @@ return this; } - protected virtual Byte[] ToByteArray() + public virtual Byte[] ToByteArray() => this.bytes; public static implicit operator Byte[] (Pam pam) @@ -104,7 +104,7 @@ /// /// 19 Send Bubble Up Burst 2 yes 3 /// - public const Byte SendBUPBurst = 19; + public const Byte SendBubbleUpBurst = 19; /// /// 20 Set frequency offset 2 yes 3 @@ -114,12 +114,12 @@ /// /// 21 Activate Metrology Test Mode 2 no 1 /// - public const Byte ActivateTestMode = 21; + public const Byte ActivateMetrologyTestMode = 21; /// /// 22 Set Reboot Count 2 no? (Production Mode) 3 /// - public const Byte RebootsCounter = 22; + public const Byte SetRebootCount = 22; /// /// 31 Get debug 2 yes 3 @@ -129,12 +129,12 @@ /// /// 32 Change Fixed Date Reading Settings 3 no 0 /// - public const Byte ChangeFixedDateReading = 32; + public const Byte ChangeFixedDateReadingSettings = 32; /// /// 33 Get Customer Debug 2 yes 2 /// - public const Byte RequestCustomerDebug = 33; + public const Byte GetCustomerDebug = 33; /// /// 48 Change Meter Reading 4 no(Production Mode) 3 @@ -149,7 +149,7 @@ /// /// 50 Set date and time 4 no 1 /// - public const Byte SetDatetime = 50; + public const Byte SetDateAndTime = 50; /// /// 51 Change settings for data logger 4 no 0 @@ -204,12 +204,12 @@ /// /// 72 Send Sequence of Test-Telegrams 7 yes 3 /// - public const Byte SendTestTelegrams = 72; + public const Byte SendSequenceOfTestTelegrams = 72; /// /// 73 Receive Sequence of Test-Telegrams 7 yes 3 /// - public const Byte ReceiveTestTelegrams = 73; + public const Byte ReceiveSequenceOfTestTelegrams = 73; /// /// 80 Change Customer Text 9 no 2 @@ -244,6 +244,6 @@ /// /// 148 Set Variable PCB ID variable no 3 /// - public const Byte VariablePCB = 148; + public const Byte SetVariablePcbId = 148; } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Ping.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Ping.cs new file mode 100644 index 00000000..602dc921 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Ping.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + public class Ping : Pam + { + public Ping() : base(1 /* TODO: TBD */, Ping) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ReceiveSequenceOfTestTelegrams.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ReceiveSequenceOfTestTelegrams.cs new file mode 100644 index 00000000..4199bdb5 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ReceiveSequenceOfTestTelegrams.cs @@ -0,0 +1,54 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + // TODO: parameters - TBD + public class ReceiveSequenceOfTestTelegrams : Pam + { + public ReceiveSequenceOfTestTelegrams() : base(8, ReceiveSequenceOfTestTelegrams) + { + } + + public Byte Parameter1 + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + + public Byte Parameter2 + { + get => this.bytes[2]; + set => this.bytes[2] = value; + } + + public Byte Parameter3 + { + get => this.bytes[3]; + set => this.bytes[3] = value; + } + + public Byte Parameter4 + { + get => this.bytes[4]; + set => this.bytes[4] = value; + } + + public Byte Parameter5 + { + get => this.bytes[5]; + set => this.bytes[5] = value; + } + + public Byte Parameter6 + { + get => this.bytes[6]; + set => this.bytes[6] = value; + } + + public Byte Parameter7 + { + get => this.bytes[7]; + set => this.bytes[7] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestDebugTelegram.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestDebugTelegram.cs new file mode 100644 index 00000000..d35902b7 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestDebugTelegram.cs @@ -0,0 +1,9 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + public class RequestDebugTelegram : DebugCmd + { + public RequestDebugTelegram() : base(RequestDebugTelegram) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestFixedDateReading.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestFixedDateReading.cs new file mode 100644 index 00000000..c682c735 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestFixedDateReading.cs @@ -0,0 +1,42 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + // TODO: parameters - TBD + public class RequestFixedDateReading : Pam + { + public RequestFixedDateReading() : base(6, RequestFixedDateReading) + { + } + + public Byte Parameter1 + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + + public Byte Parameter2 + { + get => this.bytes[2]; + set => this.bytes[2] = value; + } + + public Byte Parameter3 + { + get => this.bytes[3]; + set => this.bytes[3] = value; + } + + public Byte Parameter4 + { + get => this.bytes[4]; + set => this.bytes[4] = value; + } + + public Byte Parameter5 + { + get => this.bytes[5]; + set => this.bytes[5] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestLoggingData.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestLoggingData.cs new file mode 100644 index 00000000..59c07ff3 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestLoggingData.cs @@ -0,0 +1,42 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + // TODO: parameters - TBD + public class RequestLoggingData : Pam + { + public RequestLoggingData() : base(6, RequestLoggingData) + { + } + + public Byte Parameter1 + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + + public Byte Parameter2 + { + get => this.bytes[2]; + set => this.bytes[2] = value; + } + + public Byte Parameter3 + { + get => this.bytes[3]; + set => this.bytes[3] = value; + } + + public Byte Parameter4 + { + get => this.bytes[4]; + set => this.bytes[4] = value; + } + + public Byte Parameter5 + { + get => this.bytes[5]; + set => this.bytes[5] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestMemoryDump.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestMemoryDump.cs new file mode 100644 index 00000000..f18292ac --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RequestMemoryDump.cs @@ -0,0 +1,47 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class RequestMemoryDump : Pam + { + public RequestMemoryDump() : base(7, MemoryDump) + { + } + + public Byte Parameter1 + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + + public Byte Parameter2 + { + get => this.bytes[2]; + set => this.bytes[2] = value; + } + + public Byte Parameter3 + { + get => this.bytes[3]; + set => this.bytes[3] = value; + } + + public Byte Parameter4 + { + get => this.bytes[4]; + set => this.bytes[4] = value; + } + + public Byte Parameter5 + { + get => this.bytes[5]; + set => this.bytes[5] = value; + } + + public Byte Parameter6 + { + get => this.bytes[6]; + set => this.bytes[6] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendBubbleUpBurst.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendBubbleUpBurst.cs new file mode 100644 index 00000000..0ac96218 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendBubbleUpBurst.cs @@ -0,0 +1,19 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using Common.Utils.Extensions; + + using System; + + public class SendBubbleUpBurst : Pam + { + public SendBubbleUpBurst() : base(3, SendBubbleUpBurst) + { + } + + public UInt16 Value + { + get => this.bytes.ToUInt16BE(1); + set => value.GetBytesBE().CopyTo(this.bytes, 1); + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendSequenceOfTestTelegrams.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendSequenceOfTestTelegrams.cs new file mode 100644 index 00000000..a26cf4c7 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendSequenceOfTestTelegrams.cs @@ -0,0 +1,54 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + // TODO: parameters - TBD + public class SendSequenceOfTestTelegrams : Pam + { + public SendSequenceOfTestTelegrams() : base(8, SendSequenceOfTestTelegrams) + { + } + + public Byte Parameter1 + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + + public Byte Parameter2 + { + get => this.bytes[2]; + set => this.bytes[2] = value; + } + + public Byte Parameter3 + { + get => this.bytes[3]; + set => this.bytes[3] = value; + } + + public Byte Parameter4 + { + get => this.bytes[4]; + set => this.bytes[4] = value; + } + + public Byte Parameter5 + { + get => this.bytes[5]; + set => this.bytes[5] = value; + } + + public Byte Parameter6 + { + get => this.bytes[6]; + set => this.bytes[6] = value; + } + + public Byte Parameter7 + { + get => this.bytes[7]; + set => this.bytes[7] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendTestPattern.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendTestPattern.cs new file mode 100644 index 00000000..3e14b351 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SendTestPattern.cs @@ -0,0 +1,48 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + // TODO: parameters - TBD + public class SendTestPattern : Pam + { + public SendTestPattern() : base(6, SendTestPattern) + { + } + + public Byte Parameter1 + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + + public Byte Parameter2 + { + get => this.bytes[2]; + set => this.bytes[2] = value; + } + + public Byte Parameter3 + { + get => this.bytes[3]; + set => this.bytes[3] = value; + } + + public Byte Parameter4 + { + get => this.bytes[4]; + set => this.bytes[4] = value; + } + + public Byte Parameter5 + { + get => this.bytes[5]; + set => this.bytes[5] = value; + } + + public Byte Parameter6 + { + get => this.bytes[6]; + set => this.bytes[6] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SerialOutput.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SerialOutput.cs new file mode 100644 index 00000000..cb250e58 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SerialOutput.cs @@ -0,0 +1,9 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + public class SerialOutput : DebugCmd + { + public SerialOutput() : base(SerialOutput) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivationByThreshold.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivationByThreshold.cs index 05d03a86..cba6d288 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivationByThreshold.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivationByThreshold.cs @@ -4,7 +4,17 @@ public class SetActivationByThreshold : DebugCmd { - public SetActivationByThreshold(Byte parameter) : base(SetActivationByThreshold) + public SetActivationByThreshold() : base(SetActivationByThreshold) + { + } + + public SetActivationByThreshold(Byte parameter) : this() => this.bytes[1] = parameter; + + public Byte Rotations + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivityCreditLimits.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivityCreditLimits.cs new file mode 100644 index 00000000..10febabb --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetActivityCreditLimits.cs @@ -0,0 +1,22 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class SetActivityCreditLimits : DebugCmd + { + public SetActivityCreditLimits() : base(SetActivityCreditLimits) + { + } + + /// + /// Bit Field + /// Bits 6 - 7 -> Mode, 00 TFX, 01 Idle, 10 Sensus RF + /// Bits 0 - 5 – Number of Activity Credits (X+1)*100. Value of 63 sets limit to 10000 + /// + public Byte Mask + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetAlarms.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetAlarms.cs index 2e50908c..6c01bdc4 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetAlarms.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetAlarms.cs @@ -1,9 +1,17 @@ namespace Common.Hardware.WaterMeter.eRegister.Features { + using Common.Utils.Extensions; + public class SetAlarms : AlarmsMask { - public SetAlarms() : base(2, DebugCmd.SetAlarms) + public SetAlarms() : base(3, GetDebug) + => this.bytes[2] = DebugCmd.SetAlarms; + + public override System.Byte[] ToByteArray() { + this.bytes[1] = this.bits.ToByte(); + + return base.ToByteArray(); } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetBatteryUsageTestOffset.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetBatteryUsageTestOffset.cs new file mode 100644 index 00000000..5dbe2a75 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetBatteryUsageTestOffset.cs @@ -0,0 +1,23 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class SetBatteryUsageTestOffset : DebugCmd + { + public SetBatteryUsageTestOffset() : base(SetBatteryUsageTestOffset) + { + } + + /// + /// 0 Remove Battery Usage offset + /// 1 <= X <= 99 Set Test EOL to 1 to 99 percent + /// 100 < X <= 199 Set Test EOL offset to 99.01 to 99.99 percent + /// 100 -> End of Life + /// + public Byte BatteryUsedInPercent // TODO: implement as double value + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetBytterySeconds.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetBytterySeconds.cs index 674c9cee..8ba13bc0 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetBytterySeconds.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetBytterySeconds.cs @@ -12,8 +12,8 @@ public UInt32 Seconds { - get => this.bytes.ToUInt32BigEndian(1); - set => value.ToBigEndianBytes().CopyTo(this.bytes, 1); + get => this.bytes.ToUInt32BE(1); + set => value.GetBytesBE().CopyTo(this.bytes, 1); } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetDateAndTime.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetDateAndTime.cs new file mode 100644 index 00000000..2fe6c006 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetDateAndTime.cs @@ -0,0 +1,19 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using Common.Utils.Extensions; + + using System; + + public class SetDateAndTime : Pam + { + public SetDateAndTime() : base(5, SetDateAndTime) + { + } + + public UInt32 SecondsSince20000101 + { + get => this.bytes.ToUInt32BE(1); + set => value.GetBytesBE().CopyTo(this.bytes, 1); + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetFrequencyOffset.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetFrequencyOffset.cs new file mode 100644 index 00000000..0bcf817c --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetFrequencyOffset.cs @@ -0,0 +1,19 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using Common.Utils.Extensions; + + using System; + + public class SetFrequencyOffset : Pam + { + public SetFrequencyOffset() : base(3, SetFrequencyOffset) + { + } + + public UInt16 Offset + { + get => this.bytes.ToUInt16BE(1); + set => value.GetBytesBE().CopyTo(this.bytes, 1); + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/MeterType.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMeterType.cs similarity index 74% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/MeterType.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMeterType.cs index ef30027c..21c2ad1b 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/MeterType.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMeterType.cs @@ -2,9 +2,9 @@ { using System; - public class MeterType : DebugCmd + public class SetMeterType : DebugCmd { - public MeterType() : base(MeterType) + public SetMeterType() : base(MeterType) { } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs index 79ba8b31..c70061c7 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs @@ -106,7 +106,7 @@ set => value.ToBigEndianBytes().CopyTo(this.bytes, 14); } - protected override Byte[] ToByteArray() + public override Byte[] ToByteArray() { this.bytes[12] = this.bitsFromByte11.ToByte(); this.bytes[1] = 0x10; diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPCB.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPcbId.cs similarity index 80% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPCB.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPcbId.cs index 6f5a2e76..e3a83e8f 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPCB.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPcbId.cs @@ -4,9 +4,9 @@ using System; - public class SetPCB : Pam + public class SetPcbId : Pam { - public SetPCB() : base(5, SetPCB) + public SetPcbId() : base(5, SetPCB) { } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPowerLevel.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPowerLevel.cs index 1119c79e..a716ff8b 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPowerLevel.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetPowerLevel.cs @@ -12,16 +12,15 @@ { } - public Byte PowerLevel - { - get => (Byte)(this.bytes[1] - this.Mode); - set => this.bytes[1] = (Byte)(Math.Min(value, (Byte)127) + this.Mode); - } + public Byte PowerLevel { get; set; } - public PowerLevelModes Mode + public PowerLevelModes Mode { get; set; } + + public override Byte[] ToByteArray() { - get => (PowerLevelModes)(this.bytes[1] - this.PowerLevel); - set => this.bytes[1] = (Byte)(value + this.PowerLevel); + this.Value = (Byte)((Byte)this.Mode | 127 & this.PowerLevel); + + return base.ToByteArray(); } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RebootsCounter.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetRebootCount.cs similarity index 79% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RebootsCounter.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetRebootCount.cs index c2dcf4ef..001ff5e5 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/RebootsCounter.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetRebootCount.cs @@ -2,9 +2,9 @@ { using System; - public class RebootsCounter : Pam + public class SetRebootCount : Pam { - public RebootsCounter() : base(3, RebootsCounter) + public SetRebootCount() : base(3, SetRebootCount) { } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetSpecificError.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetSpecificError.cs new file mode 100644 index 00000000..391cc375 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetSpecificError.cs @@ -0,0 +1,9 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + public class SetSpecificError : DebugCmd + { + public SetSpecificError() : base(SetSpecificError) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetTFXParameters.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetTFXParameters.cs index 2b9a684a..40b68508 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetTFXParameters.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetTFXParameters.cs @@ -175,7 +175,7 @@ public UInt32 CurrentReading => BitConverter.ToUInt32(this.bytes, 18); - protected override Byte[] ToByteArray() + public override Byte[] ToByteArray() { this.bytes[3] = this.bitsFromByte2.ToByte(); this.bytes[4] = this.bitsFromByte3.ToByte(); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetTestFastActivityBupTiming.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetTestFastActivityBupTiming.cs new file mode 100644 index 00000000..81a52ff9 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetTestFastActivityBupTiming.cs @@ -0,0 +1,21 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + using System; + + public class SetTestFastActivityBupTiming : DebugCmd + { + public SetTestFastActivityBupTiming() : base(SetTestFastActivityBupTiming) + { + } + + /// + /// 0 – Default setting of 3 seconds. + /// 1 - 255 Number of 250ms offset between Activity BUP’s after a Block Load Command. + /// + public Byte Miliseconds + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetVariablePcbId.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetVariablePcbId.cs new file mode 100644 index 00000000..d8a7676b --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetVariablePcbId.cs @@ -0,0 +1,9 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + public class SetVariablePcbId : Pam + { + public SetVariablePcbId() : base(1 /* TODO: TBD */, SetVariablePcbId) + { + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusMode.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WirelessMBusMode.cs similarity index 89% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusMode.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WirelessMBusMode.cs index 4d94bc9c..b13596d3 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WMBusMode.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/WirelessMBusMode.cs @@ -4,15 +4,14 @@ using System; - public class WMBusMode : Pam + public class WirelessMBusMode : Pam { private readonly Byte[] bits; - private Byte mBusStatus; - public WMBusMode() : base(2, ChangeWirelessMBusMode) + public WirelessMBusMode() : base(2, ChangeWirelessMBusMode) => this.bits = new Byte[8]; - public WMBusMode(Byte mBusStatus) : base(2, ChangeWirelessMBusMode) + public WirelessMBusMode(Byte mBusStatus) : this() { this.bytes[1] = mBusStatus; this.bits = mBusStatus.GetBits(); @@ -81,7 +80,7 @@ set => this.bits[0] = (Byte)(value ? 1 : 0); } - protected override Byte[] ToByteArray() + public override Byte[] ToByteArray() { this.bytes[1] = this.bits.ToByte(); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj index 6fbdf7db..47af8b77 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj @@ -58,10 +58,13 @@ - + + + + @@ -79,10 +82,6 @@ {05F0CCAF-9F2B-45F9-A7F8-12F29AD182F3} Common.Utils.Extensions - - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2} - Common.Hardware.Interfaces.Ports.SirtBroadcaster - {B23BFAF9-08AE-4311-8C08-FB2BB49EA2AD} Common.Hardware.Interfaces.Ports.Sirt diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Data/SEMI.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Data/SEMI.cs index 367cd60f..5d848803 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Data/SEMI.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Data/SEMI.cs @@ -1,6 +1,7 @@ namespace Common.Hardware.WaterMeter.eRegister.Data { - using Common.Hardware.Interfaces.Ports.SirtBroadcaster; + using Common.Hardware.Interfaces.Ports.SIRT; + using Common.Hardware.Interfaces.Ports.SIRT.Parameters; using Common.Utils.Extensions; using System; diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs new file mode 100644 index 00000000..38ae81d1 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs @@ -0,0 +1,274 @@ +namespace Common.Hardware.WaterMeter.eRegister +{ + using Common.Hardware.WaterMeter.eRegister.Features; + + using System; + using System.Collections.Generic; + using System.Linq; + using System.Reflection; + + public class Eregister + { + [PamType(AuthLevel.II)] + public ChangeWakeUp ChangeWakeUp { get; set; } + + [PamType(AuthLevel.O)] + public SetPowerLevel SetPowerLevelSensusRF { get; set; } + + [PamType(AuthLevel.III)] + public SetPowerLevel SetPowerLevelFlexNet { get; set; } + + [PamType(AuthLevel.II)] + public ChangeNumberOfLatWindows ChangeNumberOfLatWindows { get; set; } + + [PamType(AuthLevel.I)] + public ResetAlarms ResetAlarms { get; set; } + + [PamType(AuthLevel.II, true)] + public DeactivateTransmitter DeactivateTransmiter { get; set; } + + [PamType(AuthLevel.II)] + public WirelessMBusMode WirelessMBusMode { get; set; } + + [PamType(AuthLevel.O)] + public DeactivateAlarms DeactivateAlarms { get; set; } + + [PamType(AuthLevel.O)] + public ChangeNumberOfDeals ChangeNumberOfDeals { get; set; } + + [PamType(AuthLevel.O)] + public ParameterizeLeakageDetection ParameterizeLeakageDetection { get; set; } + + [PamType(AuthLevel.O)] + public ParameterizeBrokenPipeDetection ParameterizeBrokenPipeDetection { get; set; } + + [PamType(AuthLevel.I)] + public SetHistoricalErrorLimit SetHistoricalErrorLimit { get; set; } + + [PamType(AuthLevel.III, true)] + public Reset Reset { get; set; } + + [PamType(AuthLevel.II)] + public ChangeTransmissionInterval ChangeTransmissionInterval { get; set; } + + [PamType(AuthLevel.II)] + public OpenMeteringTransmitionIntervalWMBus OpenMeteringTransmitionIntervalWMBus { get; set; } + + [PamType(AuthLevel.III, true)] + public SendBubbleUpBurst SendBubbleUpBurst { get; set; } + + [PamType(AuthLevel.III, true)] + public SetFrequencyOffset SetFrequencyOffset { get; set; } + + [PamType(AuthLevel.I)] + public ActivateMetrologyTestMode ActivateMetrologyTestMode { get; set; } + + [PamType(AuthLevel.III)] + public SetRebootCount SetRebootCount { get; set; } + + [PamType(AuthLevel.III, true)] + public EregisterDebug Debug { get; set; } + + [PamType(AuthLevel.O)] + public ChangeFixedDateReadingSettings ChangeFixedDateReadingSettings { get; set; } + + [PamType(AuthLevel.II, true)] + public GetCustomerDebug GetCustomerDebug { get; set; } + + [PamType(AuthLevel.III)] + public ChangeMeterReading ChangeMeterReading { get; set; } + + [PamType(AuthLevel.III)] + public ChangeMeterId ChangeMeterId { get; set; } + + [PamType(AuthLevel.I)] + public SetDateAndTime SetDateAndTime { get; set; } + + [PamType(AuthLevel.O)] + public ChangeDataLoggerSettings ChangeDataLoggerSettings { get; set; } + + [PamType(AuthLevel.III)] + public SetBytterySeconds SetBytterySeconds { get; set; } + + [PamType(AuthLevel.III)] + public SetPcbId SetPcbId { get; set; } + + [PamType(AuthLevel.O, true)] + public RequestFixedDateReading RequestFixedDateReading { get; set; } + + [PamType(AuthLevel.O, true)] + public RequestLoggingData RequestLoggingData { get; set; } + + [PamType(AuthLevel.III, true)] + public SendTestPattern SendTestPattern { get; set; } + + [PamType(AuthLevel.III, true)] + public RequestMemoryDump RequestMemoryDump { get; set; } + + [PamType(AuthLevel.III, true)] + public SendSequenceOfTestTelegrams SendSequenceOfTestTelegrams { get; set; } + + [PamType(AuthLevel.III, true)] + public ReceiveSequenceOfTestTelegrams ReceiveSequenceOfTestTelegrams { get; set; } + + [PamType(AuthLevel.II)] + public ChangeCustomerText ChangeCustomerText { get; set; } + + [PamType(AuthLevel.O, true)] + public EncapsulatedFlexNet EncapsulatedFlexNet { get; set; } + + [PamType(AuthLevel.O)] + public SetTFXParameters SetTFXParameters { get; set; } + + [PamType(AuthLevel.III, true)] + public SetMetrologyParameters SetMetrologyParameters { get; set; } + + [PamType(AuthLevel.O, true)] + public Ping Ping { get; set; } + + [PamType(AuthLevel.III)] + public SetVariablePcbId SetVariablePcbId { get; set; } + + public IEnumerable BuildPams() + { + var pams = this.GetPams() + .OrderBy(x => x.CommandBytes[0]); + var cmds = new List(); + var pamsLevel0 = new List(); + var pamsLevel1 = new List(); + var pamsLevel2 = new List(); + var pamsLevel3 = new List(); + + var pin1 = new ProvidePin { AuthLevel = AuthLevel.I }.ToByteArray(); + var pin2 = new ProvidePin { AuthLevel = AuthLevel.II }.ToByteArray(); + var pin3 = new ProvidePin { AuthLevel = AuthLevel.III }.ToByteArray(); + + foreach (var pam in pams) + { + if (pam.IsSingleCmd) + { + if (pam.AuthLevel == AuthLevel.I) + { + pam.CommandBytes.AddRange(pin1); + } + else if (pam.AuthLevel == AuthLevel.II) + { + pam.CommandBytes.AddRange(pin2); + } + else if (pam.AuthLevel == AuthLevel.III) + { + pam.CommandBytes.AddRange(pin3); + } + + cmds.Add(pam); + } + else + { + if (pam.AuthLevel == AuthLevel.O) + { + pamsLevel0.Add(pam); + } + else if (pam.AuthLevel == AuthLevel.I) + { + pamsLevel1.Add(pam); + } + else if (pam.AuthLevel == AuthLevel.II) + { + pamsLevel2.Add(pam); + } + else if (pam.AuthLevel == AuthLevel.III) + { + pamsLevel3.Add(pam); + } + } + } + + var pamLevel0 = new EregisterPam(); + + foreach (var pam in pamsLevel0) + { + pamLevel0.Name += $"{pam.Name}{Environment.NewLine}"; + pamLevel0.CommandBytes.AddRange(pam.CommandBytes); + } + + pamLevel0.Name = pamLevel0.Name.Trim(); + + var pamLevel1 = new EregisterPam(); + + foreach (var pam in pamsLevel1) + { + pamLevel1.Name += $"{pam.Name}{Environment.NewLine}"; + pamLevel1.CommandBytes.AddRange(pam.CommandBytes); + } + + pamLevel1.Name = pamLevel1.Name.Trim(); + pamLevel1.CommandBytes.AddRange(pin1); + + var pamLevel2 = new EregisterPam(); + + foreach (var pam in pamsLevel2) + { + pamLevel2.Name += $"{pam.Name}{Environment.NewLine}"; + pamLevel2.CommandBytes.AddRange(pam.CommandBytes); + } + + pamLevel2.Name = pamLevel2.Name.Trim(); + pamLevel2.CommandBytes.AddRange(pin2); + + var pamLevel3 = new EregisterPam(); + + foreach (var pam in pamsLevel3) + { + pamLevel3.Name += $"{pam.Name}{Environment.NewLine}"; + pamLevel3.CommandBytes.AddRange(pam.CommandBytes); + } + + pamLevel3.Name = pamLevel3.Name.Trim(); + pamLevel3.CommandBytes.AddRange(pin3); + + cmds.Insert(0, pamLevel3); + cmds.Insert(0, pamLevel2); + cmds.Insert(0, pamLevel1); + cmds.Insert(0, pamLevel0); + + return cmds; + } + + private IEnumerable GetPams() + { + foreach (var eregisterProperty in typeof(Eregister).GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + var pamType = eregisterProperty.GetCustomAttribute(); + + if (pamType is null) + { + continue; + } + + var propertyValue = eregisterProperty.GetValue(this); + + if (propertyValue is null) + { + continue; + } + else if (propertyValue is EregisterDebug debug) + { + foreach (var pam in debug.GetPams().OrderBy(x => x.CommandBytes[2])) + { + yield return pam; + } + } + else if (propertyValue is Pam pam) + { + yield return new EregisterPam + { + Name = eregisterProperty.Name, + AuthLevel = pamType.AuthLevel, + IsSingleCmd = pamType.IsSingleCmd, + CommandBytes = pam.ToByteArray().ToList() + }; + } + } + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs new file mode 100644 index 00000000..a25820bf --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs @@ -0,0 +1,86 @@ +namespace Common.Hardware.WaterMeter.eRegister +{ + using Common.Hardware.WaterMeter.eRegister.Features; + + using System.Collections.Generic; + using System.Linq; + using System.Reflection; + + public class EregisterDebug + { + [PamType(AuthLevel.III, true)] + public RequestDebugTelegram RequestDebugTelegram { get; set; } + + [PamType(AuthLevel.III, true)] + public ResetCredits ResetCredits { get; set; } + + [PamType(AuthLevel.III, true)] + public DisableCredits DisableCredits { get; set; } + + [PamType(AuthLevel.III, true)] + public SerialOutput SerialOutput { get; set; } + + [PamType(AuthLevel.III, true)] + public SetAlarms SetAlarm { get; set; } + + [PamType(AuthLevel.III, true)] + public SetSpecificError SetSpecificError { get; set; } + + [PamType(AuthLevel.III, true)] + public OpticalTelegram OpticalTelegram { get; set; } + + [PamType(AuthLevel.III, true)] + public FactoryComplete FactoryComplete { get; set; } + + [PamType(AuthLevel.III, true)] + public EnableCredits EnableCredits { get; set; } + + [PamType(AuthLevel.III, true)] + public SetBatteryUsageTestOffset SetBatteryUsageTestOffset { get; set; } + + [PamType(AuthLevel.III, true)] + public SetTestFastActivityBupTiming SetTestFastActivityBupTiming { get; set; } + + [PamType(AuthLevel.III, true)] + public SetActivityCreditLimits SetActivityCreditLimits { get; set; } + + [PamType(AuthLevel.III, true)] + public SetActivationByThreshold SetActivationByThreshold { get; set; } + + [PamType(AuthLevel.III, true)] + public DisableOTAFirmwareUpdate DisableOTAFirmwareUpdate { get; set; } + + [PamType(AuthLevel.III, true)] + public SetMeterType SetMeterType { get; set; } + + internal IEnumerable GetPams() + { + foreach (var eregisterProperty in typeof(EregisterDebug).GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + var pamType = eregisterProperty.GetCustomAttribute(); + + if (pamType is null) + { + continue; + } + + var propertyValue = eregisterProperty.GetValue(this); + + if (propertyValue is null) + { + continue; + } + else if (propertyValue is Pam pam) + { + yield return new EregisterPam + { + Name = eregisterProperty.Name, + AuthLevel = pamType.AuthLevel, + IsSingleCmd = pamType.IsSingleCmd, + CommandBytes = pam.ToByteArray().ToList() + }; + } + } + } + } +} \ No newline at end of file diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs new file mode 100644 index 00000000..a1ad9f3a --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs @@ -0,0 +1,18 @@ +namespace Common.Hardware.WaterMeter.eRegister +{ + using Common.Hardware.WaterMeter.eRegister.Features; + + using System; + using System.Collections.Generic; + + public class EregisterPam + { + public String Name { get; set; } + + public AuthLevel AuthLevel { get; set; } + + public Boolean IsSingleCmd { get; set; } + + public List CommandBytes { get; set; } = new List(); + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/PamTypeAttribute.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/PamTypeAttribute.cs new file mode 100644 index 00000000..d0ae7978 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/PamTypeAttribute.cs @@ -0,0 +1,20 @@ +namespace Common.Hardware.WaterMeter.eRegister +{ + using Common.Hardware.WaterMeter.eRegister.Features; + + using System; + + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] + public class PamTypeAttribute : Attribute + { + public PamTypeAttribute(AuthLevel authLevel, Boolean isSingleCmd = false) + { + this.AuthLevel = authLevel; + this.IsSingleCmd = isSingleCmd; + } + + public AuthLevel AuthLevel { get; } + + public Boolean IsSingleCmd { get; } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs index f021825e..a3aac8ea 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs @@ -1,7 +1,7 @@ namespace Common.Hardware.WaterMeter.eRegister { - using Common.Hardware.Interfaces.Ports.Sirt; - using Common.Hardware.Interfaces.Ports.Sirt.Parameters; + using Common.Hardware.Interfaces.Ports.SIRT; + using Common.Hardware.Interfaces.Ports.SIRT.Parameters; using Common.Hardware.WaterMeter.eRegister.Features; using Common.Utils.Extensions; @@ -267,7 +267,10 @@ { Cmd = JustSirtMessage.W_PAM, Address = this.RadioAddress, - P1 = P811.WupDelPamAfterSemi, + P1 = new P811 + { + DelPamSemi = true + }, Data = ChangeWakeUp.StayAwake // Pin level 2 ^ // Pin level 3 - only production mode @@ -294,24 +297,24 @@ MinimumFlow = this.DataLoggerMinFlow }) // Pin level 0 - .Append(new ChangeFixedDateReading + .Append(new ChangeFixedDateReadingSettings { DayOfMonth = this.FixedDateReadingDay, SettingI = this.FixedDateReadingSettingI, SettingII = this.FixedDateReadingSettingII }) // Pin level 2 - .Append(new WMBusMode(this.MBusStatus)) + .Append(new WirelessMBusMode(this.MBusStatus)) // Pin level 0 .Append(new SetPowerLevel(this.PowerModeSensusRF)) // Pin level 3 - only production mode .Append(new SetPowerLevel(this.PowerModeFlexNet)) // Pin level 3 - single cmd - .Append(new DisableOTA(this.OTASettings)) + .Append(new DisableOTAFirmwareUpdate(this.OTASettings)) // Pin level 3 - single cmd .Append(new SetActivationByThreshold(this.OTASettings)) // Pin level 2 - .Append(new SetOpenMeteringTransmitionIntervalWMBus(this.OpenMeteringTransmissionInterval)) + .Append(new OpenMeteringTransmitionIntervalWMBus(this.OpenMeteringTransmissionInterval)) // Pin level 2 .Append(new ChangeTransmissionInterval(this.TransmissionIntervalLast)) // Pin level 2 diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs index 7f4e964b..5d56ef50 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs @@ -1,6 +1,6 @@ namespace Common.Hardware.WaterMeter.eRegister { - using Common.Hardware.Interfaces.Ports.SirtBroadcaster; + using Common.Hardware.Interfaces.Ports.SIRT; using NLog; using NLog.Config; diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs index 55d0266b..ee2696b7 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs @@ -1,8 +1,7 @@ namespace Common.Hardware.WaterMeter.eRegister { - using Common.Hardware.Interfaces.Ports.Sirt; - using Common.Hardware.Interfaces.Ports.Sirt.Parameters; - using Common.Hardware.Interfaces.Ports.SirtBroadcaster; + using Common.Hardware.Interfaces.Ports.SIRT; + using Common.Hardware.Interfaces.Ports.SIRT.Parameters; using Common.Hardware.WaterMeter.eRegister.Data; using System; diff --git a/Common/OmniPlus/InspectionUI/App.config b/Common/OmniPlus/InspectionUI/App.config index cd98da8d..e7204fd6 100644 --- a/Common/OmniPlus/InspectionUI/App.config +++ b/Common/OmniPlus/InspectionUI/App.config @@ -1,40 +1,40 @@ - + - + - + - - - - + + + + - + - + - - + + - - + + - \ No newline at end of file + diff --git a/Common/OmniPlus/InspectionUI/InspectionUI.csproj b/Common/OmniPlus/InspectionUI/InspectionUI.csproj index 46e5dcda..9dee3433 100644 --- a/Common/OmniPlus/InspectionUI/InspectionUI.csproj +++ b/Common/OmniPlus/InspectionUI/InspectionUI.csproj @@ -8,7 +8,7 @@ WinExe InspectionUI InspectionUI - v4.0 + v4.5 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -94,7 +94,6 @@ - diff --git a/Common/OmniPlus/InspectionUI/packages.config b/Common/OmniPlus/InspectionUI/packages.config index 4ef8437f..a669ad94 100644 --- a/Common/OmniPlus/InspectionUI/packages.config +++ b/Common/OmniPlus/InspectionUI/packages.config @@ -1,6 +1,6 @@  - - - + + + \ No newline at end of file diff --git a/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj b/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj index eb5c925f..721ae086 100644 --- a/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj +++ b/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj @@ -71,7 +71,6 @@ - @@ -130,10 +129,6 @@ - - {F408DE9E-01E6-4CFF-AE79-B572B0674FA2} - Common.Hardware.Interfaces.Ports.SirtBroadcaster - {4E8BB839-D40A-488C-88CE-F21811F1F476} Common.Hardware.WaterMeter.eRegister diff --git a/Common/Ui/Common.UI.WPF/ViewModels/CompilerServices.cs b/Common/Ui/Common.UI.WPF/ViewModels/CompilerServices.cs deleted file mode 100644 index 698b37d5..00000000 --- a/Common/Ui/Common.UI.WPF/ViewModels/CompilerServices.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace System.Runtime.CompilerServices -{ - [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] - public class CallerMemberNameAttribute : Attribute - { - } - - [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] - public class CallerFilePathAttribute : Attribute - { - } - - [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] - public class CallerLineNumberAttribute : Attribute - { - } -} \ No newline at end of file diff --git a/Common/Ui/GenesisToolBox/FrmTempMeter.cs b/Common/Ui/GenesisToolBox/FrmTempMeter.cs index e051672c..9c2f56f2 100644 --- a/Common/Ui/GenesisToolBox/FrmTempMeter.cs +++ b/Common/Ui/GenesisToolBox/FrmTempMeter.cs @@ -821,7 +821,7 @@ private const int TAKE_LINES = 50; - public void AddMessage(string message) + public void AddMessage(String message) { this.BeginInvoke(new Action(() => { @@ -834,7 +834,7 @@ this.automaticContentBox.AppendText(text); this.automaticContentBox.ScrollBars = RichTextBoxScrollBars.None; } - catch (Exception e) + catch (Exception) { // TODO: implement logging. } @@ -864,7 +864,7 @@ } protected override void OnFormClosed(FormClosedEventArgs e) - => this.BtnDisconnect_Click(default(object), EventArgs.Empty); + => this.BtnDisconnect_Click(default(Object), EventArgs.Empty); private void SaveSettingsBtn_Click(Object sender, EventArgs e) { @@ -873,12 +873,12 @@ Appsettings.GMHPort = gmhPort; } - if (int.TryParse($"{this.messurementStepMS.Text}", out int msStep)) + if (int.TryParse($"{this.messurementStepMS.Text}", out var msStep)) { Appsettings.MessurementStep = msStep; } - if (int.TryParse($"{this.messurementDauerMS.Text}", out int msDauer)) + if (int.TryParse($"{this.messurementDauerMS.Text}", out var msDauer)) { Appsettings.MessurementDauer = msDauer; } @@ -906,7 +906,7 @@ zfgnsm.ReLogin(); } - zfgnsm.SetLcdText(false, new byte[] { 0x10, 0x10 }); + zfgnsm.SetLcdText(false, new Byte[] { 0x10, 0x10 }); return true; } } @@ -955,7 +955,7 @@ { if (meter is ZeroFlowGenesisMeter zfgnsm) { - var avg = default(double); + var avg = default(Double); try { @@ -1071,10 +1071,10 @@ { TempFromTofLUT.Add(new Tuple(item.AvgTof, item.RefTempC)); } - StringBuilder result = new StringBuilder(); - List list = new List( - txtInterpolTofs.Text.Split(new string[] { "\r\n" }, - StringSplitOptions.RemoveEmptyEntries)); + var result = new StringBuilder(); + var list = new List( + txtInterpolTofs.Text.Split(new string[] { "\r\n" }, + StringSplitOptions.RemoveEmptyEntries)); foreach (var item in list) { var tof = 0.0; diff --git a/Common/Ui/GenesisToolBox/GenesisToolBox.csproj b/Common/Ui/GenesisToolBox/GenesisToolBox.csproj index 7ce6dadf..666e5b3c 100644 --- a/Common/Ui/GenesisToolBox/GenesisToolBox.csproj +++ b/Common/Ui/GenesisToolBox/GenesisToolBox.csproj @@ -13,6 +13,7 @@ 512 true + false publish\ true Disk @@ -25,7 +26,6 @@ true 0 1.0.0.%2a - false false true @@ -42,7 +42,7 @@ 7.0 true bin\Debug\Xylem.Common.Ui.GenesisToolBox.xml - 0003;1591; + IDE0003;IDE0049;1591; AnyCPU diff --git a/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs b/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs index 446ea43c..55eedd39 100644 --- a/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs +++ b/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs @@ -177,15 +177,25 @@ return bytes; } + public static Byte[] GetBytesBE(this UInt32 value) + { + var bytes = new Byte[2]; + bytes[0] = (Byte)(value >> 24); + bytes[1] = (Byte)(value >> 16); + bytes[2] = (Byte)(value >> 8); + bytes[3] = (Byte)value; - public static Byte[] GetBits(this Byte _byte) + return bytes; + } + + public static Byte[] GetBits(this Byte @byte) { var bits = new Byte[8]; for (var i = 0; i < 8; i++) { - bits[i] = (Byte)((_byte >> i) & 1); + bits[i] = (Byte)((@byte >> i) & 1); } return bits; From 5340d0c03b224bffad12c036b181f526ab26a356 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 16 Oct 2024 14:15:07 +0200 Subject: [PATCH 32/44] sentinel - returned errors filtered --- .../API/Cordonel/EOLProgressController.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs b/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs index a94c52b9..517752f6 100644 --- a/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs +++ b/LaaProductionWeb/LaaProductionWeb/API/Cordonel/EOLProgressController.cs @@ -56,15 +56,22 @@ } var apps = this.GetConfigurationJson(); - var errors = this.dbcontext.EOLProgress.RunSentinel(eol, apps); + var errors = this.dbcontext.EOLProgress + .RunSentinel(eol, apps); + var hasErrors = false; - if (errors?.Count() > 0) + foreach (var error in errors) { - foreach (var error in errors) + if (!string.IsNullOrWhiteSpace(error.Key)) { this.ModelState.AddModelError(error.Key, error.Value); - } + hasErrors = true; + } + } + + if (hasErrors) + { return this.BadRequest(); } } From a679ecddce4075f1ffbd0f0b262872a262fc0e64 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Thu, 17 Oct 2024 10:06:36 +0200 Subject: [PATCH 33/44] eregister - all radio keys by type --- Common/CommonConsole/CommonConsole.csproj | 7 +- Common/CommonConsole/Program.cs | 212 +++++++++++++++++- ...mmon.Hardware.Interfaces.Ports.SIRT.csproj | 10 +- .../{JustSirtBroadcaster.cs => SIRT.cs} | 40 ++-- .../{JustSirtMessage.cs => SirtMessage.cs} | 8 +- .../{JustSirtProxy.cs => SirtProxy.cs} | 13 +- .../{JustSirtTask.cs => SirtTask.cs} | 52 ++--- .../{JustTaskStatus.cs => TaskStatus.cs} | 2 +- .../JustSerialPort.cs | 1 - .../ChangeCustomerText.cs | 6 +- .../ChangeSensusRFEncryptionKey.cs | 2 +- .../ChangeWakeUp.cs | 10 +- .../DeactivateAlarms.cs | 6 + ...ommon.Hardware.WaterMeter.eRegister.csproj | 1 + .../Eregister.cs | 173 +++----------- .../EregisterDebug.cs | 34 --- .../EregisterExtensions.cs | 211 +++++++++++++++++ .../EregisterPam.cs | 2 +- .../ParameterSet.cs | 128 +++++------ .../ProgrammingBatch.cs | 24 +- .../ProgrammingTask.cs | 30 +-- .../Interfaces/ISQLReader.cs | 3 + .../Common.Logic.Extensions.SQL/SQLReader.cs | 17 ++ .../BytesExtensions.cs | 2 +- .../API/Eregister/RadioKeyController.cs | 192 +++++++++++----- .../Controllers/SearchController.cs | 36 +-- 26 files changed, 770 insertions(+), 452 deletions(-) rename Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/{JustSirtBroadcaster.cs => SIRT.cs} (76%) rename Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/{JustSirtMessage.cs => SirtMessage.cs} (94%) rename Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/{JustSirtProxy.cs => SirtProxy.cs} (89%) rename Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/{JustSirtTask.cs => SirtTask.cs} (61%) rename Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/{JustTaskStatus.cs => TaskStatus.cs} (89%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs diff --git a/Common/CommonConsole/CommonConsole.csproj b/Common/CommonConsole/CommonConsole.csproj index d5c05ce5..12a2ae0b 100644 --- a/Common/CommonConsole/CommonConsole.csproj +++ b/Common/CommonConsole/CommonConsole.csproj @@ -49,9 +49,12 @@ + + + @@ -97,6 +100,8 @@ Common.Utils.Extensions - + + + \ No newline at end of file diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index 8ea99ce5..f1fdb0ec 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -2,20 +2,222 @@ { using Common.Hardware.WaterMeter.eRegister; using Common.Hardware.WaterMeter.eRegister.Features; + using Common.Logic.Extensions.SQL; using System; + using System.Xml.Serialization; public class Program { public static void Main() { - var eregister = EregisterModel(); + var serialNumbers = String.Join(", ", new Object[] { 17833444, 18743226, 18752765, 19744225, 18743225, 19793034, 19793035, 20731121, 20731265, 18743224 }); + var xml = new SQLConnection("Server=SLASQL01.emea.sensus.net; Database=Auftrag; User ID=sa; Password=sqlserver;") + .CreateCommand($@" + SELECT CAST((SELECT vm.Wert AS CSD + , SUBSTRING(ISNULL(fs.Wert, ''), 1, 1) AS RadioKeyType + , aps.SerienNr + , aps.StatusFertigung + , CAST(CASE WHEN vm.Wert LIKE 'CSD 769400%' + OR vm.Wert LIKE 'CSD 770951%' + OR vm.Wert LIKE 'CSD 772721%' + THEN RIGHT(er.Adresse, 9) + ELSE aps.SerienNr END AS NVARCHAR(10)) AS MeterId + , er.TempAdresse + , er.Adresse + , x.FertigungsauftragNr + , x.Frequency + , x.Metersize + , x.Volume_per_Pulse AS VolumePerPulse + , x.Volume_per_LED_Pulse AS VolumePerLedPulse + , CAST(0 AS TINYINT) AS OffsetFactor + , CAST(5 AS TINYINT) AS OffsetTime + , CAST(0 AS TINYINT) AS FactoryCalibration + , CAST(3 AS TINYINT) AS TransmissionInterval + , CAST(7 AS TINYINT) AS MBusStatus + , CAST(0 AS TINYINT) AS LatWindows + , x.Byte11 AS UnitOfMesure + , x.Bit56 AS DecimalPoint + , x.Disallow_Reverse_Volume AS CandI + , x.Alarm_Low_Battery + , x.Alarm_Leakage + , x.Alarm_Magnetic_Tamper + , x.Alarm_Metrology_Unavailable + , x.Alarm_Backflow + , x.Alarm_Broken_Pipe + , x.Alarm_Medium_Absent + , x.Alarm_Specific_Error + , x.LeakagePeriod + , x.LeakageThreshold + , x.BrokenPipePeriod + , x.BrokenPipeThreshold + , x.History_Error_Limits_Days + , x.Data_Logging_Period + , x.Data_Logging_Forward_Counter + , x.Data_Logging_Time_Of_Minimum_Flow + , x.Data_Logging_Minimum_Flow + , x.Data_Logging_Time_Of_Broken_Pipe + , x.Data_Logging_Broken_Pipe_Flow + , x.Data_Logging_Current_Flow + , x.Data_Logging_Time_Of_Peak_Flow + , x.Data_Logging_Peak_Flow + , x.Data_Logging_Time_Of_Maximum_Flow + , x.Data_Logging_Maximum_Flow + , x.Data_Logging_Backward_Volume + , x.Data_Logging_Counter + , x.Data_Logging_Alarm_State + , x.FDR_Day_Of_Data_Reading + , x.FDR_Forward_Counter + , x.FDR_Time_Of_Minimum_Flow + , x.FDR_Minimum_Flow + , x.FDR_Time_Of_Broken_Pipe + , x.FDR_Broken_Pipe_Flow + , x.FDR_Current_Flow + , x.FDR_Time_Of_Peak_Flow + , x.FDR_Peak_Flow + , x.FDR_Time_Of_Maximum_Flow + , x.FDR_Maximum_Flow + , x.FDR_Backward_Volume + , x.FDR_Counter + , x.FDR_Alarm_State + , x.Transmission_Intervall + , x.PowerLevelHex + , CAST(CASE WHEN vm.Wert LIKE 'CSD 769400%' + OR vm.Wert LIKE 'CSD 770951%' + OR vm.Wert LIKE 'CSD 773102%' THEN 0 ELSE 1 END AS BIT) AS DisableOTA + , CAST(CASE WHEN vm.Wert LIKE 'CSD 764144%' + OR vm.Wert LIKE 'CSD 760407%' + THEN 0 ELSE x.LAT_Interval END AS TINYINT) AS LATInterval + , CAST(CASE WHEN vm.Wert LIKE 'CSD 769400%' THEN 0 + WHEN x.Metersize BETWEEN 53 AND 55 THEN 8 + ELSE 10 END AS TINYINT) AS ActivationByThreshold + , CAST(CASE WHEN vm.Wert LIKE 'CSD 760407%' + OR vm.Wert LIKE 'CSD 764144%' THEN 16 + WHEN vm.Wert LIKE 'CSD 38102_BU%' THEN 30 + WHEN vm.Wert LIKE 'CSD 772100_WE%' THEN 15 * 60 + ELSE 60 * 60 END AS SMALLINT) AS OpenMeteringTransmissionIntervalSeconds + , x.UTC_Offset AS UtcOffset + , x.Wake_Up_Interval AS WakeUpInterval + , CASE WHEN idn.Nennweite < 150 THEN 500 ELSE 50 END AS DisplayVolume + , CAST(CASE WHEN er.GeschlossenDatum IS NULL THEN 0 ELSE 1 END AS BIT) AS Sealed + FROM eRegister AS er + JOIN (SELECT DISTINCT + AuftragNr + , PositionNr + , SerienNr + , MAX(StatusFertigung) OVER (PARTITION BY SerienNr) AS StatusFertigung + FROM AuftragPositionSerienNr + WHERE SerienNr IN ({serialNumbers})) AS aps + ON er.Seriennummer = aps.SerienNr + JOIN AlleAuftragPositionen AS aap + ON aps.AuftragNr = aap.AuftragNr + AND aps.PositionNr = aap.PositionNr + JOIN (SELECT ap.FertigungsauftragNr + , rf.Frequency + , ms.Metersize + , ms.Volume_per_Pulse + , ms.Volume_per_LED_Pulse + , u.Byte11 + , dp.Bit56 + , ap.Disallow_Reverse_Volume + , ap.Alarm_Low_Battery + , ap.Alarm_Leakage + , ap.Alarm_Magnetic_Tamper + , ap.Alarm_Metrology_Unavailable + , ap.Alarm_Backflow + , ap.Alarm_Broken_Pipe + , ap.Alarm_Medium_Absent + , ap.Alarm_Specific_Error + , lp.[Bit0-2] AS LeakagePeriod + , lt.[Bit3-7] AS LeakageThreshold + , bpp.[Bit0-2] AS BrokenPipePeriod + , bpt.[Bit3-7] AS BrokenPipeThreshold + , ap.History_Error_Limits_Days + , dl.Data_Logging_Period + , ap.Data_Logging_Forward_Counter + , ap.Data_Logging_Time_Of_Minimum_Flow + , ap.Data_Logging_Minimum_Flow + , ap.Data_Logging_Time_Of_Broken_Pipe + , ap.Data_Logging_Broken_Pipe_Flow + , ap.Data_Logging_Current_Flow + , ap.Data_Logging_Time_Of_Peak_Flow + , ap.Data_Logging_Peak_Flow + , ap.Data_Logging_Time_Of_Maximum_Flow + , ap.Data_Logging_Maximum_Flow + , ap.Data_Logging_Backward_Volume + , ap.Data_Logging_Counter + , ap.Data_Logging_Alarm_State + , ap.FDR_Day_Of_Data_Reading + , ap.FDR_Forward_Counter + , ap.FDR_Time_Of_Minimum_Flow + , ap.FDR_Minimum_Flow + , ap.FDR_Time_Of_Broken_Pipe + , ap.FDR_Broken_Pipe_Flow + , ap.FDR_Current_Flow + , ap.FDR_Time_Of_Peak_Flow + , ap.FDR_Peak_Flow + , ap.FDR_Time_Of_Maximum_Flow + , ap.FDR_Maximum_Flow + , ap.FDR_Backward_Volume + , ap.FDR_Counter + , ap.FDR_Alarm_State + , ap.Transmission_Intervall + , ap.LAT_Interval + , utc.UTC_Offset + , wup.Wake_Up_Interval + , rfpl.PowerLevelHex + FROM eRegister_Auftragposition AS ap + LEFT JOIN eRegister_Metersize AS ms + ON ap.Meter_Size_Id = ms.Id + LEFT JOIN eRegister_Radiofrequency AS rf + ON ap.Radiofrequency_Id = rf.Id + LEFT JOIN eRegister_Unit AS u + ON ap.Unit_Id = u.Id + LEFT JOIN eRegister_DecimalPoint AS dp + ON ap.Decimal_Point_Id = dp.Id + LEFT JOIN eRegister_LeakagePeriod AS lp + ON ap.Leakage_Period_Id = lp.Id + LEFT JOIN eRegister_LeakageThreshold AS lt + ON ap.Leakage_Threshold_Id = lt.Id + LEFT JOIN eRegister_BrokenPipePeriod AS bpp + ON ap.Broken_Pipe_Period_Id = bpp.Id + LEFT JOIN eRegister_BrokenPipeThreshold AS bpt + ON ap.Broken_Pipe_Threshold_Id = bpt.Id + LEFT JOIN eRegister_DataLoggingPeriod AS dl + ON ap.Data_Logging_Period_Id = dl.Id + LEFT JOIN eRegister_UtcOffset AS utc + ON ap.UTC_Offset_Id = utc.Id + LEFT JOIN eRegister_WakeUpInterval AS wup + ON ap.Wake_Up_Interval_Id = wup.Id + LEFT JOIN eRegister_RFPowerlevel AS rfpl + ON rf.Frequency = rfpl.Frequenz + AND ms.Nennweite = rfpl.Nennweite) AS x + ON aap.FertigungsauftragNr = x.FertigungsauftragNr + JOIN Identnr AS idn + ON aap.IdentNr = idn.IdentNr + LEFT JOIN VAKO_Merkmale AS vm + ON SUBSTRING(idn.VakoCode, 1, LEN(vm.Basis)) = vm.Basis + AND SUBSTRING(idn.VakoCode, vm.Stelle, vm.Laenge) = vm.Charcode + AND vm.Wert LIKE 'CSD%' + LEFT JOIN VAKO_Merkmale AS fs + ON SUBSTRING(idn.VakoCode, 1, LEN(fs.Basis)) = fs.Basis + AND SUBSTRING(idn.VakoCode, fs.Stelle, fs.Laenge) = fs.Charcode + AND fs.Bezeichnung LIKE 'Funkschlüssel' + FOR XML PATH('eProgrammingParameters') + , ROOT('eProgramingParametersList')) AS XML)") + .FirstOrDefault(x => x.GetXml(0)); - var pams = eregister.BuildPams(); - foreach (var pam in pams) + var serializer = new XmlSerializer(typeof(eProgramingParametersList)); + var model = serializer.Deserialize(xml); + + if (model is Eregister eregister) { - Console.WriteLine($"{pam.Name}: {BitConverter.ToString(pam.CommandBytes.ToArray()).Replace("-", String.Empty)}"); + foreach (var pam in eregister.BuildPams()) + { + Console.WriteLine($"{pam.PamNames}: {BitConverter.ToString(pam.CommandBytes.ToArray())}"); + Console.WriteLine(); + } } } @@ -23,7 +225,7 @@ { ChangeWakeUp = new ChangeWakeUp { - Mode = WakeUpMode.StayAwake + WakeUpMode = WakeUpMode.StayAwake }, ChangeMeterReading = new ChangeMeterReading { diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj index aae88833..910d4233 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj @@ -41,11 +41,11 @@ - - - - - + + + + + diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtBroadcaster.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRT.cs similarity index 76% rename from Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtBroadcaster.cs rename to Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRT.cs index b3078ae4..0df8c07e 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtBroadcaster.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRT.cs @@ -4,15 +4,15 @@ using System.Collections.Concurrent; using System.Threading; - public class JustSirtBroadcaster + public class SIRT { - private static readonly ConcurrentDictionary runningTasks - = new ConcurrentDictionary(); - private readonly JustSirtProxy proxy; + private static readonly ConcurrentDictionary runningTasks + = new ConcurrentDictionary(); + private readonly SirtProxy proxy; - public JustSirtBroadcaster(String portName) + public SIRT(String portName) { - this.proxy = new JustSirtProxy(portName); + this.proxy = new SirtProxy(portName); this.proxy.MessageReceived += this.Proxy_MessageReceived; } @@ -39,11 +39,11 @@ var awaiter = new ManualResetEventSlim(); - var task = JustSirtTask.ActivateSIRT; + var task = SirtTask.ActivateSIRT; task.Cancelled += _ => awaiter.Set(); task.Completed += _task => { - activated = _task.TaskStatus == JustTaskStatus.Completed; + activated = _task.TaskStatus == TaskStatus.Completed; if (activated) { @@ -60,11 +60,11 @@ if (activated) { - task = JustSirtTask.IdentifySIRT; + task = SirtTask.IdentifySIRT; task.Cancelled += _ => awaiter.Set(); task.Completed += _task => { - activated = _task.TaskStatus == JustTaskStatus.Completed; + activated = _task.TaskStatus == TaskStatus.Completed; if (activated) { @@ -96,25 +96,25 @@ return this.proxy.TryClose(); } - public JustTaskStatus TryRun(JustSirtTask task) + public TaskStatus TryRun(SirtTask task) { if (!this.proxy.IsOpen) { - return JustTaskStatus.ProxyNotOpen; + return TaskStatus.ProxyNotOpen; } var address = task.Address; if (runningTasks.TryGetValue(address, out var runningTask) && runningTask != null) { - return JustTaskStatus.InRunningTasks; + return TaskStatus.InRunningTasks; } var countInPamPool = 0; foreach (var _task in runningTasks.Values) { - if (_task != null && _task.Cmd == JustSirtMessage.W_PAM) + if (_task != null && _task.Cmd == SirtMessage.W_PAM) { countInPamPool++; } @@ -122,16 +122,16 @@ if (countInPamPool >= 5) { - return JustTaskStatus.PamPoolIsFull; + return TaskStatus.PamPoolIsFull; } task = runningTasks.AddOrUpdate(address, task, (a, t) => task); - if (task.TaskStatus == JustTaskStatus.Completed) + if (task.TaskStatus == TaskStatus.Completed) { this.Task_DismissFromRunningTasks(task); - return JustTaskStatus.Completed; + return TaskStatus.Completed; } task.Cancelled += this.Task_DismissFromRunningTasks; @@ -141,10 +141,10 @@ this.proxy.WriteBytes(task); this.Log($"{task.Address}|{BitConverter.ToString(task)}"); - return JustTaskStatus.Sent; + return TaskStatus.Sent; } - private void Proxy_MessageReceived(JustSirtMessage message) + private void Proxy_MessageReceived(SirtMessage message) { var address = message.Address; @@ -155,7 +155,7 @@ } } - private void Task_DismissFromRunningTasks(JustSirtTask task) + private void Task_DismissFromRunningTasks(SirtTask task) { task.Cancelled -= this.Task_DismissFromRunningTasks; task.Completed -= this.Task_DismissFromRunningTasks; diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtMessage.cs similarity index 94% rename from Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs rename to Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtMessage.cs index e868a598..c2b53f16 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtMessage.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtMessage.cs @@ -2,7 +2,7 @@ { using System; - public class JustSirtMessage + public class SirtMessage { public const Byte MIN_LEN = 12; public const Byte PC2SIRT = 0x55; @@ -23,14 +23,14 @@ private Byte[] bytes; - public JustSirtMessage(DateTime? timestamp = null) + public SirtMessage(DateTime? timestamp = null) { this.timestamp = timestamp ?? DateTime.Now; this.bytes = new Byte[MIN_LEN]; this.bytes[0] = PC2SIRT; } - public JustSirtMessage(Byte[] bytes, DateTime? timestamp = null) + public SirtMessage(Byte[] bytes, DateTime? timestamp = null) { this.timestamp = timestamp ?? DateTime.Now; this.bytes = bytes; @@ -132,7 +132,7 @@ public override String ToString() => BitConverter.ToString(this.ToByteArray()); - public static implicit operator Byte[](JustSirtMessage message) + public static implicit operator Byte[](SirtMessage message) => message.ToByteArray() ?? new Byte[0]; private UInt16 CRCCCITT(Int32 start, Int32 length) diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtProxy.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtProxy.cs similarity index 89% rename from Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtProxy.cs rename to Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtProxy.cs index 8b872724..05e9ee51 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtProxy.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtProxy.cs @@ -2,16 +2,15 @@ { using System; using System.Collections.Generic; - using System.Diagnostics; using System.Timers; - public class JustSirtProxy + public class SirtProxy { private readonly JustSerialPort serialPort; private readonly List buffer; private readonly Timer timer; - public JustSirtProxy(String portName) + public SirtProxy(String portName) { var settings = new SerialPortSettings { @@ -26,7 +25,7 @@ this.timer = new Timer(); } - public event Action MessageReceived; + public event Action MessageReceived; public Boolean IsOpen => this.serialPort.IsOpen; @@ -96,7 +95,7 @@ } this.bufferLength = this.buffer.Count; - this.start = this.buffer.IndexOf(JustSirtMessage.SIRT2PC); + this.start = this.buffer.IndexOf(SirtMessage.SIRT2PC); if (this.start < 0) { @@ -119,7 +118,7 @@ { return; } - else if (this.buffer[this.stopIX] != JustSirtMessage.STOP) + else if (this.buffer[this.stopIX] != SirtMessage.STOP) { return; } @@ -129,7 +128,7 @@ this.buffer.CopyTo(this.start, this.bytes, 0, this.bytesLength); this.buffer.RemoveRange(0, this.start + this.bytesLength); - this.MessageReceived?.Invoke(new JustSirtMessage(this.bytes)); + this.MessageReceived?.Invoke(new SirtMessage(this.bytes)); } } } diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtTask.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs similarity index 61% rename from Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtTask.cs rename to Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs index da171d71..e1c47187 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustSirtTask.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs @@ -6,14 +6,14 @@ using System.Collections.Concurrent; using System.Timers; - public class JustSirtTask + public class SirtTask { private readonly Timer timer = new Timer(); - private readonly JustSirtMessage request = new JustSirtMessage(); - private readonly ConcurrentStack responses = new ConcurrentStack(); + private readonly SirtMessage request = new SirtMessage(); + private readonly ConcurrentStack responses = new ConcurrentStack(); - public event Action Completed; - public event Action Cancelled; + public event Action Completed; + public event Action Cancelled; public Byte Cmd { @@ -45,35 +45,35 @@ set => this.request.Data = value; } - public JustTaskStatus TaskStatus { get; protected set; } + public TaskStatus TaskStatus { get; protected set; } public Byte[] LastPayload => this.responses.TryPeek(out var response) ? response.Data : default(Byte[]); - public virtual void ReceiveMessage(JustSirtMessage response, Int32 mhz) + public virtual void ReceiveMessage(SirtMessage response, Int32 mhz) { this.responses.Push(response); - if (this.TaskStatus != JustTaskStatus.Completed) + if (this.TaskStatus != TaskStatus.Completed) { - this.TaskStatus = JustTaskStatus.Running; + this.TaskStatus = TaskStatus.Running; - if (this.request.Cmd == JustSirtMessage.W_PAM) + if (this.request.Cmd == SirtMessage.W_PAM) { - if (response.Cmd == JustSirtMessage.FROMAIR && response.Data[0] == JustSirtMessage.SEMI) + if (response.Cmd == SirtMessage.FROMAIR && response.Data[0] == SirtMessage.SEMI) { - this.TaskStatus = JustTaskStatus.Completed; + this.TaskStatus = TaskStatus.Completed; } } - else if (response.Cmd == JustSirtMessage.ACKNANSW) + else if (response.Cmd == SirtMessage.ACKNANSW) { - this.TaskStatus = JustTaskStatus.Completed; + this.TaskStatus = TaskStatus.Completed; } } - if (this.TaskStatus == JustTaskStatus.Completed) + if (this.TaskStatus == TaskStatus.Completed) { this.Completed?.Invoke(this); this.timer.Stop(); @@ -83,12 +83,12 @@ public virtual void PrepareForRun() { this.responses.Clear(); - this.TaskStatus = JustTaskStatus.Pending; + this.TaskStatus = TaskStatus.Pending; this.timer.AutoReset = false; this.timer.Interval = 10_000; this.timer.Elapsed += (sender, _1) => { - this.TaskStatus = JustTaskStatus.Cancelled; + this.TaskStatus = TaskStatus.Cancelled; this.Cancelled?.Invoke(this); }; @@ -101,12 +101,12 @@ public override String ToString() => BitConverter.ToString(this.ToByteArray()); - public static implicit operator Byte[] (JustSirtTask task) + public static implicit operator Byte[] (SirtTask task) => task?.ToByteArray() ?? new Byte[] { }; - public static readonly JustSirtTask ActivateSIRT = new JustSirtTask + public static readonly SirtTask ActivateSIRT = new SirtTask { - Cmd = JustSirtMessage.W_REG, + Cmd = SirtMessage.W_REG, Address = 0x20000000, P2 = 0x05, Data = new Byte[] @@ -119,22 +119,22 @@ } }; - public static readonly JustSirtTask IdentifySIRT = new JustSirtTask + public static readonly SirtTask IdentifySIRT = new SirtTask { - Cmd = JustSirtMessage.R_REG, + Cmd = SirtMessage.R_REG, Address = 0x11001820, P2 = 0x08 }; - public static readonly JustSirtTask ReadPamPool = new JustSirtTask + public static readonly SirtTask ReadPamPool = new SirtTask { - Cmd = JustSirtMessage.R_PAM, + Cmd = SirtMessage.R_PAM, Address = 0xFFFFFFFF }; - public static JustSirtTask DeleteFromPamPool(UInt32 address) => new JustSirtTask + public static SirtTask DeleteFromPamPool(UInt32 address) => new SirtTask { - Cmd = JustSirtMessage.W_PAM, + Cmd = SirtMessage.W_PAM, P1 = new P811 { DelPamAdr = true }, Address = address }; diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustTaskStatus.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/TaskStatus.cs similarity index 89% rename from Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustTaskStatus.cs rename to Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/TaskStatus.cs index baf4dbb6..ac00bafd 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/JustTaskStatus.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/TaskStatus.cs @@ -1,6 +1,6 @@ namespace Common.Hardware.Interfaces.Ports.SIRT { - public enum JustTaskStatus + public enum TaskStatus { Pending = 0, Running = 1, diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports/JustSerialPort.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports/JustSerialPort.cs index 47254b14..528ea128 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports/JustSerialPort.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports/JustSerialPort.cs @@ -21,7 +21,6 @@ public JustSerialPort(SerialPortSettings serialPortSettings) { - this.serialPortSettings = serialPortSettings; this.portName = this.serialPortSettings.PortName; } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeCustomerText.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeCustomerText.cs index 155f3cee..277477a0 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeCustomerText.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeCustomerText.cs @@ -5,12 +5,14 @@ public class ChangeCustomerText : Pam { + private Int32 serialno; + public ChangeCustomerText() : base(10, ChangeCustomerText) { } - public ChangeCustomerText(String text) : this() - => this.Text = text; + public ChangeCustomerText(Object text) : this() + => this.Text = $"{text}".Trim(); public String Text { diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs index 0dbeeb1d..00aae55d 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeSensusRFEncryptionKey.cs @@ -35,7 +35,7 @@ public String HexKey { get => BitConverter.ToString(this.Key).Replace("-", String.Empty); - set => this.Key = value.ToBytes(); + set => this.Key = value.ToByteArray(); } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeWakeUp.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeWakeUp.cs index 8127277d..07a5d89a 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeWakeUp.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/ChangeWakeUp.cs @@ -9,14 +9,20 @@ } public ChangeWakeUp(WakeUpMode mode) : base(2, ChangeWakeUpMode) - => this.Mode = mode; + => this.WakeUpMode = mode; - public WakeUpMode Mode + public WakeUpMode WakeUpMode { get => (WakeUpMode)this.bytes[1]; set => this.bytes[1] = (Byte)value; } + public Byte Mode + { + get => this.bytes[1]; + set => this.bytes[1] = value; + } + public static ChangeWakeUp AutoOff => WakeUpMode.SleepAutoOff; public static ChangeWakeUp AutoOn => WakeUpMode.SleepAutoOn; diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateAlarms.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateAlarms.cs index 690038d0..5daeaf87 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateAlarms.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/DeactivateAlarms.cs @@ -1,9 +1,15 @@ namespace Common.Hardware.WaterMeter.eRegister.Features { + using System; + public class DeactivateAlarms : AlarmsMask { public DeactivateAlarms() : base(2, DeactivateAlarms) { } + + public DeactivateAlarms(Byte alarmsMask) : base(alarmsMask, DeactivateAlarms) + { + } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj index 47af8b77..5d8617b9 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj @@ -63,6 +63,7 @@ + diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs index 38ae81d1..4935fc5c 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs @@ -2,11 +2,6 @@ { using Common.Hardware.WaterMeter.eRegister.Features; - using System; - using System.Collections.Generic; - using System.Linq; - using System.Reflection; - public class Eregister { [PamType(AuthLevel.II)] @@ -90,6 +85,10 @@ [PamType(AuthLevel.III)] public SetBytterySeconds SetBytterySeconds { get; set; } + // TODO: Implement in builder + [PamType(AuthLevel.III)] + public ChangeRadioId ChangeRadioId { get; set; } + [PamType(AuthLevel.III)] public SetPcbId SetPcbId { get; set; } @@ -99,6 +98,22 @@ [PamType(AuthLevel.O, true)] public RequestLoggingData RequestLoggingData { get; set; } + // TODO: Implement in builder + // [PamType(AuthLevel.I, true)] + public ChangePin ChangePinI { get; set; } + + // TODO: Implement in builder + // [PamType(AuthLevel.II, true)] + public ChangePin ChangePinII { get; set; } + + // TODO: Implement in builder + // [PamType(AuthLevel.III, true)] + public ChangePin ChangePinIII { get; set; } + + // TODO: Implement in builder + // [PamType(AuthLevel.O)] + public ProvidePin ProvidePin { get; set; } + [PamType(AuthLevel.III, true)] public SendTestPattern SendTestPattern { get; set; } @@ -114,7 +129,11 @@ [PamType(AuthLevel.II)] public ChangeCustomerText ChangeCustomerText { get; set; } - [PamType(AuthLevel.O, true)] + // TODO: Implement in builder + // [PamType(AuthLevel.O)] + public ChangeSensusRFEncryptionKey ChangeSensusRFEncryptionKey { get; set; } + + [PamType(AuthLevel.II)] public EncapsulatedFlexNet EncapsulatedFlexNet { get; set; } [PamType(AuthLevel.O)] @@ -128,147 +147,5 @@ [PamType(AuthLevel.III)] public SetVariablePcbId SetVariablePcbId { get; set; } - - public IEnumerable BuildPams() - { - var pams = this.GetPams() - .OrderBy(x => x.CommandBytes[0]); - var cmds = new List(); - var pamsLevel0 = new List(); - var pamsLevel1 = new List(); - var pamsLevel2 = new List(); - var pamsLevel3 = new List(); - - var pin1 = new ProvidePin { AuthLevel = AuthLevel.I }.ToByteArray(); - var pin2 = new ProvidePin { AuthLevel = AuthLevel.II }.ToByteArray(); - var pin3 = new ProvidePin { AuthLevel = AuthLevel.III }.ToByteArray(); - - foreach (var pam in pams) - { - if (pam.IsSingleCmd) - { - if (pam.AuthLevel == AuthLevel.I) - { - pam.CommandBytes.AddRange(pin1); - } - else if (pam.AuthLevel == AuthLevel.II) - { - pam.CommandBytes.AddRange(pin2); - } - else if (pam.AuthLevel == AuthLevel.III) - { - pam.CommandBytes.AddRange(pin3); - } - - cmds.Add(pam); - } - else - { - if (pam.AuthLevel == AuthLevel.O) - { - pamsLevel0.Add(pam); - } - else if (pam.AuthLevel == AuthLevel.I) - { - pamsLevel1.Add(pam); - } - else if (pam.AuthLevel == AuthLevel.II) - { - pamsLevel2.Add(pam); - } - else if (pam.AuthLevel == AuthLevel.III) - { - pamsLevel3.Add(pam); - } - } - } - - var pamLevel0 = new EregisterPam(); - - foreach (var pam in pamsLevel0) - { - pamLevel0.Name += $"{pam.Name}{Environment.NewLine}"; - pamLevel0.CommandBytes.AddRange(pam.CommandBytes); - } - - pamLevel0.Name = pamLevel0.Name.Trim(); - - var pamLevel1 = new EregisterPam(); - - foreach (var pam in pamsLevel1) - { - pamLevel1.Name += $"{pam.Name}{Environment.NewLine}"; - pamLevel1.CommandBytes.AddRange(pam.CommandBytes); - } - - pamLevel1.Name = pamLevel1.Name.Trim(); - pamLevel1.CommandBytes.AddRange(pin1); - - var pamLevel2 = new EregisterPam(); - - foreach (var pam in pamsLevel2) - { - pamLevel2.Name += $"{pam.Name}{Environment.NewLine}"; - pamLevel2.CommandBytes.AddRange(pam.CommandBytes); - } - - pamLevel2.Name = pamLevel2.Name.Trim(); - pamLevel2.CommandBytes.AddRange(pin2); - - var pamLevel3 = new EregisterPam(); - - foreach (var pam in pamsLevel3) - { - pamLevel3.Name += $"{pam.Name}{Environment.NewLine}"; - pamLevel3.CommandBytes.AddRange(pam.CommandBytes); - } - - pamLevel3.Name = pamLevel3.Name.Trim(); - pamLevel3.CommandBytes.AddRange(pin3); - - cmds.Insert(0, pamLevel3); - cmds.Insert(0, pamLevel2); - cmds.Insert(0, pamLevel1); - cmds.Insert(0, pamLevel0); - - return cmds; - } - - private IEnumerable GetPams() - { - foreach (var eregisterProperty in typeof(Eregister).GetProperties(BindingFlags.Public | BindingFlags.Instance)) - { - var pamType = eregisterProperty.GetCustomAttribute(); - - if (pamType is null) - { - continue; - } - - var propertyValue = eregisterProperty.GetValue(this); - - if (propertyValue is null) - { - continue; - } - else if (propertyValue is EregisterDebug debug) - { - foreach (var pam in debug.GetPams().OrderBy(x => x.CommandBytes[2])) - { - yield return pam; - } - } - else if (propertyValue is Pam pam) - { - yield return new EregisterPam - { - Name = eregisterProperty.Name, - AuthLevel = pamType.AuthLevel, - IsSingleCmd = pamType.IsSingleCmd, - CommandBytes = pam.ToByteArray().ToList() - }; - } - } - } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs index a25820bf..d1574bdd 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs @@ -1,10 +1,6 @@ namespace Common.Hardware.WaterMeter.eRegister { using Common.Hardware.WaterMeter.eRegister.Features; - - using System.Collections.Generic; - using System.Linq; - using System.Reflection; public class EregisterDebug { @@ -52,35 +48,5 @@ [PamType(AuthLevel.III, true)] public SetMeterType SetMeterType { get; set; } - - internal IEnumerable GetPams() - { - foreach (var eregisterProperty in typeof(EregisterDebug).GetProperties(BindingFlags.Public | BindingFlags.Instance)) - { - var pamType = eregisterProperty.GetCustomAttribute(); - - if (pamType is null) - { - continue; - } - - var propertyValue = eregisterProperty.GetValue(this); - - if (propertyValue is null) - { - continue; - } - else if (propertyValue is Pam pam) - { - yield return new EregisterPam - { - Name = eregisterProperty.Name, - AuthLevel = pamType.AuthLevel, - IsSingleCmd = pamType.IsSingleCmd, - CommandBytes = pam.ToByteArray().ToList() - }; - } - } - } } } \ No newline at end of file diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs new file mode 100644 index 00000000..ad3b0d1e --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs @@ -0,0 +1,211 @@ +namespace Common.Hardware.WaterMeter.eRegister +{ + using Common.Hardware.WaterMeter.eRegister.Features; + + using System; + using System.Collections.Generic; + using System.Linq; + using System.Reflection; + + public static class EregisterExtensions + { + public static IEnumerable BuildPams(this Eregister eregister) + { + var pams = eregister + .GetPams() + .OrderBy(x => x.CommandBytes[0]); + var cmds = new List(); + var pamsLevel0 = new List(); + var pamsLevel1 = new List(); + var pamsLevel2 = new List(); + var pamsLevel3 = new List(); + + var pin1 = new ProvidePin { AuthLevel = AuthLevel.I }.ToByteArray(); + var pin2 = new ProvidePin { AuthLevel = AuthLevel.II }.ToByteArray(); + var pin3 = new ProvidePin { AuthLevel = AuthLevel.III }.ToByteArray(); + + foreach (var pam in pams) + { + if (pam.IsSingleCmd) + { + if (pam.AuthLevel == AuthLevel.I) + { + pam.CommandBytes.AddRange(pin1); + } + else if (pam.AuthLevel == AuthLevel.II) + { + pam.CommandBytes.AddRange(pin2); + } + else if (pam.AuthLevel == AuthLevel.III) + { + pam.CommandBytes.AddRange(pin3); + } + + cmds.Add(pam); + } + else + { + if (pam.AuthLevel == AuthLevel.O) + { + pamsLevel0.Add(pam); + } + else if (pam.AuthLevel == AuthLevel.I) + { + pamsLevel1.Add(pam); + } + else if (pam.AuthLevel == AuthLevel.II) + { + pamsLevel2.Add(pam); + } + else if (pam.AuthLevel == AuthLevel.III) + { + pamsLevel3.Add(pam); + } + } + } + + if (pamsLevel3.Count > 0) + { + var pamLevel3 = new EregisterPam(); + + foreach (var pam in pamsLevel3) + { + pamLevel3.PamNames += $"{pam.PamNames}{Environment.NewLine}"; + pamLevel3.CommandBytes.AddRange(pam.CommandBytes); + } + + pamLevel3.PamNames = pamLevel3.PamNames?.Trim(); + pamLevel3.CommandBytes.AddRange(pin3); + cmds.Insert(0, pamLevel3); + } + + if (pamsLevel2.Count > 0) + { + var pamLevel2 = new EregisterPam(); + + foreach (var pam in pamsLevel2) + { + pamLevel2.PamNames += $"{pam.PamNames}{Environment.NewLine}"; + pamLevel2.CommandBytes.AddRange(pam.CommandBytes); + } + + pamLevel2.PamNames = pamLevel2.PamNames?.Trim(); + pamLevel2.CommandBytes.AddRange(pin2); + cmds.Insert(0, pamLevel2); + } + + if (pamsLevel1.Count > 0) + { + var pamLevel1 = new EregisterPam(); + + foreach (var pam in pamsLevel1) + { + pamLevel1.PamNames += $"{pam.PamNames}{Environment.NewLine}"; + pamLevel1.CommandBytes.AddRange(pam.CommandBytes); + } + + pamLevel1.PamNames = pamLevel1.PamNames?.Trim(); + pamLevel1.CommandBytes.AddRange(pin1); + cmds.Insert(0, pamLevel1); + } + + if (pamsLevel0.Count > 0) + { + var pamLevel0 = new EregisterPam(); + + foreach (var pam in pamsLevel0) + { + pamLevel0.PamNames += $"{pam.PamNames}{Environment.NewLine}"; + pamLevel0.CommandBytes.AddRange(pam.CommandBytes); + } + + pamLevel0.PamNames = pamLevel0.PamNames?.Trim(); + cmds.Insert(0, pamLevel0); + } + + return cmds; + } + + public static IEnumerable BuildTasks(this IEnumerable pams, Action taskOptions) + { + foreach (var pam in pams) + { + var task = new ProgrammingTask(); + + taskOptions(task); + + task.PamNames = pam.PamNames; + task.Data = pam.CommandBytes.ToArray(); + } + + yield break; + } + + public static IEnumerable GetPams(this Eregister eregister) + { + foreach (var eregisterProperty in typeof(Eregister).GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + var pamType = eregisterProperty.GetCustomAttribute(); + + if (pamType is null) + { + continue; + } + + var propertyValue = eregisterProperty.GetValue(eregister); + + if (propertyValue is null) + { + continue; + } + else if (propertyValue is EregisterDebug debug) + { + foreach (var pam in debug.GetPams().OrderByDescending(x => x.CommandBytes[2])) + { + yield return pam; + } + } + else if (propertyValue is Pam pam) + { + yield return new EregisterPam + { + PamNames = eregisterProperty.Name, + AuthLevel = pamType.AuthLevel, + IsSingleCmd = pamType.IsSingleCmd, + CommandBytes = pam.ToByteArray().ToList() + }; + } + } + } + + public static IEnumerable GetPams(this EregisterDebug debug) + { + foreach (var eregisterProperty in typeof(EregisterDebug).GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + var pamType = eregisterProperty.GetCustomAttribute(); + + if (pamType is null) + { + continue; + } + + var propertyValue = eregisterProperty.GetValue(debug); + + if (propertyValue is null) + { + continue; + } + else if (propertyValue is Pam pam) + { + yield return new EregisterPam + { + PamNames = eregisterProperty.Name, + AuthLevel = pamType.AuthLevel, + IsSingleCmd = pamType.IsSingleCmd, + CommandBytes = pam.ToByteArray().ToList() + }; + } + } + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs index a1ad9f3a..f445ac0d 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs @@ -7,7 +7,7 @@ public class EregisterPam { - public String Name { get; set; } + public String PamNames { get; set; } public AuthLevel AuthLevel { get; set; } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs index a3aac8ea..00e7c22d 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs @@ -103,7 +103,7 @@ internal ProgrammingTask BuildWupTxLatMBusTask() => new ProgrammingTask { - Cmd = JustSirtMessage.W_PAM, + Cmd = SirtMessage.W_PAM, P1 = new P811 { DelPamSemi = true, @@ -124,7 +124,7 @@ internal ProgrammingTask BuildTestParametersTask() => new ProgrammingTask { - Cmd = JustSirtMessage.W_PAM, + Cmd = SirtMessage.W_PAM, P1 = new P811 { DelPamSemi = true @@ -142,7 +142,7 @@ } .Append(new ProvidePin { - AuthLevel = Features.AuthLevel.III + AuthLevel = AuthLevel.III }), EncryptionKey = this.IsSealed ? this.EncryptionKey : null }; @@ -150,7 +150,7 @@ internal ProgrammingTask BuildSetupDisplayTask() => new ProgrammingTask { - Cmd = JustSirtMessage.W_PAM, + Cmd = SirtMessage.W_PAM, P1 = new P811 { DelPamSemi = true @@ -167,7 +167,7 @@ internal ProgrammingTask BuildOptoOnTask() => new ProgrammingTask { - Cmd = JustSirtMessage.W_PAM, + Cmd = SirtMessage.W_PAM, P1 = new P811 { DelPamSemi = true @@ -183,7 +183,7 @@ EncryptionKey = this.IsSealed ? this.EncryptionKey : null }; - internal void ParseParameters() + public void ParseParameters() { var length = this.Parameters?.Length ?? 0; @@ -252,78 +252,70 @@ if (!String.IsNullOrWhiteSpace(radioKey)) { - this.EncryptionKey = radioKey.ToBytes(); + this.EncryptionKey = radioKey.ToByteArray(); } } } } - - var httpClient = new HttpClient(); } - internal IEnumerable BuildFinalProgrammingTasks() + public IEnumerable BuildFinalProgrammingTasks() { - yield return new ProgrammingTask + var tasks = new Eregister { - Cmd = JustSirtMessage.W_PAM, - Address = this.RadioAddress, - P1 = new P811 + ChangeWakeUp = new ChangeWakeUp(WakeUpMode.StayAwake), + ChangeMeterReading = new ChangeMeterReading(this.DisplayVolume), + ChangeCustomerText = new ChangeCustomerText(this.Serialno), + DeactivateAlarms = new DeactivateAlarms(this.AlarmsMask), + ResetAlarms = new ResetAlarms(Byte.MaxValue), + ParameterizeLeakageDetection = new ParameterizeLeakageDetection(this.LeakageDetection), + ParameterizeBrokenPipeDetection = new ParameterizeBrokenPipeDetection(this.BrokenPipeDetection), + SetHistoricalErrorLimit = new SetHistoricalErrorLimit(this.HistoricalErrorLimit), + ChangeDataLoggerSettings = new ChangeDataLoggerSettings + { + TimeInterval = this.DataLoggerTimeInterval, + TimeOfMinimumFlow = this.DataLoggerMinFlowTime, + MinimumFlow = this.DataLoggerMinFlow + }, + ChangeFixedDateReadingSettings = new ChangeFixedDateReadingSettings + { + DayOfMonth = this.FixedDateReadingDay, + SettingI = this.FixedDateReadingSettingI, + SettingII = this.FixedDateReadingSettingII + }, + WirelessMBusMode = new WirelessMBusMode(this.MBusStatus), + SetPowerLevelSensusRF = new SetPowerLevel(this.PowerModeSensusRF), + SetPowerLevelFlexNet = new SetPowerLevel(this.PowerModeFlexNet), + ChangeNumberOfLatWindows = new ChangeNumberOfLatWindows(this.NumberOfLatWindows), + ChangeTransmissionInterval = new ChangeTransmissionInterval(this.TransmissionIntervalLast), + OpenMeteringTransmitionIntervalWMBus = new OpenMeteringTransmitionIntervalWMBus(this.OpenMeteringTransmissionInterval), + Debug = new EregisterDebug + { + DisableOTAFirmwareUpdate = new DisableOTAFirmwareUpdate(this.OTASettings), + SetActivationByThreshold = new SetActivationByThreshold(this.OTASettings), + } + } + .BuildPams() + .BuildTasks(options => + { + options.Address = this.RadioAddress; + options.Cmd = SirtMessage.W_PAM; + options.P1 = new P811 { DelPamSemi = true - }, - Data = ChangeWakeUp.StayAwake - // Pin level 2 ^ - // Pin level 3 - only production mode - .Append(new ChangeMeterId(this.MeterId)) - // Pin level 3 - only production mode - .Append(new ChangeMeterReading(this.DisplayVolume)) - // Pin level 2 - .Append(new ChangeCustomerText($"{this.Serialno}")) - // Pin level 0 - .Append(new AlarmsMask(this.AlarmsMask, Pam.DeactivateAlarms)) - // Pin level 1 - .Append(new ResetAlarms()) - // Pin level 0 - .Append(new ParameterizeLeakageDetection(this.LeakageDetection)) - // Pin level 0 - .Append(new ParameterizeBrokenPipeDetection(this.BrokenPipeDetection)) - // Pin level 1 - .Append(new SetHistoricalErrorLimit(this.HistoricalErrorLimit)) - // Pin level 0 - .Append(new ChangeDataLoggerSettings - { - TimeInterval = this.DataLoggerTimeInterval, - TimeOfMinimumFlow = this.DataLoggerMinFlowTime, - MinimumFlow = this.DataLoggerMinFlow - }) - // Pin level 0 - .Append(new ChangeFixedDateReadingSettings - { - DayOfMonth = this.FixedDateReadingDay, - SettingI = this.FixedDateReadingSettingI, - SettingII = this.FixedDateReadingSettingII - }) - // Pin level 2 - .Append(new WirelessMBusMode(this.MBusStatus)) - // Pin level 0 - .Append(new SetPowerLevel(this.PowerModeSensusRF)) - // Pin level 3 - only production mode - .Append(new SetPowerLevel(this.PowerModeFlexNet)) - // Pin level 3 - single cmd - .Append(new DisableOTAFirmwareUpdate(this.OTASettings)) - // Pin level 3 - single cmd - .Append(new SetActivationByThreshold(this.OTASettings)) - // Pin level 2 - .Append(new OpenMeteringTransmitionIntervalWMBus(this.OpenMeteringTransmissionInterval)) - // Pin level 2 - .Append(new ChangeTransmissionInterval(this.TransmissionIntervalLast)) - // Pin level 2 - .Append(new ChangeNumberOfLatWindows(this.NumberOfLatWindows)) - // Pin level 2 - .Append(new ChangeSensusRFEncryptionKey(this.EncryptionKey)) - // Pin level 3 - .Append(new ChangeRadioId(this.FinalAddress)) - }; + }; + }); + + foreach (var task in tasks) + { + yield return task; + } } } } + +//// TODO: +//// Pin level 2 +//.Append(new ChangeSensusRFEncryptionKey(this.EncryptionKey)) +//// Pin level 3 +//.Append(new ChangeRadioId(this.FinalAddress)) \ No newline at end of file diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs index 5d56ef50..98a9e5c2 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs @@ -21,7 +21,7 @@ private readonly Dictionary> completedTasks = new Dictionary>(); private readonly ILogger logger = CreateNLogger("SIRT"); - private JustSirtBroadcaster broadcaster; + private SIRT broadcaster; private Int32 rssiRow; public event Action OnProgress; @@ -272,7 +272,7 @@ foreach (var task in tasks) { - if (task.TaskStatus != JustTaskStatus.Completed) + if (task.TaskStatus != TaskStatus.Completed) { this.broadcaster.TryRun(task); @@ -337,7 +337,7 @@ while (true) { - if (this.broadcaster.TryRun(task) == JustTaskStatus.Sent) + if (this.broadcaster.TryRun(task) == TaskStatus.Sent) { task.Cancelled += _ => awaiter.Set(); task.Completed += _ => awaiter.Set(); @@ -346,7 +346,7 @@ awaiter.Reset(); } - if (task.TaskStatus == JustTaskStatus.Completed) + if (task.TaskStatus == TaskStatus.Completed) { break; } @@ -379,20 +379,6 @@ } } - public void Run(ProgrammingTask task) - { - var status = this.broadcaster.TryRun(task); - var awaiter = new ManualResetEventSlim(); - - while (status != JustTaskStatus.Sent) - { - awaiter.Wait(1000); - awaiter.Reset(); - - status = this.broadcaster.TryRun(task); - } - } - public Boolean StartOnCOMPort(String portName) { var activated = false; @@ -401,7 +387,7 @@ { this.Stop(); - this.broadcaster = new JustSirtBroadcaster(portName); + this.broadcaster = new SIRT(portName); this.broadcaster.Logging += this.logger.Debug; if (this.broadcaster.TryActivate()) diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs index ee2696b7..02f20cd6 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using System.Linq; - public class ProgrammingTask : JustSirtTask + public class ProgrammingTask : SirtTask { private const String PENDING = nameof(PENDING); @@ -31,6 +31,8 @@ public TaskState State { get; private set; } = TaskState.None; + public String PamNames { get; internal set; } + public override void PrepareForRun() { this.OnProgress?.Invoke(this); @@ -38,21 +40,21 @@ base.PrepareForRun(); } - public override void ReceiveMessage(JustSirtMessage response, Int32 mhz) + public override void ReceiveMessage(SirtMessage response, Int32 mhz) { if (this.EncryptionKey != null && this.EncryptionKey.Length == 16) { this.DecryptResponse(response); } - if (this.State != TaskState.Success && response.Cmd == JustSirtMessage.FROMAIR) + if (this.State != TaskState.Success && response.Cmd == SirtMessage.FROMAIR) { var label = this.Label; var state = this.State; var data = response.Data; var type = data[0]; - if (type == JustSirtMessage.SEMI) + if (type == SirtMessage.SEMI) { var semi = new SEMI(data, (UInt16)mhz); label = semi.PAMStatus.ToString(); @@ -60,33 +62,33 @@ if (semi.PAMStatus == PAMStatus.OK) { state = TaskState.Success; - this.TaskStatus = JustTaskStatus.Completed; + this.TaskStatus = TaskStatus.Completed; } else { state = TaskState.Error; - this.TaskStatus = JustTaskStatus.Cancelled; + this.TaskStatus = TaskStatus.Cancelled; } this.semis.Add(semi); } - else if (type == JustSirtMessage.BUP) + else if (type == SirtMessage.BUP) { - label = nameof(JustSirtMessage.BUP); + label = nameof(SirtMessage.BUP); state = TaskState.Warning; this.bups.Add(new BUP(data)); } - else if (type == JustSirtMessage.LAT) + else if (type == SirtMessage.LAT) { - label = nameof(JustSirtMessage.LAT); + label = nameof(SirtMessage.LAT); state = TaskState.Warning; this.lats.Add(new LAT(data)); } - else if (type == JustSirtMessage.DEBUG) + else if (type == SirtMessage.DEBUG) { - label = nameof(JustSirtMessage.DEBUG); + label = nameof(SirtMessage.DEBUG); state = TaskState.Warning; this.debugs.Add(new DEBUG(data)); @@ -130,7 +132,7 @@ } else if (this.LastPayload != null) { - var last = new JustSirtMessage(this.LastPayload); + var last = new SirtMessage(this.LastPayload); P11 p11 = last.P1; if (p11.LenOverflow) @@ -205,7 +207,7 @@ return new Tuple(label, TaskState.Success); } - private void DecryptResponse(JustSirtMessage response) + private void DecryptResponse(SirtMessage response) { var data = response.Data; var length = data.Length; diff --git a/Common/Logic/Common.Logic.Extensions.SQL/Interfaces/ISQLReader.cs b/Common/Logic/Common.Logic.Extensions.SQL/Interfaces/ISQLReader.cs index 14652d85..b7ee3dd1 100644 --- a/Common/Logic/Common.Logic.Extensions.SQL/Interfaces/ISQLReader.cs +++ b/Common/Logic/Common.Logic.Extensions.SQL/Interfaces/ISQLReader.cs @@ -1,9 +1,12 @@ namespace Common.Logic.Extensions.SQL.Interfaces { using System; + using System.Xml; public interface ISQLReader { + XmlReader GetXml(Int32 index); + T GetValue(Int32 index); } } \ No newline at end of file diff --git a/Common/Logic/Common.Logic.Extensions.SQL/SQLReader.cs b/Common/Logic/Common.Logic.Extensions.SQL/SQLReader.cs index 1a19eaf5..470d15db 100644 --- a/Common/Logic/Common.Logic.Extensions.SQL/SQLReader.cs +++ b/Common/Logic/Common.Logic.Extensions.SQL/SQLReader.cs @@ -5,6 +5,8 @@ using System; using System.Data.SqlClient; using System.Diagnostics; + using System.IO; + using System.Xml; public class SQLReader : ISQLReader, IDisposable { @@ -19,6 +21,21 @@ this.sqlDataReader.Dispose(); } + public XmlReader GetXml(Int32 index) + { + var value = default(XmlReader); + + if (0 <= index && index < this.sqlDataReader.FieldCount) + { + if (!this.sqlDataReader.IsDBNull(index)) + { + value = this.sqlDataReader.GetSqlXml(index)?.CreateReader(); + } + } + + return value; + } + public T GetValue(Int32 index) { var value = default(T); diff --git a/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs b/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs index 55eedd39..63d39276 100644 --- a/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs +++ b/Common/Utils/Common.Utils.Extensions/BytesExtensions.cs @@ -233,7 +233,7 @@ return (Byte)sum; } - public static Byte[] ToBytes(this String hexString) + public static Byte[] ToByteArray(this String hexString) { var bytes = new List(); diff --git a/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs b/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs index 256bd1ac..71677e58 100644 --- a/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs +++ b/LaaProductionWeb/LaaProductionWeb/API/Eregister/RadioKeyController.cs @@ -13,30 +13,70 @@ { const String SENSUS_STANDARD = "E6C88800DEB868C0D6A84880CE982840"; + private readonly SqlConnection sqlConnection; + + public RadioKeyController() + => this.sqlConnection = WebApiApplication.GetService(); + [HttpGet] - [Route] - public IHttpActionResult Get([FromUri] Int32 serialno, [FromUri] Byte radioKeyType = 0) + [Route("byserialno/{serialno}")] + public IHttpActionResult Get([FromUri] Int32 serialno) { + var pono = default(Int32); + var address = default(Int64); + var keyType = default(String); + + this.sqlConnection + .CreateCommand($@" + SELECT DISTINCT + aap.FertigungsauftragNr + , aps.SerienNr + , er.Adresse + , idn.KeyType + FROM (SELECT DISTINCT + __idn.IdentNr + , SUBSTRING(vm.Wert, 1, 1) AS KeyType + FROM (SELECT DISTINCT + _idn.IdentNr + , _idn.VakoCode + FROM Identnr AS _idn + JOIN VAKO_Merkmale AS vm + ON SUBSTRING(_idn.VakoCode, 1, LEN(vm.Basis)) = vm.Basis + AND SUBSTRING(_idn.VakoCode, vm.Stelle, vm.Laenge) = vm.Charcode + AND ((vm.Stelle = 26 AND vm.Laenge = 1 AND vm.Charcode IN ('K', 'L', 'M')) + OR (vm.Stelle = 9 AND vm.Laenge = 1 AND vm.Charcode IN ('K', 'L', 'M'))) + AND (vm.Wert LIKE '%eRegister%')) AS __idn + JOIN VAKO_Merkmale AS vm + ON SUBSTRING(__idn.VakoCode, 1, LEN(vm.Basis)) = vm.Basis + AND SUBSTRING(__idn.VakoCode, vm.Stelle, vm.Laenge) = vm.Charcode + WHERE vm.Schluessel = 'Funkschluessel') AS idn + JOIN AlleAuftragPositionen AS aap + ON idn.IdentNr = aap.IdentNr + JOIN AuftragPositionSerienNr AS aps + ON aap.AuftragNr = aps.AuftragNr + AND aap.PositionNr = aps.PositionNr + JOIN eRegister AS er + ON aps.SerienNr = er.Seriennummer + WHERE aps.SerienNr = @{nameof(serialno)}") + .SetParameter(nameof(serialno), serialno) + .FirstOrDefault(x => + { + pono = x.GetValue(0); + address = x.GetValue(2); + keyType = x.GetValue(3); + }); + var radioKey = default(String); - if (radioKeyType == 1) + if (keyType == "S") { radioKey = SENSUS_STANDARD; } - else if (radioKeyType == 2) + else if (keyType == "Z") { - radioKey = this.GetOrdernoAndAddress(serialno, out var orderno, out var address); - - if (String.IsNullOrWhiteSpace(radioKey)) - { - radioKey = this.GetRadioKeyV2(orderno, address); - } - else - { - return this.BadRequest(radioKey); - } + radioKey = this.GetRadioKeyV2(pono, address); } - else if (radioKeyType == 3) + else if (keyType == "K") { radioKey = this.GetRadioKeyCSD(serialno); } @@ -44,47 +84,70 @@ return this.Ok(radioKey); } - private String GetOrdernoAndAddress(Int32 serialno, out Int32 orderno, out Int64 address) + [HttpGet] + [Route("byaddress/{address}")] + public IHttpActionResult Get([FromUri] Int64 address) { - orderno = 0; - address = 0; + var pono = default(Int32); + var serialno = default(Int32); + var keyType = default(String); - var result = default(String); + this.sqlConnection + .CreateCommand($@" + SELECT DISTINCT + aap.FertigungsauftragNr + , aps.SerienNr + , er.Adresse + , idn.KeyType + FROM (SELECT DISTINCT + __idn.IdentNr + , SUBSTRING(vm.Wert, 1, 1) AS KeyType + FROM (SELECT DISTINCT + _idn.IdentNr + , _idn.VakoCode + FROM Identnr AS _idn + JOIN VAKO_Merkmale AS vm + ON SUBSTRING(_idn.VakoCode, 1, LEN(vm.Basis)) = vm.Basis + AND SUBSTRING(_idn.VakoCode, vm.Stelle, vm.Laenge) = vm.Charcode + AND ((vm.Stelle = 26 AND vm.Laenge = 1 AND vm.Charcode IN ('K', 'L', 'M')) + OR (vm.Stelle = 9 AND vm.Laenge = 1 AND vm.Charcode IN ('K', 'L', 'M'))) + AND (vm.Wert LIKE '%eRegister%')) AS __idn + JOIN VAKO_Merkmale AS vm + ON SUBSTRING(__idn.VakoCode, 1, LEN(vm.Basis)) = vm.Basis + AND SUBSTRING(__idn.VakoCode, vm.Stelle, vm.Laenge) = vm.Charcode + WHERE vm.Schluessel = 'Funkschluessel') AS idn + JOIN AlleAuftragPositionen AS aap + ON idn.IdentNr = aap.IdentNr + JOIN AuftragPositionSerienNr AS aps + ON aap.AuftragNr = aps.AuftragNr + AND aap.PositionNr = aps.PositionNr + JOIN eRegister AS er + ON aps.SerienNr = er.Seriennummer + WHERE er.Adresse = @{nameof(address)}") + .SetParameter(nameof(address), address) + .FirstOrDefault(x => + { + pono = x.GetValue(0); + serialno = x.GetValue(1); + keyType = x.GetValue(3); + }); - try + var radioKey = default(String); + + if (keyType == "S") { - var _orderno = 0; - var _address = 0L; - - WebApiApplication - .GetService() - .CreateCommand($@" - SELECT DISTINCT TOP 1 - aap.FertigungsauftragNr - , er.Adresse - FROM eRegister AS er - JOIN AuftragPositionSerienNr AS aps - ON er.Seriennummer = aps.SerienNr - JOIN AlleAuftragPositionen AS aap - ON aps.AuftragNr = aap.AuftragNr - AND aps.PositionNr = aap.PositionNr - WHERE er.Seriennummer = @{nameof(serialno)}") - .SetParameter(nameof(serialno), serialno) - .FirstOrDefault(reader => - { - _orderno = reader.GetValue(0); - _address = reader.GetValue(1); - }); - - orderno = _orderno; - address = _address; + radioKey = SENSUS_STANDARD; } - catch (Exception e) + else if (keyType == "Z") { - result = e.Message; + radioKey = this.GetRadioKeyV2(pono, address); + } + else if (keyType == "K") + { + radioKey = this.GetRadioKeyCSD(serialno); } - return result; + return this.Ok(radioKey); } private string GetRadioKeyCSD(Int32 serialno) @@ -93,17 +156,21 @@ try { - radioKey = WebApiApplication - .GetService() + radioKey = this.sqlConnection .CreateCommand($@" - SELECT DISTINCT - errk.Radiokey - FROM AlleAuftragPositionSerienNr AS aaps - JOIN AlleAuftragPositionVakoMerkmale AS aapvm - ON aaps.FertigungsauftragNr = aapvm.FertigungsauftragNr - JOIN eRegister_CSD_Radiokey AS errk - ON aapvm.Wert LIKE '%' + errk.CSD + '%' - WHERE aaps.SerienNr = @{nameof(serialno)}") + SELECT DISTINCT csd.Radiokey + FROM AuftragPositionSerienNr AS aps + JOIN AlleAuftragPositionen AS aap + ON aps.AuftragNr = aap.AuftragNr + AND aps.PositionNr = aap.PositionNr + JOIN Identnr AS idn + ON aap.IdentNr = idn.IdentNr + JOIN VAKO_Merkmale AS vm + ON SUBSTRING(idn.VakoCode, 1, LEN(vm.Basis)) = vm.Basis + AND SUBSTRING(idn.VakoCode, vm.Stelle, vm.Laenge) = vm.Charcode + JOIN eRegister_CSD_Radiokey AS csd + ON vm.Wert LIKE ('%' + csd.CSD + '%') + WHERE aps.SerienNr = @{nameof(serialno)}") .SetParameter(nameof(serialno), serialno) .FirstOrDefault(reader => reader.GetValue(0)); } @@ -135,7 +202,14 @@ using (var httpResponseMessage = new HttpClient().SendAsync(httpRequestMessage).Result) { - radioKey = httpResponseMessage?.Content?.ReadAsStringAsync()?.Result?.Trim('"'); + if (httpResponseMessage.IsSuccessStatusCode) + { + radioKey = httpResponseMessage?.Content?.ReadAsStringAsync()?.Result?.Trim('"'); + } + else + { + radioKey = httpResponseMessage.ReasonPhrase; + } } ServicePointManager.Expect100Continue = expect100Continue; diff --git a/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs b/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs index 42f2adcf..396158f2 100644 --- a/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs +++ b/LaaProductionWeb/LaaProductionWeb/Controllers/SearchController.cs @@ -193,41 +193,11 @@ } else { - const String UrlFormat = "https://nodes.sms-esaap.com/keygenproxy/api/v2/keys/devices?orderNumber={0}&radioaddress={1}"; - const String XNodeTokenHeaderName = "X-Node-Token"; - const String XNodeTokenHeaderValue = "d5b8c0b2-81f6-4421-80d0-44eb2093e616"; - - var ponr = this.http + result = this.http .SetBearer(this.bearer) - .Get(request => request - .SetPath($"/LaaProductionWeb/api/search/pono/eregister/address/{token}")) + .Get(request => request + .SetPath($"/LaaProductionWeb/api/eregister/radiokey/byaddress/{token}")) .Value; - - using (var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, String.Format(UrlFormat, ponr, token))) - { - httpRequestMessage.Headers.Add(XNodeTokenHeaderName, XNodeTokenHeaderValue); - - var expect100Continue = ServicePointManager.Expect100Continue; - var securityProtokol = ServicePointManager.SecurityProtocol; - - ServicePointManager.Expect100Continue = true; - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; - - using (var httpResponseMessage = new HttpClient().SendAsync(httpRequestMessage).Result) - { - if (httpResponseMessage.IsSuccessStatusCode) - { - result = httpResponseMessage.Content?.ReadAsStringAsync()?.Result?.Trim('"'); - } - else - { - result = httpResponseMessage.StatusCode.ToString(); - } - } - - ServicePointManager.Expect100Continue = expect100Continue; - ServicePointManager.SecurityProtocol = securityProtokol; - } } } catch (Exception e) From 955e0fa0343b2f92ec1f5e5c38b5c5362cd3ee52 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Fri, 18 Oct 2024 14:56:54 +0200 Subject: [PATCH 34/44] eregister - features, auto pam build, programming parameters from the db & api --- Common/CommonConsole/CommonConsole.csproj | 6 +- Common/CommonConsole/Program.cs | 327 +++--------------- ...mmon.Hardware.Interfaces.Ports.SIRT.csproj | 4 +- .../{SIRT.cs => SirtBroadcaster.cs} | 22 +- .../SirtTask.cs | 84 +++-- .../{TaskStatus.cs => SirtTaskState.cs} | 2 +- ...dware.WaterMeter.eRegister.Features.csproj | 3 + .../EregisterFeatures.cs | 149 ++++++++ .../EregisterFeaturesDebug.cs} | 36 +- .../OpticalTelegram.cs | 3 + .../PamAttribute.cs} | 8 +- .../SetMetrologyParameters.cs | 60 ++-- ...ommon.Hardware.WaterMeter.eRegister.csproj | 9 +- .../Eregister.cs | 190 +++------- .../EregisterBatch.cs | 110 ++++++ .../EregisterExtensions.cs | 212 ++++++++++-- .../EregisterProgrammingTask.cs | 29 ++ .../Models/EregisterBatchSettings.cs | 14 + .../EregisterPamModel.cs} | 6 +- .../Models/EregisterProgrammingParameters.cs | 172 +++++++++ .../EregisterProgrammingParametersList.cs | 10 + .../ParameterSet.cs | 8 +- .../ProgrammingBatch.cs | 10 +- .../ProgrammingTask.cs | 47 +-- .../SQLConnection.cs | 2 +- Common/Ui/Common.UI.WPF/App.xaml | 2 - Common/Ui/Common.UI.WPF/App.xaml.cs | 48 +-- Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj | 24 +- .../Ui/Common.UI.WPF/Data/EregisterShared.cs | 63 ++++ .../Auftrag.cs => Data/P2000Shared.cs} | 84 +++-- Common/Ui/Common.UI.WPF/Index.xaml | 5 + Common/Ui/Common.UI.WPF/Index.xaml.cs | 9 + .../Common.UI.WPF/Infrastructure/AppHost.cs | 66 ++++ .../Infrastructure/User32DllImports.cs | 21 ++ .../Infrastructure/User32DllWindowState.cs | 19 + Common/Ui/Common.UI.WPF/MainWindow.xaml | 12 +- .../Models/Contracts/IMainModel.cs | 15 - .../Common.UI.WPF/Models/MainWindowModel.cs | 30 -- .../eRegisterPruefungInitialisierungModel.cs | 52 ++- .../eRegister_PruefungInitialisierungM.cs | 64 ++++ Common/Ui/Common.UI.WPF/ViewModels/Command.cs | 27 +- .../Ui/Common.UI.WPF/ViewModels/Command[T].cs | 27 +- .../Common.UI.WPF/ViewModels/MainWindowVM.cs | 40 +-- Common/Ui/Common.UI.WPF/ViewModels/VM.cs | 19 +- Common/Ui/Common.UI.WPF/ViewModels/VM[T].cs | 4 +- .../eRegisterPruefungInitialisierungVM.cs | 34 +- .../eRegister_PruefungInitialisierungVM.cs | 20 ++ .../Common.UI.WPF/Views/MainWindowView.xaml | 10 - .../Views/MainWindowView.xaml.cs | 9 - Common/Ui/Common.UI.WPF/app.config | 19 +- .../eRegister_PruefungInitialisierung.xaml | 114 ++++++ .../eRegister_PruefungInitialisierung.xaml.cs | 23 ++ .../API/Eregister/RadioKeyController.cs | 153 +++----- 53 files changed, 1586 insertions(+), 950 deletions(-) rename Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/{SIRT.cs => SirtBroadcaster.cs} (88%) rename Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/{TaskStatus.cs => SirtTaskState.cs} (90%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/EregisterFeatures.cs rename Common/Hardware/WaterMeter/eRegister/{Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs => Common.Hardware.WaterMeter.eRegister.Features/EregisterFeaturesDebug.cs} (58%) rename Common/Hardware/WaterMeter/eRegister/{Common.Hardware.WaterMeter.eRegister/PamTypeAttribute.cs => Common.Hardware.WaterMeter.eRegister.Features/PamAttribute.cs} (57%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterProgrammingTask.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterBatchSettings.cs rename Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/{EregisterPam.cs => Models/EregisterPamModel.cs} (68%) create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParameters.cs create mode 100644 Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParametersList.cs create mode 100644 Common/Ui/Common.UI.WPF/Data/EregisterShared.cs rename Common/Ui/Common.UI.WPF/{Infrastructure/Auftrag.cs => Data/P2000Shared.cs} (68%) create mode 100644 Common/Ui/Common.UI.WPF/Index.xaml create mode 100644 Common/Ui/Common.UI.WPF/Index.xaml.cs create mode 100644 Common/Ui/Common.UI.WPF/Infrastructure/AppHost.cs create mode 100644 Common/Ui/Common.UI.WPF/Infrastructure/User32DllImports.cs create mode 100644 Common/Ui/Common.UI.WPF/Infrastructure/User32DllWindowState.cs delete mode 100644 Common/Ui/Common.UI.WPF/Models/Contracts/IMainModel.cs delete mode 100644 Common/Ui/Common.UI.WPF/Models/MainWindowModel.cs create mode 100644 Common/Ui/Common.UI.WPF/Models/eRegister_PruefungInitialisierungM.cs create mode 100644 Common/Ui/Common.UI.WPF/ViewModels/eRegister_PruefungInitialisierungVM.cs delete mode 100644 Common/Ui/Common.UI.WPF/Views/MainWindowView.xaml delete mode 100644 Common/Ui/Common.UI.WPF/Views/MainWindowView.xaml.cs create mode 100644 Common/Ui/Common.UI.WPF/eRegister_PruefungInitialisierung.xaml create mode 100644 Common/Ui/Common.UI.WPF/eRegister_PruefungInitialisierung.xaml.cs diff --git a/Common/CommonConsole/CommonConsole.csproj b/Common/CommonConsole/CommonConsole.csproj index 12a2ae0b..f17f29c1 100644 --- a/Common/CommonConsole/CommonConsole.csproj +++ b/Common/CommonConsole/CommonConsole.csproj @@ -53,8 +53,7 @@ - - + @@ -100,8 +99,5 @@ Common.Utils.Extensions - - - \ No newline at end of file diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index f1fdb0ec..3538555e 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -1,303 +1,60 @@ namespace CommonConsole { - using Common.Hardware.WaterMeter.eRegister; - using Common.Hardware.WaterMeter.eRegister.Features; - using Common.Logic.Extensions.SQL; - using System; - using System.Xml.Serialization; public class Program { public static void Main() { - var serialNumbers = String.Join(", ", new Object[] { 17833444, 18743226, 18752765, 19744225, 18743225, 19793034, 19793035, 20731121, 20731265, 18743224 }); - var xml = new SQLConnection("Server=SLASQL01.emea.sensus.net; Database=Auftrag; User ID=sa; Password=sqlserver;") - .CreateCommand($@" - SELECT CAST((SELECT vm.Wert AS CSD - , SUBSTRING(ISNULL(fs.Wert, ''), 1, 1) AS RadioKeyType - , aps.SerienNr - , aps.StatusFertigung - , CAST(CASE WHEN vm.Wert LIKE 'CSD 769400%' - OR vm.Wert LIKE 'CSD 770951%' - OR vm.Wert LIKE 'CSD 772721%' - THEN RIGHT(er.Adresse, 9) - ELSE aps.SerienNr END AS NVARCHAR(10)) AS MeterId - , er.TempAdresse - , er.Adresse - , x.FertigungsauftragNr - , x.Frequency - , x.Metersize - , x.Volume_per_Pulse AS VolumePerPulse - , x.Volume_per_LED_Pulse AS VolumePerLedPulse - , CAST(0 AS TINYINT) AS OffsetFactor - , CAST(5 AS TINYINT) AS OffsetTime - , CAST(0 AS TINYINT) AS FactoryCalibration - , CAST(3 AS TINYINT) AS TransmissionInterval - , CAST(7 AS TINYINT) AS MBusStatus - , CAST(0 AS TINYINT) AS LatWindows - , x.Byte11 AS UnitOfMesure - , x.Bit56 AS DecimalPoint - , x.Disallow_Reverse_Volume AS CandI - , x.Alarm_Low_Battery - , x.Alarm_Leakage - , x.Alarm_Magnetic_Tamper - , x.Alarm_Metrology_Unavailable - , x.Alarm_Backflow - , x.Alarm_Broken_Pipe - , x.Alarm_Medium_Absent - , x.Alarm_Specific_Error - , x.LeakagePeriod - , x.LeakageThreshold - , x.BrokenPipePeriod - , x.BrokenPipeThreshold - , x.History_Error_Limits_Days - , x.Data_Logging_Period - , x.Data_Logging_Forward_Counter - , x.Data_Logging_Time_Of_Minimum_Flow - , x.Data_Logging_Minimum_Flow - , x.Data_Logging_Time_Of_Broken_Pipe - , x.Data_Logging_Broken_Pipe_Flow - , x.Data_Logging_Current_Flow - , x.Data_Logging_Time_Of_Peak_Flow - , x.Data_Logging_Peak_Flow - , x.Data_Logging_Time_Of_Maximum_Flow - , x.Data_Logging_Maximum_Flow - , x.Data_Logging_Backward_Volume - , x.Data_Logging_Counter - , x.Data_Logging_Alarm_State - , x.FDR_Day_Of_Data_Reading - , x.FDR_Forward_Counter - , x.FDR_Time_Of_Minimum_Flow - , x.FDR_Minimum_Flow - , x.FDR_Time_Of_Broken_Pipe - , x.FDR_Broken_Pipe_Flow - , x.FDR_Current_Flow - , x.FDR_Time_Of_Peak_Flow - , x.FDR_Peak_Flow - , x.FDR_Time_Of_Maximum_Flow - , x.FDR_Maximum_Flow - , x.FDR_Backward_Volume - , x.FDR_Counter - , x.FDR_Alarm_State - , x.Transmission_Intervall - , x.PowerLevelHex - , CAST(CASE WHEN vm.Wert LIKE 'CSD 769400%' - OR vm.Wert LIKE 'CSD 770951%' - OR vm.Wert LIKE 'CSD 773102%' THEN 0 ELSE 1 END AS BIT) AS DisableOTA - , CAST(CASE WHEN vm.Wert LIKE 'CSD 764144%' - OR vm.Wert LIKE 'CSD 760407%' - THEN 0 ELSE x.LAT_Interval END AS TINYINT) AS LATInterval - , CAST(CASE WHEN vm.Wert LIKE 'CSD 769400%' THEN 0 - WHEN x.Metersize BETWEEN 53 AND 55 THEN 8 - ELSE 10 END AS TINYINT) AS ActivationByThreshold - , CAST(CASE WHEN vm.Wert LIKE 'CSD 760407%' - OR vm.Wert LIKE 'CSD 764144%' THEN 16 - WHEN vm.Wert LIKE 'CSD 38102_BU%' THEN 30 - WHEN vm.Wert LIKE 'CSD 772100_WE%' THEN 15 * 60 - ELSE 60 * 60 END AS SMALLINT) AS OpenMeteringTransmissionIntervalSeconds - , x.UTC_Offset AS UtcOffset - , x.Wake_Up_Interval AS WakeUpInterval - , CASE WHEN idn.Nennweite < 150 THEN 500 ELSE 50 END AS DisplayVolume - , CAST(CASE WHEN er.GeschlossenDatum IS NULL THEN 0 ELSE 1 END AS BIT) AS Sealed - FROM eRegister AS er - JOIN (SELECT DISTINCT - AuftragNr - , PositionNr - , SerienNr - , MAX(StatusFertigung) OVER (PARTITION BY SerienNr) AS StatusFertigung - FROM AuftragPositionSerienNr - WHERE SerienNr IN ({serialNumbers})) AS aps - ON er.Seriennummer = aps.SerienNr - JOIN AlleAuftragPositionen AS aap - ON aps.AuftragNr = aap.AuftragNr - AND aps.PositionNr = aap.PositionNr - JOIN (SELECT ap.FertigungsauftragNr - , rf.Frequency - , ms.Metersize - , ms.Volume_per_Pulse - , ms.Volume_per_LED_Pulse - , u.Byte11 - , dp.Bit56 - , ap.Disallow_Reverse_Volume - , ap.Alarm_Low_Battery - , ap.Alarm_Leakage - , ap.Alarm_Magnetic_Tamper - , ap.Alarm_Metrology_Unavailable - , ap.Alarm_Backflow - , ap.Alarm_Broken_Pipe - , ap.Alarm_Medium_Absent - , ap.Alarm_Specific_Error - , lp.[Bit0-2] AS LeakagePeriod - , lt.[Bit3-7] AS LeakageThreshold - , bpp.[Bit0-2] AS BrokenPipePeriod - , bpt.[Bit3-7] AS BrokenPipeThreshold - , ap.History_Error_Limits_Days - , dl.Data_Logging_Period - , ap.Data_Logging_Forward_Counter - , ap.Data_Logging_Time_Of_Minimum_Flow - , ap.Data_Logging_Minimum_Flow - , ap.Data_Logging_Time_Of_Broken_Pipe - , ap.Data_Logging_Broken_Pipe_Flow - , ap.Data_Logging_Current_Flow - , ap.Data_Logging_Time_Of_Peak_Flow - , ap.Data_Logging_Peak_Flow - , ap.Data_Logging_Time_Of_Maximum_Flow - , ap.Data_Logging_Maximum_Flow - , ap.Data_Logging_Backward_Volume - , ap.Data_Logging_Counter - , ap.Data_Logging_Alarm_State - , ap.FDR_Day_Of_Data_Reading - , ap.FDR_Forward_Counter - , ap.FDR_Time_Of_Minimum_Flow - , ap.FDR_Minimum_Flow - , ap.FDR_Time_Of_Broken_Pipe - , ap.FDR_Broken_Pipe_Flow - , ap.FDR_Current_Flow - , ap.FDR_Time_Of_Peak_Flow - , ap.FDR_Peak_Flow - , ap.FDR_Time_Of_Maximum_Flow - , ap.FDR_Maximum_Flow - , ap.FDR_Backward_Volume - , ap.FDR_Counter - , ap.FDR_Alarm_State - , ap.Transmission_Intervall - , ap.LAT_Interval - , utc.UTC_Offset - , wup.Wake_Up_Interval - , rfpl.PowerLevelHex - FROM eRegister_Auftragposition AS ap - LEFT JOIN eRegister_Metersize AS ms - ON ap.Meter_Size_Id = ms.Id - LEFT JOIN eRegister_Radiofrequency AS rf - ON ap.Radiofrequency_Id = rf.Id - LEFT JOIN eRegister_Unit AS u - ON ap.Unit_Id = u.Id - LEFT JOIN eRegister_DecimalPoint AS dp - ON ap.Decimal_Point_Id = dp.Id - LEFT JOIN eRegister_LeakagePeriod AS lp - ON ap.Leakage_Period_Id = lp.Id - LEFT JOIN eRegister_LeakageThreshold AS lt - ON ap.Leakage_Threshold_Id = lt.Id - LEFT JOIN eRegister_BrokenPipePeriod AS bpp - ON ap.Broken_Pipe_Period_Id = bpp.Id - LEFT JOIN eRegister_BrokenPipeThreshold AS bpt - ON ap.Broken_Pipe_Threshold_Id = bpt.Id - LEFT JOIN eRegister_DataLoggingPeriod AS dl - ON ap.Data_Logging_Period_Id = dl.Id - LEFT JOIN eRegister_UtcOffset AS utc - ON ap.UTC_Offset_Id = utc.Id - LEFT JOIN eRegister_WakeUpInterval AS wup - ON ap.Wake_Up_Interval_Id = wup.Id - LEFT JOIN eRegister_RFPowerlevel AS rfpl - ON rf.Frequency = rfpl.Frequenz - AND ms.Nennweite = rfpl.Nennweite) AS x - ON aap.FertigungsauftragNr = x.FertigungsauftragNr - JOIN Identnr AS idn - ON aap.IdentNr = idn.IdentNr - LEFT JOIN VAKO_Merkmale AS vm - ON SUBSTRING(idn.VakoCode, 1, LEN(vm.Basis)) = vm.Basis - AND SUBSTRING(idn.VakoCode, vm.Stelle, vm.Laenge) = vm.Charcode - AND vm.Wert LIKE 'CSD%' - LEFT JOIN VAKO_Merkmale AS fs - ON SUBSTRING(idn.VakoCode, 1, LEN(fs.Basis)) = fs.Basis - AND SUBSTRING(idn.VakoCode, fs.Stelle, fs.Laenge) = fs.Charcode - AND fs.Bezeichnung LIKE 'Funkschlüssel' - FOR XML PATH('eProgrammingParameters') - , ROOT('eProgramingParametersList')) AS XML)") - .FirstOrDefault(x => x.GetXml(0)); + var bytes = new Byte[] { 0x15, 0x33, 0x40, 0x01, 0x00, 0x00, 0x06, 0x12 }; + var sirtId = BitConverter.ToUInt64(bytes, 0); + var rf = (sirtId >> 24 & 1) == 1 ? 433 : 868; + Console.WriteLine(BitConverter.ToString(bytes)); + Console.WriteLine(sirtId); + Console.WriteLine(rf); + Console.WriteLine(); - var serializer = new XmlSerializer(typeof(eProgramingParametersList)); - var model = serializer.Deserialize(xml); + var bits = String.Empty; - if (model is Eregister eregister) + for (var i = 0; i < 64; i++) { - foreach (var pam in eregister.BuildPams()) + bits += $"{sirtId >> i & 1}"; + + if (i > 0 && (i + 1) % 4 == 0) { - Console.WriteLine($"{pam.PamNames}: {BitConverter.ToString(pam.CommandBytes.ToArray())}"); - Console.WriteLine(); + bits += " "; } } + + Console.WriteLine(bits); + + //var meterUnits = 5; + //var decimalPoint = 3; + + //bits[0] = (Byte)(meterUnits >> 0 & 1); + //bits[1] = (Byte)(meterUnits >> 1 & 1); + //bits[2] = (Byte)(meterUnits >> 2 & 1); + //bits[3] = (Byte)(meterUnits >> 3 & 1); + //bits[4] = (Byte)(meterUnits >> 4 & 1); + //bits[5] = (Byte)(decimalPoint >> 0 & 1); + //bits[6] = (Byte)(decimalPoint >> 1 & 1); + + //Console.WriteLine(BitConverter.ToString(bits)); + + //meterUnits = 0; + //meterUnits ^= bits[0]; + //meterUnits ^= bits[1] << 1; + //meterUnits ^= bits[2] << 2; + //meterUnits ^= bits[3] << 3; + //meterUnits ^= bits[4] << 4; + + //decimalPoint = 0; + //decimalPoint ^= bits[5]; + //decimalPoint ^= bits[6] << 1; + + //Console.WriteLine(meterUnits); + //Console.WriteLine(decimalPoint); } - - private static Eregister EregisterModel() => new Eregister - { - ChangeWakeUp = new ChangeWakeUp - { - WakeUpMode = WakeUpMode.StayAwake - }, - ChangeMeterReading = new ChangeMeterReading - { - DisplayVolume = 500 - }, - ChangeCustomerText = new ChangeCustomerText - { - Text = "242300147" - }, - DeactivateAlarms = new DeactivateAlarms - { - Backflow = true, - MagneticTamper = true, - SpecificError = true, - }, - ResetAlarms = new ResetAlarms - { - Value = byte.MaxValue - }, - ParameterizeLeakageDetection = new ParameterizeLeakageDetection - { - Value = 10, - }, - ParameterizeBrokenPipeDetection = new ParameterizeBrokenPipeDetection - { - Value = 50 - }, - SetHistoricalErrorLimit = new SetHistoricalErrorLimit - { - Value = 50 - }, - ChangeDataLoggerSettings = new ChangeDataLoggerSettings - { - MinimumFlow = 10, - TimeInterval = 1440, - TimeOfMinimumFlow = 1 - }, - WirelessMBusMode = new WirelessMBusMode - { - WMBusEnabled = true, - InstallationModeEnabled = true, - EncryptionEnabled = true, - }, - SetPowerLevelSensusRF = new SetPowerLevel - { - Mode = PowerLevelModes.SensusRF, - PowerLevel = 10 - }, - SetPowerLevelFlexNet = new SetPowerLevel - { - Mode = PowerLevelModes.FlexNet, - PowerLevel = 10 - }, - Debug = new EregisterDebug - { - DisableOTAFirmwareUpdate = new DisableOTAFirmwareUpdate - { - Mode = OTAMode.DisableFWUpdate - }, - SetActivationByThreshold = new SetActivationByThreshold - { - Rotations = 1 - } - }, - OpenMeteringTransmitionIntervalWMBus = new OpenMeteringTransmitionIntervalWMBus - { - Seconds = 15 - }, - ChangeNumberOfLatWindows = new ChangeNumberOfLatWindows - { - N = 3 - } - }; } } \ No newline at end of file diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj index 910d4233..005d177a 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/Common.Hardware.Interfaces.Ports.SIRT.csproj @@ -41,11 +41,11 @@ - + - + diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRT.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtBroadcaster.cs similarity index 88% rename from Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRT.cs rename to Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtBroadcaster.cs index 0df8c07e..59e61e32 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SIRT.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtBroadcaster.cs @@ -4,13 +4,13 @@ using System.Collections.Concurrent; using System.Threading; - public class SIRT + public class SirtBroadcaster { private static readonly ConcurrentDictionary runningTasks = new ConcurrentDictionary(); private readonly SirtProxy proxy; - public SIRT(String portName) + public SirtBroadcaster(String portName) { this.proxy = new SirtProxy(portName); this.proxy.MessageReceived += this.Proxy_MessageReceived; @@ -43,7 +43,7 @@ task.Cancelled += _ => awaiter.Set(); task.Completed += _task => { - activated = _task.TaskStatus == TaskStatus.Completed; + activated = _task.TaskState == SirtTaskState.Completed; if (activated) { @@ -64,7 +64,7 @@ task.Cancelled += _ => awaiter.Set(); task.Completed += _task => { - activated = _task.TaskStatus == TaskStatus.Completed; + activated = _task.TaskState == SirtTaskState.Completed; if (activated) { @@ -96,18 +96,18 @@ return this.proxy.TryClose(); } - public TaskStatus TryRun(SirtTask task) + public SirtTaskState TryRun(SirtTask task) { if (!this.proxy.IsOpen) { - return TaskStatus.ProxyNotOpen; + return SirtTaskState.ProxyNotOpen; } var address = task.Address; if (runningTasks.TryGetValue(address, out var runningTask) && runningTask != null) { - return TaskStatus.InRunningTasks; + return SirtTaskState.InRunningTasks; } var countInPamPool = 0; @@ -122,16 +122,16 @@ if (countInPamPool >= 5) { - return TaskStatus.PamPoolIsFull; + return SirtTaskState.PamPoolIsFull; } task = runningTasks.AddOrUpdate(address, task, (a, t) => task); - if (task.TaskStatus == TaskStatus.Completed) + if (task.TaskState == SirtTaskState.Completed) { this.Task_DismissFromRunningTasks(task); - return TaskStatus.Completed; + return SirtTaskState.Completed; } task.Cancelled += this.Task_DismissFromRunningTasks; @@ -141,7 +141,7 @@ this.proxy.WriteBytes(task); this.Log($"{task.Address}|{BitConverter.ToString(task)}"); - return TaskStatus.Sent; + return SirtTaskState.Sent; } private void Proxy_MessageReceived(SirtMessage message) diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs index e1c47187..34ccf50d 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTask.cs @@ -8,9 +8,22 @@ public class SirtTask { - private readonly Timer timer = new Timer(); - private readonly SirtMessage request = new SirtMessage(); - private readonly ConcurrentStack responses = new ConcurrentStack(); + private readonly Timer timer; + private readonly SirtMessage request; + private readonly ConcurrentStack responsesInContext; + private readonly ConcurrentStack responsesOutContext; + + public SirtTask() + { + this.timer = new Timer(); + this.request = new SirtMessage(); + this.responsesInContext = new ConcurrentStack(); + this.responsesOutContext = new ConcurrentStack(); + + this.timer.AutoReset = false; + this.timer.Interval = 10_000; + this.timer.Elapsed += this.Timer_Elapsed; + } public event Action Completed; public event Action Cancelled; @@ -45,66 +58,75 @@ set => this.request.Data = value; } - public TaskStatus TaskStatus { get; protected set; } + public SirtTaskState TaskState { get; protected set; } - public Byte[] LastPayload - => this.responses.TryPeek(out var response) - ? response.Data - : default(Byte[]); + public Byte[] LastPayload + => this.responsesInContext.TryPeek(out var response) + ? response.Data + : default(Byte[]); public virtual void ReceiveMessage(SirtMessage response, Int32 mhz) { - this.responses.Push(response); - - if (this.TaskStatus != TaskStatus.Completed) + if (this.TaskState != SirtTaskState.Completed && this.TaskState != SirtTaskState.Cancelled) { - this.TaskStatus = TaskStatus.Running; + this.responsesInContext.Push(response); + + this.TaskState = SirtTaskState.Running; if (this.request.Cmd == SirtMessage.W_PAM) { if (response.Cmd == SirtMessage.FROMAIR && response.Data[0] == SirtMessage.SEMI) { - this.TaskStatus = TaskStatus.Completed; + this.TaskState = SirtTaskState.Completed; } } else if (response.Cmd == SirtMessage.ACKNANSW) { - this.TaskStatus = TaskStatus.Completed; + this.TaskState = SirtTaskState.Completed; } } + else + { + this.ResponseOutOfContext(response, mhz); + } - if (this.TaskStatus == TaskStatus.Completed) + if (this.TaskState == SirtTaskState.Completed) { this.Completed?.Invoke(this); this.timer.Stop(); } } + protected virtual void ResponseOutOfContext(SirtMessage response, Int32 mhz) + => this.responsesOutContext.Push(response); + public virtual void PrepareForRun() { - this.responses.Clear(); - this.TaskStatus = TaskStatus.Pending; - this.timer.AutoReset = false; - this.timer.Interval = 10_000; - this.timer.Elapsed += (sender, _1) => - { - this.TaskStatus = TaskStatus.Cancelled; + this.TaskState = SirtTaskState.Pending; - this.Cancelled?.Invoke(this); - }; + this.responsesOutContext.Clear(); + this.responsesInContext.Clear(); this.timer.Start(); } + + private void Timer_Elapsed(Object sender, ElapsedEventArgs e) + { + this.TaskState = SirtTaskState.Cancelled; + + this.Cancelled?.Invoke(this); + this.timer.Stop(); + } public virtual Byte[] ToByteArray() => this.request.ToByteArray(); - public override String ToString() + public override String ToString() => BitConverter.ToString(this.ToByteArray()); - public static implicit operator Byte[] (SirtTask task) + public static implicit operator Byte[] (SirtTask task) => task?.ToByteArray() ?? new Byte[] { }; - public static readonly SirtTask ActivateSIRT = new SirtTask + internal static readonly SirtTask ActivateSIRT = new SirtTask { Cmd = SirtMessage.W_REG, Address = 0x20000000, @@ -119,24 +141,24 @@ } }; - public static readonly SirtTask IdentifySIRT = new SirtTask + internal static readonly SirtTask IdentifySIRT = new SirtTask { Cmd = SirtMessage.R_REG, Address = 0x11001820, P2 = 0x08 }; - public static readonly SirtTask ReadPamPool = new SirtTask + internal static readonly SirtTask ReadPamPool = new SirtTask { Cmd = SirtMessage.R_PAM, Address = 0xFFFFFFFF }; - public static SirtTask DeleteFromPamPool(UInt32 address) => new SirtTask + internal static SirtTask DeleteFromPamPool(UInt32 address) => new SirtTask { Cmd = SirtMessage.W_PAM, P1 = new P811 { DelPamAdr = true }, Address = address }; -} + } } diff --git a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/TaskStatus.cs b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTaskState.cs similarity index 90% rename from Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/TaskStatus.cs rename to Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTaskState.cs index ac00bafd..c411aed2 100644 --- a/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/TaskStatus.cs +++ b/Common/Hardware/Interfaces/Ports/Common.Hardware.Interfaces.Ports.SIRT/SirtTaskState.cs @@ -1,6 +1,6 @@ namespace Common.Hardware.Interfaces.Ports.SIRT { - public enum TaskStatus + public enum SirtTaskState { Pending = 0, Running = 1, diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj index c7efe4fa..a8fb0a3e 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/Common.Hardware.WaterMeter.eRegister.Features.csproj @@ -56,12 +56,15 @@ + + + diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/EregisterFeatures.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/EregisterFeatures.cs new file mode 100644 index 00000000..8f018107 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/EregisterFeatures.cs @@ -0,0 +1,149 @@ +namespace Common.Hardware.WaterMeter.eRegister.Features +{ + public class EregisterFeatures + { + [Pam(AuthLevel.II)] + public ChangeWakeUp ChangeWakeUp { get; set; } + + [Pam(AuthLevel.O)] + public SetPowerLevel SetPowerLevelSensusRF { get; set; } + + [Pam(AuthLevel.III)] + public SetPowerLevel SetPowerLevelFlexNet { get; set; } + + [Pam(AuthLevel.II)] + public ChangeNumberOfLatWindows ChangeNumberOfLatWindows { get; set; } + + [Pam(AuthLevel.I)] + public ResetAlarms ResetAlarms { get; set; } + + [Pam(AuthLevel.II, true)] + public DeactivateTransmitter DeactivateTransmiter { get; set; } + + [Pam(AuthLevel.II)] + public WirelessMBusMode WirelessMBusMode { get; set; } + + [Pam(AuthLevel.O)] + public DeactivateAlarms DeactivateAlarms { get; set; } + + [Pam(AuthLevel.O)] + public ChangeNumberOfDeals ChangeNumberOfDeals { get; set; } + + [Pam(AuthLevel.O)] + public ParameterizeLeakageDetection ParameterizeLeakageDetection { get; set; } + + [Pam(AuthLevel.O)] + public ParameterizeBrokenPipeDetection ParameterizeBrokenPipeDetection { get; set; } + + [Pam(AuthLevel.I)] + public SetHistoricalErrorLimit SetHistoricalErrorLimit { get; set; } + + [Pam(AuthLevel.III, true)] + public Reset Reset { get; set; } + + [Pam(AuthLevel.II)] + public ChangeTransmissionInterval ChangeTransmissionInterval { get; set; } + + [Pam(AuthLevel.II)] + public OpenMeteringTransmitionIntervalWMBus OpenMeteringTransmitionIntervalWMBus { get; set; } + + [Pam(AuthLevel.III, true)] + public SendBubbleUpBurst SendBubbleUpBurst { get; set; } + + [Pam(AuthLevel.III, true)] + public SetFrequencyOffset SetFrequencyOffset { get; set; } + + [Pam(AuthLevel.I)] + public ActivateMetrologyTestMode ActivateMetrologyTestMode { get; set; } + + [Pam(AuthLevel.III)] + public SetRebootCount SetRebootCount { get; set; } + + [Pam(AuthLevel.III, true)] + public EregisterFeaturesDebug Debug { get; set; } + + [Pam(AuthLevel.O)] + public ChangeFixedDateReadingSettings ChangeFixedDateReadingSettings { get; set; } + + [Pam(AuthLevel.II, true)] + public GetCustomerDebug GetCustomerDebug { get; set; } + + [Pam(AuthLevel.III)] + public ChangeMeterReading ChangeMeterReading { get; set; } + + [Pam(AuthLevel.III)] + public ChangeMeterId ChangeMeterId { get; set; } + + [Pam(AuthLevel.I)] + public SetDateAndTime SetDateAndTime { get; set; } + + [Pam(AuthLevel.O)] + public ChangeDataLoggerSettings ChangeDataLoggerSettings { get; set; } + + [Pam(AuthLevel.III)] + public SetBytterySeconds SetBytterySeconds { get; set; } + + // TODO: Implement in builder + [Pam(AuthLevel.III)] + public ChangeRadioId ChangeRadioId { get; set; } + + [Pam(AuthLevel.III)] + public SetPcbId SetPcbId { get; set; } + + [Pam(AuthLevel.O, true)] + public RequestFixedDateReading RequestFixedDateReading { get; set; } + + [Pam(AuthLevel.O, true)] + public RequestLoggingData RequestLoggingData { get; set; } + + // TODO: Implement in builder + // [PamType(AuthLevel.I, true)] + public ChangePin ChangePinI { get; set; } + + // TODO: Implement in builder + // [PamType(AuthLevel.II, true)] + public ChangePin ChangePinII { get; set; } + + // TODO: Implement in builder + // [PamType(AuthLevel.III, true)] + public ChangePin ChangePinIII { get; set; } + + // TODO: Implement in builder + // [PamType(AuthLevel.O)] + public ProvidePin ProvidePin { get; set; } + + [Pam(AuthLevel.III, true)] + public SendTestPattern SendTestPattern { get; set; } + + [Pam(AuthLevel.III, true)] + public RequestMemoryDump RequestMemoryDump { get; set; } + + [Pam(AuthLevel.III, true)] + public SendSequenceOfTestTelegrams SendSequenceOfTestTelegrams { get; set; } + + [Pam(AuthLevel.III, true)] + public ReceiveSequenceOfTestTelegrams ReceiveSequenceOfTestTelegrams { get; set; } + + [Pam(AuthLevel.II)] + public ChangeCustomerText ChangeCustomerText { get; set; } + + // TODO: Implement in builder + // [PamType(AuthLevel.O)] + public ChangeSensusRFEncryptionKey ChangeSensusRFEncryptionKey { get; set; } + + [Pam(AuthLevel.II)] + public EncapsulatedFlexNet EncapsulatedFlexNet { get; set; } + + [Pam(AuthLevel.O)] + public SetTFXParameters SetTFXParameters { get; set; } + + [Pam(AuthLevel.III, true)] + public SetMetrologyParameters SetMetrologyParameters { get; set; } + + [Pam(AuthLevel.O, true)] + public Ping Ping { get; set; } + + [Pam(AuthLevel.III)] + public SetVariablePcbId SetVariablePcbId { get; set; } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/EregisterFeaturesDebug.cs similarity index 58% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/EregisterFeaturesDebug.cs index d1574bdd..c319dd2c 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterDebug.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/EregisterFeaturesDebug.cs @@ -1,52 +1,50 @@ -namespace Common.Hardware.WaterMeter.eRegister +namespace Common.Hardware.WaterMeter.eRegister.Features { - using Common.Hardware.WaterMeter.eRegister.Features; - - public class EregisterDebug + public class EregisterFeaturesDebug { - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public RequestDebugTelegram RequestDebugTelegram { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public ResetCredits ResetCredits { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public DisableCredits DisableCredits { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public SerialOutput SerialOutput { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public SetAlarms SetAlarm { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public SetSpecificError SetSpecificError { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public OpticalTelegram OpticalTelegram { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public FactoryComplete FactoryComplete { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public EnableCredits EnableCredits { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public SetBatteryUsageTestOffset SetBatteryUsageTestOffset { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public SetTestFastActivityBupTiming SetTestFastActivityBupTiming { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public SetActivityCreditLimits SetActivityCreditLimits { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public SetActivationByThreshold SetActivationByThreshold { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public DisableOTAFirmwareUpdate DisableOTAFirmwareUpdate { get; set; } - [PamType(AuthLevel.III, true)] + [Pam(AuthLevel.III, true)] public SetMeterType SetMeterType { get; set; } } } \ No newline at end of file diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OpticalTelegram.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OpticalTelegram.cs index 4e4138b6..1a2ba116 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OpticalTelegram.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/OpticalTelegram.cs @@ -8,6 +8,9 @@ { } + public OpticalTelegram(Byte minutes) : this() + => this.Minutes = minutes; + public Byte Minutes { get => this.bytes[1]; diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/PamTypeAttribute.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/PamAttribute.cs similarity index 57% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/PamTypeAttribute.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/PamAttribute.cs index d0ae7978..d57a3079 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/PamTypeAttribute.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/PamAttribute.cs @@ -1,13 +1,11 @@ -namespace Common.Hardware.WaterMeter.eRegister +namespace Common.Hardware.WaterMeter.eRegister.Features { - using Common.Hardware.WaterMeter.eRegister.Features; - using System; [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] - public class PamTypeAttribute : Attribute + public class PamAttribute : Attribute { - public PamTypeAttribute(AuthLevel authLevel, Boolean isSingleCmd = false) + public PamAttribute(AuthLevel authLevel, Boolean isSingleCmd = false) { this.AuthLevel = authLevel; this.IsSingleCmd = isSingleCmd; diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs index c70061c7..621dcf6c 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister.Features/SetMetrologyParameters.cs @@ -37,50 +37,58 @@ set => this.bytes[11] = value; } - public Byte CandIRule - { - get => this.bitsFromByte11.ToByte(); - set => this.bitsFromByte11 = value.GetBits(); - } - public MeterUnits Units { get { - var bits = new Byte[8]; + var value = 0; - bits[4] = this.bitsFromByte11[0]; - bits[3] = this.bitsFromByte11[1]; - bits[2] = this.bitsFromByte11[2]; - bits[1] = this.bitsFromByte11[3]; - bits[0] = this.bitsFromByte11[4]; + value ^= this.bitsFromByte11[4]; + value ^= this.bitsFromByte11[3] << 1; + value ^= this.bitsFromByte11[2] << 2; + value ^= this.bitsFromByte11[1] << 3; + value ^= this.bitsFromByte11[0] << 4; - return (MeterUnits)bits.ToByte(); + return (MeterUnits)value; } set { - var bits = ((Byte)value).GetBits(); + var units = (Byte)value; - this.bitsFromByte11[0] = bits[4]; - this.bitsFromByte11[1] = bits[3]; - this.bitsFromByte11[2] = bits[2]; - this.bitsFromByte11[3] = bits[1]; - this.bitsFromByte11[4] = bits[0]; + this.bitsFromByte11[4] = (Byte)(units >> 0 & 1); + this.bitsFromByte11[3] = (Byte)(units >> 1 & 1); + this.bitsFromByte11[2] = (Byte)(units >> 2 & 1); + this.bitsFromByte11[1] = (Byte)(units >> 3 & 1); + this.bitsFromByte11[0] = (Byte)(units >> 4 & 1); } } public DecimalPointLocations DecimalPoint { - get => (DecimalPointLocations)this.bitsFromByte11[6]; + get + { + var result = 0; + + result ^= bytes[5] << 0; + result ^= bytes[6] << 1; + + return (DecimalPointLocations)result; + } set { var x = (Byte)value; - this.bitsFromByte11[6] = (Byte)(x >> 5 & 1); - this.bitsFromByte11[5] = (Byte)(x >> 6 & 1); + this.bitsFromByte11[6] = (Byte)(x >> 0 & 1); + this.bitsFromByte11[5] = (Byte)(x >> 1 & 1); } } + public Byte CandIRules + { + get => this.bitsFromByte11[7]; + set => this.bitsFromByte11[7] = value; + } + /// /// This controls whether the volume can accumulate in the reverse direction. If this bit is set /// the device will only count forward.For example, if the display starts at 0 and 50 liters of @@ -90,8 +98,8 @@ /// public Boolean UseCandIRules { - get => this.bitsFromByte11[7] == 1; - set => this.bitsFromByte11[7] = (Byte)(value ? 1 : 0); + get => this.CandIRules == 1; + set => this.CandIRules = (Byte)(value ? 1 : 0); } public Byte MeterSize @@ -100,9 +108,9 @@ set => this.bytes[13] = value; } - public Int32 VppLED + public UInt32 VppLED { - get => this.bytes.ToInt32BigEndian(14); + get => this.bytes.ToUInt32BigEndian(14); set => value.ToBigEndianBytes().CopyTo(this.bytes, 14); } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj index 5d8617b9..312f11db 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Common.Hardware.WaterMeter.eRegister.csproj @@ -62,10 +62,13 @@ - + - - + + + + + diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs index 4935fc5c..7e6a3a1d 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs @@ -1,151 +1,69 @@ namespace Common.Hardware.WaterMeter.eRegister { - using Common.Hardware.WaterMeter.eRegister.Features; + using Common.Hardware.Interfaces.Ports.SIRT; + using Common.Hardware.Interfaces.Ports.SIRT.Parameters; + using Common.Hardware.WaterMeter.eRegister.Models; + using Common.Utils.Extensions; + using System; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; public class Eregister { - [PamType(AuthLevel.II)] - public ChangeWakeUp ChangeWakeUp { get; set; } + private readonly String portName; + private readonly SirtBroadcaster sirt433; + private readonly SirtBroadcaster sirt868; + private readonly EregisterProgrammingParameters programmingParameters; + private readonly ICollection programmingTasks + = new List(); - [PamType(AuthLevel.O)] - public SetPowerLevel SetPowerLevelSensusRF { get; set; } + public Eregister(EregisterProgrammingParameters programmingParameters, SirtBroadcaster sirt433, SirtBroadcaster sirt868, String portName) + { + this.portName = portName; + this.sirt433 = sirt433; + this.sirt868 = sirt868; + this.programmingParameters = programmingParameters; + } - [PamType(AuthLevel.III)] - public SetPowerLevel SetPowerLevelFlexNet { get; set; } + public IEnumerable BuildInspectionPreparationProgrammingTasks() + { + var p1 = new P811 + { + DelPamSemi = true + }; - [PamType(AuthLevel.II)] - public ChangeNumberOfLatWindows ChangeNumberOfLatWindows { get; set; } + foreach (var pam in this.programmingParameters.BuildInspectionPreparationPams()) + { + var address = (UInt32)(10000000000 - this.programmingParameters.TempAdresse); + var task = new EregisterProgrammingTask + { + Address = address, + Cmd = SirtMessage.W_PAM, + P1 = p1, + Name = pam.Key, + Data = pam.Value, + EncryptionKey = this.programmingParameters.EncryptionKey.ToByteArray() + }; - [PamType(AuthLevel.I)] - public ResetAlarms ResetAlarms { get; set; } + this.programmingTasks.Add(task); + } - [PamType(AuthLevel.II, true)] - public DeactivateTransmitter DeactivateTransmiter { get; set; } + return this.programmingTasks; + } - [PamType(AuthLevel.II)] - public WirelessMBusMode WirelessMBusMode { get; set; } + internal void Clear() => this.programmingTasks.Clear(); - [PamType(AuthLevel.O)] - public DeactivateAlarms DeactivateAlarms { get; set; } + internal Task RunProgrammingTasksAsync(CancellationToken cancellationToken) + { + return Task.Factory.StartNew(state => + { + if (state is Eregister eregister) + { + // TODO: Tasks execution + } - [PamType(AuthLevel.O)] - public ChangeNumberOfDeals ChangeNumberOfDeals { get; set; } - - [PamType(AuthLevel.O)] - public ParameterizeLeakageDetection ParameterizeLeakageDetection { get; set; } - - [PamType(AuthLevel.O)] - public ParameterizeBrokenPipeDetection ParameterizeBrokenPipeDetection { get; set; } - - [PamType(AuthLevel.I)] - public SetHistoricalErrorLimit SetHistoricalErrorLimit { get; set; } - - [PamType(AuthLevel.III, true)] - public Reset Reset { get; set; } - - [PamType(AuthLevel.II)] - public ChangeTransmissionInterval ChangeTransmissionInterval { get; set; } - - [PamType(AuthLevel.II)] - public OpenMeteringTransmitionIntervalWMBus OpenMeteringTransmitionIntervalWMBus { get; set; } - - [PamType(AuthLevel.III, true)] - public SendBubbleUpBurst SendBubbleUpBurst { get; set; } - - [PamType(AuthLevel.III, true)] - public SetFrequencyOffset SetFrequencyOffset { get; set; } - - [PamType(AuthLevel.I)] - public ActivateMetrologyTestMode ActivateMetrologyTestMode { get; set; } - - [PamType(AuthLevel.III)] - public SetRebootCount SetRebootCount { get; set; } - - [PamType(AuthLevel.III, true)] - public EregisterDebug Debug { get; set; } - - [PamType(AuthLevel.O)] - public ChangeFixedDateReadingSettings ChangeFixedDateReadingSettings { get; set; } - - [PamType(AuthLevel.II, true)] - public GetCustomerDebug GetCustomerDebug { get; set; } - - [PamType(AuthLevel.III)] - public ChangeMeterReading ChangeMeterReading { get; set; } - - [PamType(AuthLevel.III)] - public ChangeMeterId ChangeMeterId { get; set; } - - [PamType(AuthLevel.I)] - public SetDateAndTime SetDateAndTime { get; set; } - - [PamType(AuthLevel.O)] - public ChangeDataLoggerSettings ChangeDataLoggerSettings { get; set; } - - [PamType(AuthLevel.III)] - public SetBytterySeconds SetBytterySeconds { get; set; } - - // TODO: Implement in builder - [PamType(AuthLevel.III)] - public ChangeRadioId ChangeRadioId { get; set; } - - [PamType(AuthLevel.III)] - public SetPcbId SetPcbId { get; set; } - - [PamType(AuthLevel.O, true)] - public RequestFixedDateReading RequestFixedDateReading { get; set; } - - [PamType(AuthLevel.O, true)] - public RequestLoggingData RequestLoggingData { get; set; } - - // TODO: Implement in builder - // [PamType(AuthLevel.I, true)] - public ChangePin ChangePinI { get; set; } - - // TODO: Implement in builder - // [PamType(AuthLevel.II, true)] - public ChangePin ChangePinII { get; set; } - - // TODO: Implement in builder - // [PamType(AuthLevel.III, true)] - public ChangePin ChangePinIII { get; set; } - - // TODO: Implement in builder - // [PamType(AuthLevel.O)] - public ProvidePin ProvidePin { get; set; } - - [PamType(AuthLevel.III, true)] - public SendTestPattern SendTestPattern { get; set; } - - [PamType(AuthLevel.III, true)] - public RequestMemoryDump RequestMemoryDump { get; set; } - - [PamType(AuthLevel.III, true)] - public SendSequenceOfTestTelegrams SendSequenceOfTestTelegrams { get; set; } - - [PamType(AuthLevel.III, true)] - public ReceiveSequenceOfTestTelegrams ReceiveSequenceOfTestTelegrams { get; set; } - - [PamType(AuthLevel.II)] - public ChangeCustomerText ChangeCustomerText { get; set; } - - // TODO: Implement in builder - // [PamType(AuthLevel.O)] - public ChangeSensusRFEncryptionKey ChangeSensusRFEncryptionKey { get; set; } - - [PamType(AuthLevel.II)] - public EncapsulatedFlexNet EncapsulatedFlexNet { get; set; } - - [PamType(AuthLevel.O)] - public SetTFXParameters SetTFXParameters { get; set; } - - [PamType(AuthLevel.III, true)] - public SetMetrologyParameters SetMetrologyParameters { get; set; } - - [PamType(AuthLevel.O, true)] - public Ping Ping { get; set; } - - [PamType(AuthLevel.III)] - public SetVariablePcbId SetVariablePcbId { get; set; } + }, this, cancellationToken); + } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs new file mode 100644 index 00000000..8f652479 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs @@ -0,0 +1,110 @@ +namespace Common.Hardware.WaterMeter.eRegister +{ + using Common.Hardware.Interfaces.Ports.SIRT; + using Common.Hardware.WaterMeter.eRegister.Models; + + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + public class EregisterBatch + { + private readonly SirtBroadcaster sirt433; + private readonly SirtBroadcaster sirt868; + private readonly EregisterBatchSettings settings; + private readonly ConcurrentQueue eregisters; + + private CancellationTokenSource cancellationTokenSource; + private CancellationToken cancellationToken; + + public EregisterBatch(EregisterBatchSettings settings) + { + this.settings = settings; + this.sirt433 = new SirtBroadcaster(this.settings.PortNameSirt433); + this.sirt868 = new SirtBroadcaster(this.settings.PortNameSirt868); + this.eregisters = new ConcurrentQueue(); + } + + public void Add(EregisterProgrammingParameters programmingParameters) + { + this.settings.PortNamesEregister.TryGetValue(programmingParameters.Slotno, out var portName); + this.eregisters.Enqueue(new Eregister(programmingParameters, this.sirt433, this.sirt868, portName)); + } + + public void CancelExecution() + { + // TODO: cancel running tasks. + + this.Clear(); + } + + public void Clear() + { + while (this.eregisters.Count > 0) + { + if (this.eregisters.TryDequeue(out var eregister)) + { + eregister.Clear(); + } + } + } + + public void LoadInspectionInitializationTasks() + { + foreach (var eregister in this.eregisters) + { + eregister.BuildInspectionPreparationProgrammingTasks(); + } + } + + public void LoadProgrammingParameters(EregisterProgrammingParametersList eprogrammingParameters) + { + foreach (var programmingParameters in eprogrammingParameters) + { + this.Add(programmingParameters); + } + } + + public Task RunProgrammingTasksAsync() + { + this.cancellationTokenSource = new CancellationTokenSource(); + this.cancellationToken = this.cancellationTokenSource.Token; + + return Task.Factory + .StartNew(state => + { + if (state is EregisterBatch ebatch) + { + var tasks = new List(); + + foreach (var eregister in this.eregisters) + { + var task = eregister.RunProgrammingTasksAsync(this.cancellationToken); + + tasks.Add(task); + } + + Task.Factory.ContinueWhenAll(tasks.ToArray(), _tasks => + { + foreach (var _task in _tasks) + { + if (_task.Exception != null) + { + // TODO: log exception + } + } + }); + } + + }, this, this.cancellationToken) + .ContinueWith(task => + { + if (task.Exception != null) + { + // TODO: log exception + } + }); + } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs index ad3b0d1e..580bc6e9 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs @@ -1,6 +1,8 @@ namespace Common.Hardware.WaterMeter.eRegister { + using Common.Hardware.Interfaces.Ports.SIRT; using Common.Hardware.WaterMeter.eRegister.Features; + using Common.Hardware.WaterMeter.eRegister.Models; using System; using System.Collections.Generic; @@ -9,16 +11,48 @@ public static class EregisterExtensions { - public static IEnumerable BuildPams(this Eregister eregister) + public static IDictionary BuildInspectionPreparationPams(this EregisterProgrammingParameters parameters) + { + var eprogramming = new EregisterFeatures + { + ChangeWakeUp = new ChangeWakeUp(WakeUpMode.StayAwake), + ChangeTransmissionInterval = new ChangeTransmissionInterval(parameters.Transmission_Interval_Before), + ChangeNumberOfLatWindows = new ChangeNumberOfLatWindows(parameters.Lat_Windows_Before), + ChangeMeterReading = new ChangeMeterReading(parameters.Display_Volume_Before), + WirelessMBusMode = new WirelessMBusMode(parameters.MBusStatus), + SetMetrologyParameters = new SetMetrologyParameters + { + UseCandIRules = parameters.Use_CandI_Rules == 1, + DecimalPoint = (DecimalPointLocations)parameters.DecimalPoint, + FactoryCalibration = parameters.FactoryCalibration, + MeterSize = parameters.Metersize, + OffsetFactor = parameters.OffsetFactor, + OffsetTime = parameters.OffsetTime, + Units = (MeterUnits)parameters.UnitsOfMessure, + Vpp = parameters.VolumePerPulse, + VppLED = parameters.VolumePerLedPulse + }, + Debug = new EregisterFeaturesDebug + { + OpticalTelegram = new OpticalTelegram(parameters.LED_On_Minutes) + } + }; + + return eprogramming + .BuildPams() + .ToDictionary(x => x.PamNames, x => x.ToArray()); + } + + public static IEnumerable BuildPams(this EregisterFeatures eregister) { var pams = eregister .GetPams() .OrderBy(x => x.CommandBytes[0]); - var cmds = new List(); - var pamsLevel0 = new List(); - var pamsLevel1 = new List(); - var pamsLevel2 = new List(); - var pamsLevel3 = new List(); + var cmds = new List(); + var pamsLevel0 = new List(); + var pamsLevel1 = new List(); + var pamsLevel2 = new List(); + var pamsLevel3 = new List(); var pin1 = new ProvidePin { AuthLevel = AuthLevel.I }.ToByteArray(); var pin2 = new ProvidePin { AuthLevel = AuthLevel.II }.ToByteArray(); @@ -66,7 +100,7 @@ if (pamsLevel3.Count > 0) { - var pamLevel3 = new EregisterPam(); + var pamLevel3 = new EregisterPamModel(); foreach (var pam in pamsLevel3) { @@ -81,7 +115,7 @@ if (pamsLevel2.Count > 0) { - var pamLevel2 = new EregisterPam(); + var pamLevel2 = new EregisterPamModel(); foreach (var pam in pamsLevel2) { @@ -96,7 +130,7 @@ if (pamsLevel1.Count > 0) { - var pamLevel1 = new EregisterPam(); + var pamLevel1 = new EregisterPamModel(); foreach (var pam in pamsLevel1) { @@ -111,7 +145,7 @@ if (pamsLevel0.Count > 0) { - var pamLevel0 = new EregisterPam(); + var pamLevel0 = new EregisterPamModel(); foreach (var pam in pamsLevel0) { @@ -126,7 +160,7 @@ return cmds; } - public static IEnumerable BuildTasks(this IEnumerable pams, Action taskOptions) + public static IEnumerable BuildTasks(this IEnumerable pams, Action taskOptions) { foreach (var pam in pams) { @@ -141,11 +175,11 @@ yield break; } - public static IEnumerable GetPams(this Eregister eregister) + public static IEnumerable GetPams(this EregisterFeatures eregister) { - foreach (var eregisterProperty in typeof(Eregister).GetProperties(BindingFlags.Public | BindingFlags.Instance)) + foreach (var eregisterProperty in typeof(EregisterFeatures).GetProperties(BindingFlags.Public | BindingFlags.Instance)) { - var pamType = eregisterProperty.GetCustomAttribute(); + var pamType = eregisterProperty.GetCustomAttribute(); if (pamType is null) { @@ -158,7 +192,7 @@ { continue; } - else if (propertyValue is EregisterDebug debug) + else if (propertyValue is EregisterFeaturesDebug debug) { foreach (var pam in debug.GetPams().OrderByDescending(x => x.CommandBytes[2])) { @@ -167,22 +201,24 @@ } else if (propertyValue is Pam pam) { - yield return new EregisterPam + var commandBytes = pam.ToByteArray().ToList(); + var pamNames = $"PAM {commandBytes[0]}: {eregisterProperty.Name}"; + yield return new EregisterPamModel { - PamNames = eregisterProperty.Name, + PamNames = pamNames, AuthLevel = pamType.AuthLevel, IsSingleCmd = pamType.IsSingleCmd, - CommandBytes = pam.ToByteArray().ToList() + CommandBytes = commandBytes }; } } } - public static IEnumerable GetPams(this EregisterDebug debug) + public static IEnumerable GetPams(this EregisterFeaturesDebug debug) { - foreach (var eregisterProperty in typeof(EregisterDebug).GetProperties(BindingFlags.Public | BindingFlags.Instance)) + foreach (var eregisterProperty in typeof(EregisterFeaturesDebug).GetProperties(BindingFlags.Public | BindingFlags.Instance)) { - var pamType = eregisterProperty.GetCustomAttribute(); + var pamType = eregisterProperty.GetCustomAttribute(); if (pamType is null) { @@ -197,15 +233,143 @@ } else if (propertyValue is Pam pam) { - yield return new EregisterPam + var commandBytes = pam.ToByteArray().ToList(); + var pamNames = $"PAM {commandBytes[0]}: {eregisterProperty.Name}"; + + yield return new EregisterPamModel { - PamNames = eregisterProperty.Name, + PamNames = pamNames, AuthLevel = pamType.AuthLevel, IsSingleCmd = pamType.IsSingleCmd, - CommandBytes = pam.ToByteArray().ToList() + CommandBytes = commandBytes }; } } } + + public static Byte[] DecryptResponse(this Byte[] encryptedData, Byte[] encryptionKey) + { + if (encryptionKey?.Length != 16) + { + return encryptedData; + } + + var length = encryptedData.Length; + + if (length < 13) + { + return encryptedData; + } + + var decryptedData = new Byte[length]; + var hex = BitConverter.ToString(decryptedData); + + Array.Copy(encryptedData, 0, decryptedData, 0, length); + + var token = decryptedData[1]; + + for (var x = 6; x < length; x++) + { + token += (Byte)(decryptedData[x - (token & 0x3) - 1] >> ((token >> 6) & 0x1)); + + decryptedData[x] ^= encryptionKey[(token >> 2) & 0x0F]; + + if (token >= 0x80) + { + decryptedData[x] = (Byte)~decryptedData[x]; + } + } + + var crc = decryptedData.CalculateCRC(5, length - 2); + + if (crc == 0 || crc == UInt16.MaxValue) + { + return decryptedData; + } + + return encryptedData; + } + + public static Byte[] EncryptRequest(this Byte[] plainData, Byte[] encryptionKey, UInt32 address) + { + if (encryptionKey?.Length != 16 || address <= 0) + { + return plainData; + } + + var dataLength = plainData.Length; + var telegramLength = dataLength + 2; + var encryptedData = new Byte[telegramLength]; + + Array.Copy(plainData, 0, encryptedData, 0, dataLength); + + var telegramForCRCLength = telegramLength + 4; + var telegramForCRC = new Byte[telegramForCRCLength]; + + telegramForCRC[0] = (Byte)(address >> 24); + telegramForCRC[1] = (Byte)(address >> 16); + telegramForCRC[2] = (Byte)(address >> 8); + telegramForCRC[3] = (Byte)(address >> 0); + + Array.Copy(encryptedData, 0, telegramForCRC, 4, telegramLength); + + var telegramCRC = telegramForCRC.CalculateCRC(1, telegramForCRCLength - 2); + encryptedData[telegramLength - 2] = (Byte)(telegramCRC >> 8); + encryptedData[telegramLength - 1] = (Byte)(telegramCRC >> 0); + + var reference = address; + var token = (Byte)0xFF; + + for (var i = 0; i < telegramLength; i++) + { + token += (Byte)(((reference >> ((token & 0x3) << 3)) & 0xFF) >> ((token >> 6) & 1)); + + reference = reference << 8; + reference += encryptedData[i]; + + encryptedData[i] ^= encryptionKey[(token >> 2) & 0x0F]; + + if (token >= 0x80) + { + encryptedData[i] = (Byte)~encryptedData[i]; + } + } + + return encryptedData; + } + + private static UInt16 CalculateCRC(this Byte[] data, Int32 start, Int32 length) + { + var crc = (UInt16)0xFFFF; + var dataLength = data?.Length ?? 0; + + if (start + length > dataLength) + { + return crc; + } + + for (var b = start; b < length; b++) + { + var _byte = data[b]; + var token = (UInt16)((_byte << 8) & 0xFF00); + + for (var i = 0; i < 8; i++) + { + if (0x8000 == ((crc ^ token) & 0x8000)) + { + crc <<= 1; + crc ^= 0x1021; + } + else + { + crc <<= 1; + } + + token <<= 1; + } + } + + return crc; + } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterProgrammingTask.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterProgrammingTask.cs new file mode 100644 index 00000000..66d8ded4 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterProgrammingTask.cs @@ -0,0 +1,29 @@ +namespace Common.Hardware.WaterMeter.eRegister +{ + using Common.Hardware.Interfaces.Ports.SIRT; + + using System; + + public class EregisterProgrammingTask : SirtTask + { + public String Name { get; internal set; } + + public String State { get; set; } + + public Byte[] EncryptionKey { get; internal set; } + + public override void ReceiveMessage(SirtMessage response, Int32 mhz) + { + response.Data = response.Data.DecryptResponse(this.EncryptionKey); + + base.ReceiveMessage(response, mhz); + } + + public override Byte[] ToByteArray() + { + this.Data = this.Data.EncryptRequest(this.EncryptionKey, this.Address); + + return base.ToByteArray(); + } + } +} \ No newline at end of file diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterBatchSettings.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterBatchSettings.cs new file mode 100644 index 00000000..fe3fd4c9 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterBatchSettings.cs @@ -0,0 +1,14 @@ +namespace Common.Hardware.WaterMeter.eRegister.Models +{ + using System; + using System.Collections.Generic; + + public class EregisterBatchSettings + { + public String PortNameSirt433 { get; set; } + + public String PortNameSirt868 { get; set; } + + public IDictionary PortNamesEregister { get; set; } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterPamModel.cs similarity index 68% rename from Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs rename to Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterPamModel.cs index f445ac0d..4bfdb4a2 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterPam.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterPamModel.cs @@ -1,11 +1,11 @@ -namespace Common.Hardware.WaterMeter.eRegister +namespace Common.Hardware.WaterMeter.eRegister.Models { using Common.Hardware.WaterMeter.eRegister.Features; using System; using System.Collections.Generic; - public class EregisterPam + public class EregisterPamModel { public String PamNames { get; set; } @@ -14,5 +14,7 @@ public Boolean IsSingleCmd { get; set; } public List CommandBytes { get; set; } = new List(); + + internal Byte[] ToArray() => this.CommandBytes.ToArray(); } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParameters.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParameters.cs new file mode 100644 index 00000000..0e99a9c4 --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParameters.cs @@ -0,0 +1,172 @@ +namespace Common.Hardware.WaterMeter.eRegister.Models +{ + using System; + using System.Xml.Serialization; + + [XmlRoot(nameof(EregisterProgrammingParameters))] + public class EregisterProgrammingParameters + { + [XmlAttribute("P2000_Shared_Id")] + public Int32 SharedId { get; set; } + + public Int32 Slotno { get; set; } + + public Int32 FertigungsauftragNr { get; set; } + + public Int32 AuftragNr { get; set; } + + public Int32 PositionNr { get; set; } + + public Int32 SerienNr { get; set; } + + public String KundeneigeneSerienNr { get; set; } + + public Int32 StatusFertigung { get; set; } + + public Int64 TempAdresse { get; set; } + + public Int64 Adresse { get; set; } + + public Int32 Frequency { get; set; } + + public String CSD { get; set; } + + public String MeterId { get; set; } + + public Byte Metersize { get; set; } + + public Int32 VolumePerPulse { get; set; } + + public UInt32 VolumePerLedPulse { get; set; } + + public Byte OffsetFactor { get; set; } + + public Byte OffsetTime { get; set; } + + public Byte FactoryCalibration { get; set; } + + [XmlAttribute("TransmissionIntervall")] + public Byte Transmission_Interval_Before { get; set; } + + public Byte MBusStatus { get; set; } + + public Byte LatWindows { get; set; } + + public Byte UnitsOfMessure { get; set; } + + public Byte DecimalPoint { get; set; } + + public Byte Use_CandI_Rules { get; set; } + + public Byte Alarm_Low_Battery { get; set; } + + public Byte Alarm_Leakage { get; set; } + + public Byte Alarm_Magnetic_Tamper { get; set; } + + public Byte Alarm_Metrology_Unavailable { get; set; } + + public Byte Alarm_Backflow { get; set; } + + public Byte Alarm_Broken_Pipe { get; set; } + + public Byte Alarm_Medium_Absent { get; set; } + + public Byte Alarm_Specific_Error { get; set; } + + public Byte LeakagePeriod { get; set; } + + public Byte LeakageThreshold { get; set; } + + public Byte BrokenPipePeriod { get; set; } + + public Byte BrokenPipeThreshold { get; set; } + + public Byte History_Error_Limits_Days { get; set; } + + public Int32 Data_Logging_Period { get; set; } + + public Byte Data_Logging_Forward_Counter { get; set; } + + public Byte Data_Logging_Time_Of_Minimum_Flow { get; set; } + + public Byte Data_Logging_Minimum_Flow { get; set; } + + public Byte Data_Logging_Time_Of_Broken_Pipe { get; set; } + + public Byte Data_Logging_Broken_Pipe_Flow { get; set; } + + public Byte Data_Logging_Current_Flow { get; set; } + + public Byte Data_Logging_Time_Of_Peak_Flow { get; set; } + + public Byte Data_Logging_Peak_Flow { get; set; } + + public Byte Data_Logging_Time_Of_Maximum_Flow { get; set; } + + public Byte Data_Logging_Maximum_Flow { get; set; } + + public Byte Data_Logging_Backward_Volume { get; set; } + + public Byte Data_Logging_Counter { get; set; } + + public Byte Data_Logging_Alarm_State { get; set; } + + public Byte FDR_Day_Of_Data_Reading { get; set; } + + public Byte FDR_Forward_Counter { get; set; } + + public Byte FDR_Time_Of_Minimum_Flow { get; set; } + + public Byte FDR_Minimum_Flow { get; set; } + + public Byte FDR_Time_Of_Broken_Pipe { get; set; } + + public Byte FDR_Broken_Pipe_Flow { get; set; } + + public Byte FDR_Current_Flow { get; set; } + + public Byte FDR_Time_Of_Peak_Flow { get; set; } + + public Byte FDR_Peak_Flow { get; set; } + + public Byte FDR_Time_Of_Maximum_Flow { get; set; } + + public Byte FDR_Maximum_Flow { get; set; } + + public Byte FDR_Backward_Volume { get; set; } + + public Byte FDR_Counter { get; set; } + + public Byte FDR_Alarm_State { get; set; } + + [XmlAttribute("Transmission_Intervall")] + public Byte Transmission_Intervall_After { get; set; } + + public Byte PowerLevelHex { get; set; } + + public Byte DisableOTA { get; set; } + + public Byte LAT_Interval { get; set; } + + public Byte ActivationByThreshold { get; set; } + + public Int16 OpenMeteringTransmissionIntervalSeconds { get; set; } + + public Single UTC_Offset { get; set; } + + public Byte Wake_Up_Interval { get; set; } + + public Int32 DisplayVolume { get; set; } + + public Boolean Sealed { get; set; } + + public Byte Lat_Windows_Before { get; set; } + + public UInt32 Display_Volume_Before { get; set; } + + public Byte LED_On_Minutes { get; set; } + + public String EncryptionKey { get; set; } + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParametersList.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParametersList.cs new file mode 100644 index 00000000..fc4e120f --- /dev/null +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParametersList.cs @@ -0,0 +1,10 @@ +namespace Common.Hardware.WaterMeter.eRegister.Models +{ + using System.Collections.Generic; + using System.Xml.Serialization; + + [XmlRoot(nameof(EregisterProgrammingParametersList), ElementName = nameof(EregisterProgrammingParametersList))] + public class EregisterProgrammingParametersList : List + { + } +} diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs index 00e7c22d..8f0b4487 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ParameterSet.cs @@ -136,9 +136,9 @@ OffsetFactor = this.OffsetFactor, OffsetTime = this.OffsetTime, FactoryCalibration = this.FactoryCalibration, - CandIRule = this.CandIRules, + CandIRules = this.CandIRules, MeterSize = this.MeterSize, - VppLED = this.VolumePerLedPulse, + VppLED = (UInt32)this.VolumePerLedPulse, } .Append(new ProvidePin { @@ -261,7 +261,7 @@ public IEnumerable BuildFinalProgrammingTasks() { - var tasks = new Eregister + var tasks = new EregisterFeatures { ChangeWakeUp = new ChangeWakeUp(WakeUpMode.StayAwake), ChangeMeterReading = new ChangeMeterReading(this.DisplayVolume), @@ -289,7 +289,7 @@ ChangeNumberOfLatWindows = new ChangeNumberOfLatWindows(this.NumberOfLatWindows), ChangeTransmissionInterval = new ChangeTransmissionInterval(this.TransmissionIntervalLast), OpenMeteringTransmitionIntervalWMBus = new OpenMeteringTransmitionIntervalWMBus(this.OpenMeteringTransmissionInterval), - Debug = new EregisterDebug + Debug = new EregisterFeaturesDebug { DisableOTAFirmwareUpdate = new DisableOTAFirmwareUpdate(this.OTASettings), SetActivationByThreshold = new SetActivationByThreshold(this.OTASettings), diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs index 98a9e5c2..4df35518 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingBatch.cs @@ -21,7 +21,7 @@ private readonly Dictionary> completedTasks = new Dictionary>(); private readonly ILogger logger = CreateNLogger("SIRT"); - private SIRT broadcaster; + private SirtBroadcaster broadcaster; private Int32 rssiRow; public event Action OnProgress; @@ -272,7 +272,7 @@ foreach (var task in tasks) { - if (task.TaskStatus != TaskStatus.Completed) + if (task.TaskState != SirtTaskState.Completed) { this.broadcaster.TryRun(task); @@ -337,7 +337,7 @@ while (true) { - if (this.broadcaster.TryRun(task) == TaskStatus.Sent) + if (this.broadcaster.TryRun(task) == SirtTaskState.Sent) { task.Cancelled += _ => awaiter.Set(); task.Completed += _ => awaiter.Set(); @@ -346,7 +346,7 @@ awaiter.Reset(); } - if (task.TaskStatus == TaskStatus.Completed) + if (task.TaskState == SirtTaskState.Completed) { break; } @@ -387,7 +387,7 @@ { this.Stop(); - this.broadcaster = new SIRT(portName); + this.broadcaster = new SirtBroadcaster(portName); this.broadcaster.Logging += this.logger.Debug; if (this.broadcaster.TryActivate()) diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs index 02f20cd6..9dacfb39 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/ProgrammingTask.cs @@ -29,7 +29,7 @@ public String RSSI { get; private set; } - public TaskState State { get; private set; } = TaskState.None; + public TaskState State { get; private set; } = eRegister.TaskState.None; public String PamNames { get; internal set; } @@ -47,7 +47,9 @@ this.DecryptResponse(response); } - if (this.State != TaskState.Success && response.Cmd == SirtMessage.FROMAIR) + base.ReceiveMessage(response, mhz); + + if (this.State != eRegister.TaskState.Success && response.Cmd == SirtMessage.FROMAIR) { var label = this.Label; var state = this.State; @@ -61,13 +63,13 @@ if (semi.PAMStatus == PAMStatus.OK) { - state = TaskState.Success; - this.TaskStatus = TaskStatus.Completed; + state = eRegister.TaskState.Success; + this.TaskState = SirtTaskState.Completed; } else { - state = TaskState.Error; - this.TaskStatus = TaskStatus.Cancelled; + state = eRegister.TaskState.Error; + this.TaskState = SirtTaskState.Cancelled; } this.semis.Add(semi); @@ -75,21 +77,21 @@ else if (type == SirtMessage.BUP) { label = nameof(SirtMessage.BUP); - state = TaskState.Warning; + state = eRegister.TaskState.Warning; this.bups.Add(new BUP(data)); } else if (type == SirtMessage.LAT) { label = nameof(SirtMessage.LAT); - state = TaskState.Warning; + state = eRegister.TaskState.Warning; this.lats.Add(new LAT(data)); } else if (type == SirtMessage.DEBUG) { label = nameof(SirtMessage.DEBUG); - state = TaskState.Warning; + state = eRegister.TaskState.Warning; this.debugs.Add(new DEBUG(data)); } @@ -100,7 +102,6 @@ } this.OnProgress?.Invoke(this); - base.ReceiveMessage(response, mhz); } public override Byte[] ToByteArray() @@ -123,11 +124,11 @@ if (semi.PAMStatus == PAMStatus.OK) { - this.State = TaskState.Success; + this.State = eRegister.TaskState.Success; } else { - this.State = TaskState.Error; + this.State = eRegister.TaskState.Error; } } else if (this.LastPayload != null) @@ -138,28 +139,28 @@ if (p11.LenOverflow) { this.Label = "LEN OVERFLOW"; - this.State = TaskState.Error; + this.State = eRegister.TaskState.Error; } else if (!p11.SrcChannel && p11.InvalidMod1) { this.Label = "MOD 1 CRC ERROR"; - this.State = TaskState.Error; + this.State = eRegister.TaskState.Error; } else if (p11.SrcChannel && p11.InvalidMod2) { this.Label = "MOD 2 CRC ERROR"; - this.State = TaskState.Error; + this.State = eRegister.TaskState.Error; } else { this.Label = nameof(PAMStatus.OK); - this.State = TaskState.Success; + this.State = eRegister.TaskState.Success; } } else { this.Label = "NA"; - this.State = TaskState.Error; + this.State = eRegister.TaskState.Error; } this.OnProgress?.Invoke(this); @@ -169,42 +170,42 @@ { var label = $"{this.semis.LastOrDefault()?.MBusStatus} OK"; - return new Tuple(label, TaskState.Success); + return new Tuple(label, eRegister.TaskState.Success); } internal Tuple CheckBatteryVoltage(ParameterSet parameterSet) { var label = $"{this.debugs.LastOrDefault()?.BatteryVoltage:0.00} OK"; - return new Tuple(label, TaskState.Success); + return new Tuple(label, eRegister.TaskState.Success); } internal Tuple CheckBatteryRemaining(ParameterSet parameterSet) { var label = $"{this.semis.LastOrDefault()?.BatteryRemaining:0.0} OK"; - return new Tuple(label, TaskState.Success); + return new Tuple(label, eRegister.TaskState.Success); } internal Tuple CheckRadioFWVersion(ParameterSet parameterSet) { var label = $"{this.debugs.LastOrDefault()?.RadioFirmwareVersion} OK"; - return new Tuple(label, TaskState.Success); + return new Tuple(label, eRegister.TaskState.Success); } internal Tuple CheckMetrologyFWVersion(ParameterSet arg) { var label = $"{this.debugs.LastOrDefault()?.MetrologyFirmwareVersion} OK"; - return new Tuple(label, TaskState.Success); + return new Tuple(label, eRegister.TaskState.Success); } internal Tuple CheckReboots(ParameterSet parameterSet) { var label = $"{this.debugs.LastOrDefault()?.RebootCount} OK"; - return new Tuple(label, TaskState.Success); + return new Tuple(label, eRegister.TaskState.Success); } private void DecryptResponse(SirtMessage response) diff --git a/Common/Logic/Common.Logic.Extensions.SQL/SQLConnection.cs b/Common/Logic/Common.Logic.Extensions.SQL/SQLConnection.cs index b65c1fb2..1eae0fb9 100644 --- a/Common/Logic/Common.Logic.Extensions.SQL/SQLConnection.cs +++ b/Common/Logic/Common.Logic.Extensions.SQL/SQLConnection.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Data.SqlClient; - using System.Linq; /// /// A wrapper class around the . @@ -221,6 +220,7 @@ using (var sqlCommand = sqlConnection.CreateCommand()) { sqlCommand.CommandText = command.CommandText; + // sqlCommand.CommandType = CommandType.Text; sqlCommand.Parameters.AddRange(command.Parameters); diff --git a/Common/Ui/Common.UI.WPF/App.xaml b/Common/Ui/Common.UI.WPF/App.xaml index 10a1ad0d..903771f7 100644 --- a/Common/Ui/Common.UI.WPF/App.xaml +++ b/Common/Ui/Common.UI.WPF/App.xaml @@ -3,10 +3,8 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:In="clr-namespace:Common.UI.WPF.Infrastructure" StartupUri="MainWindow.xaml"> - - diff --git a/Common/Ui/Common.UI.WPF/App.xaml.cs b/Common/Ui/Common.UI.WPF/App.xaml.cs index 71043ab4..bd1ccdfe 100644 --- a/Common/Ui/Common.UI.WPF/App.xaml.cs +++ b/Common/Ui/Common.UI.WPF/App.xaml.cs @@ -1,40 +1,40 @@ namespace Common.UI.WPF { + using Common.UI.WPF.Infrastructure; + using System; - using System.Diagnostics; using System.Windows; + using System.Windows.Controls; public partial class App : Application { + protected override void OnActivated(EventArgs e) + { + if (this.MainWindow?.Content is Frame frame) + { + AppHost.Navigation = frame.NavigationService; + } + + base.OnActivated(e); + } + + protected override void OnExit(ExitEventArgs e) + { + AppHost.NotifyExited(); + + base.OnExit(e); + } + protected override void OnStartup(StartupEventArgs args) { - var currentProcess = Process.GetCurrentProcess(); - var currentProcessName = currentProcess.ProcessName; - var currentProcessId = currentProcess.Id; - - try + if (AppHost.TryRestoreRunningInstance()) { - foreach (var _process in Process.GetProcessesByName(currentProcessName)) - { - if (_process.Id != currentProcessId) - { - try - { - _process.Kill(); - } - catch (Exception e) - { - MessageBox.Show(e.StackTrace, e.Message); - } - } - } + this.Shutdown(); } - catch (Exception e) + else { - MessageBox.Show(e.StackTrace, e.Message); + base.OnStartup(args); } - - base.OnStartup(args); } } } diff --git a/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj b/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj index 721ae086..806ab668 100644 --- a/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj +++ b/Common/Ui/Common.UI.WPF/Common.UI.WPF.csproj @@ -41,6 +41,7 @@ + @@ -58,13 +59,19 @@ MSBuild:Compile Designer + + eRegister_PruefungInitialisierung.xaml + + - + + - + + - + @@ -72,6 +79,7 @@ + @@ -79,9 +87,13 @@ eRegisterPruefungInitialisierungView.xaml - - MainWindowView.xaml + + Index.xaml + + Designer + MSBuild:Compile + MSBuild:Compile Designer @@ -98,7 +110,7 @@ Designer MSBuild:Compile - + Designer MSBuild:Compile diff --git a/Common/Ui/Common.UI.WPF/Data/EregisterShared.cs b/Common/Ui/Common.UI.WPF/Data/EregisterShared.cs new file mode 100644 index 00000000..1ad8a293 --- /dev/null +++ b/Common/Ui/Common.UI.WPF/Data/EregisterShared.cs @@ -0,0 +1,63 @@ +namespace Common.UI.WPF.Data +{ + using Common.Hardware.WaterMeter.eRegister.Models; + using Common.UI.WPF.Infrastructure; + + using System; + using System.IO; + using System.Xml.Serialization; + + public class EregisterShared + { + internal static EregisterProgrammingParametersList AllProgrammingParametersBySharedId(Int32 sharedId) + { + var xmlList = AppHost.SQLConnection + .CreateCommand($@" + SELECT CAST((SELECT ersh.P2000_Shared_Id + , ersh.Slotno + , erpp.* + FROM eRegister_Shared AS ersh + JOIN VieweRegisterProgrammingParameters AS erpp + ON ersh.Serialno = erpp.SerienNr + WHERE ersh.P2000_Shared_Id = @{nameof(sharedId)} + FOR XML PATH('{nameof(EregisterProgrammingParameters)}') + , ROOT('{nameof(EregisterProgrammingParametersList)}')) + AS XML)") + .SetParameter(nameof(sharedId), sharedId) + .FirstOrDefault(x => x.GetValue(0)); + var xmlDeserialized = default(Object); + + if (!String.IsNullOrWhiteSpace(xmlList)) + { + var xmlSerializer = new XmlSerializer(typeof(EregisterProgrammingParametersList)); + var xmlReader = new StringReader(xmlList); + + try + { + xmlDeserialized = xmlSerializer.Deserialize(xmlReader); + } + catch (Exception e) + { + // TODO: Exception logging + } + } + + return xmlDeserialized as EregisterProgrammingParametersList ?? new EregisterProgrammingParametersList(); + } + } + + public class EregisterSharedModel + { + public Int32 SharedId { get; set; } + + public Int32 Slotno { get; set; } + + public Int32 Serialno { get; set; } + + public Int64 RadioAddress { get; set; } + + public Int64 FinalAddress { get; set; } + + public EregisterProgrammingParameters Parameters { get; set; } + } +} diff --git a/Common/Ui/Common.UI.WPF/Infrastructure/Auftrag.cs b/Common/Ui/Common.UI.WPF/Data/P2000Shared.cs similarity index 68% rename from Common/Ui/Common.UI.WPF/Infrastructure/Auftrag.cs rename to Common/Ui/Common.UI.WPF/Data/P2000Shared.cs index c3c385fd..5b4fecee 100644 --- a/Common/Ui/Common.UI.WPF/Infrastructure/Auftrag.cs +++ b/Common/Ui/Common.UI.WPF/Data/P2000Shared.cs @@ -1,19 +1,53 @@ -namespace Common.UI.WPF.Infrastructure +namespace Common.UI.WPF.Data { using Common.Hardware.WaterMeter.eRegister; - using Common.Logic.Extensions.SQL; using Common.Logic.Extensions.SQL.Interfaces; + using Common.UI.WPF.Infrastructure; using Common.UI.WPF.Models; using System; using System.Collections.Generic; - public class Auftrag + public class P2000Shared { - private static readonly ISQLConnection sqlConnection = SQLConnection.CreateSQLConnection(Appsettings.Current["PS.ConnectionString"]); + internal static Boolean TryLoadPendingActions(out Int32 psno, out Int32 sharedId, out P2000Action action) + { + psno = 0; + sharedId = 0; + action = P2000Action.None; + + var succeeded = false; + + if (Int32.TryParse(Appsettings.Current["PS.Nr"], out psno)) + { + dynamic result = AppHost + .SQLConnection + .CreateCommand($@" + SELECT TOP 1 + Id + , Action + FROM P2000_Shared + WHERE Psno = @{nameof(psno)} + AND Completed = 0 + ORDER BY Id DESC") + .SetParameter(nameof(psno), psno) + .FirstOrDefault(reader => new + { + sharedId = reader.GetValue(0), + action = reader.GetValue(1), + succeeded = true + }); + + sharedId = result.sharedId; + action = result.action; + succeeded = result.succeeded; + } + + return succeeded; + } internal static IEnumerable All_eRegister_Shared_ByRunno(Int32 scharedId) - => sqlConnection + => AppHost.SQLConnection .CreateCommand($@" SELECT P2000_Shared_Id , Slotno @@ -29,7 +63,7 @@ .ExecuteReader(ReadJusteRegisterParameterSet); internal static ParameterSet eRegister_Shared_ByRunno_Slotno(Int32 scharedId, Int32 slotno) - => sqlConnection + => AppHost.SQLConnection .CreateCommand($@" SELECT P2000_Shared_Id , Slotno @@ -45,44 +79,6 @@ .SetParameter(nameof(slotno), slotno) .FirstOrDefault(ReadJusteRegisterParameterSet); - internal static Boolean TryFind_P2000_Shared_Action(out Int32 psno, out Int32 sharedId, out P2000Action action) - { - psno = 0; - sharedId = 0; - action = P2000Action.None; - - var succeeded = Int32.TryParse(Appsettings.Current["PS.Nr"], out psno); - - if (succeeded) - { - dynamic result = sqlConnection - .CreateCommand($@" - SELECT TOP 1 - Id - , Action - FROM P2000_Shared - WHERE Psno = @{nameof(psno)} - AND Completed = 0 - ORDER BY Id DESC") - .SetParameter(nameof(psno), psno) - .FirstOrDefault(reader => new - { - sharedId = reader.GetValue(0), - action = reader.GetValue(1) - }); - - succeeded = result != null; - - if (succeeded) - { - sharedId = result.sharedId; - action = result.action; - } - } - - return succeeded; - } - private static ParameterSet ReadJusteRegisterParameterSet(ISQLReader reader) => new ParameterSet { diff --git a/Common/Ui/Common.UI.WPF/Index.xaml b/Common/Ui/Common.UI.WPF/Index.xaml new file mode 100644 index 00000000..ff7b728c --- /dev/null +++ b/Common/Ui/Common.UI.WPF/Index.xaml @@ -0,0 +1,5 @@ + + diff --git a/Common/Ui/Common.UI.WPF/Index.xaml.cs b/Common/Ui/Common.UI.WPF/Index.xaml.cs new file mode 100644 index 00000000..92d3eece --- /dev/null +++ b/Common/Ui/Common.UI.WPF/Index.xaml.cs @@ -0,0 +1,9 @@ +namespace Common.UI.WPF +{ + using System.Windows.Controls; + + public partial class Index : Page + { + public Index() => this.InitializeComponent(); + } +} diff --git a/Common/Ui/Common.UI.WPF/Infrastructure/AppHost.cs b/Common/Ui/Common.UI.WPF/Infrastructure/AppHost.cs new file mode 100644 index 00000000..142f1a52 --- /dev/null +++ b/Common/Ui/Common.UI.WPF/Infrastructure/AppHost.cs @@ -0,0 +1,66 @@ +namespace Common.UI.WPF.Infrastructure +{ + using Common.Logic.Extensions.SQL.Interfaces; + + using System; + using System.Diagnostics; + using System.Windows.Navigation; + + public class AppHost + { + internal static event Action Exited; + + internal static NavigationService Navigation { get; set; } + + internal static readonly ISQLConnection SQLConnection + = Logic.Extensions.SQL.SQLConnection.CreateSQLConnection(Appsettings.Current["PS.ConnectionString"]); + + internal static void NotifyExited() + { + if (Exited != null) + { + Exited.Invoke(); + + foreach (Action handler in Exited.GetInvocationList()) + { + Exited -= handler; + } + } + } + + internal static Boolean TryRestoreRunningInstance() + { + var restored = false; + var assemblyName = typeof(App).Assembly.GetName().Name; + + var currentProcess = Process.GetCurrentProcess(); + + foreach (var process in Process.GetProcessesByName(currentProcess.ProcessName)) + { + if (process.MainModule.FileName == currentProcess.MainModule.FileName) + { + if (process.Id != currentProcess.Id) + { + var windowHandle = process.MainWindowHandle; + + if (windowHandle != IntPtr.Zero) + { + if (User32DllImports.IsIconic(windowHandle)) + { + User32DllImports.ShowWindow(windowHandle, User32DllWindowState.Restore); + } + + User32DllImports.SetForegroundWindow(windowHandle); + + restored = true; + + break; + } + } + } + } + + return restored; + } + } +} diff --git a/Common/Ui/Common.UI.WPF/Infrastructure/User32DllImports.cs b/Common/Ui/Common.UI.WPF/Infrastructure/User32DllImports.cs new file mode 100644 index 00000000..507b8a96 --- /dev/null +++ b/Common/Ui/Common.UI.WPF/Infrastructure/User32DllImports.cs @@ -0,0 +1,21 @@ +namespace Common.UI.WPF.Infrastructure +{ + using System; + using System.Diagnostics; + using System.Runtime.InteropServices; + + public class User32DllImports + { + [DllImport("User32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + internal static extern Boolean IsIconic([In] IntPtr windowHandle); + + [DllImport("User32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + internal static extern Boolean SetForegroundWindow([In] IntPtr windowHandle); + + [DllImport("User32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + internal static extern Boolean ShowWindow([In] IntPtr windowHandle, [In] User32DllWindowState command); + } +} diff --git a/Common/Ui/Common.UI.WPF/Infrastructure/User32DllWindowState.cs b/Common/Ui/Common.UI.WPF/Infrastructure/User32DllWindowState.cs new file mode 100644 index 00000000..bd1d42c9 --- /dev/null +++ b/Common/Ui/Common.UI.WPF/Infrastructure/User32DllWindowState.cs @@ -0,0 +1,19 @@ +namespace Common.UI.WPF.Infrastructure +{ + using System; + + public enum User32DllWindowState : Int32 + { + Hide = 0x0, + ShowNormal = 0x1, + ShowMinimized = 0x2, + ShowMaximized = 0x3, + ShowNormalNotActive = 0x4, + Minimize = 0x6, + ShowMinimizedNotActive = 0x7, + ShowCurrentNotActive = 0x8, + Restore = 0x9, + ShowDefault = 0xA, + ForceMinimize = 0xB + } +} diff --git a/Common/Ui/Common.UI.WPF/MainWindow.xaml b/Common/Ui/Common.UI.WPF/MainWindow.xaml index 732abcca..0b7ca681 100644 --- a/Common/Ui/Common.UI.WPF/MainWindow.xaml +++ b/Common/Ui/Common.UI.WPF/MainWindow.xaml @@ -2,19 +2,9 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:VM="clr-namespace:Common.UI.WPF.ViewModels" - xmlns:Views="clr-namespace:Common.UI.WPF.Views" Title="{Binding Title}"> - - - - - - - - - - + diff --git a/Common/Ui/Common.UI.WPF/Models/Contracts/IMainModel.cs b/Common/Ui/Common.UI.WPF/Models/Contracts/IMainModel.cs deleted file mode 100644 index 1a3d887f..00000000 --- a/Common/Ui/Common.UI.WPF/Models/Contracts/IMainModel.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Common.UI.WPF.Models.Contracts -{ - using System; - - public interface IMainModel - { - Int32 Psno { get; set; } - - Int32 Runno { get; set; } - - P2000Action Action { get; set; } - - void LoadP2000Shared(); - } -} diff --git a/Common/Ui/Common.UI.WPF/Models/MainWindowModel.cs b/Common/Ui/Common.UI.WPF/Models/MainWindowModel.cs deleted file mode 100644 index ab19b053..00000000 --- a/Common/Ui/Common.UI.WPF/Models/MainWindowModel.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace Common.UI.WPF.Models -{ - using Common.UI.WPF.Infrastructure; - using Common.UI.WPF.Models.Contracts; - - using System; - - public class MainWindowModel : IMainModel - { - public Int32 Psno { get; set; } - - public Int32 Runno { get; set; } - - public P2000Action Action { get; set; } - - public void LoadP2000Shared() - { - this.Psno = -1; - this.Runno = -1; - this.Action = P2000Action.None; - - if (Auftrag.TryFind_P2000_Shared_Action(out var psno, out var runno, out var action)) - { - this.Psno = psno; - this.Runno = runno; - this.Action = action; - } - } - } -} diff --git a/Common/Ui/Common.UI.WPF/Models/eRegisterPruefungInitialisierungModel.cs b/Common/Ui/Common.UI.WPF/Models/eRegisterPruefungInitialisierungModel.cs index e3b4825b..3dee39c2 100644 --- a/Common/Ui/Common.UI.WPF/Models/eRegisterPruefungInitialisierungModel.cs +++ b/Common/Ui/Common.UI.WPF/Models/eRegisterPruefungInitialisierungModel.cs @@ -1,9 +1,7 @@ namespace Common.UI.WPF.Models { using Common.Hardware.WaterMeter.eRegister; - using Common.UI.WPF.Infrastructure; - using Common.UI.WPF.Models.Contracts; - + using Common.UI.WPF.Data; using System; using System.Collections.Generic; using System.Threading; @@ -11,12 +9,10 @@ public class eRegisterPruefungInitialisierungModel { - private readonly IMainModel mainModel; private readonly ProgrammingBatch programmingBatch; - public eRegisterPruefungInitialisierungModel(IMainModel mainModel) + public eRegisterPruefungInitialisierungModel() { - this.mainModel = mainModel; this.programmingBatch = new ProgrammingBatch(); } @@ -31,7 +27,7 @@ { if (!this.IsRunning) { - foreach (var parameterSet in Auftrag.All_eRegister_Shared_ByRunno(this.mainModel.Runno)) + foreach (var parameterSet in P2000Shared.All_eRegister_Shared_ByRunno(1)) { this.programmingBatch.AddOrReplace(parameterSet); } @@ -53,26 +49,26 @@ { if (state is eRegisterPruefungInitialisierungModel model && !model.IsRunning) { - model.IsRunning = true; - model.programmingBatch.OnProgress += model.ProgrammingBatch_OnProgress; + //model.IsRunning = true; + //model.programmingBatch.OnProgress += model.ProgrammingBatch_OnProgress; - var portName = Appsettings.Current["SIRT.PortName"]; + //var portName = Appsettings.Current["SIRT.PortName"]; - model.programmingBatch.StartOnCOMPort(portName); - model.programmingBatch.InitializeCalibration(); - model.programmingBatch.Run(); + //model.programmingBatch.StartOnCOMPort(portName); + //model.programmingBatch.InitializeCalibration(); + //model.programmingBatch.Run(); } }, this, CancellationToken.None) .ContinueWith(task => { if (task.AsyncState is eRegisterPruefungInitialisierungModel model && model.IsRunning) { - model.programmingBatch.Stop(); + //model.programmingBatch.Stop(); - model.programmingBatch.OnProgress -= model.ProgrammingBatch_OnProgress; - model.IsRunning = false; + //model.programmingBatch.OnProgress -= model.ProgrammingBatch_OnProgress; + //model.IsRunning = false; - model.Done?.Invoke(); + //model.Done?.Invoke(); } }, CancellationToken.None); @@ -80,7 +76,7 @@ { if (!this.IsRunning) { - var parameterSet = Auftrag.eRegister_Shared_ByRunno_Slotno(this.mainModel.Runno, slotno); + var parameterSet = P2000Shared.eRegister_Shared_ByRunno_Slotno(1, slotno); this.programmingBatch.AddOrReplace(parameterSet); } } @@ -91,26 +87,26 @@ { if (state is eRegisterPruefungInitialisierungModel model && !model.IsRunning) { - model.IsRunning = true; - model.programmingBatch.OnProgress += model.ProgrammingBatch_OnProgress; + //model.IsRunning = true; + //model.programmingBatch.OnProgress += model.ProgrammingBatch_OnProgress; - var portName = Appsettings.Current["SIRT.PortName"]; + //var portName = Appsettings.Current["SIRT.PortName"]; - model.programmingBatch.StartOnCOMPort(portName); - model.programmingBatch.InitializeCalibration(slotno); - model.programmingBatch.Run(slotno); + //model.programmingBatch.StartOnCOMPort(portName); + //model.programmingBatch.InitializeCalibration(slotno); + //model.programmingBatch.Run(slotno); } }, this, CancellationToken.None) .ContinueWith(task => { if (task.AsyncState is eRegisterPruefungInitialisierungModel model && model.IsRunning) { - model.programmingBatch.Stop(); + //model.programmingBatch.Stop(); - model.programmingBatch.OnProgress -= model.ProgrammingBatch_OnProgress; - model.IsRunning = false; + //model.programmingBatch.OnProgress -= model.ProgrammingBatch_OnProgress; + //model.IsRunning = false; - model.Done?.Invoke(); + //model.Done?.Invoke(); } }, CancellationToken.None); } diff --git a/Common/Ui/Common.UI.WPF/Models/eRegister_PruefungInitialisierungM.cs b/Common/Ui/Common.UI.WPF/Models/eRegister_PruefungInitialisierungM.cs new file mode 100644 index 00000000..ed8976a6 --- /dev/null +++ b/Common/Ui/Common.UI.WPF/Models/eRegister_PruefungInitialisierungM.cs @@ -0,0 +1,64 @@ +namespace Common.UI.WPF.Models +{ + using Common.Hardware.WaterMeter.eRegister; + using Common.Hardware.WaterMeter.eRegister.Models; + using Common.UI.WPF.Data; + using Common.UI.WPF.Infrastructure; + + using System; + using System.Collections.Generic; + using System.Net.Http; + + public class eRegister_PruefungInitialisierungM + { + private readonly EregisterBatch ebatch; + + public eRegister_PruefungInitialisierungM() + { + var settings = new EregisterBatchSettings + { + PortNameSirt433 = Appsettings.Current["SIRT.433.PortName"], + PortNameSirt868 = Appsettings.Current["SIRT.868.PortName"], + PortNamesEregister = new Dictionary() + }; + + for (var i = 1; i < 11; i++) + { + settings.PortNamesEregister[i] = Appsettings.Current[$"Slot.{i}.PortName"]; + } + + this.ebatch = new EregisterBatch(settings); + } + + internal void CancelExecution() + => this.ebatch.CancelExecution(); + + internal void Execute() + { + this.ebatch.Clear(); + + if (P2000Shared.TryLoadPendingActions(out var psno, out var sharedId, out var action)) + { + var eprogrammingParameters = EregisterShared.AllProgrammingParametersBySharedId(sharedId); + var uriFormat = Appsettings.Current["Http.EregisterRadioKey.BySerialNo"]; + var httpClient = new HttpClient(); + + foreach (var epp in eprogrammingParameters) + { + using (var httpResponeMessage = httpClient.GetAsync(String.Format(uriFormat, epp.SerienNr)).Result) + { + if (httpResponeMessage.IsSuccessStatusCode) + { + epp.EncryptionKey = httpResponeMessage.Content.ReadAsStringAsync().Result.Trim('"'); + } + } + } + + this.ebatch.LoadProgrammingParameters(eprogrammingParameters); + this.ebatch.LoadInspectionInitializationTasks(); + + // this.ebatch.RunProgrammingTasksAsync(); + } + } + } +} diff --git a/Common/Ui/Common.UI.WPF/ViewModels/Command.cs b/Common/Ui/Common.UI.WPF/ViewModels/Command.cs index bd06545a..975029ee 100644 --- a/Common/Ui/Common.UI.WPF/ViewModels/Command.cs +++ b/Common/Ui/Common.UI.WPF/ViewModels/Command.cs @@ -3,23 +3,20 @@ using System; using System.Windows.Input; - public abstract partial class VM + public class Command : ICommand { - protected class Command : ICommand + private readonly Action executable; + + public Command(Action executable) => this.executable = executable; + + public event EventHandler CanExecuteChanged { - private readonly Action executable; - - public Command(Action executable) => this.executable = executable; - - public event EventHandler CanExecuteChanged - { - add => CommandManager.RequerySuggested += value; - remove => CommandManager.RequerySuggested -= value; - } - - public bool CanExecute(Object _) => this.executable != null; - - public void Execute(Object _) => this.executable?.Invoke(); + add => CommandManager.RequerySuggested += value; + remove => CommandManager.RequerySuggested -= value; } + + public bool CanExecute(Object _) => this.executable != null; + + public void Execute(Object _) => this.executable?.Invoke(); } } diff --git a/Common/Ui/Common.UI.WPF/ViewModels/Command[T].cs b/Common/Ui/Common.UI.WPF/ViewModels/Command[T].cs index c84595ab..9fc98674 100644 --- a/Common/Ui/Common.UI.WPF/ViewModels/Command[T].cs +++ b/Common/Ui/Common.UI.WPF/ViewModels/Command[T].cs @@ -3,23 +3,20 @@ using System; using System.Windows.Input; - public abstract partial class VM + public class Command : ICommand { - protected class Command : ICommand + private readonly Action executable; + + public Command(Action executable) => this.executable = executable; + + public event EventHandler CanExecuteChanged { - private readonly Action executable; - - public Command(Action executable) => this.executable = executable; - - public event EventHandler CanExecuteChanged - { - add => CommandManager.RequerySuggested += value; - remove => CommandManager.RequerySuggested -= value; - } - - public bool CanExecute(Object _) => this.executable != null; - - public void Execute(Object parameter) => this.executable?.Invoke(parameter is T t ? t : default(T)); + add => CommandManager.RequerySuggested += value; + remove => CommandManager.RequerySuggested -= value; } + + public bool CanExecute(Object _) => this.executable != null; + + public void Execute(Object parameter) => this.executable?.Invoke(parameter is T t ? t : default(T)); } } diff --git a/Common/Ui/Common.UI.WPF/ViewModels/MainWindowVM.cs b/Common/Ui/Common.UI.WPF/ViewModels/MainWindowVM.cs index 03f86858..4f7d7d94 100644 --- a/Common/Ui/Common.UI.WPF/ViewModels/MainWindowVM.cs +++ b/Common/Ui/Common.UI.WPF/ViewModels/MainWindowVM.cs @@ -1,42 +1,28 @@ namespace Common.UI.WPF.ViewModels { + using Common.UI.WPF.Data; using Common.UI.WPF.Models; - using Common.UI.WPF.Models.Contracts; using System; public class MainWindowVM : VM { - private readonly IMainModel model = new MainWindowModel(); - private readonly P2000Action action; - public MainWindowVM() : base() { - this.model.LoadP2000Shared(); + var title = String.Empty; + var source = new Uri("Index.xaml", UriKind.Relative); - var content = this.Content; - - if (this.action != this.model.Action) + if (P2000Shared.TryLoadPendingActions(out var psno, out var runno, out var action)) { - this.action = this.model.Action; - - switch (this.action) + if (action != P2000Action.None) { - case P2000Action.eRegister_PruefungInitialisierung: - content = new eRegisterPruefungInitialisierungVM(this.model); - title = "Prüfunginitializierung_NeueVako"; - break; - case P2000Action.eRegister_PruefungAbschluss: - content = this; - title = "Prüfungabschluss_NeueVako"; - break; - default: - content = this; - break; + title = action.ToString(); + source = new Uri($"{action}.xaml", UriKind.Relative); } } - this.Content = content; + this.Title = title; + this.Source = source; } private String title; @@ -46,11 +32,11 @@ set => this.Set(x => x.title = value); } - private VM content; - public VM Content + private Uri source; + public Uri Source { - get => this.content; - set => this.Set(x => x.content = value); + get => this.source; + set => this.Set(x => x.source = value); } } } diff --git a/Common/Ui/Common.UI.WPF/ViewModels/VM.cs b/Common/Ui/Common.UI.WPF/ViewModels/VM.cs index 9e32cc85..0330f0e9 100644 --- a/Common/Ui/Common.UI.WPF/ViewModels/VM.cs +++ b/Common/Ui/Common.UI.WPF/ViewModels/VM.cs @@ -1,33 +1,32 @@ namespace Common.UI.WPF.ViewModels { + using Common.UI.WPF.Infrastructure; + using System; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using System.Windows.Threading; /// /// Base view model with notification features and commands. /// - public abstract partial class VM : INotifyPropertyChanged + public abstract class VM : INotifyPropertyChanged { - private static readonly Dispatcher dispatcher = App.Current.Dispatcher; + protected VM() => AppHost.Exited += AppHost_Exited; public event PropertyChangedEventHandler PropertyChanged; - protected void DispatcherInvoke(Action action) - => dispatcher.Invoke(action); + protected virtual void AppHost_Exited() + { + } protected void NotifyPropertyChanged([CallerMemberName] String property = "") => this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property)); - protected void Set(Action setExpression, [CallerMemberName] String property = "") + protected void Set(Action setter, [CallerMemberName] String property = "") { - this.DispatcherInvoke(setExpression); + setter?.Invoke(); this.NotifyPropertyChanged(property); } - - protected Task StartTask(Action action) - => Task.Factory.StartNew(action); } } diff --git a/Common/Ui/Common.UI.WPF/ViewModels/VM[T].cs b/Common/Ui/Common.UI.WPF/ViewModels/VM[T].cs index 0d82f3de..75f091f2 100644 --- a/Common/Ui/Common.UI.WPF/ViewModels/VM[T].cs +++ b/Common/Ui/Common.UI.WPF/ViewModels/VM[T].cs @@ -3,7 +3,7 @@ using System; using System.Runtime.CompilerServices; - public abstract class VM : VM where T : VM + public abstract class VM : VM where T : VM { protected VM() : base() { @@ -12,7 +12,7 @@ protected void Set(Action setter, [CallerMemberName] String property = "") { - this.DispatcherInvoke(() => setter?.Invoke(this as T)); + setter?.Invoke(this is T t ? t : default(T)); this.NotifyPropertyChanged(property); } } diff --git a/Common/Ui/Common.UI.WPF/ViewModels/eRegisterPruefungInitialisierungVM.cs b/Common/Ui/Common.UI.WPF/ViewModels/eRegisterPruefungInitialisierungVM.cs index 8df94287..29413ee5 100644 --- a/Common/Ui/Common.UI.WPF/ViewModels/eRegisterPruefungInitialisierungVM.cs +++ b/Common/Ui/Common.UI.WPF/ViewModels/eRegisterPruefungInitialisierungVM.cs @@ -1,7 +1,6 @@ namespace Common.UI.WPF.ViewModels { using Common.UI.WPF.Models; - using Common.UI.WPF.Models.Contracts; using System; using System.Collections.ObjectModel; @@ -13,7 +12,6 @@ const Int32 RowsCount = 15; private readonly TaskVM[,] tasks; - private readonly IMainModel mainModel; private readonly eRegisterPruefungInitialisierungModel model; public eRegisterPruefungInitialisierungVM() @@ -21,17 +19,16 @@ } - public eRegisterPruefungInitialisierungVM(IMainModel mainModel) : base() - { - this.mainModel = mainModel; - this.model = new eRegisterPruefungInitialisierungModel(mainModel); - this.model.OnProgress += this.Model_OnProgress; - this.model.Done += this.Model_Done; - this.Tasks = new ObservableCollection(); - this.tasks = new TaskVM[RowsCount, ColumnsCount]; + //public eRegisterPruefungInitialisierungVM() : base() + //{ + // this.model = new eRegisterPruefungInitialisierungModel(); + // this.model.OnProgress += this.Model_OnProgress; + // this.model.Done += this.Model_Done; + // this.Tasks = new ObservableCollection(); + // this.tasks = new TaskVM[RowsCount, ColumnsCount]; - this.ExecuteAllTasks(); - } + // this.ExecuteAllTasks(); + //} public ObservableCollection Tasks { get; } @@ -80,14 +77,11 @@ private void Model_OnProgress(TaskModel task) { - this.DispatcherInvoke(() => - { - var _task = this.tasks[task.Row, task.Column]; - _task.Row = task.Row; - _task.Column = task.Column; - _task.Label = task.Label; - _task.State = task.State; - }); + var _task = this.tasks[task.Row, task.Column]; + _task.Row = task.Row; + _task.Column = task.Column; + _task.Label = task.Label; + _task.State = task.State; } private void Model_Done() diff --git a/Common/Ui/Common.UI.WPF/ViewModels/eRegister_PruefungInitialisierungVM.cs b/Common/Ui/Common.UI.WPF/ViewModels/eRegister_PruefungInitialisierungVM.cs new file mode 100644 index 00000000..7e396fc3 --- /dev/null +++ b/Common/Ui/Common.UI.WPF/ViewModels/eRegister_PruefungInitialisierungVM.cs @@ -0,0 +1,20 @@ +namespace Common.UI.WPF.ViewModels +{ + using Common.UI.WPF.Models; + + public class eRegister_PruefungInitialisierungVM : VM + { + private readonly eRegister_PruefungInitialisierungM model; + + public eRegister_PruefungInitialisierungVM() + => this.model = new eRegister_PruefungInitialisierungM(); + + protected override void AppHost_Exited() + { + this.model.CancelExecution(); + base.AppHost_Exited(); + } + + internal void Execute() => this.model.Execute(); + } +} diff --git a/Common/Ui/Common.UI.WPF/Views/MainWindowView.xaml b/Common/Ui/Common.UI.WPF/Views/MainWindowView.xaml deleted file mode 100644 index 166b2cd4..00000000 --- a/Common/Ui/Common.UI.WPF/Views/MainWindowView.xaml +++ /dev/null @@ -1,10 +0,0 @@ - - diff --git a/Common/Ui/Common.UI.WPF/Views/MainWindowView.xaml.cs b/Common/Ui/Common.UI.WPF/Views/MainWindowView.xaml.cs deleted file mode 100644 index 02ef5da4..00000000 --- a/Common/Ui/Common.UI.WPF/Views/MainWindowView.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Common.UI.WPF.Views -{ - using System.Windows.Controls; - - public partial class MainWindowView : Grid - { - public MainWindowView() => this.InitializeComponent(); - } -} diff --git a/Common/Ui/Common.UI.WPF/app.config b/Common/Ui/Common.UI.WPF/app.config index 3bcf1bad..634ccf6c 100644 --- a/Common/Ui/Common.UI.WPF/app.config +++ b/Common/Ui/Common.UI.WPF/app.config @@ -3,7 +3,19 @@ - + + + + + + + + + + + + + @@ -13,4 +25,7 @@ - + + + + diff --git a/Common/Ui/Common.UI.WPF/eRegister_PruefungInitialisierung.xaml b/Common/Ui/Common.UI.WPF/eRegister_PruefungInitialisierung.xaml new file mode 100644 index 00000000..dd245239 --- /dev/null +++ b/Common/Ui/Common.UI.WPF/eRegister_PruefungInitialisierung.xaml @@ -0,0 +1,114 @@ + + + + + + + + + + +