- apply only first and last valid telegram from each configured optical batch
- mark used and ignored telegrams in Poseidon optical CSV diagnostics
- allow optical batch size 1
- retain parse-rejected and duplicate-second diagnostics
- include sanitized meter serial number in Poseidon diagnostic filenames
- create separate diagnostic files when the serial changes within a batch
Cause:
- Merging develop/Local-master into develop/SLM-PT50_genesisDirectDecode_mirror accepted the source application version 3.9.3147.138.
- The server branch uses application version 3.9.3152.0 and needs a separate revision for the merged program.
Solution:
1. Align the application version
- Restore the server version base 3.9.3152 and set revision to 100.
- Update AssemblyVersion and AssemblyFileVersion from 3.9.3147.138 to 3.9.3152.100.
- Preserve the code integrated by the preceding merge commit.
Cause:
- Duplicate original output path names caused an unhandled dictionary exception when preparing rename or removal warnings.
- Output path name editing allowed duplicate names.
- Saving failures could close the Paths dialog despite unsaved changes.
Solution:
1. Validate output path names
- Reject empty and duplicate names when confirming edits and before saving.
- Compare names ignoring case and surrounding whitespace.
- Show a warning and preserve the previous name when an edit is rejected.
2. Handle existing duplicate names
- Consolidate removals and resolve renames without duplicate dictionary entries.
- Preserve test references when the original name still exists.
- Warn about ambiguous renames and leave affected references unchanged for manual correction.
- Apply test reference updates from a snapshot to prevent chained renames.
3. Preserve the editing session
- Keep the Paths dialog open after validation or database save failures.
- Keep the dialog open when cancelling the save confirmation.
4. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.131 to 3.9.3147.138.
- Accept observed 0x03 nine-field telegrams with 0hX trailers.
- Add optical packet rejection diagnostics and Poseidon debug logging.
- Cap standing snapshot waits and fail when optical loop cannot start.
- Select Poseidon corrections once per reader family.
- Bump version to 3.9.3183.0.
- Filter preview updates to selected cameras and clear disabled streams.
- Skip start/end image grabs for disabled water meters.
- Retry incomplete JMS send acquisitions and extend first-packet timeout handling.
- Show selected camera in image overlay text.
- Introduced `CameraCaptureSelection` for configurable camera capture aligned with water meter selection from Data Entry.
- Added `ApplyLiveStreamSelection` to dynamically update live streams and operator preview based on camera selection.
- Implemented retry logic for JMS image acquisition (`GrabImagesOp`) with up to 3 attempts for robust handling of partial or failed send operations.
- Enhanced preview handling in `PicturesTabPageCtrl` to prevent unselected cameras from overwriting the preview during tests.
- Added `IWaterMeterSelection` interface and integrated it into `EntryForm` to streamline water meter-related decisions.
- Improved logging with detailed information for capture routing and selection logic.
- Added unit tests for `CameraCaptureSelection` to validate behavior in various selection scenarios.
Cause:
- Closing TBF did not release meter sessions created through the GCI GUI.
- Laatzen keep-session threads could keep the process alive after the main window closed, preventing TBF from starting again.
- A meter disposal failure could interrupt cleanup of the remaining slots and workers.
Solution:
1. Release GCI resources on application exit
- Dispose GCI diagnostic windows and cancel preadjustment.
- Clean meter sessions and slot workers even when the bench was never started.
- Log cleanup failures without skipping other bridge components.
2. Improve cleanup resilience
- Continue disposing remaining meters if one fails.
- Release workers and clear slot references even when meter disposal reports an error.
- Dispose meters outside the batch lock to allow status callbacks during cleanup.
3. Clean resources owned by the standalone GCI view
- Release its API meter sessions when the view is disposed.
4. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.136 to 3.9.3147.137.
Cause:
- GCI tools mixed slot setup, meter actions and diagnostics in a single workspace.
- Operators needed reusable scenarios, explicit port configuration and readable per-meter results.
- Register selectors were not refreshed after initialization, and read values were limited to byte representations.
Solution:
1. Organize the manager workspace
- Add Slots list setup, Slots manager, WM (Cordonel) manager and Databases manager navigation while retaining the Laatzen API tab.
- Group related actions, compact and align controls, and provide resizable component pages and per-tab log buffers.
- Add collapsible Global log, Slots list and Slots threads tools, with log headings and clear buttons.
- Place a compact Cancel task button in the component header and highlight active cancellation controls in red.
- Prevent conflicting operations and closing the window while a task is running.
2. Separate slot rows from port configuration
- Add manual row creation, automatic configured-slot creation and explicit automatic port assignment.
- Select newly created slot rows and keep their ports empty until configured.
- Remove automatic port assignment during initialization and obsolete detection columns.
3. Add reusable parallel scenarios
- Store named scenarios in the local user profile with atomic saving and protection for invalid libraries.
- Provide a connect-and-login example composed of the original individual bridge operations.
- Execute steps sequentially within each meter and concurrently across selected meters, preserving failure cleanup and cancellation.
- Display one complete result block per finished meter, with method details on single lines and masked passwords.
- Keep live progress in the compact action table with full-text tooltips.
4. Improve register access and value conversion
- Refresh register lists when opening Registers or expanding a selector while preserving valid selections.
- Separate read and write controls and debounce live input validation.
- Add automatic or explicit scalar, text and byte interpretations, Decimal/Hex/Binary display and selectable byte order.
- Reinterpret the last read value without repeating meter communication.
- Convert write input to the register type with a visible preview, range validation and exact-width checks for hexadecimal bytes.
5. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.135 to 3.9.3147.136.
- Simplified display text formatting in `TestStartEndForm` by removing unnecessary date and time information.
- Added an alias for `CalibrationTemperatureInput` in `GciBridge` for improved code clarity.
- Introduced `LiveStreamSupervisorAsync` to enable automatic recovery of camera live streams after disconnections or failures.
- Added timeout handling improvements to `CameraLineReader` to prevent indefinite blocking during TCP half-open states.
- Enhanced live stream cleanup logic with graceful shutdown and transport fault recovery.
- Introduced new integration tests for live stream recovery covering manual power cycles, transport failures, and communication resilience.
- Improved logging with additional diagnostic information to monitor recovery and live stream status.
- Updated data entry logic to keep selections auditable with detailed logging.
- Added support for simulating transport failures in hardware tests to verify recovery behavior.
- Added `AppDiagnostic` project reference with `ReferenceOutputAssembly` set to false in `TBF.csproj`.
- Updated `PostBuildEvent` to use the relative AppDiagnostic path for improved flexibility.
Cause:
- Newer source configuration and runtime package copy steps could overwrite operator settings in Config/gci_config.json.
- Legacy build file lists could remove the configuration during Clean or Rebuild.
Solution:
1. Preserve destination configuration
- Initialize gci_config.json from source defaults only when the destination file is missing.
- Publish new defaults atomically without replacing a concurrently created file.
- Exclude operator configuration from ordinary GCI, TBF and runtime package copying and ownership cleanup.
- Resolve script and default configuration paths inside each executing target for reliable Visual Studio builds, with guards for missing scripts and empty destinations.
2. Protect Clean and Rebuild
- Preserve and restore configuration around CoreClean.
- Exclude legacy configuration ownership from incremental cleanup.
3. Validation
- Configuration preservation tests passed for first initialization, newer source defaults, exact bytes and encoding, Clean, Rebuild and incremental cleanup.
- EnsureGciConfiguration passed for both real project imports with isolated Release destinations and with evaluation-time paths cleared before execution.
- Runtime synchronization regression tests passed, including preserving customized configuration formerly owned by the runtime manifest.
- Full application compilation was not rerun for this build-script change.
4. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.132 to 3.9.3147.133.
Cause:
- New UniDataStorageReader and UniDataStorageWriter components required manual entry of connection strings and query templates without an initial format example.
Solution:
1. Initialize new component configurations
- Prefill database storage type and a generic Microsoft SQL connection string with Windows authentication, encryption, certificate validation and a connection timeout.
- Provide a reader SELECT template with QUERYPARAM and explicit placeholder names.
- Provide writer INSERT, UPDATE and stored procedure templates, selecting Microsoft SQL for new writers.
- Apply defaults through factory DefaultConfig so persisted component configurations retain their existing values.
2. Validation
- Standalone compilation of both changed factories passed against existing application dependencies.
- Reviewed writer template placeholders against the database writer implementation; git diff --check passed.
- Full application build and interactive UI validation were not performed for this commit. The earlier full build was blocked by missing iPerl/NFC project dependencies.
3. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.131 to 3.9.3147.132.
- Introduced `SendImagesParameters` class to encapsulate image count and delay logic for JMS `send` operations with validation.
- Updated `GrabImagesOp` to utilize `SendImagesParameters` for improved parameter consistency and readability.
- Added unit tests for `SendImagesParameters` to validate runtime values and ensure normalized behavior.
- Implemented `ReloadCamRoiForCurrentProcedure` in `Camera` to refresh ROI parameters dynamically between image operations, addressing outdated snapshot issues.
- Added debug logging for DataEntry sensor selection, auto-read configuration, and timeout handling.
- Refactored reader resolution logic to prevent stale paths and rebuild sparse slot mappings.
- Improved handling of Poseidon family readers with explicit opt-out and legacy position mask support.
- Updated tests to validate Poseidon reader selection, settings preservation, and multi-cycle behavior.
- Revised SmartCommunicationForm to dynamically rebuild layouts when switching reader families.
- Incremented assembly version to `3.9.3182.0`.
- Decode legacy 0x03/0x83 optical frames with a 24-bit accumulator
and 8192 Hz ASIC timestamp
- Buffer fragmented frames and support 7/8-field firmware variants
- Route OriginalIperlCommunication through SmartCommunicationForm
- Add opt-in USB head connectivity and read-only factory ID tests
- Document Poseidon configuration, optical capture and diagnostics
- Remove generated XML documentation from bin/Debug
Cause:
- Switching off a pump symbol changed the control-board output without sending an explicit stop command to its frequency inverter.
- The serial Danfoss driver could discard STOP while another command was pending.
- Mixed relay/inverter tandems did not stop their available inverter.
Solution:
1. Dispatch schematic pump stops on the device thread
- Send explicit stop commands to inverter pumps addressed by accepted manual route changes, preserving board output control for relay pumps.
- Handle UniCB and Papouch control boards and attempt all addressed inverter stops before reporting failures.
- Preserve accepted UniCB manual stops until output transmission so operations in the same tick cannot undo them.
2. Protect stop delivery
- Allow Danfoss STOP to replace a pending start or setpoint command.
- Stop each available tandem inverter independently, including mixed tandems and failure of the other inverter.
3. Validation
- Standalone regression checks passed for stop dispatch, route limits, error isolation, serial STOP priority and mixed tandems.
- TBF Debug build passed. Physical pump operation has not been verified on the station.
4. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.130 to 3.9.3147.131.
Cause:
- Release builds enabled HEAT_METERS and requested heat meter fields from water meter configuration databases.
- Selecting a procedure failed when the Test table did not contain the HeatMetersPath column.
Solution:
1. Align Release configurations for water meters
- Remove HEAT_METERS from the Release constants in TBF, Config and Results.
- Exclude heat meter functionality and its conditional database mappings without modifying the database.
2. Validation
- Config and Results Release builds passed.
- Full TBF Release build remains blocked by external RFID/NFC dependency and GCI runtime-copy errors.
3. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.129 to 3.9.3147.130.
Cause:
- Changing the results layout required numeric input.
- Mouse wheel adjustments could change values by multiple units.
- Rounded card borders were uneven and overlapped by their contents.
Solution:
1. Add layout sliders
- Add sliders synchronized with the numeric layout controls.
- Limit meters per row to 6, keeping 0 for automatic layout.
- Adjust sliders and numeric controls by one unit per mouse wheel notch.
- Preserve synchronization when loading saved views or opening child windows.
2. Refine result cards
- Add smooth rounded corners and a thinner border.
- Add inner spacing to prevent content from overlapping the frame.
- Adapt corner geometry and spacing to display scaling.
3. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.128 to 3.9.3147.129.
Cause:
- Previous Results displayed procedure names without their list numbers.
- The Purchase order column occupied unnecessary horizontal space.
Solution:
1. Display procedure numbers
- Prefix procedure names with the list number in parentheses, followed by a space.
- Resolve numbers using the procedure name and revision recorded with the batch.
- Display a dash when the procedure cannot be uniquely identified.
- Render the number and parentheses in regular black text while keeping the procedure name as a blue link.
2. Optimize column layout
- Size the Purchase order column to its header and center its contents.
- Allocate the remaining space to the procedure name.
3. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.127 to 3.9.3147.128.
Cause:
- Start and stop telegrams allocated 17 bytes without reserving two additional bytes for the CRC.
- CRC calculation overwrote the final register, producing incomplete Modbus frames that could prevent the pump from stopping.
Solution:
1. Correct telegram lengths
- Increase start and stop telegram buffers from 17 to 19 bytes.
- Preserve all five registers and reserve separate bytes for the CRC.
2. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.126 to 3.9.3147.127.
Cause:
- TBF was upgraded from .NET Framework 4.7.2 to 4.8 for Laatzen and GCI compatibility in commit 6199bd48c, while ResultsBrowser remained on 4.7.2 despite referencing TBF.
- Introducing PackageReference for MySql.Data exposed this existing framework mismatch during package restore, producing NU1201 errors.
- Other Framework projects, application startup configurations and the Workplace installation prerequisite still targeted or declared older Framework versions.
Solution:
1. Align project target frameworks
- Upgrade ResultsBrowser and 36 remaining projects from .NET Framework 4.7.2 to 4.8.
- Update SDK-style projects from net472 to net48.
2. Align runtime and installation requirements
- Update 20 application startup configurations to require .NET Framework 4.8.
- Update the Workplace bootstrapper prerequisite to .NET Framework 4.8.
3. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.125 to 3.9.3147.126.
Cause:
- A security vulnerability in the older PHP version required a PHP update. Although updating PHP separately in the existing XAMPP installation was possible, it was complex, so a complete XAMPP update was chosen for simplicity.
- Updating the complete XAMPP distribution also upgraded MariaDB to 10.11, making the database server update a secondary consequence of the PHP security update.
- MySql.Data 6.6.5 failed while loading character sets from MariaDB 10.11, throwing an InvalidCastException when converting DBNull to an integer.
- SessionFactory creation displayed only the outer exception message, hiding the actual connection failure.
- After SessionFactory creation failed, TBF called OpenSession() on a null reference, causing a secondary NullReferenceException.
Solution:
1. Update the MySQL database driver
- Replace MySql.Data 6.6.5 references with MySql.Data 9.3.0 PackageReference entries across all 15 referencing projects.
- Enable automatic binding redirects to resolve dependency version differences.
- Remove the obsolete MySql.Data entry from TBF/packages.config.
2. Preserve database connection errors
- Include the underlying exception message when reporting SessionFactory creation failures.
- Propagate startup connection failures to the existing TBF error handler instead of returning a null SessionFactory.
- Preserve the original exception chain for diagnostics.
3. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.121 to 3.9.3147.125.
Cause:
- Startup and shutdown draining continued until timeout when scale readings did not decrease.
- Stalled draining required unnecessary operator confirmation.
Solution:
1. Detect stalled draining
- Monitor fresh, valid readings above each scale's Empty threshold.
- Detect stagnation after 5 seconds of settling and 5 seconds without sufficient mass decrease.
- Reset monitoring for invalid, stale or missing samples and new draining phases.
2. Automatically finish draining
- Skip remaining draining without a confirmation dialog and close all drain valves.
- Skip the remaining startup draining phase and continue initialization.
- Continue shutdown after automatically cancelling the remaining draining time.
- Require fresh scale readings when confirming empty tanks during shutdown.
3. Log automatic skipping
- Write a warning to the main application log with startup/shutdown context.
- Include the reason, scale weights, empty thresholds and minimum mass decrease.
4. Increased revision
- Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.123 to 3.9.3147.124.
Cause:
- Startup draining continued for the full configured duration even when all connected scale tanks were already empty.
- The startup sequence did not use the configured empty-weight thresholds to finish draining early.
Solution:
1. Confirm empty tanks during startup draining
- Require five consecutive checks with fresh, valid mass readings at or below each tank's Empty threshold.
- Reset the confirmation count when any tank is loaded, a reading is invalid or outdated, or valves are still moving.
- Use the draining threshold in both phases, including when only the secondary drain valve is open.
2. Finish the entire draining sequence early
- Close all drain valves after empty tanks are confirmed.
- Skip the second draining phase when confirmation completes in the first phase.
- Retain the configured maximum draining time and timed fallback for unsupported tank types.
3. Increased revision
- Updated TBF AssemblyVersion and AssemblyFileVersion from 3.9.3147.121 to 3.9.3147.123.
- Introduced `NativeTouchRead` command access mode in `PoseidonCommandAccessMode`, tailored for new HAT devices.
- Implemented `PoseidonNativeTouchReadCommandAccess` for native parameter reading and TouchRead transmissions.
- Added new methods for probing native HAT head identity and factory ID requests for diagnostics.
- Enhanced `PoseidonNa2wSerialTransport` with execution and raw capture of native commands.
- Updated tests to validate `NativeTouchRead` behavior, including transport-level and payload-specific scenarios.
- Revised configuration defaults to accommodate native baud rates and added safeguards for legacy mode mismatch.
- Introduced `RefEnergy` column in `TestRslt` table for both MySQL and SQLite databases to ensure compatibility with NHibernate result persistence.
- Updated migration helpers to include `EnsureTestResultHeatColumnsMySql` and `EnsureTestResultHeatColumnsSQLite` methods.
- Added unit test validation to verify the default value of `RefEnergy` in `GenesisRecoveryTests`.
- Incremented assembly version to `3.9.3180.1`.