|
Apollo 11.0
自动驾驶开放平台
|
Node is the fundamental building block of Cyber RT. 更多...
#include <node.h>
Public 成员函数 | |
| virtual | ~Node () |
| const std::string & | Name () const |
| Get node's name. | |
| template<typename MessageT > | |
| auto | CreateWriter (const proto::RoleAttributes &role_attr) -> std::shared_ptr< Writer< MessageT > > |
| Create a Writer with specific message type. | |
| template<typename MessageT > | |
| auto | CreateWriter (const std::string &channel_name) -> std::shared_ptr< Writer< MessageT > > |
| Create a Writer with specific message type. | |
| template<typename MessageT > | |
| auto | CreateReader (const std::string &channel_name, const CallbackFunc< MessageT > &reader_func=nullptr) -> std::shared_ptr< cyber::Reader< MessageT > > |
| Create a Reader with specific message type with channel name qos and other configs used will be default | |
| template<typename MessageT > | |
| auto | CreateReader (const ReaderConfig &config, const CallbackFunc< MessageT > &reader_func=nullptr) -> std::shared_ptr< cyber::Reader< MessageT > > |
| Create a Reader with specific message type with reader config | |
| template<typename MessageT > | |
| auto | CreateReader (const proto::RoleAttributes &role_attr, const CallbackFunc< MessageT > &reader_func=nullptr) -> std::shared_ptr< cyber::Reader< MessageT > > |
Create a Reader object with RoleAttributes | |
| template<typename Request , typename Response > | |
| auto | CreateService (const std::string &service_name, const typename Service< Request, Response >::ServiceCallback &service_callback) -> std::shared_ptr< Service< Request, Response > > |
Create a Service object with specific service_name | |
| template<typename Request , typename Response > | |
| auto | CreateClient (const std::string &service_name) -> std::shared_ptr< Client< Request, Response > > |
Create a Client object to request Service with service_name | |
| bool | DeleteReader (const std::string &channel_name) |
| bool | DeleteReader (const ReaderConfig &config) |
| bool | DeleteReader (const proto::RoleAttributes &role_attr) |
| void | Observe () |
| Observe all readers' data | |
| void | ClearData () |
| clear all readers' data | |
| template<typename MessageT > | |
| auto | GetReader (const std::string &channel_name) -> std::shared_ptr< Reader< MessageT > > |
Get the Reader object that subscribe channel_name | |
友元 | |
| template<typename M0 , typename M1 , typename M2 , typename M3 > | |
| class | Component |
| class | TimerComponent |
| bool | Init (const char *, const std::string &) |
| std::unique_ptr< Node > | CreateNode (const std::string &, const std::string &) |
Node is the fundamental building block of Cyber RT.
every module contains and communicates through the node. A module can have different types of communication by defining read/write and/or service/client in a node.
| void Node::ClearData | ( | ) |
| auto Node::CreateClient | ( | const std::string & | service_name | ) | -> std::shared_ptr<Client<Request, Response>> |
Create a Client object to request Service with service_name
| Request | Message Type of the Request |
| Response | Message Type of the Response |
| service_name | specific service name to a Service |
Client | auto Node::CreateReader | ( | const proto::RoleAttributes & | role_attr, |
| const CallbackFunc< MessageT > & | reader_func = nullptr |
||
| ) | -> std::shared_ptr<cyber::Reader<MessageT>> |
Create a Reader object with RoleAttributes
| MessageT | Message Type |
| role_attr | instance of RoleAttributes, includes channel name, qos, etc. |
| reader_func | invoked when message receive |
| auto Node::CreateReader | ( | const ReaderConfig & | config, |
| const CallbackFunc< MessageT > & | reader_func = nullptr |
||
| ) | -> std::shared_ptr<cyber::Reader<MessageT>> |
Create a Reader with specific message type with reader config
| MessageT | Message Type |
| config | instance of ReaderConfig, include channel name, qos and pending queue size |
| reader_func | invoked when message receive |
| auto Node::CreateReader | ( | const std::string & | channel_name, |
| const CallbackFunc< MessageT > & | reader_func = nullptr |
||
| ) | -> std::shared_ptr<cyber::Reader<MessageT>> |
Create a Reader with specific message type with channel name qos and other configs used will be default
| MessageT | Message Type |
| channel_name | the channel of the reader subscribed. |
| reader_func | invoked when message receive invoked when the message is received. |
| auto Node::CreateService | ( | const std::string & | service_name, |
| const typename Service< Request, Response >::ServiceCallback & | service_callback | ||
| ) | -> std::shared_ptr<Service<Request, Response>> |
Create a Service object with specific service_name
| Request | Message Type of the Request |
| Response | Message Type of the Response |
| service_name | specific service name to a serve |
| service_callback | invoked when a service is called |
Service | auto Node::CreateWriter | ( | const proto::RoleAttributes & | role_attr | ) | -> std::shared_ptr<Writer<MessageT>> |
Create a Writer with specific message type.
| MessageT | Message Type |
| role_attr | is a protobuf message RoleAttributes, which includes the channel name and other info. |
| auto Node::CreateWriter | ( | const std::string & | channel_name | ) | -> std::shared_ptr<Writer<MessageT>> |
| bool Node::DeleteReader | ( | const proto::RoleAttributes & | role_attr | ) |
| bool Node::DeleteReader | ( | const ReaderConfig & | config | ) |
| bool Node::DeleteReader | ( | const std::string & | channel_name | ) |
| auto Node::GetReader | ( | const std::string & | channel_name | ) | -> std::shared_ptr<Reader<MessageT>> |
Get the Reader object that subscribe channel_name
| MessageT | Message Type |
| channel_name | channel name |
| const std::string & Node::Name | ( | ) | const |
| void Node::Observe | ( | ) |
|
friend |
|
friend |
|
friend |
|
friend |