package eu.hsrw.ias.ggd;

public class SensorData {

  private String sensorId;
  private String tag;
  private double value;
  private Severity state = Severity.Unknown;

  public SensorData(String sensorId, double value, String tag) {
    this.sensorId = sensorId;
    this.value = value;
    this.tag = tag;
  }

  public String getTag() {
    return tag;
  }

  public void setTag(String tag) {
    this.tag = tag;
  }

  public double getValue() {
    return value;
  }

  public void setValue(double value) {
    this.value = value;
  }

  public String getSensorId() {
    return sensorId;
  }

  public void setSensorId(String id) {
    this.sensorId = id;
  }

  public Severity getState() {
    return state;
  }

  public void setState(Severity state) {
    if (this.state != Severity.Critical) {
      this.state = state;
    }
  }

  public void resetState() {
    this.state = Severity.Unknown;
  }
}
