volt_distr_viz.h
Go to the documentation of this file.
00001 /*
00002  * volt_distr_viz.h
00003  * Copyright 2013 University of Massachusetts Lowell
00004  * Author: Jonathan Hasenzahl
00005  */
00006 
00007 // =============================================================================
00008 // Name   : volt_distr_viz.h
00009 // Author : Jonathan Hasenzahl
00010 // Date   : 2012
00011 //
00012 // Voltage distribution visualizer class for the ROS node "volt_distr". Creates
00013 // an SVG image showing voltage tendencies of each channel.
00014 // =============================================================================
00015 
00016 #ifndef VOLT_DISTR_VIZ_H_
00017 #define VOLT_DISTR_VIZ_H_
00018 
00019 #include "ros/ros.h"
00020 #include <plotter.h>
00021 #include <fstream>
00022 #include <sstream>
00023 #include <string>
00024 #include <vector>
00025 
00035 class VoltDistrViz
00036 {
00037 public:
00041     VoltDistrViz(const std::string& file_name) { init(file_name); }
00042     ~VoltDistrViz();
00043 
00044     void draw(const boost::array<double, 60>& percents);
00045 
00046 private:
00047     void init(const std::string& file_name);
00048 
00049     SVGPlotter* plotter_;
00050     std::ofstream file_;
00051     std::vector< boost::array<int, 4> > coords_;
00052 
00053     bool is_ok_;
00054 };
00055 
00056 #endif


volt_distr
Author(s): Jonathan Hasenzahl
autogenerated on Sun Jan 5 2014 11:12:31