/// <summary> /// Is called from the <see cref="IThermalObject"/> once per thermal update. /// </summary> /// <param name="transferredHeat"> /// The heat that was transferred to the <see cref="IThermalObject"/> during the thermal update in J (Joule). /// </param> /// <param name="roomThermalManager"> /// The <see cref="IRoomThermalManager"/> that does the thermal update. /// </param> public void ThermalUpdate(float transferredHeat, IRoomThermalManager roomThermalManager) { DateTime now = DateTime.Now; TimeSpan durationSinceLastRead = DateTime.Now - _lastRead; if (durationSinceLastRead > RefreshInterval) { _lastRead = now; try { _lastReadVentilValue = RemoteHeater.GetState(); } catch (Exception exception) { Debug.LogError("Failed to get heater State"); Debug.LogException(exception); } } //TODO: process ventil value }
/// <summary> /// A <see cref="IRoomThermalManager"/> signals the <see cref="IThermalObject"/> that the thermal simulation was started. /// </summary> /// <param name="roomThermalManager"> /// The <see cref="IRoomThermalManager"/> that starts the thermal simulation with this <see cref="IThermalObject"/>. /// </param> public void ThermalStart(IRoomThermalManager roomThermalManager) { }