|
HAICU Interlock Watchdog frontend
Frontend to communicate with the Arduino-based HAICU interlock watchdog
|
This is the MIDAS/TMFE frontend equipment for an Arduino-based watchdog over TCP.
The frontend manages ODB settings for arming/disarming the watchdog and configuring a 64-bit channel mask. It periodically polls the device for triggered channels and publishes readback + per-channel variables to ODB.
Full documentation here.
Confirmed to run on standard Linux DAQ systems (Ubuntu 22.04 and similar).
Requires cmake >= 3.10.
Requires a working MIDAS installation (TMFE framework) and the MIDASSYS environment variable to be set.
No external communication libraries are required.
TCP communication is implemented directly in this repository (SimpleTcpClient).
If MIDASSYS is configured correctly, a full build should work via
The frontend executable is fearduino_wd.
It registers the equipment as ARDUINO_WD and polls the watchdog at a fixed period. Connection and control are performed via ODB settings under /Equipment/ARDUINO_WD/Settings.
This frontend uses TCP only (host/port are configured in ODB).
Device-side protocol notes:
END line.Commands used by the frontend:
ARM / DISARM : Arm/Disarm specific pinsMASK 0x%08X%08X (MaskHi then MaskLo) : Mask the unmonitored pinsCLEAR : Clear all triggered pinsTRIGGERED : Find the triggered pinsODB layout (relative to /Equipment/ARDUINO_WD/):
Settings/Host (string) - hostname or IP of the watchdog (default: watchdog01)Settings/Port (string) - TCP port (default: 5000)Settings/Armed (int 0/1) - arm/disarm requestSettings/MaskLo (DWORD) - channel mask bits 0..31Settings/MaskHi (DWORD) - channel mask bits 32..63Settings/Clear (int 0/1) - write 1 to request CLEAR (frontend resets to 0 after successful clear)Readback/Status (string) - connection/state summary (Connected, ARMED, DISARMED, error text, etc.)Readback/TriggeredPins (string) - human-readable summary, e.g. CH3 PIN12; CH9 PIN7All arrays are length 64 (channels 0..63):
Variables/Triggered (int[64]) - 1 if channel currently triggered else 0Variables/TriggeredPin (int[64]) - pin number for the channel or -1 if not triggeredVariables/FirstMS (DWORD[64]) - first trigger time (ms) reported by deviceVariables/LastMS (DWORD[64]) - last trigger time (ms) reported by deviceSettings/Host or Settings/Port changes, or when the TCP connection drops.