Public Types | Public Member Functions | Private Attributes | List of all members
ublox_gps::CallbackHandler_< T > Class Template Reference

#include <callback.h>

Inheritance diagram for ublox_gps::CallbackHandler_< T >:
Inheritance graph
[legend]

Public Types

typedef boost::function< void(const T &)> Callback
 A callback function. More...
 

Public Member Functions

 CallbackHandler_ (const Callback &func=Callback())
 Initialize the Callback Handler with a callback function. More...
 
virtual const T & get ()
 Get the last received message. More...
 
void handle (ublox::Reader &reader)
 Decode the U-Blox message & call the callback function if it exists. More...
 
- Public Member Functions inherited from ublox_gps::CallbackHandler
bool wait (const boost::posix_time::time_duration &timeout)
 Wait for on the condition. More...
 

Private Attributes

Callback func_
 the callback function to handle the message More...
 
message_
 The last received message. More...
 

Additional Inherited Members

- Protected Attributes inherited from ublox_gps::CallbackHandler
boost::condition_variable condition_
 Condition for the handler lock. More...
 
boost::mutex mutex_
 Lock for the handler. More...
 

Detailed Description

template<typename T>
class ublox_gps::CallbackHandler_< T >

Definition at line 68 of file callback.h.

Member Typedef Documentation

template<typename T>
typedef boost::function<void(const T&)> ublox_gps::CallbackHandler_< T >::Callback

A callback function.

Definition at line 70 of file callback.h.

Constructor & Destructor Documentation

template<typename T>
ublox_gps::CallbackHandler_< T >::CallbackHandler_ ( const Callback func = Callback())
inline

Initialize the Callback Handler with a callback function.

Parameters
funca callback function for the message, defaults to none

Definition at line 76 of file callback.h.

Member Function Documentation

template<typename T>
virtual const T& ublox_gps::CallbackHandler_< T >::get ( )
inlinevirtual

Get the last received message.

Definition at line 81 of file callback.h.

template<typename T>
void ublox_gps::CallbackHandler_< T >::handle ( ublox::Reader reader)
inlinevirtual

Decode the U-Blox message & call the callback function if it exists.

Parameters
readera reader to decode the message buffer

Implements ublox_gps::CallbackHandler.

Definition at line 87 of file callback.h.

Member Data Documentation

template<typename T>
Callback ublox_gps::CallbackHandler_< T >::func_
private

the callback function to handle the message

Definition at line 114 of file callback.h.

template<typename T>
T ublox_gps::CallbackHandler_< T >::message_
private

The last received message.

Definition at line 115 of file callback.h.


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


ublox_gps
Author(s): Johannes Meyer
autogenerated on Thu Jan 28 2021 03:13:52