#include <demux.hpp>
Public Member Functions | |
MessageDemux (const std::string &name, const std::string &url, const mm_messages::Verbosity::Level &verbosity=mm_messages::Verbosity::QUIET, const bool bind=false) | |
MessageDemux (const MessageDemux &other) | |
template<typename C > | |
void | registerSubscriber (const unsigned int &id, void(C::*processPacket)(const unsigned char *, const unsigned int &), C &s) |
void | shutdown () |
void | spin () |
void | unregisterSubscriber (const unsigned int &id) |
~MessageDemux () | |
Private Types | |
typedef ecl::BinaryFunction < const unsigned char *, const unsigned int &, void > * | BufferCallbackFunction |
typedef std::map< unsigned int, BufferCallbackFunction > | SubscriberMap |
typedef std::map< unsigned int, BufferCallbackFunction > ::const_iterator | SubscriberMapConstIterator |
typedef std::map< unsigned int, BufferCallbackFunction > ::iterator | SubscriberMapIterator |
typedef std::pair< unsigned int, BufferCallbackFunction > | SubscriberMapPair |
typedef std::pair< std::map < unsigned int, BufferCallbackFunction > ::iterator, bool > | SubscriberMapResultPair |
Private Attributes | |
int | endpoint_id |
ecl::Mutex | mutex |
std::string | name |
bool | shutdown_requested |
int | socket |
SubscriberMap | subscribers |
ecl::Thread | thread |
std::string | url |
mm_messages::Verbosity::Level | verbosity |
typedef ecl::BinaryFunction<const unsigned char*,const unsigned int&,void>* mm_mux_demux::impl::MessageDemux::BufferCallbackFunction [private] |
typedef std::map<unsigned int, BufferCallbackFunction> mm_mux_demux::impl::MessageDemux::SubscriberMap [private] |
typedef std::map<unsigned int, BufferCallbackFunction>::const_iterator mm_mux_demux::impl::MessageDemux::SubscriberMapConstIterator [private] |
typedef std::map<unsigned int, BufferCallbackFunction>::iterator mm_mux_demux::impl::MessageDemux::SubscriberMapIterator [private] |
typedef std::pair<unsigned int, BufferCallbackFunction> mm_mux_demux::impl::MessageDemux::SubscriberMapPair [private] |
typedef std::pair<std::map<unsigned int, BufferCallbackFunction>::iterator,bool> mm_mux_demux::impl::MessageDemux::SubscriberMapResultPair [private] |
mm_mux_demux::impl::MessageDemux::MessageDemux | ( | const std::string & | name, |
const std::string & | url, | ||
const mm_messages::Verbosity::Level & | verbosity = mm_messages::Verbosity::QUIET , |
||
const bool | bind = false |
||
) |
mm_mux_demux::impl::MessageDemux::MessageDemux | ( | const MessageDemux & | other | ) |
void mm_mux_demux::impl::MessageDemux::registerSubscriber | ( | const unsigned int & | id, |
void(C::*)(const unsigned char *, const unsigned int &) | processPacket, | ||
C & | s | ||
) | [inline] |
void mm_mux_demux::impl::MessageDemux::unregisterSubscriber | ( | const unsigned int & | id | ) |
int mm_mux_demux::impl::MessageDemux::endpoint_id [private] |
ecl::Mutex mm_mux_demux::impl::MessageDemux::mutex [private] |
std::string mm_mux_demux::impl::MessageDemux::name [private] |
bool mm_mux_demux::impl::MessageDemux::shutdown_requested [private] |
int mm_mux_demux::impl::MessageDemux::socket [private] |
ecl::Thread mm_mux_demux::impl::MessageDemux::thread [private] |
std::string mm_mux_demux::impl::MessageDemux::url [private] |