A – Registration and execution - Register GenesisCommunication Factory in the component list. - Separate the Genesis form and sequence from iPerl communication. B – Communication activities - Restore initialization, connection, PCB reading, password and login. - Include grouped login, mode switching and disconnection. - Support processing up to 10 slots. C1 – Input calibration factors - Read three factors from Water meters / Text1–Text3. - Validate integer values in the range 1–65535. - Preserve the default of 15625 when all three fields are empty. D – Q3 calibration - Connect the Prepare Q3 → measurement → Write Q3 workflow. - Add channel processing to FlyingStart and FlyingStartMassCollection. - Reset previous measurement data and validate calculated factors. - Mark factors as stored only after StoreCalibration succeeds. E – Results and database - Store calibration factors separately for each meter and channel. - Add result entities, mappings and Q3 data. - Extend DB.cs / EnsureSchema to create and update the schema. - Preserve compatibility with the existing binary format. Validation: - Debug build and 18 tests passed. - Simulated communication runs follow the same activity sequence. - The complete Q3 workflow has not yet been verified on hardware. Known limitation: - An inherited mismatch in simulated responses and error propagation can produce an incorrect OK result; this change does not fix it.
66 lines
1.5 KiB
C#
66 lines
1.5 KiB
C#
///
|
|
/// Copyright (c) 2015-2023 Sensus Slovensko a.s.
|
|
///
|
|
using FluentNHibernate.Mapping;
|
|
using Results.Entities;
|
|
|
|
namespace Results.Mappings
|
|
{
|
|
class WaterMeterDataMap : ClassMap<WaterMeterData>
|
|
{
|
|
public WaterMeterDataMap()
|
|
{
|
|
Id(x => x.Id);
|
|
Map(x => x.ProductName);
|
|
Map(x => x.Producer);
|
|
|
|
Map(x => x.DN);
|
|
Map(x => x.L);
|
|
Map(x => x.Mounting);
|
|
|
|
Map(x => x.Qnames);
|
|
Map(x => x.Q4_Qmax);
|
|
Map(x => x.Q3_Qn);
|
|
Map(x => x.Q2_Qt);
|
|
Map(x => x.Q1_Qmin);
|
|
Map(x => x.ErrLimHiQ);
|
|
Map(x => x.ErrLimLoQ);
|
|
|
|
Map(x => x.MetrologicalClass);
|
|
Map(x => x.TemperatureClass);
|
|
Map(x => x.PressureLossClass);
|
|
Map(x => x.MaxAdmissiblePressure);
|
|
Map(x => x.FlowProfileSensitivityClass);
|
|
|
|
Map(x => x.ApprovalInfo);
|
|
Map(x => x.Certificate);
|
|
|
|
Map(x => x.PulsesPerLtr);
|
|
|
|
Map(x => x.ProducerAux);
|
|
Map(x => x.Q3_Qn_Aux);
|
|
Map(x => x.MetrologicalClassAux);
|
|
Map(x => x.ApprovalInfoAux);
|
|
Map(x => x.PulsesPerLtrAux);
|
|
|
|
Map(x => x.Medium);
|
|
|
|
Map(x => x.Text1);
|
|
Map(x => x.Text2);
|
|
Map(x => x.Text3);
|
|
Map(x => x.Text4);
|
|
Map(x => x.Text5);
|
|
|
|
Map(x => x.Compound);
|
|
#if HEAT_METER_SUPPORT
|
|
Map(x => x.HeatMeter);
|
|
#endif
|
|
#if ORACLE_DB
|
|
Map(x => x.WMTypeId);
|
|
#endif
|
|
Map(x => x.Q3Channel);
|
|
|
|
}
|
|
}
|
|
}
|