package launch;

import javafx.application.Application;
import javafx.stage.Stage;
import modele.ConcreteSensor;
import modele.Sensor;
import modele.SensorManager;
import modele.VirtualSensor;
import views.WeatherController;

import java.util.ArrayList;
import java.util.List;

public class Launch extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {
        //Create captors here
        SensorManager.getInstance();

        VirtualSensor virtualSensor = new VirtualSensor(new ArrayList<>(), 0, "testmachin", 54);
        ConcreteSensor concreteSensor1 = new ConcreteSensor(3);
        ConcreteSensor concreteSensor2 = new ConcreteSensor(78);
        virtualSensor.addSensor(concreteSensor1,concreteSensor1.getWeight());
        virtualSensor.addSensor(concreteSensor2,concreteSensor2.getWeight());

        SensorManager.getInstance().addSensor(virtualSensor);

        WeatherController weatherController = new WeatherController(SensorManager.getInstance().getSensorList(), "FXML/WeatherStation.fxml","WeatherStation");

    }
}
