DESIGNER NMEA2000 INTEGRATION - 2026-11-06

This update restores the NMEA2000 settings, receive decoder and outbound
datascherm commands for Actisense NGT-1-USB and NGX-1-USB gateways.

INSTALL INTO AN EXISTING DESIGNER INSTALLATION

1. Close Designer. Keep a copy of your existing yc_designer.jar for rollback.
2. Extract this ZIP. Copy yc_designer.jar and the complete nmea2000 directory
   into the Designer installation directory, next to its existing jre and jars
   directories. Keep the supplied user_profile fallback files in that directory
   too. Do not replace your personal settings/profile with a clean profile.
3. Start Designer using its normal launcher and Java 25 runtime.
4. Open File > Settings > NMEA2000 (or choose the NMEA2000 tab in Settings).
5. Select the adapter's COM port, then Connect. The application queries both
   115200 and 230400 baud as necessary. The gateway is identified from its reply,
   not its Windows friendly name.
6. Confirm Transfer Receive All, increasing PGN count and a populated device
   list. Choose the appropriate device/instance in datascherm properties.
7. Optional: enable automatic connection at Designer startup in the NMEA2000 tab.
   This remembers the selected port. A missing or changed port is reported;
   Designer never silently chooses a different adapter.

CONNECTION BEHAVIOR

- The native x64 DLL owns the COM port exclusively while connected.
  NMEA Reader, Toolkit and other programs must close that port first. A busy
  port produces an error; Designer cannot evict the other program.
- On recognized gateways, mode 1 (Transfer Normal) or 4 (Convert) is switched
  to mode 2 (Transfer Receive All), with an acknowledgement required before
  Designer reports Connected.
- The original mode is restored on normal disconnect or exit (and child-stdin
  EOF when using the optional helper fallback).
  Restoration failures are shown in the settings status. After a forced kill or
  USB fault, check the gateway mode if required before using another application.
- Mode persistence on NGX firmware varies; mode is checked on each connection.
- Startup stays light: the connection is opened only on Connect or configured
  autoconnect. The settings panel is created when first opened.
- Designer loads native nmea2000/yc_n2k.dll through JNI. No old Actisense DLL,
  JNA, .NET runtime or helper process is used on the default native path.
- Windows x64 and the adapter's USB driver are required. The retained helper
  fallback additionally requires .NET Framework 4.8. See NATIVE-DLL.txt for
  backend selection, deployment details and DLL-specific hardware tests.

TRANSMISSION

Device discovery sends ISO requests for address claim/product/configuration
information. Existing datascherm controls route to the gateway through BST94.
Transmit PGNs are enabled individually when needed, with acknowledgements.
No explicit EEPROM/flash commit is sent. Whether individual settings are saved
immediately depends on gateway firmware. "SENT" means accepted by the serial
driver, not confirmation that a remote instrument acted on the command.
Outgoing fast-packet payloads are limited to 223 bytes. Larger transport payloads
are rejected visibly rather than silently truncated. Incoming payloads up to
1785 bytes are accepted in the supported formats.

TEST ON YOUR TEST NETWORK

1. Start from a power-cycled NGX in Convert mode. Connect directly in Designer
   without first using NMEA Reader. Confirm mode 4 -> 2 and live data.
2. Repeat with NGT. Confirm heading/depth/engine values on dataschermen against
   your existing instrument/Navigatie reference, including device/instance choice.
3. While connected, try opening that COM port in NMEA Reader. It should report
   busy. Disconnect Designer; NMEA Reader should then be able to open it.
4. Disconnect/reconnect three times. Confirm original mode restoration each time.
5. Unplug/replug USB during reception. Confirm connection loss is shown (or the
   no-recent-traffic indicator if the USB driver remains silent), and reconnect
   manually after refreshing the port list.
6. On your test network, verify a harmless device-info request and any desired
   datascherm control against actual instrument behavior. Local mock tests do
   not establish physical transmission or control compatibility.
7. Run for 15-30 minutes. Monitor PGN count, queue drops/errors and Java memory.
   Confirm the status says native x64 DLL and no helper process is running.
8. Enable autoconnect, restart Designer and verify reconnection to the saved port.

WHAT WAS VERIFIED LOCALLY

Full Java 25 source compilation, native DLL and helper protocol/mode/cleanup
tests, Java-to-native and Java-to-helper integration using mock NGT/NGX adapters,
real encrypted-definition PGN decoding
into the heading data model, outbound request routing, payload resize validation,
and the restored settings UI in English/Dutch/German/French.
See native-tests.txt, integration-tests.txt, helper-integration-tests.txt and
ui-tests.txt. Physical adapters were unavailable
on the development machine. Obfuscated packaging was not tested; Ant keep rules
have been added for reflection and serialized NMEA2000 settings.

SOURCE / REBUILD

From the Designer workspace:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tools/nmea2000-bridge/build-designer.ps1

The script builds/tests into artifacts and writes a shareable update ZIP there.
It does not modify the external ant_algemeen.properties or another installation.
Ant designer_jar/deploy targets also build and include the helper runtime.
