package Services.CaptCO2;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@SpringBootApplication
@RequestMapping("/CaptCO2/")
public class CaptCo2Application {
	
	private double co2;
	private double precision;
	private String unite;
	
	
	public CaptCo2Application(){
		this.precision = 50;
		this.unite = "PPM";
		this.co2 = 400;
	}

	
	@GetMapping("getCO2/")
	public double getCo2() {
		return co2;
	}
	@GetMapping("setCO2/")
	public void setCo2(double co2) {
		this.co2 = co2;
	}

	public double getPrecision() {
		return precision;
	}

	public void setPrecision(double precision) {
		this.precision = precision;
	}

	public String getUnite() {
		return unite;
	}

	public void setUnite(String unite) {
		this.unite = unite;
	}
	
	
	public static void main(String[] args) {
		SpringApplication.run(CaptCo2Application.class, args);
		
	}


}
