Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
DishVisualizer Class Reference

Helper class for the dish_viz node. More...

#include <DishVisualizer.h>

List of all members.

Public Member Functions

 DishVisualizer ()
double getMaxVolt (int index)
double getMinVolt (int index)
int init (int mode)
 Initializes the visualizer.
void redraw ()
 Redraws the visualizer screen.
void setMaxVolt (int index, double volt)
void setMinVolt (int index, double volt)
void setVoltRanges (const boost::array< double, 60 > &b, const boost::array< double, 60 > &t, const boost::array< double, 60 > &min, const boost::array< double, 60 > &max)
 Sets the ranges for each channel (used for determining colors)
void update (int channel, double newValue)
 Updates the visualizer with new voltage data for a channel.
void updateCa (const burst_calc::ca &c)
 Updates the center of activity to be displayed.
virtual ~DishVisualizer ()

Public Attributes

bool isInit

Private Member Functions

int intMap (double input, double min_in, double max_in, int min_out, int max_out)
 Generates color values based on input data.

Private Attributes

double baselines [60]
burst_calc::ca ca
vector< vector< int > > centers
int color_mode
vector< double > data
boost::mutex dataUpdate
double max_volts [60]
double min_volts [60]
bool plot_ca
XPlotter * plotter
double thresholds [60]

Detailed Description

Helper class for the dish_viz node.

Creates a visualizer on screen so the user can see the spiking activity which is causing ARM movement.

Author:
Abraham Shultz
Jonathan Hasenzahl

Definition at line 36 of file DishVisualizer.h.


Constructor & Destructor Documentation

Definition at line 19 of file DishVisualizer.cpp.

Definition at line 32 of file DishVisualizer.cpp.


Member Function Documentation

double DishVisualizer::getMaxVolt ( int  index) [inline]

Definition at line 65 of file DishVisualizer.h.

double DishVisualizer::getMinVolt ( int  index) [inline]

Definition at line 64 of file DishVisualizer.h.

int DishVisualizer::init ( int  mode)

Initializes the visualizer.

Parameters:
modethe color mode to use
Returns:
0

Definition at line 41 of file DishVisualizer.cpp.

int DishVisualizer::intMap ( double  input,
double  min_in,
double  max_in,
int  min_out,
int  max_out 
) [private]

Generates color values based on input data.

Parameters:
inputthe input voltage
min_inthe minimum input voltage
max_inthe maximum input voltage
min_outthe minimum generated value
max_outthe maximum generated value
Returns:
the generated color value

Definition at line 127 of file DishVisualizer.cpp.

Redraws the visualizer screen.

Definition at line 146 of file DishVisualizer.cpp.

void DishVisualizer::setMaxVolt ( int  index,
double  volt 
) [inline]

Definition at line 67 of file DishVisualizer.h.

void DishVisualizer::setMinVolt ( int  index,
double  volt 
) [inline]

Definition at line 66 of file DishVisualizer.h.

void DishVisualizer::setVoltRanges ( const boost::array< double, 60 > &  b,
const boost::array< double, 60 > &  t,
const boost::array< double, 60 > &  min,
const boost::array< double, 60 > &  max 
)

Sets the ranges for each channel (used for determining colors)

Parameters:
bbaselines for each channel
tthresholds for each channel
minminimum voltages for each channel
maxmaximum voltages for each channel

Definition at line 280 of file DishVisualizer.cpp.

void DishVisualizer::update ( int  channel,
double  newValue 
)

Updates the visualizer with new voltage data for a channel.

Parameters:
channelthe channel being updated
newValuethe new value for the channel

Definition at line 247 of file DishVisualizer.cpp.

void DishVisualizer::updateCa ( const burst_calc::ca &  c)

Updates the center of activity to be displayed.

Parameters:
cthe CA to be displayed

Definition at line 261 of file DishVisualizer.cpp.


Member Data Documentation

double DishVisualizer::baselines[60] [private]

Definition at line 45 of file DishVisualizer.h.

burst_calc::ca DishVisualizer::ca [private]

Definition at line 41 of file DishVisualizer.h.

vector< vector<int> > DishVisualizer::centers [private]

Definition at line 39 of file DishVisualizer.h.

Definition at line 49 of file DishVisualizer.h.

vector<double> DishVisualizer::data [private]

Definition at line 40 of file DishVisualizer.h.

boost::mutex DishVisualizer::dataUpdate [private]

Definition at line 44 of file DishVisualizer.h.

Definition at line 55 of file DishVisualizer.h.

double DishVisualizer::max_volts[60] [private]

Definition at line 48 of file DishVisualizer.h.

double DishVisualizer::min_volts[60] [private]

Definition at line 47 of file DishVisualizer.h.

bool DishVisualizer::plot_ca [private]

Definition at line 42 of file DishVisualizer.h.

XPlotter* DishVisualizer::plotter [private]

Definition at line 38 of file DishVisualizer.h.

double DishVisualizer::thresholds[60] [private]

Definition at line 46 of file DishVisualizer.h.


The documentation for this class was generated from the following files:


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