This interface represents a batteries state of charge, meaning the percentage of charge left before the battery is no longer usable.
The interface could look something like this:
class state_of_charge {
/** Returns a percentage value. Negative values are possible and these
* represent under charge conditions beyond a safe point for a charge
* storing device. Above +1.0 (100%) means over charge above a safe
* point for a charge storing device.
*/
result<float> read() { /* ... */ }
};
This interface represents a batteries state of charge, meaning the percentage of charge left before the battery is no longer usable.
The interface could look something like this: