Public Types | Public Member Functions | Private Attributes | List of all members
mm_mux_demux::Subscriber< ID, DataType > Class Template Reference

#include <subscriber.hpp>

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_mux_demux::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_mux_demux::Subscriber< ID, DataType >::ByteArray

Definition at line 37 of file subscriber.hpp.

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

Definition at line 36 of file subscriber.hpp.

Constructor & Destructor Documentation

template<unsigned int ID, typename DataType>
mm_mux_demux::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_mux_demux::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_mux_demux::Subscriber< ID, DataType >::~Subscriber ( )
inlinevirtual

Definition at line 82 of file subscriber.hpp.

Member Function Documentation

template<unsigned int ID, typename DataType>
void mm_mux_demux::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_mux_demux::Subscriber< ID, DataType >::function
private

Definition at line 95 of file subscriber.hpp.

template<unsigned int ID, typename DataType>
unsigned int mm_mux_demux::Subscriber< ID, DataType >::id
private

Definition at line 94 of file subscriber.hpp.

template<unsigned int ID, typename DataType>
std::string mm_mux_demux::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_mux_demux
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:52:14