burst_merger.h
Go to the documentation of this file.
00001 /*
00002  * burst_merger.h
00003  * Copyright 2013 University of Massachusetts Lowell
00004  * Author: Jonathan Hasenzahl
00005  */
00006 
00007 #ifndef BURST_MERGER_H_
00008 #define BURST_MERGER_H_
00009 
00010 #include "ros/ros.h"
00011 #include "neuro_recv/dish_state.h"
00012 #include "burst_calc/burst.h"
00013 #include <vector>
00014 
00024 class BurstMerger
00025 {
00026 public:
00027     BurstMerger();
00028     ~BurstMerger();
00029     void update();
00030     void updateTime(int index, const ros::Time* t);
00031 
00032     void add(const burst_calc::burst& b) { list_.push_back(b); }
00033     bool canPublish() { return !final_.empty(); }
00034     const burst_calc::burst& getBurst() { return final_[0]; };
00035     void deletePublished() { final_.erase(final_.begin()); }
00036 
00037 private:
00038     burst_calc::burst merge(const burst_calc::burst& b1,
00039                             const burst_calc::burst& b2);
00040 
00041     std::vector<burst_calc::burst> final_;
00042     std::vector<burst_calc::burst> list_;
00043     boost::array<ros::Time*, 60> times_;
00044 };
00045 
00046 #endif


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