00001 /* 00002 * burst_checker.h 00003 * Copyright 2013 University of Massachusetts Lowell 00004 * Author: Jonathan Hasenzahl 00005 */ 00006 00007 #ifndef BURST_CHECKER_H_ 00008 #define BURST_CHECKER_H_ 00009 00010 #include "neuro_recv/dish_state.h" 00011 #include "burst_calc/burst.h" 00012 00022 class BurstChecker 00023 { 00024 public: 00025 BurstChecker(); 00026 void init(int index, double baseline, double threshold, int burst_window); 00027 void update(const neuro_recv::dish_state& d); 00028 void reset(); 00029 const ros::Time* getTimePtr(); 00030 00031 const burst_calc::burst& getBurst() { return burst_; } 00032 bool isBursting() { return is_bursting_; } 00033 bool endOfBurst() { return end_of_burst_; } 00034 00035 private: 00036 burst_calc::burst burst_; 00037 int index_; 00038 double baseline_; 00039 double threshold_; 00040 int frame_count_; 00041 int spike_count_; 00042 bool is_bursting_; 00043 bool is_possible_burst_; 00044 bool end_of_burst_; 00045 int burst_window_; 00046 }; 00047 00048 #endif