Public Member Functions | Private Types | Private Attributes | List of all members
ublox_gps::CallbackHandlers Class Reference

Callback handlers for incoming u-blox messages. More...

#include <callback.h>

Public Member Functions

void handle (ublox::Reader &reader)
 Calls the callback handler for the message in the reader. More...
 
template<typename T >
void insert (typename CallbackHandler_< T >::Callback callback)
 
template<typename T >
void insert (typename CallbackHandler_< T >::Callback callback, unsigned int message_id)
 
template<typename T >
bool read (T &message, const boost::posix_time::time_duration &timeout)
 Read a u-blox message of the given type. More...
 
void readCallback (unsigned char *data, std::size_t &size)
 Processes u-blox messages in the given buffer & clears the read messages from the buffer. More...
 

Private Types

typedef std::multimap< std::pair< uint8_t, uint8_t >, boost::shared_ptr< CallbackHandler > > Callbacks
 

Private Attributes

boost::mutex callback_mutex_
 
Callbacks callbacks_
 

Detailed Description

Callback handlers for incoming u-blox messages.

Definition at line 121 of file callback.h.

Member Typedef Documentation

typedef std::multimap<std::pair<uint8_t, uint8_t>, boost::shared_ptr<CallbackHandler> > ublox_gps::CallbackHandlers::Callbacks
private

Definition at line 229 of file callback.h.

Member Function Documentation

void ublox_gps::CallbackHandlers::handle ( ublox::Reader reader)
inline

Calls the callback handler for the message in the reader.

Parameters
readera reader containing a u-blox message

Definition at line 160 of file callback.h.

template<typename T >
void ublox_gps::CallbackHandlers::insert ( typename CallbackHandler_< T >::Callback  callback)
inline

Definition at line 129 of file callback.h.

template<typename T >
void ublox_gps::CallbackHandlers::insert ( typename CallbackHandler_< T >::Callback  callback,
unsigned int  message_id 
)
inline

Definition at line 146 of file callback.h.

template<typename T >
bool ublox_gps::CallbackHandlers::read ( T &  message,
const boost::posix_time::time_duration &  timeout 
)
inline

Read a u-blox message of the given type.

Parameters
messagethe received u-blox message
timeoutthe amount of time to wait for the desired message

Definition at line 176 of file callback.h.

void ublox_gps::CallbackHandlers::readCallback ( unsigned char *  data,
std::size_t &  size 
)
inline

Processes u-blox messages in the given buffer & clears the read messages from the buffer.

Parameters
datathe buffer of u-blox messages to process
sizethe size of the buffer

Definition at line 205 of file callback.h.

Member Data Documentation

boost::mutex ublox_gps::CallbackHandlers::callback_mutex_
private

Definition at line 233 of file callback.h.

Callbacks ublox_gps::CallbackHandlers::callbacks_
private

Definition at line 232 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