led.h 281 B

1234567891011121314151617
  1. #ifndef _LED_H_
  2. #define _LED_H_
  3. class Led {
  4. public:
  5. virtual ~Led() = default;
  6. // Set the led state based on the device state
  7. virtual void OnStateChanged() = 0;
  8. };
  9. class NoLed : public Led {
  10. public:
  11. virtual void OnStateChanged() override {}
  12. };
  13. #endif // _LED_H_