Base class for a Writer. A Writer is an object to send messages through a 'Channel'.
More...
#include <writer_base.h>
Base class for a Writer. A Writer is an object to send messages through a 'Channel'.
- Warning
- One Writer can only write one channel. But different writers can write through the same channel
◆ WriterBase()
apollo::cyber::WriterBase::WriterBase |
( |
const proto::RoleAttributes & |
role_attr | ) |
|
|
inlineexplicit |
Construct a new Writer Base object.
- Parameters
-
role_attr | role attributes for this Writer |
◆ ~WriterBase()
virtual apollo::cyber::WriterBase::~WriterBase |
( |
| ) |
|
|
inlinevirtual |
◆ GetChannelName()
const std::string& apollo::cyber::WriterBase::GetChannelName |
( |
| ) |
const |
|
inline |
Get Writer's Channel name.
- Returns
- const std::string& const reference to the channel name
◆ GetReaders()
virtual void apollo::cyber::WriterBase::GetReaders |
( |
std::vector< proto::RoleAttributes > * |
readers | ) |
|
|
inlinevirtual |
◆ HasReader()
virtual bool apollo::cyber::WriterBase::HasReader |
( |
| ) |
|
|
inlinevirtual |
Is there any Reader that subscribes our Channel? You can publish message when this return true.
- Returns
- true if the channel has reader
-
false if the channel has no reader
Reimplemented in apollo::cyber::Writer< MessageT >.
◆ Init()
virtual bool apollo::cyber::WriterBase::Init |
( |
| ) |
|
|
pure virtual |
◆ IsInit()
bool apollo::cyber::WriterBase::IsInit |
( |
| ) |
const |
|
inline |
Is Writer initialized?
- Returns
- true if the Writer is inited
-
false if the Write is not inited
◆ Shutdown()
virtual void apollo::cyber::WriterBase::Shutdown |
( |
| ) |
|
|
pure virtual |
◆ init_
bool apollo::cyber::WriterBase::init_ |
|
protected |
◆ lock_
std::mutex apollo::cyber::WriterBase::lock_ |
|
mutableprotected |
◆ role_attr_
proto::RoleAttributes apollo::cyber::WriterBase::role_attr_ |
|
protected |
The documentation for this class was generated from the following file: