heartbeat-watchdog

Crates.ioheartbeat-watchdog
lib.rsheartbeat-watchdog
version0.2.0
created_at2025-03-22 23:03:19.360883+00
updated_at2025-03-24 03:20:46.890352+00
descriptionA versatile heartbeat watchdog
homepage
repositoryhttps://github.com/roboplc/heartbeat-watchdog
max_upload_size
id1602193
size55,214
Sergiy S. (divi255)

documentation

README

Heartbeat watchdog crates.io page docs.rs page

A versatile watchdog and heartbeat traits for various monitoring purposes in mission-critical systems (processes, single threads etc).

The crate is a part of the RoboPLC project and works on Linux only. No other platforms support is planned, except bare-metal.

Communication

The crate provides out-of-the-box:

  • UDP socket heartbeat/watchdog

  • GPIO heartbeat/watchdog (requires gpio feature)

More communication methods can be added by implementing io::WatchdogIo and Heart traits.

For high-level communication (e.g. TCP/IP) the edges are encoded as "+" for rising and "." for falling to simplify sniffing/debugging purposes.

Bare-metal

The crate has got integration with embassy for no_std targets. Requires disabling defaults and enabling embassy feature.

Error detection

The following heartbeat errors are detected:

  • Timeout - no heartbeat edge change has been detected within the specified time

  • Window - heartbeat edge change has been detected out of the time window

  • OutOfOrder - heartbeat edge change has been detected out of order (e.g. for TCP/IP communication)

Commit count: 21

cargo fmt