DishVisualizer.h
Go to the documentation of this file.
00001 /*
00002  * DishVisualizer.h
00003  * Copyright 2013 University of Massachusetts Lowell
00004  * Authors: Abraham Shultz, Jonathan Hasenzahl
00005  */
00006 
00007 #ifndef _DISH_VISUALIZER_H
00008 #define _DISH_VISUALIZER_H
00009 
00010 #include <plotter.h>
00011 #include <sstream>
00012 #include <vector>
00013 #include <stdint.h>
00014 #include "ros/ros.h"
00015 #include "burst_calc/ca.h"
00016 #include "boost/thread.hpp"
00017 #include "boost/range.hpp"
00018 
00019 #define RED_BLUE_SEPARATED 0
00020 #define RED_BLUE_MIX 1
00021 #define RED_GREEN_BLUE 2
00022 #define BLUE_ONLY 3
00023 
00024 #define MAX_COLOR 65535
00025 
00036 class DishVisualizer {
00037 private:
00038         XPlotter *plotter;
00039         vector< vector<int> > centers;
00040         vector<double> data;
00041         burst_calc::ca ca;
00042         bool plot_ca;
00043         int intMap(double input, double min_in, double max_in, int min_out, int max_out);
00044         boost::mutex dataUpdate;
00045         double baselines[60];
00046         double thresholds[60];
00047         double min_volts[60];
00048         double max_volts[60];
00049         int color_mode;
00050 
00051 public:
00052         DishVisualizer();
00053         virtual ~DishVisualizer();
00054         int init(int mode);
00055         bool isInit;
00056         void update(int channel, double newValue);
00057         void updateCa(const burst_calc::ca& c);
00058         void redraw();
00059         void setVoltRanges(const boost::array<double, 60>& b,
00060                            const boost::array<double, 60>& t,
00061                            const boost::array<double, 60>& min,
00062                            const boost::array<double, 60>& max);
00063 
00064         double getMinVolt(int index) { return min_volts[index]; }
00065         double getMaxVolt(int index) { return max_volts[index]; }
00066         void setMinVolt(int index, double volt) { min_volts[index] = volt; }
00067         void setMaxVolt(int index, double volt) { max_volts[index] = volt; }
00068 };
00069 
00070 #endif /* _DISH_VISUALIZER_H */


dish_viz
Author(s): Abraham Shultz
autogenerated on Sun Jan 5 2014 11:12:31