Public Member Functions | Private Member Functions | Private Attributes
BurstMerger Class Reference

Helper class for the burst_creator node. More...

#include <burst_merger.h>

List of all members.

Public Member Functions

void add (const burst_calc::burst &b)
 BurstMerger ()
 Sets values to their initial states.
bool canPublish ()
void deletePublished ()
const burst_calc::burst & getBurst ()
void update ()
 Performs the merge operation after new bursts have been added.
void updateTime (int index, const ros::Time *t)
 Updates the burst checker time pointer for a channel.
 ~BurstMerger ()
 Frees up memory allocated to burst checker time pointers.

Private Member Functions

burst_calc::burst merge (const burst_calc::burst &b1, const burst_calc::burst &b2)
 Merges two bursts into a single burst.

Private Attributes

std::vector< burst_calc::burst > final_
std::vector< burst_calc::burst > list_
boost::array< ros::Time *, 60 > times_

Detailed Description

Helper class for the burst_creator node.

Checks for overlapping bursts from each channel. If there are overlapping bursts, they will be merged so duplicates are eliminated.

Author:
Jonathan Hasenzahl

Definition at line 24 of file burst_merger.h.


Constructor & Destructor Documentation

Sets values to their initial states.

Definition at line 13 of file burst_merger.cpp.

Frees up memory allocated to burst checker time pointers.

Definition at line 22 of file burst_merger.cpp.


Member Function Documentation

void BurstMerger::add ( const burst_calc::burst &  b) [inline]

Definition at line 32 of file burst_merger.h.

bool BurstMerger::canPublish ( ) [inline]

Definition at line 33 of file burst_merger.h.

void BurstMerger::deletePublished ( ) [inline]

Definition at line 35 of file burst_merger.h.

const burst_calc::burst& BurstMerger::getBurst ( ) [inline]

Definition at line 34 of file burst_merger.h.

burst_calc::burst BurstMerger::merge ( const burst_calc::burst &  b1,
const burst_calc::burst &  b2 
) [private]

Merges two bursts into a single burst.

Pre-condition: the time span of the bursts must overlap in some way.

Parameters:
b1one of the bursts to be merged
b2the other burst to be merged
Returns:
the merged burst

Definition at line 165 of file burst_merger.cpp.

Performs the merge operation after new bursts have been added.

First, check all stored bursts and merge any that can be. Then compare all stored bursts against the times to determine if any of them can be published.

Definition at line 37 of file burst_merger.cpp.

void BurstMerger::updateTime ( int  index,
const ros::Time *  t 
)

Updates the burst checker time pointer for a channel.

The pointer either points to the start time of that channel's possible burst, or is null if there is no possible burst.

Parameters:
indexthe index of the channel
tthe time pointer of the channel's burst checker

Definition at line 142 of file burst_merger.cpp.


Member Data Documentation

std::vector<burst_calc::burst> BurstMerger::final_ [private]

Definition at line 41 of file burst_merger.h.

std::vector<burst_calc::burst> BurstMerger::list_ [private]

Definition at line 42 of file burst_merger.h.

boost::array<ros::Time*, 60> BurstMerger::times_ [private]

Definition at line 43 of file burst_merger.h.


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


burst_calc
Author(s): Jonathan Hasenzahl
autogenerated on Sun Jan 5 2014 11:12:30