f4ec6ef945
When SFM_FORWARD_ENABLED=true and SFM_URL is set, every Blastware
event binary in the ACH watch folder is forwarded to an SFM server's
/db/import/blastware_file endpoint as a multipart POST. The paired
<binary>.TXT ASCII report (which Blastware's ACH writes alongside
each event) is shipped in the same request, letting the SFM server
index the full per-channel stats — PPV, ZC Freq, Time of Peak, Peak
Acceleration / Displacement, Peak Vector Sum + time, sensor
self-check Pass/Fail per channel, and monitor-log timestamps —
without depending on the still-undecoded BW waveform body codec.
New module event_forwarder.py:
- is_event_binary() filename matcher (BW's <P><serial3><stem>.<ext>
scheme; rejects .MLG, .TXT, .log, .ini, .h5, etc.)
- ForwardState (.json file keyed by sha256 — idempotent across
restarts and auto-updates)
- find_pending_events() with quiescence + grace-period guards
- Hand-rolled multipart encoder (stdlib-only)
- forward_event_pair() / forward_pending() — POST loop with
structured per-event outcomes
Wired into series3_watcher.run_watcher() on its own cadence
(SFM_FORWARD_INTERVAL_SECONDS, default 60s) so it doesn't slow the
existing 5-min heartbeat scan.
Default-off: existing 1.4.x deployments keep their old behaviour
after auto-updating until an operator sets SFM_URL +
SFM_FORWARD_ENABLED=true and restarts.
17 unit tests in test_event_forwarder.py cover filename matching,
state idempotency, scan logic (quiescence, grace, max age,
already-forwarded, .TXT pairing), multipart byte shape, and an
end-to-end POST against a tiny stdlib http.server fake.
Bumps version 1.4.4 → 1.5.0 (minor — additive feature, no API break).
Requires SFM server v0.16+ for the paired-.TXT import endpoint.
42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
; Inno Setup script for Series 3 Watcher
|
|
; Run through Inno Setup Compiler after building dist\series3-watcher.exe
|
|
|
|
[Setup]
|
|
AppName=Series 3 Watcher
|
|
AppVersion=1.5.0
|
|
AppPublisher=Terra-Mechanics Inc.
|
|
DefaultDirName={pf}\Series3Watcher
|
|
DefaultGroupName=Series 3 Watcher
|
|
OutputBaseFilename=series3-watcher-setup
|
|
Compression=lzma
|
|
SolidCompression=yes
|
|
; Require admin rights so we can write to Program Files
|
|
PrivilegesRequired=admin
|
|
|
|
[Tasks]
|
|
Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; Flags: unchecked
|
|
|
|
[Dirs]
|
|
; Create the agent_logs folder so the watcher can write logs on first run
|
|
Name: "{app}\agent_logs"
|
|
|
|
[Files]
|
|
; Main executable — built by build.bat / PyInstaller
|
|
Source: "dist\series3-watcher.exe"; DestDir: "{app}"; Flags: ignoreversion
|
|
|
|
[Icons]
|
|
; Start Menu shortcut
|
|
Name: "{group}\Series 3 Watcher"; Filename: "{app}\series3-watcher.exe"
|
|
; Start Menu uninstall shortcut
|
|
Name: "{group}\Uninstall Series 3 Watcher"; Filename: "{uninstallexe}"
|
|
; Desktop shortcut (optional — controlled by [Tasks] above)
|
|
Name: "{commondesktop}\Series 3 Watcher"; Filename: "{app}\series3-watcher.exe"; Tasks: desktopicon
|
|
; Startup folder shortcut so the tray app launches on login
|
|
Name: "{userstartup}\Series 3 Watcher"; Filename: "{app}\series3-watcher.exe"
|
|
|
|
[Run]
|
|
; Offer to launch the app after install (unchecked by default)
|
|
Filename: "{app}\series3-watcher.exe"; \
|
|
Description: "Launch Series 3 Watcher"; \
|
|
Flags: nowait postinstall skipifsilent unchecked
|