Skip to main content

Module tune

Module tune 

Source
Expand description

CLI adapter for the shared tune runtime.

Enums§

PidWriteOutcome
The result of write_pid_values – deliberately simpler than WriteBackOutcome below, which layers CLI-only concerns (a Skipped variant covering unconfigured tags, no recorded results, or an interactive skip) on top of this. write_pid_values only ever runs once a specific, available target has already been chosen, so there is nothing left to “skip” by the time it’s called. Named distinctly from bhtune_driver::WriteOutcome (that one describes a single raw tag write’s own outcome; this one describes the full pre-read/write/verify/rollback/audit sequence across all three PID constants).
TuneOutcome

Functions§

write_pid_values
Pre-reads the existing Proportional/Integral/Derivative values, writes and verifies target (Proportional then Integral then Derivative, stopping at the first failure), rolls back to the pre-read values on partial failure (only for kind = WriteKind::Write -- [WriteKind::Revert] never does, so a revert can't chase its own failure with a nested rollback; see [WriteKind]'s own doc comment), and records exactly one [TuneWriteRow`] audit row for the attempt, success or not.