protected void Page_Load(object sender, EventArgs e)
        {
            BusModel s1 = new BusModel("3627", "706", "http://192.168.0.12",80.0, 1772);

            DataGather s1Gather = new DataGather(s1);

            if(s1Gather.gatherFromArduino())
            {
                //Complete
            }
            else
            {
                //Error Log
            }

            BusModel s2 = new BusModel("3612", "706", "http://192.168.0.12", 80.0, 1772);

            DataGather s2Gather = new DataGather(s2);

            if (s2Gather.gatherFromArduino())
            {
                //Complete
            }
            else
            {
                //Error Log
            }
        }
 public TransPortEnvironmentData(BusModel model, DataFromArduino data, DateTime getTime)
     : base(data.temperature, data.humidity, data.co2)
 {
     busno        = model.busno;
     lineno       = model.lineno;
     thi          = model.thi;
     co2_density  = model.co2;
     this.getTime = getTime;
 }
 public TransPortEnvironmentData(BusModel model, DataFromArduino data,DateTime getTime)
     : base(data.temperature, data.humidity, data.co2)
 {
     busno = model.busno;
     lineno = model.lineno;
     thi = model.thi;
     co2_density = model.co2;
     this.getTime = getTime;
 }
Exemplo n.º 4
0
 public DataGather(BusModel bus)
 {
     this.bus = bus;
 }