Apollo 10.0
自动驾驶开放平台
apollo::cyber::TimerOption结构体 参考

The options of timer 更多...

#include <timer.h>

apollo::cyber::TimerOption 的协作图:

Public 成员函数

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

Public 属性

uint32_t period = 0
 The period of the timer, unit is ms max: 512 * 64 min: 1
 
std::function< void()> callback
 The task that the timer needs to perform
 
bool oneshot
 True: perform the callback only after the first timing cycle False: perform the callback every timed period
 

详细描述

The options of timer

在文件 timer.h32 行定义.

构造及析构函数说明

◆ TimerOption() [1/2]

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

Construct a new Timer Option object

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

在文件 timer.h40 行定义.

uint32_t period
The period of the timer, unit is ms max: 512 * 64 min: 1
Definition timer.h:54
bool oneshot
True: perform the callback only after the first timing cycle False: perform the callback every timed ...
Definition timer.h:63
std::function< void()> callback
The task that the timer needs to perform
Definition timer.h:57

◆ TimerOption() [2/2]

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

Default constructor for initializer list

在文件 timer.h47 行定义.

47: period(), callback(), oneshot() {}

类成员变量说明

◆ callback

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

The task that the timer needs to perform

在文件 timer.h57 行定义.

◆ oneshot

bool apollo::cyber::TimerOption::oneshot

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

在文件 timer.h63 行定义.

◆ period

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

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

在文件 timer.h54 行定义.


该结构体的文档由以下文件生成: