Handle
Methods
Types
EnergyReading
EnergyStats and StatSummary
Method Reference
read_energy(duration: f64) -> Result<EnergyReading>
Integrate energy and charge over duration seconds.
read_stats(duration: f64) -> Result<EnergyStats>
Statistics over the window, rather than an integral.
Examples
Budget a duty cycle
Catch a current spike a mean would hide
Supported Hardware
Notes
- The box clamps the window to 0.1-120 seconds. A request outside that range is refused rather than silently adjusted.
- The client widens its HTTP budget to
max(30, duration + 30)seconds. duration_son the reply is the window the instrument actually used, which can differ slightly from what you asked for. Divide by it, not by your request, when converting an integral to an average.- Energy is joules and charge is coulombs. Convert to mWh or mAh in your test if that is the unit your budget is written in.

