semf
semf::app::LedBlinking Class Referenceabstract

Interface for a blinking led class. More...

#include <ledblinking.h>

Inheritance diagram for semf::app::LedBlinking:
Inheritance graph
Collaboration diagram for semf::app::LedBlinking:
Collaboration graph

Public Types

enum class  Mode : uint8_t { Off = 0 , On = 1 , Blinking = 2 }
 

Public Member Functions

virtual ~LedBlinking ()=default
 
virtual void setBlinking (unsigned int onOffTime)=0
 Starts blinking the led with the same on and off time. More...
 
virtual void setBlinking (unsigned int onTime, unsigned int offTime)=0
 Starts blinking the led with different on and off time. More...
 
virtual Mode mode () const =0
 Returns the active mode of the led. More...
 
- Public Member Functions inherited from semf::app::Led
virtual ~Led ()=default
 
virtual void setOn ()=0
 
virtual void setOff ()=0
 
virtual void toggle ()=0
 

Detailed Description

Interface for a blinking led class.

Definition at line 22 of file ledblinking.h.

Member Enumeration Documentation

◆ Mode

enum class semf::app::LedBlinking::Mode : uint8_t
strong

Led operation modes.

Enumerator
Off 
On 
Blinking 

Definition at line 26 of file ledblinking.h.

Constructor & Destructor Documentation

◆ ~LedBlinking()

virtual semf::app::LedBlinking::~LedBlinking ( )
virtualdefault

Member Function Documentation

◆ mode()

virtual Mode semf::app::LedBlinking::mode ( ) const
pure virtual

Returns the active mode of the led.

Returns
Active led mode setting.

Implemented in semf::LedBlinking.

◆ setBlinking() [1/2]

virtual void semf::app::LedBlinking::setBlinking ( unsigned int  onOffTime)
pure virtual

Starts blinking the led with the same on and off time.

Parameters
onOffTimeOn and off time.

Implemented in semf::LedBlinking.

◆ setBlinking() [2/2]

virtual void semf::app::LedBlinking::setBlinking ( unsigned int  onTime,
unsigned int  offTime 
)
pure virtual

Starts blinking the led with different on and off time.

Parameters
onTimeOn time.
offTimeOff time.

Implemented in semf::LedBlinking.