Expand description
Brinkhaus Tools — reusable infrastructure components for Brinkhaus industrial applications.
This crate provides the core building blocks: shutdown handling, JSON settings, self-diagnosis, status collection, heartbeat monitoring, logging, and version information.
Enable the fleet feature for the FleetMonitorClient and StatusMonitor (adds reqwest + tokio),
and the licence feature for offline-verifiable, hardware-bound licences (adds ring).
Modules§
- Offline-verifiable, hardware-bound licences (feature
licence).
Structs§
- Central wiring object connecting all infrastructure components.
- Builder for constructing an
Appinstance. - A command the FleetManager can invoke on this software (mirrors the Python
CommandSpec). The catalog of registered commands rides along with every status snapshot undercommands. - Device identity sent with every heartbeat. All fields are optional and sent only when set. serial/display_name/inventory_no/stream and the password scheme are machine-wide (fleet config file); branding is software-specific. The server only accepts a serial that is registered or assigned.
- A diagnostic message with a numeric code and optional auto-timeout.
- Configuration for the FleetMonitorClient.
- HTTPS client for the BrinkhausFleetManager ingest API.
- Watchdog engine for detecting hung tasks.
- Configuration for the LoggingHelper.
- Centralized logging with rotating file handler and in-memory ring buffer.
- One translatable piece of a diagnosis message: a text key and the values for its placeholders. The UI looks the key up in its own catalog and fills in the parameters; the plain
messagestays the fallback. - Thread-safe ring buffer that keeps the last N log lines.
- Engine for tracking diagnostic messages with numeric codes, severity, and auto-timeout.
- Thread-safe JSON settings with hierarchical key access and atomic persistence.
- Coordinates graceful shutdown with signal handling and interruptible sleep.
- Cheaply cloneable handle to a ShutdownHandler.
- Periodic status collection from pluggable sources.
- High-level bridge between SelfDiagnosisEngine and the FleetManager backend.
- A self-describing status leaf (Grand Unified Log Strategy).
- Loads version metadata from a JSON file.
Enums§
- When a command is acknowledged.
- Where the channel returned by
FleetMonitorClient::channelcomes from. - A value filled into a placeholder of a
MessagePart. - Errors returned by brinkhaustools components.
- Where
reloadsourced its data from. - Severity level for a diagnosis message.
Traits§
- Trait for pluggable status sources.
Functions§
- Spawn the fleet heartbeat + controller loops on a dedicated thread that owns a current-thread tokio runtime. Mirrors
status::run_status_loop. - Like
run_fleet_loops, but reports to aHeartbeatEngine— for consumers that supervise every long-running thread with a watchdog.
Type Aliases§
- Result of a fleet command:
(result, message), result one of"success","failure","rejected"(same contract as the PythonCommandResult). - Convenience alias for
std::result::Result<T, Error>.