Woman, Life, Freedom


DoIP Library
Diagnostics over Internet Protocol (DoIP) C++ library
DoipLib::AnnouncementTimer Class Reference

A timer to announce the vehicle for a specific timer with a specific delay in between. More...

#include <announcement_timer.h>

Public Member Functions

 AnnouncementTimer (std::chrono::seconds delay, std::chrono::seconds interval, uint8_t count)
 Constructor. More...
 
 AnnouncementTimer (const AnnouncementTimer &)=delete
 
AnnouncementTimeroperator= (const AnnouncementTimer &)=delete
 
void Start (std::function< void()> &&callback)
 (Re)start the timer to tick More...
 

Detailed Description

A timer to announce the vehicle for a specific timer with a specific delay in between.

Constructor & Destructor Documentation

◆ AnnouncementTimer()

DoipLib::AnnouncementTimer::AnnouncementTimer ( std::chrono::seconds  delay,
std::chrono::seconds  interval,
uint8_t  count 
)

Constructor.

Parameters
delayDelay in seconds before starting the announcement
intervalInterval in seconds between each announcement
countNumber of annoucement broadcasting iterations

Member Function Documentation

◆ Start()

void DoipLib::AnnouncementTimer::Start ( std::function< void()> &&  callback)

(Re)start the timer to tick

Parameters
callbackDelegate to be invoked on each timer tick
Note
The caller will be blocked until the timer has been started.