Skip to main content

Crate governor

Crate governor 

Source
Expand description

Reusable charge governor runtime framework for Fuchsia.

Provides the Governor trait and run_governor, which bridges the battery and charger telemetry served by battery-manager to voted fcharger::ControllerMarker settings.

Structs§

Evaluation
Desired vote and optional periodic sampling, returned by Governor::evaluate.
Telemetry
Combined hardware telemetry snapshot passed to Governor::evaluate.
WatchInterest
Battery and charger fields whose changes trigger an evaluation, and those whose changes also wake the system from suspend to do so. Each is a Status mask: only field presence matters.

Traits§

Governor
Trait implemented by specific charging algorithms (e.g. MSC, thermal, battery defender).

Functions§

clear_vote_fields
Clears the fields selected by mask from vote.
diff_controls
Computes (to_set, to_clear) delta masks between applied and desired.
merge_vote
Copies the Some fields of patch into vote, keeping vote’s other fields.
run_governor
Main execution loop for an autonomous charge governor component. Never returns.