#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 |
Definition at line 34 of file subscriber.hpp.
typedef mm_messages::ByteArray mm_radio::Subscriber< ID, DataType >::ByteArray |
Definition at line 37 of file subscriber.hpp.
typedef mm_messages::MessageRegistry mm_radio::Subscriber< ID, DataType >::MessageRegistry |
Definition at line 36 of file subscriber.hpp.
mm_radio::Subscriber< ID, DataType >::Subscriber | ( | const std::string & | name, |
void(*)(DataType) | f | ||
) | [inline] |
Construct with a callback to a global or static function.
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.
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.
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. |
C | : the member function's class type. |
Definition at line 74 of file subscriber.hpp.
virtual mm_radio::Subscriber< ID, DataType >::~Subscriber | ( | ) | [inline, virtual] |
Definition at line 82 of file subscriber.hpp.
void mm_radio::Subscriber< ID, DataType >::processPacket | ( | const unsigned char * | buffer, |
const unsigned int & | size | ||
) | [inline] |
Definition at line 87 of file subscriber.hpp.
ecl::UnaryFunction<DataType,void>* mm_radio::Subscriber< ID, DataType >::function [private] |
Definition at line 95 of file subscriber.hpp.
unsigned int mm_radio::Subscriber< ID, DataType >::id [private] |
Definition at line 94 of file subscriber.hpp.
std::string mm_radio::Subscriber< ID, DataType >::name [private] |
Definition at line 93 of file subscriber.hpp.