Fawkes API  Fawkes Development Version
min_merge.h
1 
2 /***************************************************************************
3  * min_merge.h - Laser min merge data filter
4  *
5  * Created: Wed Mar 16 21:45:27 2011
6  * Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef __PLUGINS_LASER_FILTER_FILTERS_MIN_MERGE_H_
24 #define __PLUGINS_LASER_FILTER_FILTERS_MIN_MERGE_H_
25 
26 #include "filter.h"
27 
28 #include <vector>
29 
30 namespace fawkes {
31  class Logger;
32 }
33 
35 {
36  public:
37  /// Timestamp selection method
38  typedef enum {
39  TIMESTAMP_LATEST, ///< use the latest of all timestamps
40  TIMESTAMP_FIRST, ///< use the first (oldest) of all timestamps
41  TIMESTAMP_INDEX ///< use a specific index in the input buffer list
43 
44  LaserMinMergeDataFilter(const std::string filter_name,
45  fawkes::Logger *logger,
46  unsigned int in_data_size,
47  std::vector<LaserDataFilter::Buffer *> &in);
48  LaserMinMergeDataFilter(const std::string filter_name,
49  fawkes::Logger *logger,
50  unsigned int in_data_size,
51  std::vector<LaserDataFilter::Buffer *> &in,
52  TimestampSelectionMethod timestamp_selection_method,
53  unsigned int timestamp_index = 0);
54 
55  virtual void filter();
56 
57  private:
58  fawkes::Logger *logger;
59 
60  TimestampSelectionMethod timestamp_selection_method_;
61  unsigned int timestamp_index_;
62 
63  std::vector<bool> ignored_;
64 };
65 
66 #endif
use the latest of all timestamps
Definition: min_merge.h:39
Fawkes library namespace.
TimestampSelectionMethod
Timestamp selection method.
Definition: min_merge.h:38
use the first (oldest) of all timestamps
Definition: min_merge.h:40
Merge multiple laser data arrays into one.
Definition: min_merge.h:34
Laser data filter.
Definition: filter.h:32
Interface for logging.
Definition: logger.h:34