Apollo  6.0
Open source self driving car software
Public Member Functions | Public Attributes | List of all members
apollo::cyber::TimerOption Struct Reference

The options of timer. More...

#include <timer.h>

Collaboration diagram for apollo::cyber::TimerOption:
Collaboration graph

Public Member Functions

 TimerOption (uint32_t period, std::function< void()> callback, bool oneshot)
 Construct a new Timer Option object. More...
 
 TimerOption ()
 Default constructor for initializer list. More...
 

Public Attributes

uint32_t period = 0
 The period of the timer, unit is ms max: 512 * 64 min: 1. More...
 
std::function< void()> callback
 
bool oneshot
 

Detailed Description

The options of timer.

Constructor & Destructor Documentation

◆ TimerOption() [1/2]

apollo::cyber::TimerOption::TimerOption ( uint32_t  period,
std::function< void()>  callback,
bool  oneshot 
)
inline

Construct a new Timer Option object.

Parameters
periodThe period of the timer, unit is ms
callbackThe task that the timer needs to perform
oneshotOneshot or period

◆ TimerOption() [2/2]

apollo::cyber::TimerOption::TimerOption ( )
inline

Default constructor for initializer list.

Member Data Documentation

◆ callback

std::function<void()> apollo::cyber::TimerOption::callback

The task that the timer needs to perform

◆ oneshot

bool apollo::cyber::TimerOption::oneshot

True: perform the callback only after the first timing cycle False: perform the callback every timed period

◆ period

uint32_t apollo::cyber::TimerOption::period = 0

The period of the timer, unit is ms max: 512 * 64 min: 1.


The documentation for this struct was generated from the following file: