#include <callback.h>
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... | |
T | 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... | |
Definition at line 68 of file callback.h.
typedef boost::function<void(const T&)> ublox_gps::CallbackHandler_< T >::Callback |
A callback function.
Definition at line 70 of file callback.h.
|
inline |
Initialize the Callback Handler with a callback function.
func | a callback function for the message, defaults to none |
Definition at line 76 of file callback.h.
|
inlinevirtual |
Get the last received message.
Definition at line 81 of file callback.h.
|
inlinevirtual |
Decode the U-Blox message & call the callback function if it exists.
reader | a reader to decode the message buffer |
Implements ublox_gps::CallbackHandler.
Definition at line 87 of file callback.h.
|
private |
the callback function to handle the message
Definition at line 114 of file callback.h.
|
private |
The last received message.
Definition at line 115 of file callback.h.