30 traits.set_oscillation(
true);
33 traits.set_direction(
true);
34 traits.set_speed(
true);
35 traits.set_supported_speed_count(5);
38 traits.set_direction(
true);
39 traits.set_speed(
true);
40 traits.set_supported_speed_count(100);
41 traits.set_oscillation(
true);
50 if (
call.get_state().has_value())
52 if (
call.get_oscillating().has_value())
54 if (
call.get_speed().has_value())
56 if (
call.get_direction().has_value())
fan::FanTraits get_traits() override
void control(const fan::FanCall &call) override
void set_type(DemoFanType type)
optional< bool > get_state() const
optional< bool > get_oscillating() const
optional< int > get_speed() const
optional< FanDirection > get_direction() const
FanDirection direction
The current direction of the fan.
bool oscillating
The current oscillation state of the fan.
bool state
The current on/off state of the fan.
int speed
The current fan speed level.
Providing packet encoding functions for exchanging data with a remote host.