com.openxc.measurements.FuelLevel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openxc-it Show documentation
Show all versions of openxc-it Show documentation
Instrumentation test suite for OpenXC library
The newest version!
package com.openxc.measurements;
import com.openxc.units.Percentage;
import com.openxc.util.Range;
/**
* The FuelLevel is the current level of fuel in the gas tank.
*/
public class FuelLevel extends BaseMeasurement {
private final static Range RANGE =
new Range(new Percentage(0), new Percentage(100));
public final static String ID = "fuel_level";
public FuelLevel(Number value) {
super(new Percentage(value), RANGE);
}
public FuelLevel(Percentage value) {
super(value, RANGE);
}
@Override
public String getGenericName() {
return ID;
}
}