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

#include <command_processor_base.h>

类 apollo::external_command::CommandProcessorBase 继承关系图:
apollo::external_command::CommandProcessorBase 的协作图:

Public 成员函数

 CommandProcessorBase ()
 
virtual ~CommandProcessorBase ()=default
 
virtual bool Init (const std::shared_ptr< cyber::Node > &node)
 
virtual bool GetCommandStatus (int64_t command_id, CommandStatus *status) const =0
 Get the command status.
 

Protected 成员函数

const CommandProcessorConfigGetProcessorConfig () const
 
const std::shared_ptr< cyber::Node > & Node () const
 

详细描述

在文件 command_processor_base.h43 行定义.

构造及析构函数说明

◆ CommandProcessorBase()

apollo::external_command::CommandProcessorBase::CommandProcessorBase ( )

在文件 command_processor_base.cc38 行定义.

39 : processor_config_(std::make_shared<CommandProcessorConfig>()) {}

◆ ~CommandProcessorBase()

virtual apollo::external_command::CommandProcessorBase::~CommandProcessorBase ( )
virtualdefault

成员函数说明

◆ GetCommandStatus()

virtual bool apollo::external_command::CommandProcessorBase::GetCommandStatus ( int64_t  command_id,
CommandStatus status 
) const
pure virtual

◆ GetProcessorConfig()

const CommandProcessorConfig & apollo::external_command::CommandProcessorBase::GetProcessorConfig ( ) const
protected

在文件 command_processor_base.cc58 行定义.

58 {
59 return *processor_config_;
60}

◆ Init()

bool apollo::external_command::CommandProcessorBase::Init ( const std::shared_ptr< cyber::Node > &  node)
virtual

apollo::external_command::ActionCommandProcessor, apollo::external_command::MotionCommandProcessorBase< T >, apollo::external_command::MotionCommandProcessorBase< LaneFollowCommand > , 以及 apollo::external_command::MotionCommandProcessorBase< ValetParkingCommand > 重载.

在文件 command_processor_base.cc41 行定义.

41 {
42 int status;
43 std::string class_name =
44 abi::__cxa_demangle(typeid(*this).name(), 0, 0, &status);
45 // Generate the default task config path from PluginManager.
46 std::string config_path =
49 "conf/config.pb.txt");
50 if (!cyber::common::GetProtoFromFile(config_path, processor_config_.get())) {
51 AERROR << "Cannot get config of " << class_name;
52 return false;
53 }
54 node_ = node;
55 return true;
56}
std::string GetPluginConfPath(const std::string &class_name, const std::string &conf_name)
get plugin configuration file location
static PluginManager * Instance()
get singleton instance of PluginManager
#define AERROR
Definition log.h:44
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...
Definition file.cc:132

◆ Node()

const std::shared_ptr< cyber::Node > & apollo::external_command::CommandProcessorBase::Node ( ) const
protected

在文件 command_processor_base.cc62 行定义.

62 {
63 return node_;
64}

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