avr-classes
Public Member Functions | List of all members
TimerService Class Referenceabstract

#include <timerservice.h>

Inheritance diagram for TimerService:
OneShotTimer< COUNTERTYPE > StopWatchTimer< COUNTERTYPE > PeriodicTimer< COUNTERTYPE >

Public Member Functions

 TimerService (void)
 
virtual void onTick (void)=0
 
void start (void)
 
void stop (void)
 
bool isRunning (void) const
 

Detailed Description

Base type for timer services that can be added to TimerServiceHost instances.

Constructor & Destructor Documentation

◆ TimerService()

TimerService::TimerService ( void  )
inline

Constructor.

Member Function Documentation

◆ isRunning()

bool TimerService::isRunning ( void  ) const
inline

Returns whether timer is currently running.

Returns
True if timer is running, false otherwise.

◆ onTick()

virtual void TimerService::onTick ( void  )
pure virtual

Callback for base tick events of TimerServiceHost. Called from ISR context.

Implemented in OneShotTimer< COUNTERTYPE >, and StopWatchTimer< COUNTERTYPE >.

◆ start()

void TimerService::start ( void  )
inline

Starts or continues the timer.

◆ stop()

void TimerService::stop ( void  )
inline

Stops the timer, keeping the current timeout value.