Public Types | Public Member Functions | Private Attributes
mm_radio::Subscriber< ID, DataType > Class Template Reference

#include <subscriber.hpp>

List of all members.

Public Types

typedef mm_messages::ByteArray ByteArray
typedef
mm_messages::MessageRegistry 
MessageRegistry

Public Member Functions

void processPacket (const unsigned char *buffer, const unsigned int &size)
 Subscriber (const std::string &name, void(*f)(DataType))
template<typename C >
 Subscriber (const std::string &name, void(C::*f)(DataType), C &c)
virtual ~Subscriber ()

Private Attributes

ecl::UnaryFunction< DataType,
void > * 
function
unsigned int id
std::string name

Detailed Description

template<unsigned int ID, typename DataType>
class mm_radio::Subscriber< ID, DataType >

Definition at line 34 of file subscriber.hpp.


Member Typedef Documentation

template<unsigned int ID, typename DataType>
typedef mm_messages::ByteArray mm_radio::Subscriber< ID, DataType >::ByteArray

Definition at line 37 of file subscriber.hpp.

template<unsigned int ID, typename DataType>
typedef mm_messages::MessageRegistry mm_radio::Subscriber< ID, DataType >::MessageRegistry

Definition at line 36 of file subscriber.hpp.


Constructor & Destructor Documentation

template<unsigned int ID, typename DataType>
mm_radio::Subscriber< ID, DataType >::Subscriber ( const std::string &  name,
void(*)(DataType)  f 
) [inline]

Construct with a callback to a global or static function.

Parameters:
name: name of the demux to connect to
id: command id of the packet to associate with
f: the global/static function.

Definition at line 46 of file subscriber.hpp.

template<unsigned int ID, typename DataType>
template<typename C >
mm_radio::Subscriber< ID, DataType >::Subscriber ( const std::string &  name,
void(C::*)(DataType)  f,
C &  c 
) [inline]

Construct with a callback to a member function.

Parameters:
name: name of the demux to connect to
id: command id of the packet to associate with
f: the member function to load.
c: the instance for the member function's class.
Template Parameters:
C: the member function's class type.

Definition at line 74 of file subscriber.hpp.

template<unsigned int ID, typename DataType>
virtual mm_radio::Subscriber< ID, DataType >::~Subscriber ( ) [inline, virtual]

Definition at line 82 of file subscriber.hpp.


Member Function Documentation

template<unsigned int ID, typename DataType>
void mm_radio::Subscriber< ID, DataType >::processPacket ( const unsigned char *  buffer,
const unsigned int &  size 
) [inline]

Definition at line 87 of file subscriber.hpp.


Member Data Documentation

template<unsigned int ID, typename DataType>
ecl::UnaryFunction<DataType,void>* mm_radio::Subscriber< ID, DataType >::function [private]

Definition at line 95 of file subscriber.hpp.

template<unsigned int ID, typename DataType>
unsigned int mm_radio::Subscriber< ID, DataType >::id [private]

Definition at line 94 of file subscriber.hpp.

template<unsigned int ID, typename DataType>
std::string mm_radio::Subscriber< ID, DataType >::name [private]

Definition at line 93 of file subscriber.hpp.


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


mm_radio
Author(s): Daniel Stonier
autogenerated on Thu Jun 6 2019 21:13:24