Apollo 10.0
自动驾驶开放平台
CommonComponentSample类 参考

#include <common_component_example.h>

类 CommonComponentSample 继承关系图:
CommonComponentSample 的协作图:

Public 成员函数

bool Init () override
 
bool Proc (const std::shared_ptr< Driver > &msg0, const std::shared_ptr< Driver > &msg1) override
 
- Public 成员函数 继承自 apollo::cyber::Component< Driver, Driver >
 Component ()
 
 ~Component () override
 
bool Initialize (const ComponentConfig &config) override
 init the component by protobuf object.
 
bool Process (const std::shared_ptr< Driver > &msg0, const std::shared_ptr< Driver > &msg1, const std::shared_ptr< NullType > &msg2, const std::shared_ptr< NullType > &msg3)
 
- Public 成员函数 继承自 apollo::cyber::ComponentBase
virtual ~ComponentBase ()
 
virtual bool Initialize (const TimerComponentConfig &config)
 
virtual void Shutdown ()
 
template<typename T >
bool GetProtoConfig (T *config) const
 

额外继承的成员函数

- Public 类型 继承自 apollo::cyber::ComponentBase
template<typename M >
using Reader = cyber::Reader< M >
 
- Protected 成员函数 继承自 apollo::cyber::ComponentBase
virtual void Clear ()
 
const std::string & ConfigFilePath () const
 
void LoadConfigFiles (const ComponentConfig &config)
 
void LoadConfigFiles (const TimerComponentConfig &config)
 
- Protected 属性 继承自 apollo::cyber::ComponentBase
std::atomic< bool > is_shutdown_ = {false}
 
std::shared_ptr< Nodenode_ = nullptr
 
std::string config_file_path_ = ""
 
std::vector< std::shared_ptr< ReaderBase > > readers_
 

详细描述

在文件 common_component_example.h25 行定义.

成员函数说明

◆ Init()

bool CommonComponentSample::Init ( )
overridevirtual

实现了 apollo::cyber::ComponentBase.

在文件 common_component_example.cc18 行定义.

18 {
19 AINFO << "Commontest component init";
20 return true;
21}
#define AINFO
Definition log.h:42

◆ Proc()

bool CommonComponentSample::Proc ( const std::shared_ptr< Driver > &  msg0,
const std::shared_ptr< Driver > &  msg1 
)
override

在文件 common_component_example.cc23 行定义.

24 {
25 AINFO << "Start common component Proc [" << msg0->msg_id() << "] ["
26 << msg1->msg_id() << "]";
27 return true;
28}

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