LoboMQ
Loading...
Searching...
No Matches
BrokerTopic Class Reference

Public Member Functions

 BrokerTopic (Elog *_logger, const char topic[])
 
const char * getTopic () const
 
int getSubscribersAmount () const
 
const std::vector< std::array< uint8_t, 6 > > & getSubscribers () const
 
const char * getFilename () const
 
void setFilename (const char *filename)
 
bool subscribe (const uint8_t *mac) const
 
bool subscribe (const std::array< uint8_t, 6 > &mac) const
 
bool unsubscribe (const uint8_t *mac)
 
bool isSubscribed (const uint8_t *mac) const
 
std::string getSubscribersString () const
 
bool sendToQueue (const PublishContent *pubContent) const
 
void dispatchMessages () const
 
void publish (PublishContent pubContent, std::vector< std::array< uint8_t, 6 > > &alreadySentMacs) const
 
bool isPublishable (const char *publishTopic) const
 
std::string toString () const
 

Detailed Description

Definition at line 21 of file BrokerTopic.h.

Constructor & Destructor Documentation

◆ BrokerTopic() [1/2]

BrokerTopic::BrokerTopic ( )

Definition at line 19 of file BrokerTopic.cpp.

◆ BrokerTopic() [2/2]

BrokerTopic::BrokerTopic ( Elog * _logger,
const char topic[] )

Definition at line 21 of file BrokerTopic.cpp.

Member Function Documentation

◆ getFilename()

const char * BrokerTopic::getFilename ( ) const

Definition at line 50 of file BrokerTopic.cpp.

◆ getSubscribers()

const std::vector< std::array< uint8_t, 6 > > & BrokerTopic::getSubscribers ( ) const

Definition at line 46 of file BrokerTopic.cpp.

◆ getSubscribersAmount()

int BrokerTopic::getSubscribersAmount ( ) const

Definition at line 42 of file BrokerTopic.cpp.

◆ getSubscribersString()

std::string BrokerTopic::getSubscribersString ( ) const

Definition at line 123 of file BrokerTopic.cpp.

◆ getTopic()

const char * BrokerTopic::getTopic ( ) const

Definition at line 38 of file BrokerTopic.cpp.

◆ isPublishable()

bool BrokerTopic::isPublishable ( const char * publishTopic) const

Definition at line 157 of file BrokerTopic.cpp.

◆ isSubscribed()

bool BrokerTopic::isSubscribed ( const uint8_t * mac) const

Definition at line 115 of file BrokerTopic.cpp.

◆ publish()

void BrokerTopic::publish ( PublishContent pubContent,
std::vector< std::array< uint8_t, 6 > > & alreadySentMacs ) const

Definition at line 134 of file BrokerTopic.cpp.

◆ setFilename()

void BrokerTopic::setFilename ( const char * filename)

Definition at line 54 of file BrokerTopic.cpp.

◆ subscribe() [1/2]

bool BrokerTopic::subscribe ( const std::array< uint8_t, 6 > & mac) const

Definition at line 93 of file BrokerTopic.cpp.

◆ subscribe() [2/2]

bool BrokerTopic::subscribe ( const uint8_t * mac) const

Definition at line 86 of file BrokerTopic.cpp.

◆ toString()

std::string BrokerTopic::toString ( ) const

Definition at line 193 of file BrokerTopic.cpp.

◆ unsubscribe()

bool BrokerTopic::unsubscribe ( const uint8_t * mac)

Definition at line 100 of file BrokerTopic.cpp.


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