async fn update_thermal_load(&self, temperature: Celsius) -> Result<(), Error> {
        let thermal_load = Self::calculate_thermal_load(
            temperature,
            self.config.policy_params.thermal_limit_begin_temperature,
            self.config.policy_params.thermal_shutdown_temperature,
        );
        if thermal_load != self.state.thermal_load.get() {
            self.state.thermal_load.set(thermal_load);
            self.send_message(
                &self.config.thermal_limiter_node,
                &Message::UpdateThermalLoad(thermal_load),
            )
            .await?;
        }

        Ok(())
    }
/// Determines the current thermal load. If there is a change from the cached thermal_load,
/// then the new value is sent out to the ThermalLimiter node.
Determines the current thermal load. If there is a change from the cached thermal_load,
then the new value is sent out to the ThermalLimiter node.
Determines the current thermal load . If there is a change from the cached thermal_load then the new value is sent out to the ThermalLimiter node .
async fn update_thermal_load(&self, temperature: Celsius) -> Result<(), Error> {
        let thermal_load = Self::calculate_thermal_load(
            temperature,
            self.config.policy_params.thermal_limit_begin_temperature,
            self.config.policy_params.thermal_shutdown_temperature,
        );
        if thermal_load != self.state.thermal_load.get() {
            self.state.thermal_load.set(thermal_load);
            self.send_message(
                &self.config.thermal_limiter_node,
                &Message::UpdateThermalLoad(thermal_load),
            )
            .await?;
        }
        Ok(())
    }
async fn update_thermal_load ( & self , temperature : Celsius ) -> Result < ( ) , Error > { let thermal_load = Self :: calculate_thermal_load ( temperature , self . config . policy_params . thermal_limit_begin_temperature , self . config . policy_params . thermal_shutdown_temperature , ) ; if thermal_load != self . state . thermal_load . get ( ) { self . state . thermal_load . set ( thermal_load ) ; self . send_message ( & self . config . thermal_limiter_node , & Message :: UpdateThermalLoad ( thermal_load ) , ) . await ? ; } Ok ( ( ) ) }
Determines the current thermal load.
Determines the current thermal load .
&self
temperature
Celsius