pamoja-power
Power-aware scheduling for the pamoja device SDK: duty cycling and an energy-aware governor, no_std-friendly.
The same capability in every language
| Language | Package | Reference |
|---|---|---|
| Rust | pamoja-power |
reference, docs.rs, install |
| TypeScript | @pamoja/power |
reference, install |
| Python | pamoja-power |
reference, install |
| C# | Pamoja.Power |
reference, install |
Power-aware scheduling for the pamoja SDK.
A node on a battery or a solar panel lives or dies by how much it sleeps. This crate holds the scheduling math that keeps such a node alive, with no runtime and no hardware assumptions, so the same decisions can be made on a microcontroller and verified on a server:
DutyCycle- trade wakefulness for battery life with a repeating wake/sleep schedule, and read back the duty fraction as a power proxy.PowerPlan- an energy-aware governor that stretches the sampling interval as the battery drains, picking aPowerModefrom the state of charge and easing off when the panel is charging.
The state of charge fed to a PowerPlan is noisy in the field, so smoothing
it first (for example with a Smoother from pamoja-kit) keeps the governor
from flapping between modes at a threshold.
The crate is no_std and allocation-free.
Examples
use Duration;
use ;
let plan = new;
assert_eq!;
assert_eq!;
License
MIT - part of the pamoja workspace: one memory-safe Rust core with bindings for every language.