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

#include <py_cyber.h>

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

Public 成员函数

 PyNode (const std::string &node_name)
 
void shutdown ()
 
PyWritercreate_writer (const std::string &channel, const std::string &type, uint32_t qos_depth=1)
 
void register_message (const std::string &desc)
 
PyReadercreate_reader (const std::string &channel, const std::string &type)
 
PyServicecreate_service (const std::string &service, const std::string &type)
 
PyClientcreate_client (const std::string &service, const std::string &type)
 
std::shared_ptr< Nodeget_node ()
 

详细描述

在文件 py_cyber.h286 行定义.

构造及析构函数说明

◆ PyNode()

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

在文件 py_cyber.h288 行定义.

288 : node_name_(node_name) {
289 node_ = CreateNode(node_name);
290 }
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.h325 行定义.

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

◆ create_reader()

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

在文件 py_cyber.h310 行定义.

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

◆ create_service()

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

在文件 py_cyber.h317 行定义.

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

◆ create_writer()

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

在文件 py_cyber.h297 行定义.

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

◆ get_node()

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

在文件 py_cyber.h332 行定义.

332{ return node_; }

◆ register_message()

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

在文件 py_cyber.h306 行定义.

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

◆ shutdown()

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

在文件 py_cyber.h292 行定义.

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

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