|
Apollo 11.0
自动驾驶开放平台
|
#include <writer.h>
Public 类型 | |
| using | TransmitterPtr = std::shared_ptr< transport::Transmitter< MessageT > > |
| using | ChangeConnection = typename service_discovery::Manager::ChangeConnection |
Public 成员函数 | |
| Writer (const proto::RoleAttributes &role_attr) | |
| Construct a new Writer object | |
| virtual | ~Writer () |
| bool | Init () override |
| Init the Writer | |
| void | Shutdown () override |
| Shutdown the Writer | |
| virtual bool | Write (const MessageT &msg) |
| Write a MessageT instance | |
| virtual bool | Write (const std::shared_ptr< MessageT > &msg_ptr) |
| Write a shared ptr of MessageT | |
| bool | HasReader () override |
| Is there any Reader that subscribes our Channel? You can publish message when this return true | |
| void | GetReaders (std::vector< proto::RoleAttributes > *readers) override |
| Get all Readers that subscriber our writing channel | |
| std::shared_ptr< MessageT > | AcquireMessage () |
| Acquire message instance to send | |
Public 成员函数 继承自 apollo::cyber::WriterBase | |
| WriterBase (const proto::RoleAttributes &role_attr) | |
| Construct a new Writer Base object | |
| virtual | ~WriterBase () |
| const std::string & | GetChannelName () const |
| Get Writer's Channel name | |
| const uint64_t | GetChannelId () const |
| Get Writer's Channel id | |
| bool | IsInit () const |
| Is Writer initialized? | |
额外继承的成员函数 | |
Protected 属性 继承自 apollo::cyber::WriterBase | |
| proto::RoleAttributes | role_attr_ |
| std::mutex | lock_ |
| bool | init_ |
| using apollo::cyber::Writer< MessageT >::ChangeConnection = typename service_discovery::Manager::ChangeConnection |
| using apollo::cyber::Writer< MessageT >::TransmitterPtr = std::shared_ptr<transport::Transmitter<MessageT> > |
|
explicit |
Construct a new Writer object
| role_attr | we use RoleAttributes to identify a Writer |
|
virtual |
| std::shared_ptr< MessageT > apollo::cyber::Writer< MessageT >::AcquireMessage | ( | ) |
Acquire message instance to send
|
overridevirtual |
Get all Readers that subscriber our writing channel
| readers | vector result of RoleAttributes |
重载 apollo::cyber::WriterBase .
|
overridevirtual |
Is there any Reader that subscribes our Channel? You can publish message when this return true
重载 apollo::cyber::WriterBase .
|
overridevirtual |
Init the Writer
实现了 apollo::cyber::WriterBase.
|
overridevirtual |
|
virtual |
Write a MessageT instance
| msg | the message we want to write |
被 apollo::cyber::blocker::IntraWriter< MessageT > 重载.
|
virtual |
Write a shared ptr of MessageT
| msg_ptr | the message shared ptr we want to write |
被 apollo::cyber::blocker::IntraWriter< MessageT > 重载.