Apollo  6.0
Open source self driving car software
Public Types | Public Member Functions | List of all members
apollo::cyber::blocker::IntraWriter< MessageT > Class Template Reference

#include <intra_writer.h>

Inheritance diagram for apollo::cyber::blocker::IntraWriter< MessageT >:
Inheritance graph
Collaboration diagram for apollo::cyber::blocker::IntraWriter< MessageT >:
Collaboration graph

Public Types

using MessagePtr = std::shared_ptr< MessageT >
 
using BlockerManagerPtr = std::shared_ptr< BlockerManager >
 
- Public Types inherited from apollo::cyber::Writer< MessageT >
using TransmitterPtr = std::shared_ptr< transport::Transmitter< MessageT > >
 
using ChangeConnection = typename service_discovery::Manager::ChangeConnection
 

Public Member Functions

 IntraWriter (const proto::RoleAttributes &attr)
 
virtual ~IntraWriter ()
 
bool Init () override
 Init the Writer. More...
 
void Shutdown () override
 Shutdown the Writer. More...
 
bool Write (const MessageT &msg) override
 Write a MessageT instance. More...
 
bool Write (const MessagePtr &msg_ptr) override
 Write a shared ptr of MessageT. More...
 
- Public Member Functions inherited from apollo::cyber::Writer< MessageT >
 Writer (const proto::RoleAttributes &role_attr)
 Construct a new Writer object. More...
 
virtual ~Writer ()
 
bool Init () override
 Init the Writer. More...
 
void Shutdown () override
 Shutdown the Writer. More...
 
bool HasReader () override
 Is there any Reader that subscribes our Channel? You can publish message when this return true. More...
 
void GetReaders (std::vector< proto::RoleAttributes > *readers) override
 Get all Readers that subscriber our writing channel. More...
 
- Public Member Functions inherited from apollo::cyber::WriterBase
 WriterBase (const proto::RoleAttributes &role_attr)
 Construct a new Writer Base object. More...
 
virtual ~WriterBase ()
 
const std::string & GetChannelName () const
 Get Writer's Channel name. More...
 
bool IsInit () const
 Is Writer initialized? More...
 

Additional Inherited Members

- Protected Attributes inherited from apollo::cyber::WriterBase
proto::RoleAttributes role_attr_
 
std::mutex lock_
 
bool init_
 

Member Typedef Documentation

◆ BlockerManagerPtr

template<typename MessageT >
using apollo::cyber::blocker::IntraWriter< MessageT >::BlockerManagerPtr = std::shared_ptr<BlockerManager>

◆ MessagePtr

template<typename MessageT >
using apollo::cyber::blocker::IntraWriter< MessageT >::MessagePtr = std::shared_ptr<MessageT>

Constructor & Destructor Documentation

◆ IntraWriter()

template<typename MessageT >
apollo::cyber::blocker::IntraWriter< MessageT >::IntraWriter ( const proto::RoleAttributes &  attr)
explicit

◆ ~IntraWriter()

template<typename MessageT >
apollo::cyber::blocker::IntraWriter< MessageT >::~IntraWriter ( )
virtual

Member Function Documentation

◆ Init()

template<typename MessageT >
bool apollo::cyber::blocker::IntraWriter< MessageT >::Init ( )
overridevirtual

Init the Writer.

Returns
true if init success
false if init failed

Implements apollo::cyber::WriterBase.

◆ Shutdown()

template<typename MessageT >
void apollo::cyber::blocker::IntraWriter< MessageT >::Shutdown ( )
overridevirtual

Shutdown the Writer.

Implements apollo::cyber::WriterBase.

◆ Write() [1/2]

template<typename MessageT >
bool apollo::cyber::blocker::IntraWriter< MessageT >::Write ( const MessageT &  msg)
overridevirtual

Write a MessageT instance.

Parameters
msgthe message we want to write
Returns
true if write successfully
false if write failed

Reimplemented from apollo::cyber::Writer< MessageT >.

◆ Write() [2/2]

template<typename MessageT >
bool apollo::cyber::blocker::IntraWriter< MessageT >::Write ( const MessagePtr msg_ptr)
overridevirtual

Write a shared ptr of MessageT.

Parameters
msg_ptrthe message shared ptr we want to write
Returns
true if write successfully
false if write failed

Reimplemented from apollo::cyber::Writer< MessageT >.


The documentation for this class was generated from the following file: