#include <demux.hpp>
Public Types | |
typedef std::map< std::string, std::shared_ptr < impl::MessageDemux > > | DemuxMap |
typedef std::map< std::string, std::shared_ptr < impl::MessageDemux > >::const_iterator | DemuxMapConstIterator |
typedef std::map< std::string, std::shared_ptr < impl::MessageDemux > >::iterator | DemuxMapIterator |
typedef std::pair< std::string, std::shared_ptr < impl::MessageDemux > > | DemuxMapPair |
Static Public Member Functions | |
static DemuxMap & | demultiplexers () |
Store demux's in an invisible storage location. | |
template<typename C > | |
static void | registerSubscriber (const std::string &name, const unsigned int &id, void(C::*processPacket)(const unsigned char *, const unsigned int &), C &s) |
Register a callback with the specified demux. | |
static void | shutdown () |
static void | shutdown (const std::string &name) |
static void | start (const std::string &name, const std::string &url, const mm_messages::Verbosity::Level &verbosity=mm_messages::Verbosity::QUIET, const bool bind=false) |
static void | unregisterSubscriber (const std::string &name, const unsigned int &id) |
typedef std::map<std::string, std::shared_ptr<impl::MessageDemux> > mm_mux_demux::MessageDemux::DemuxMap |
typedef std::map<std::string, std::shared_ptr<impl::MessageDemux> >::const_iterator mm_mux_demux::MessageDemux::DemuxMapConstIterator |
typedef std::map<std::string, std::shared_ptr<impl::MessageDemux> >::iterator mm_mux_demux::MessageDemux::DemuxMapIterator |
typedef std::pair<std::string, std::shared_ptr<impl::MessageDemux> > mm_mux_demux::MessageDemux::DemuxMapPair |
MessageDemux::DemuxMap & mm_mux_demux::MessageDemux::demultiplexers | ( | ) | [static] |
static void mm_mux_demux::MessageDemux::registerSubscriber | ( | const std::string & | name, |
const unsigned int & | id, | ||
void(C::*)(const unsigned char *, const unsigned int &) | processPacket, | ||
C & | s | ||
) | [inline, static] |
Register a callback with the specified demux.
Basically we just need a function that can handle const unsigned char* buffers.
Could make this more specific and specify 'template<typename DataType>' with 'Subscriber<DataType>' instead of 'C', but this keeps it open for creating new subscriber types.
name | |
id | |
processPacket | |
s |
void mm_mux_demux::MessageDemux::shutdown | ( | ) | [static] |
void mm_mux_demux::MessageDemux::shutdown | ( | const std::string & | name | ) | [static] |
void mm_mux_demux::MessageDemux::start | ( | const std::string & | name, |
const std::string & | url, | ||
const mm_messages::Verbosity::Level & | verbosity = mm_messages::Verbosity::QUIET , |
||
const bool | bind = false |
||
) | [static] |
void mm_mux_demux::MessageDemux::unregisterSubscriber | ( | const std::string & | name, |
const unsigned int & | id | ||
) | [static] |