Apollo 11.0
自动驾驶开放平台
apollo::drivers::gnss::RateControl类 参考

#include <parser_common.h>

apollo::drivers::gnss::RateControl 的协作图:

Public 成员函数

 RateControl (uint64_t period_ns)
 
bool check ()
 

详细描述

在文件 parser_common.h 第 55 行定义.

构造及析构函数说明

◆ RateControl()

apollo::drivers::gnss::RateControl::RateControl ( uint64_t  period_ns)
inlineexplicit

在文件 parser_common.h 第 57 行定义.

57: period_ns_(period_ns) {}

成员函数说明

◆ check()

bool apollo::drivers::gnss::RateControl::check ( )
inline

在文件 parser_common.h 第 58 行定义.

58 {
59 auto now = cyber::Time::Now().ToNanosecond();
60 if (now - latest_ns_ > period_ns_) {
61 latest_ns_ = now;
62 return true;
63 }
64 return false;
65 }
uint64_t ToNanosecond() const
convert time to nanosecond.
Definition time.cc:83
static Time Now()
get the current time.
Definition time.cc:57

该类的文档由以下文件生成: