public void TemporalUpdateAll(TemporalRoom room, DateTime timeFrom, DateTime timeTo) { TemporalTemperatureUpdate(room, timeFrom, timeTo); TemporalMotionDetectionUpdate(room, timeFrom, timeTo); TemporalCO2Update(room, timeFrom, timeTo); TemporalLuxUpdate(room, timeFrom, timeTo); TemporalLightUpdate(room, timeFrom, timeTo); TemporalLightUpdate(room, timeFrom, timeTo); TemporalWifiClientUpdate(room, timeFrom, timeTo); TemporalOccupantsUpdate(room, timeFrom, timeTo); }
public void TemporalTemperatureUpdate(TemporalRoom room, DateTime timeFrom, DateTime timeTo) { if (room.Endpoints != null && room.Endpoints.SmapEndponts.ContainsValue(SensorType.Temperature)) { TemporalSummary temporalSummary = calcMinMaxMean.CalcSMapMinMaxMean( smapDal.GetHistoricSensorValue( room.Endpoints.SmapEndponts.First(s => s.Value == SensorType.Temperature).Key, timeFrom, timeTo)); room.AverageTemperature = temporalSummary.MeanValue; room.MinObservedTemperature = temporalSummary.MinValue; room.MaxObservedTemperature = temporalSummary.MaxValue; } }
public void TemporalWifiClientUpdate(TemporalRoom room, DateTime timeFrom, DateTime timeTo) { if (room.Endpoints?.WifiEndpoint != null) { //room.WifiClients = (int)smapDal.GetCurrentSensorValue(room.Endpoints.WifiEndpoint); } }