Cause:
- Retry preparation called SetChecked(true), introducing synchronous UI access before the next phase attempt.
- This could stall retries and delay operator STOP.
Solution:
1. Fixed retry preparation
- Restore Failed, Ok and IsEnabled directly without updating the checkbox.
- Check cancellation while preparing slots for the next attempt.
- Preserve existing phase execution, parallel processing and streaming port ownership.
2. Increased revision
- Update revision to 3.9.3146.117.
Validation:
- Confirmed working retry behavior on the test bench.
Cause:
- Failed meters were excluded without retrying the current phase.
- The procedure Temperature column was redundant when using T1/T2 sensors.
Solution:
1. Added configurable retries
- Replace the Temperature column with Retries on failure.
- Interpret the value as additional attempts; default to zero.
- Preserve legacy Temperature XML compatibility.
2. Added failed-slot retry execution
- Retry only failed slots, in parallel, within the current phase.
- Preserve successful slots and their captured results.
- Restore the complete GCI batch after each attempt.
- Exclude unsuccessful slots after retries are exhausted.
3. Improved attempt diagnostics
- Log attempt numbers and outcomes to slot windows and files.
- Keep successful slot tabs visible during retries.
4. Preserved execution behavior
- Keep existing measurement algorithms, sensor readings and port handling.
- Process STOP during retries and hold once after all attempts finish.
- Prevent further retries after cancellation or streaming cleanup failure.
5. Increase revision 3.9.3146.112
Cause:
- Preadjustment Completion and TBF Q3 calibration results required configurable database persistence.
- Both write operations required diagnostics and simulation support.
Solution:
1. Added independent database writer configurations
- Added PreadjustmentCompletionWriter and Q3CalibrationWriter to gci_config.
- Support SQL commands, stored procedures and parameter mappings.
- Added SQL table creation and verification scripts.
2. Added Preadjustment Completion storage
- Store PCB ID, meter size, amplitude settings, temperature offsets, zero-flow offsets, timestamp and overall result.
- Use captured Completion readout values.
- Preserve the original HTTP reporting.
- Report SQL connection and write status in the corresponding slot diagnostics.
3. Added Q3 calibration storage
- Forward TBF results through GCI Bridge to the GCI database API.
- Store signed deviations and written calibration factors for all three paths.
- Write to SQL after successful calibration register writes and StoreCalibration.
- Include PCB ID and UTC timestamp.
4. Added simulation support
- Generate sample Completion and Q3 records for simulated slots.
- Perform real SQL writes when the corresponding writer is enabled.
- Log connection progress, write outcomes and generated record IDs.
5. Separated calibration and database outcomes
- Preserve meter operation results when database storage fails.
- Expose database write status independently.
6. Increased revision
- Updated revision from 3.9.3146.108 to 3.9.3146.109.
Validation:
- Confirmed successful SQL storage for simulated Completion.
- Confirmed successful Q3 calibration result storage.
ToDo:
- Use the GCI Q3 storage API as the foundation for future migration of Q3 calibration from the direct TBF communication branch to GCI.
Cause:
- GCI streaming port ownership interfered with regular TBF measurements using direct streaming access.
- Streaming handoff recreated both connections and required unnecessary login attempts between phases.
- Sequential port acquisition delayed execution, while unavailable meters could prevent healthy slots from continuing.
- Repeated initialization retained exclusions from the previous attempt.
Solution:
1. Integrated two communication approaches
- Enable coexistence of the GCI Bridge workflow, which uses request and streaming ports, and the TBF workflow, which accesses the streaming port directly.
- Transfer streaming port ownership explicitly between both workflows.
- Preserve the GCI request connection and authentication during streaming handoff.
2. Updated ExternalProjects - GenesisCore/GenesisMeter
- Added ConnectStreamingPort and DisconnectStreamingPort.
- Separate streaming port lifecycle from request connection lifecycle.
- Allow streaming port ownership to move between both technological branches without reconnecting the request port or repeating login.
- Preserve process configuration and release streaming resources on completion, cancellation or acquisition failure.
3. Updated ExternalProjects - CordonelPreadjustmentUi
- Adapt ZeroFlowGenesisMeter data collection to streaming port handoff.
- Support repeated StartRecordData calls without duplicate subscriptions.
- Prevent duplicate record processing and repeated amplitude scaling.
- Coordinate preadjustment data subscription startup and shutdown with streaming ownership.
4. Restored parallel slot handling
- Acquire, check and release ports concurrently across slots.
- Isolate unavailable or failed meters without excluding healthy slots.
- Drain pending operations before cleanup on STOP.
5. Corrected repeated execution and results
- Reset exclusions and result state on explicit preadjustment initialization.
- Evaluate results separately for each slot.
- Prevent empty phases from being reported as successful measurements.
- Return the streaming port for subsequent non-GCI measurements.
6. Updated revision
- Set revision to 3.9.3146.108.
Related dependency changes:
- This commit requires the corresponding changes in:
- ExternalProjects - GenesisCore/GenesisMeter.
- ExternalProjects - CordonelPreadjustmentUi.
- Build and deploy both updated assemblies together with the matching TBF/GCI changes.
Architecture milestone:
- Established functional integration of two communication architectures: GCI Bridge access to both ports and direct TBF access to the streaming port.
- This version, together with the corresponding ExternalProjects changes, provides the baseline for their future unification.
ToDo:
- Use this baseline to unify request and streaming communication behind the GCI interface.
- Migrate remaining direct streaming access to GCI while preserving parallel slot execution, cancellation and diagnostic logging.
- Centralize ownership and lifecycle management of both ports in GCI.
Cause:
- Temperature calibration results lacked measured meter temperatures and comparison details.
- Diagnostics closed immediately after a phase, preventing inspection of failures.
- Push Temperature remained visible when temperature was supplied directly from T1/T2.
- Automatic phase transitions provided insufficient settling time before temperature calibration, causing temperature checks to fail.
Solution:
1. Added structured temperature calibration results
- Return reference temperature, meter temperature, absolute difference, effective limit and sample count per slot.
- Distinguish temperature check status from overall calibration completion.
- Preserve existing API signatures and add typed result methods.
2. Improved temperature diagnostics
- Log sample count, invalid values, minimum, maximum and mean for each path.
- Add bounded TEMP-RAW capture with raw temperature, scaling factor, decoded temperature, timestamps and frame content.
- Attach diagnostic capture only during the temperature check and detach it afterwards, including on cancellation.
- Preserve the original streaming handler used during Amplitude Test.
- Keep the original comparison algorithm and temperature deviation limit.
- Remove configurable deviation from the GCI Bridge component dialog.
3. Added optional hold after preadjustment
- Add the Hold after preadjustment procedure parameter.
- Keep completed results and diagnostics visible until Continue is pressed.
- Process STOP during hold and exclude hold time from measurement duration.
4. Updated phase display
- Hide Push Temperature in sensor mode unless that action is explicitly running.
- Keep failed slots and their exclusion status visible during hold.
5. Corrected settling time
- Remove initialization overrides that forced OffsetTestSettlingTime to zero.
- Set OffsetTestSettlingTime to 20 seconds.
- Apply settling before temperature calibration and during Offset Test.
- Preserve STOP handling during the wait.
- The existing inclusive countdown produces approximately 21 seconds of waiting.
6. Aligned project versions
- Update TBF revision to 3.9.3146.107.
- The corresponding Laatzen PreadjustmentUI project state matches this TBF revision exactly.
- Build and deploy these matching project versions together.
Validation:
- Compared raw temperature frames from GCI GUI and GenesisCommunication.
- Confirmed that decoded Meter temperatures matched the raw frame values.
- Confirmed that adding a pause after Amplitude Test allowed temperature calibration to pass.
Cause:
- GenesisRegReader configured the GCI streaming port as NA.
- GCI Bridge therefore received no calibration streaming data during the Amplitude Test.
- The request port remained functional, so register writes succeeded while TOF data collection failed.
Solution:
1. Corrected streaming port ownership
- Pass the configured Genesis opto COM port to GCI Bridge as the UART streaming port.
- Stop GenesisRegReader streaming before handing the port over to GCI Bridge.
- Validate request and streaming ports during preadjustment detection.
- Release the GCI connection after preadjustment so the port can be reused by subsequent tests.
2. Increased revision
- Updated revision to 3.9.3146.104.