async fn check_critical_temperature(&self, temperature: Celsius) -> Result<(), Error> {
        // Temperature has exceeded the thermal shutdown temperature
        if temperature.0 >= self.config.policy_params.thermal_shutdown_temperature.0 {
            // TODO(pshickel): We shouldn't ever get an error here. But we should probably have
            // some type of fallback or secondary mechanism of halting the system if it somehow
            // does happen. This could have physical safety implications.
            self.send_message(
                &self.config.sys_pwr_handler,
                &Message::SystemShutdown(
                    format!(
                        "Exceeded thermal limit ({}C > {}C)",
                        temperature.0, self.config.policy_params.thermal_shutdown_temperature.0
                    )
                    .to_string(),
                ),
            )
            .await
            .map_err(|e| format_err!("Failed to shutdown the system: {}", e))?;
        }

        Ok(())
    }
/// Compares the supplied temperature with the thermal config thermal shutdown temperature. If
/// we've reached or exceeded the shutdown temperature, message the system power handler node
/// to initiate a system shutdown.
Compares the supplied temperature with the thermal config thermal shutdown temperature. If
we've reached or exceeded the shutdown temperature, message the system power handler node
to initiate a system shutdown.
Compares the supplied temperature with the thermal config thermal shutdown temperature . If we ' ve reached or exceeded the shutdown temperature message the system power handler node to initiate a system shutdown .
async fn check_critical_temperature(&self, temperature: Celsius) -> Result<(), Error> {
        // Temperature has exceeded the thermal shutdown temperature
        if temperature.0 >= self.config.policy_params.thermal_shutdown_temperature.0 {
            // TODO(pshickel): We shouldn't ever get an error here. But we should probably have
            // some type of fallback or secondary mechanism of halting the system if it somehow
            // does happen. This could have physical safety implications.
            self.send_message(
                &self.config.sys_pwr_handler,
                &Message::SystemShutdown(
                    format!(
                        "Exceeded thermal limit ({}C > {}C)",
                        temperature.0, self.config.policy_params.thermal_shutdown_temperature.0
                    )
                    .to_string(),
                ),
            )
            .await
            .map_err(|e| format_err!("Failed to shutdown the system: {}", e))?;
        }
        Ok(())
    }
async fn check_critical_temperature ( & self , temperature : Celsius ) -> Result < ( ) , Error > { // Temperature has exceeded the thermal shutdown temperature if temperature . 0 >= self . config . policy_params . thermal_shutdown_temperature . 0 { // TODO(pshickel): We shouldn't ever get an error here. But we should probably have // some type of fallback or secondary mechanism of halting the system if it somehow // does happen. This could have physical safety implications. self . send_message ( & self . config . sys_pwr_handler , & Message :: SystemShutdown ( format ! ( " " temperature 0 self config policy_params thermal_shutdown_temperature 0 ) . to_string ( ) , ) , ) . await . map_err ( | e | format_err ! ( " " e ) ) ? ; } Ok ( ( ) ) }
Compares the supplied temperature with the thermal config thermal shutdown temperature.
Compares the supplied temperature with the thermal config thermal shutdown temperature .
&self
temperature
Celsius