Apollo 9.0
自动驾驶开放平台
apollo::cyber::PyNode类 参考

#include <py_cyber.h>

apollo::cyber::PyNode 的协作图:

Public 成员函数

 PyNode (const std::string &node_name)
 
void shutdown ()
 
PyWriter * create_writer (const std::string &channel, const std::string &type, uint32_t qos_depth=1)
 
void register_message (const std::string &desc)
 
PyReader * create_reader (const std::string &channel, const std::string &type)
 
PyService * create_service (const std::string &service, const std::string &type)
 
PyClient * create_client (const std::string &service, const std::string &type)
 
std::shared_ptr< Node > get_node ()
 

详细描述

在文件 py_cyber.h 第 285 行定义.

构造及析构函数说明

◆ PyNode()

apollo::cyber::PyNode::PyNode ( const std::string &  node_name)
inlineexplicit

在文件 py_cyber.h 第 287 行定义.

287 : node_name_(node_name) {
288 node_ = CreateNode(node_name);
289 }
std::unique_ptr< Node > CreateNode(const std::string &node_name, const std::string &name_space)
Definition cyber.cc:33

成员函数说明

◆ create_client()

PyClient * apollo::cyber::PyNode::create_client ( const std::string &  service,
const std::string &  type 
)
inline

在文件 py_cyber.h 第 324 行定义.

324 {
325 if (node_) {
326 return new PyClient(service, type, node_.get());
327 }
328 return nullptr;
329 }

◆ create_reader()

PyReader * apollo::cyber::PyNode::create_reader ( const std::string &  channel,
const std::string &  type 
)
inline

在文件 py_cyber.h 第 309 行定义.

309 {
310 if (node_) {
311 return new PyReader(channel, type, node_.get());
312 }
313 return nullptr;
314 }

◆ create_service()

PyService * apollo::cyber::PyNode::create_service ( const std::string &  service,
const std::string &  type 
)
inline

在文件 py_cyber.h 第 316 行定义.

317 {
318 if (node_) {
319 return new PyService(service, type, node_.get());
320 }
321 return nullptr;
322 }

◆ create_writer()

PyWriter * apollo::cyber::PyNode::create_writer ( const std::string &  channel,
const std::string &  type,
uint32_t  qos_depth = 1 
)
inline

在文件 py_cyber.h 第 296 行定义.

297 {
298 if (node_) {
299 return new PyWriter(channel, type, qos_depth, node_.get());
300 }
301 AINFO << "Py_Node: node_ is null, new PyWriter failed!";
302 return nullptr;
303 }
#define AINFO
Definition log.h:42

◆ get_node()

std::shared_ptr< Node > apollo::cyber::PyNode::get_node ( )
inline

在文件 py_cyber.h 第 331 行定义.

331{ return node_; }

◆ register_message()

void apollo::cyber::PyNode::register_message ( const std::string &  desc)
inline

在文件 py_cyber.h 第 305 行定义.

305 {
306 message::ProtobufFactory::Instance()->RegisterPythonMessage(desc);
307 }

◆ shutdown()

void apollo::cyber::PyNode::shutdown ( )
inline

在文件 py_cyber.h 第 291 行定义.

291 {
292 node_.reset();
293 AINFO << "PyNode " << node_name_ << " exit.";
294 }

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