Public Types | Static Public Member Functions | List of all members
mm_radio::Radio Class Reference

#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 RadioMapradios ()
 
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. More...
 
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. More...
 
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. More...
 
static void unregisterSubscriber (const std::string &name, const unsigned int &id)
 

Detailed Description

Definition at line 105 of file radio.hpp.

Member Typedef Documentation

typedef std::map<std::string, std::shared_ptr<impl::Radio> > mm_radio::Radio::RadioMap

Definition at line 107 of file radio.hpp.

typedef std::map<std::string, std::shared_ptr<impl::Radio> >::const_iterator mm_radio::Radio::RadioMapConstIterator

Definition at line 110 of file radio.hpp.

typedef std::map<std::string, std::shared_ptr<impl::Radio> >::iterator mm_radio::Radio::RadioMapIterator

Definition at line 109 of file radio.hpp.

typedef std::pair<std::string, std::shared_ptr<impl::Radio> > mm_radio::Radio::RadioMapPair

Definition at line 108 of file radio.hpp.

Member Enumeration Documentation

Enumerator
NotAvailable 

Definition at line 112 of file radio.hpp.

Member Function Documentation

Radio::RadioMap & mm_radio::Radio::radios ( )
static

Definition at line 253 of file lib/radio.cpp.

template<typename C >
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 
)
inlinestatic

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.

Parameters
name
id
processPacket
s

Definition at line 153 of file radio.hpp.

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.

Parameters
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.

Parameters
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.


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


mm_radio
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:52:16