Apollo 10.0
自动驾驶开放平台
apollo::cyber::ReaderBase类 参考abstract

Base Class for Reader Reader is identified by one apollo::cyber::proto::RoleAttribute, it contains the channel_name, channel_id that we subscribe, and host_name, process_id and node that we are located, and qos that describes our transportation quality. 更多...

#include <reader_base.h>

类 apollo::cyber::ReaderBase 继承关系图:
apollo::cyber::ReaderBase 的协作图:

Public 成员函数

 ReaderBase (const proto::RoleAttributes &role_attr)
 
virtual ~ReaderBase ()
 
virtual bool Init ()=0
 Init the Reader object
 
virtual void Shutdown ()=0
 Shutdown the Reader object
 
virtual void ClearData ()=0
 Clear local data
 
virtual void Observe ()=0
 Get stored data
 
virtual bool Empty () const =0
 Query whether the Reader has data to be handled
 
virtual bool HasReceived () const =0
 Query whether we have received data since last clear
 
virtual double GetDelaySec () const =0
 Get time interval of since last receive message
 
virtual uint32_t PendingQueueSize () const =0
 Get the value of pending queue size
 
virtual bool HasWriter ()
 Query is there any writer that publish the subscribed channel
 
virtual void GetWriters (std::vector< proto::RoleAttributes > *writers)
 Get all writers pushlish the channel we subscribes
 
const std::string & GetChannelName () const
 Get Reader's Channel name
 
uint64_t ChannelId () const
 Get Reader's Channel id
 
const proto::QosProfileQosProfile () const
 Get qos profile.
 
bool IsInit () const
 Query whether the Reader is initialized
 

Protected 属性

proto::RoleAttributes role_attr_
 
std::atomic< bool > init_
 

详细描述

Base Class for Reader Reader is identified by one apollo::cyber::proto::RoleAttribute, it contains the channel_name, channel_id that we subscribe, and host_name, process_id and node that we are located, and qos that describes our transportation quality.

在文件 reader_base.h46 行定义.

构造及析构函数说明

◆ ReaderBase()

apollo::cyber::ReaderBase::ReaderBase ( const proto::RoleAttributes role_attr)
inlineexplicit

在文件 reader_base.h48 行定义.

49 : role_attr_(role_attr), init_(false) {}
std::atomic< bool > init_
proto::RoleAttributes role_attr_

◆ ~ReaderBase()

virtual apollo::cyber::ReaderBase::~ReaderBase ( )
inlinevirtual

在文件 reader_base.h50 行定义.

50{}

成员函数说明

◆ ChannelId()

uint64_t apollo::cyber::ReaderBase::ChannelId ( ) const
inline

Get Reader's Channel id

返回
uint64_t channel id

在文件 reader_base.h134 行定义.

◆ ClearData()

virtual void apollo::cyber::ReaderBase::ClearData ( )
pure virtual

◆ Empty()

virtual bool apollo::cyber::ReaderBase::Empty ( ) const
pure virtual

Query whether the Reader has data to be handled

返回
true if data container is empty
false if data container has data

apollo::cyber::blocker::IntraReader< MessageT > , 以及 apollo::cyber::Reader< MessageT > 内被实现.

◆ GetChannelName()

const std::string & apollo::cyber::ReaderBase::GetChannelName ( ) const
inline

Get Reader's Channel name

返回
const std::string& channel name

在文件 reader_base.h125 行定义.

125 {
126 return role_attr_.channel_name();
127 }

◆ GetDelaySec()

virtual double apollo::cyber::ReaderBase::GetDelaySec ( ) const
pure virtual

Get time interval of since last receive message

返回
double seconds delay

apollo::cyber::Reader< MessageT > 内被实现.

◆ GetWriters()

virtual void apollo::cyber::ReaderBase::GetWriters ( std::vector< proto::RoleAttributes > *  writers)
inlinevirtual

Get all writers pushlish the channel we subscribes

参数
writersresult RoleAttributes vector

apollo::cyber::Reader< MessageT > 重载.

在文件 reader_base.h118 行定义.

118{}

◆ HasReceived()

virtual bool apollo::cyber::ReaderBase::HasReceived ( ) const
pure virtual

Query whether we have received data since last clear

返回
true if the reader has received data
false if the reader has not received data

apollo::cyber::blocker::IntraReader< MessageT > , 以及 apollo::cyber::Reader< MessageT > 内被实现.

◆ HasWriter()

virtual bool apollo::cyber::ReaderBase::HasWriter ( )
inlinevirtual

Query is there any writer that publish the subscribed channel

返回
true if there is at least one Writer publish the channel
false if there is no Writer publish the channel

apollo::cyber::Reader< MessageT > 重载.

在文件 reader_base.h111 行定义.

111{ return false; }

◆ Init()

virtual bool apollo::cyber::ReaderBase::Init ( )
pure virtual

Init the Reader object

返回
true if init successfully
false if init failed

apollo::cyber::blocker::IntraReader< MessageT > , 以及 apollo::cyber::Reader< MessageT > 内被实现.

◆ IsInit()

bool apollo::cyber::ReaderBase::IsInit ( ) const
inline

Query whether the Reader is initialized

返回
true if the Reader has been inited
false if the Reader has not been inited

在文件 reader_base.h151 行定义.

151{ return init_.load(); }

◆ Observe()

virtual void apollo::cyber::ReaderBase::Observe ( )
pure virtual

◆ PendingQueueSize()

virtual uint32_t apollo::cyber::ReaderBase::PendingQueueSize ( ) const
pure virtual

Get the value of pending queue size

返回
uint32_t result value

apollo::cyber::Reader< MessageT > 内被实现.

◆ QosProfile()

const proto::QosProfile & apollo::cyber::ReaderBase::QosProfile ( ) const
inline

Get qos profile.

You can see qos description

返回
const proto::QosProfile& result qos

在文件 reader_base.h141 行定义.

141 {
142 return role_attr_.qos_profile();
143 }

◆ Shutdown()

virtual void apollo::cyber::ReaderBase::Shutdown ( )
pure virtual

类成员变量说明

◆ init_

std::atomic<bool> apollo::cyber::ReaderBase::init_
protected

在文件 reader_base.h155 行定义.

◆ role_attr_

proto::RoleAttributes apollo::cyber::ReaderBase::role_attr_
protected

在文件 reader_base.h154 行定义.


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