WATCHDOG(9)

πŸ“¦
version 2.9.4 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– WATCHDOG(9) πŸ’–

okay bestie, this is a HAL Component manual page and it's lowkey one of the most important ones, so lock in 🫢


✨ NAME ✨

watchdog β€” monitor multiple inputs for a "heartbeat"

it's giving "are you still alive??" energy, but for your machine πŸ’…


🌸 SYNOPSIS 🌸

loadrt watchdog num_inputs=N

you must specify the number of inputs, and it's gotta be from 1 to 32. no more, no less. each input gets its own separate timeout value, so they're all living their own independent lives fr fr 🌈


πŸŽ€ FUNCTIONS πŸŽ€

  • process β€” checks all the input pins for transitions, and clears ok-out if any input has had no transition within its timeout period. this one does not use floating point, so you should add it to a fast thread. speedy queen behavior πŸ”₯
  • set-timeouts β€” checks for timeout changes, and converts the float timeout inputs into int values that process can actually use. this function also monitors enable-in for false to true transitions, and re-enables monitoring when it catches one of those transitions. heads up: this one does use floating point, so it's appropriate to add it to the servo thread ⭐

πŸ¦‹ PINS πŸ¦‹

  • watchdog.input-n bit in β€” input number n. the inputs are numbered from 0 to num_inputs-1. yes bestie, zero-indexed, it's iconic like that πŸ’œ
  • watchdog.enable-in bit in (default: FALSE) β€” if TRUE, forces out-ok to be false. also, if a timeout occurs on any input, this pin must be set FALSE and then TRUE again to re-start the monitoring of input pins. so like, you have to actually toggle it, no cap 😭
  • watchdog.ok-out bit out (default: FALSE) β€” the OK output. this pin is true only if enable-in is TRUE and no timeout has been detected. you can connect this output to the enable input of a charge_pump or stepgen (in v mode), to provide a heartbeat signal to external monitoring hardware 🫢 main character output fr

πŸ’… PARAMETERS πŸ’…

  • watchdog.timeout-n float in β€” timeout value for input number n. the inputs are numbered from 0 to num_inputs-1. the timeout is in seconds, and it may not be below zero.
⚠️ note that a timeout of 0.0 will likely prevent ok-out from ever becoming true. also note that excessively long timeouts are relatively useless for monitoring purposes. like, why even have a watchdog at that point bestie πŸ’€

πŸ‘‘ LICENSE πŸ‘‘

GPL


and that's the whole vibe πŸ’– this page is from the LinuxCNC Documentation, dated 2010-06-22, and the manual is WATCHDOG(9) β€” a certified classic, no notes, obsessed πŸŽ€βœ¨