package Services.CaptTemp;

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("/CaptTemp/")

public class CaptTempApplication {
	// Caracteristiques
		
		private double rangeMin;
		private double rangeMax;
		private double precision;
		private char unite;

		// Valeur
		private double temp;

		// Constructeur
		public CaptTempApplication() {

			this.temp = 25; //Default
			this.precision = 0.5;
			this.rangeMin = 0;
			this.rangeMax = 40;
			this.unite = 'C';
		}

	//Methodes
		

		public double getRangeMin() {
			return rangeMin;
		}

		public void setRangeMin(double rangeMin) {
			this.rangeMin = rangeMin;
		}

		public double getRangeMax() {
			return rangeMax;
		}

		public void setRangeMax(double rangeMax) {
			this.rangeMax = rangeMax;
		}

		public double getPrecision() {
			return precision;
		}

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

		public char getUnite() {
			return unite;
		}

		public void setUnite(char unite) {
			this.unite = unite;
		}
		@GetMapping("getTemp/")
		public double getTemp() {
			return temp;
		}
		@GetMapping("setTemp/")
		public void setTemp(double temp) {
			this.temp = temp;
		}

		public static void main(String[] args) {
			SpringApplication.run(CaptTempApplication.class, args);
			
		}
		

}
