Public Member Functions | Private Types | Private Attributes
mm_mux_demux::impl::MessageDemux Class Reference

#include <demux.hpp>

List of all members.

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

Detailed Description

Definition at line 36 of file demux.hpp.


Member Typedef Documentation

typedef ecl::BinaryFunction<const unsigned char*,const unsigned int&,void>* mm_mux_demux::impl::MessageDemux::BufferCallbackFunction [private]

Definition at line 67 of file demux.hpp.

Definition at line 68 of file demux.hpp.

typedef std::map<unsigned int, BufferCallbackFunction>::const_iterator mm_mux_demux::impl::MessageDemux::SubscriberMapConstIterator [private]

Definition at line 70 of file demux.hpp.

typedef std::map<unsigned int, BufferCallbackFunction>::iterator mm_mux_demux::impl::MessageDemux::SubscriberMapIterator [private]

Definition at line 69 of file demux.hpp.

Definition at line 71 of file demux.hpp.

typedef std::pair<std::map<unsigned int, BufferCallbackFunction>::iterator,bool> mm_mux_demux::impl::MessageDemux::SubscriberMapResultPair [private]

Definition at line 72 of file demux.hpp.


Constructor & Destructor Documentation

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 
)

Definition at line 28 of file demux.cpp.

Definition at line 73 of file demux.cpp.

Definition at line 83 of file demux.cpp.


Member Function Documentation

template<typename C >
void mm_mux_demux::impl::MessageDemux::registerSubscriber ( const unsigned int &  id,
void(C::*)(const unsigned char *, const unsigned int &)  processPacket,
C &  s 
) [inline]

Definition at line 49 of file demux.hpp.

Shutdown the socket. This currently doesn't shutdown the thread as nn_recv will block indefinitely. Even after nn_shutdown is called, it will hang around.

Definition at line 140 of file demux.cpp.

Definition at line 99 of file demux.cpp.

void mm_mux_demux::impl::MessageDemux::unregisterSubscriber ( const unsigned int &  id)

Definition at line 150 of file demux.cpp.


Member Data Documentation

Definition at line 77 of file demux.hpp.

Definition at line 83 of file demux.hpp.

Definition at line 74 of file demux.hpp.

Definition at line 79 of file demux.hpp.

Definition at line 76 of file demux.hpp.

Definition at line 82 of file demux.hpp.

Definition at line 80 of file demux.hpp.

Definition at line 75 of file demux.hpp.

Definition at line 78 of file demux.hpp.


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


mm_mux_demux
Author(s): Daniel Stonier
autogenerated on Thu Jun 6 2019 21:13:22