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

#include <parser_common.h>

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

Public 成员函数

 RateControl (uint64_t period_ns)
 
bool check ()
 

详细描述

在文件 parser_common.h52 行定义.

构造及析构函数说明

◆ RateControl()

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

在文件 parser_common.h54 行定义.

54: period_ns_(period_ns) {}

成员函数说明

◆ check()

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

在文件 parser_common.h55 行定义.

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

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