com.openxc.measurements.TransmissionGearPosition 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 java.util.Locale;
import com.openxc.units.State;
/**
* The TransmissionGearPosition is the actual current gear of the transmission.
*
* This measurement is the current actual gear, not the selected or desired gear
* by the driver or computer.
*/
public class TransmissionGearPosition
extends BaseMeasurement> {
public final static String ID = "transmission_gear_position";
public enum GearPosition {
FIRST,
SECOND,
THIRD,
FOURTH,
FIFTH,
SIXTH,
SEVENTH,
EIGHTH,
NEUTRAL,
REVERSE
}
public TransmissionGearPosition(State value) {
super(value);
}
public TransmissionGearPosition(GearPosition value) {
this(new State(value));
}
public TransmissionGearPosition(String value) {
this(GearPosition.valueOf(value.toUpperCase(Locale.US)));
}
@Override
public String getGenericName() {
return ID;
}
}