#include <radio.hpp>
Public Types | |
enum | Errors { NotAvailable = -1 } |
typedef std::map< std::string, std::shared_ptr< impl::Radio > > | RadioMap |
typedef std::map< std::string, std::shared_ptr< impl::Radio > >::const_iterator | RadioMapConstIterator |
typedef std::map< std::string, std::shared_ptr< impl::Radio > >::iterator | RadioMapIterator |
typedef std::pair< std::string, std::shared_ptr< impl::Radio > > | RadioMapPair |
Static Public Member Functions | |
static RadioMap & | radios () |
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 int | send (const std::string &name, const unsigned int &id, const mm_messages::ByteArray &msg_buffer) |
static void | shutdown () |
static void | shutdown (const std::string &name) |
static void | startClient (const std::string &name, const std::string &url, const mm_messages::Verbosity::Level &verbosity=mm_messages::Verbosity::QUIET) |
Pre-establish named connections for a client. | |
static void | startServer (const std::string &name, const std::string &url, const mm_messages::Verbosity::Level &verbosity=mm_messages::Verbosity::QUIET) |
Pre-establish named connections for a server. | |
static void | unregisterSubscriber (const std::string &name, const unsigned int &id) |
typedef std::map<std::string, std::shared_ptr<impl::Radio> > mm_radio::Radio::RadioMap |
typedef std::map<std::string, std::shared_ptr<impl::Radio> >::const_iterator mm_radio::Radio::RadioMapConstIterator |
typedef std::map<std::string, std::shared_ptr<impl::Radio> >::iterator mm_radio::Radio::RadioMapIterator |
typedef std::pair<std::string, std::shared_ptr<impl::Radio> > mm_radio::Radio::RadioMapPair |
Radio::RadioMap & mm_radio::Radio::radios | ( | ) | [static] |
Definition at line 253 of file lib/radio.cpp.
static void mm_radio::Radio::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 |
int mm_radio::Radio::send | ( | const std::string & | name, |
const unsigned int & | id, | ||
const mm_messages::ByteArray & | msg_buffer | ||
) | [static] |
Definition at line 258 of file lib/radio.cpp.
void mm_radio::Radio::shutdown | ( | ) | [static] |
Definition at line 273 of file lib/radio.cpp.
void mm_radio::Radio::shutdown | ( | const std::string & | name | ) | [static] |
Definition at line 269 of file lib/radio.cpp.
void mm_radio::Radio::startClient | ( | const std::string & | name, |
const std::string & | url, | ||
const mm_messages::Verbosity::Level & | verbosity = mm_messages::Verbosity::QUIET |
||
) | [static] |
Pre-establish named connections for a client.
name | |
url |
Definition at line 234 of file lib/radio.cpp.
void mm_radio::Radio::startServer | ( | const std::string & | name, |
const std::string & | url, | ||
const mm_messages::Verbosity::Level & | verbosity = mm_messages::Verbosity::QUIET |
||
) | [static] |
Pre-establish named connections for a server.
name | |
url |
Definition at line 212 of file lib/radio.cpp.
void mm_radio::Radio::unregisterSubscriber | ( | const std::string & | name, |
const unsigned int & | id | ||
) | [static] |
Definition at line 277 of file lib/radio.cpp.