69static_assert(std::is_trivially_copyable_v<FanTraits>,
"FanTraits is returned by value from get_traits()");
BedjetMode mode
BedJet operating mode.
constexpr bool empty() const
void set_direction(bool direction)
Set whether this fan supports changing direction.
bool supports_preset_modes() const
Return if preset modes are supported.
void set_speed(bool speed)
Set whether this fan supports speed levels.
int supported_speed_count() const
Return how many speed levels the fan has.
const char * find_preset_mode(const char *preset_mode, size_t len) const
void set_supported_speed_count(int speed_count)
Set how many speed levels this fan has.
const FanPresetModes & supported_preset_modes() const
Empty when the fan has no preset modes. Set them on the Fan entity.
bool supports_direction() const
Return if this fan supports changing direction.
void set_oscillation(bool oscillation)
Set whether this fan supports oscillation.
bool supports_speed() const
Return if this fan supports speed modes.
FanTraits(bool oscillation, bool speed, bool direction, int speed_count)
void set_supported_preset_modes_(const FanPresetModes *preset_modes)
Set the preset modes pointer (only Fan::wire_preset_modes_() should call this).
const FanPresetModes * preset_modes_
const char * find_preset_mode(const char *preset_mode) const
Find and return the matching preset mode pointer from supported modes, or nullptr if not found.
bool supports_oscillation() const
Return if this fan supports oscillation.