Apollo 11.0
自动驾驶开放平台
apollo::cyber::data::DataVisitor< M0, NullType, NullType, NullType > 模板类 参考

#include <data_visitor.h>

类 apollo::cyber::data::DataVisitor< M0, NullType, NullType, NullType > 继承关系图:
apollo::cyber::data::DataVisitor< M0, NullType, NullType, NullType > 的协作图:

Public 成员函数

 DataVisitor (const VisitorConfig &configs)
 
 DataVisitor (uint64_t channel_id, uint32_t queue_size)
 
bool TryFetch (std::shared_ptr< M0 > &m0)
 
- Public 成员函数 继承自 apollo::cyber::data::DataVisitorBase
 DataVisitorBase ()
 
void RegisterNotifyCallback (std::function< void()> &&callback)
 

额外继承的成员函数

- Protected 成员函数 继承自 apollo::cyber::data::DataVisitorBase
 DataVisitorBase (const DataVisitorBase &)=delete
 
DataVisitorBaseoperator= (const DataVisitorBase &)=delete
 
- Protected 属性 继承自 apollo::cyber::data::DataVisitorBase
uint64_t next_msg_index_ = 0
 
DataNotifierdata_notifier_ = DataNotifier::Instance()
 
std::shared_ptr< Notifiernotifier_
 

详细描述

template<typename M0>
class apollo::cyber::data::DataVisitor< M0, NullType, NullType, NullType >

在文件 data_visitor.h169 行定义.

构造及析构函数说明

◆ DataVisitor() [1/2]

template<typename M0 >
apollo::cyber::data::DataVisitor< M0, NullType, NullType, NullType >::DataVisitor ( const VisitorConfig configs)
inlineexplicit

在文件 data_visitor.h171 行定义.

172 : buffer_(configs.channel_id, new BufferType<M0>(configs.queue_size)) {
173 DataDispatcher<M0>::Instance()->AddBuffer(buffer_);
175 }
void AddNotifier(uint64_t channel_id, const std::shared_ptr< Notifier > &notifier)
std::shared_ptr< Notifier > notifier_

◆ DataVisitor() [2/2]

template<typename M0 >
apollo::cyber::data::DataVisitor< M0, NullType, NullType, NullType >::DataVisitor ( uint64_t  channel_id,
uint32_t  queue_size 
)
inline

在文件 data_visitor.h177 行定义.

178 : buffer_(channel_id, new BufferType<M0>(queue_size)) {
179 DataDispatcher<M0>::Instance()->AddBuffer(buffer_);
181 }

成员函数说明

◆ TryFetch()

template<typename M0 >
bool apollo::cyber::data::DataVisitor< M0, NullType, NullType, NullType >::TryFetch ( std::shared_ptr< M0 > &  m0)
inline

在文件 data_visitor.h183 行定义.

183 { // NOLINT
184 if (buffer_.Fetch(&next_msg_index_, m0)) {
186 return true;
187 }
188 return false;
189 }
bool Fetch(uint64_t *index, std::shared_ptr< T > &m)

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