All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.openxc.measurements.IgnitionStatus Maven / Gradle / Ivy

The newest version!
package com.openxc.measurements;

import java.util.Locale;

import com.openxc.units.State;

/**
 * The IgnitionStatus is the current status of the vehicle's ignition.
 */
public class IgnitionStatus
        extends BaseMeasurement> {
    public final static String ID = "ignition_status";

    public enum IgnitionPosition {
        OFF,
        ACCESSORY,
        RUN,
        START
    }

    public IgnitionStatus(State value) {
        super(value);
    }

    public IgnitionStatus(IgnitionPosition value) {
        this(new State(value));
    }

    public IgnitionStatus(String value) {
        this(IgnitionPosition.valueOf(value.toUpperCase(Locale.US)));
    }

    @Override
    public String getGenericName() {
        return ID;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy