// Copyright (c) 2020 UWB & LESP.
// The UWB & LESP license this file to you under the MIT license.

package cz.senslog.connector.model.v1;

/**
 * The class {@code Observation} represents a record for Senslog V1.
 *
 * @author Lukas Cerny
 * @version 1.0
 * @since 1.0
 */
public class Observation extends Record {

    /** Identifier of specific sensor which measured the value (e.q. temperature, humidity, etc...). */
    private Long sensorId;

    /** Concrete value of the sensor. */
    private Float value;

    public Long getSensorId() {
        return sensorId;
    }

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

    public Float getValue() {
        return value;
    }

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

    public void setValue(Double value) {
        setValue(value != null ? value.floatValue() : null);
    }

}