Struct thermal_config::ClientConfig
source · pub struct ClientConfig(/* private fields */);
Expand description
Defines the configuration for a single client (made up of a vector of StateConfig
instances).
Implementations§
source§impl ClientConfig
impl ClientConfig
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty ClientConfig.
Note: this is only intended for use in tests. However, it isn’t marked as cfg(test) so that code outside of the library can use it in their tests as well.
sourcepub fn add_thermal_state(self, trip_points: Vec<TripPoint>) -> Self
pub fn add_thermal_state(self, trip_points: Vec<TripPoint>) -> Self
Adds a new thermal state (defined by the supplied trip points) to the client config.
This will create a new thermal state using the supplied trip points, assigning it a valid thermal state number (which is equal to the number of existing thermal states plus one).
Note: this is only intended for use in tests. However, it isn’t marked as cfg(test) so that code outside of the library can use it in their tests as well.
sourcepub fn into_thermal_states(self) -> Vec<StateConfig>
pub fn into_thermal_states(self) -> Vec<StateConfig>
Gets the thermal states that make up this client configuration.