/// Processes a new thermal load for the given sensor.
///
/// First, each trip point of `trip_point_states` is updated to active/inactive based on the new
/// thermal load for the given sensor. Next, the client's new thermal state is determined
/// according to the new currently activate trip points. If the thermal state has changed, then
/// the new value is passed to the publisher, where remote thermal clients will see the new
/// value.
Processes a new thermal load for the given sensor.
First, each trip point of `trip_point_states` is updated to active/inactive based on the new
thermal load for the given sensor. Next, the client's new thermal state is determined
according to the new currently activate trip points. If the thermal state has changed, then
the new value is passed to the publisher, where remote thermal clients will see the new
value.
Processes a new thermal load for the given sensor . First each trip point of ` trip_point_states ` is updated to active / inactive based on the new thermal load for the given sensor . Next the client ' s new thermal state is determined according to the new currently activate trip points . If the thermal state has changed then the new value is passed to the publisher where remote thermal clients will see the new value .
fn process_new_thermal_load(&mut self, thermal_load: ThermalLoad, sensor: &str) {
        self.update_active_trip_points(thermal_load, sensor);
        let new_thermal_state = self.get_thermal_state();
        if new_thermal_state != self.thermal_state {
            self.thermal_state = new_thermal_state;
            self.inspect.thermal_state.set(new_thermal_state.0.into());
            self.state_publisher.set(new_thermal_state);
        }
    }
fn process_new_thermal_load ( & mut self , thermal_load : ThermalLoad , sensor : & str ) { self . update_active_trip_points ( thermal_load , sensor ) ; let new_thermal_state = self . get_thermal_state ( ) ; if new_thermal_state != self . thermal_state { self . thermal_state = new_thermal_state ; self . inspect . thermal_state . set ( new_thermal_state . 0 . into ( ) ) ; self . state_publisher . set ( new_thermal_state ) ; } }
Processes a new thermal load for the given sensor.
Processes a new thermal load for the given sensor .
&mut self
thermal_load
ThermalLoad
sensor
&str