#include <unit_converter.h>
Public Types | |
typedef boost::function < double *(const std::string &) > | get_var_func_type |
Public Member Functions | |
double | evaluate () |
void | reset () |
UnitConverter (const std::string &expression, get_var_func_type var_func) | |
Private Types | |
typedef boost::shared_ptr< double > | variable_ptr |
typedef std::list< variable_ptr > | variable_ptr_list |
Static Private Member Functions | |
static double | avg (const double *vals, int num) |
static double * | createVariable (const char *name, void *userdata) |
static double | deg2rad (double d) |
static double | norm (double val, double min, double max) |
static double | rad2deg (double r) |
static double | smooth (double val, double old_val, double alpha) |
Private Attributes | |
mu::Parser | parser_ |
get_var_func_type | var_func_ |
variable_ptr_list | var_list_ |
Definition at line 13 of file unit_converter.h.
typedef boost::function<double * (const std::string &) > canopen::UnitConverter::get_var_func_type |
Definition at line 15 of file unit_converter.h.
typedef boost::shared_ptr<double> canopen::UnitConverter::variable_ptr [private] |
Definition at line 41 of file unit_converter.h.
typedef std::list<variable_ptr> canopen::UnitConverter::variable_ptr_list [private] |
Definition at line 42 of file unit_converter.h.
canopen::UnitConverter::UnitConverter | ( | const std::string & | expression, |
get_var_func_type | var_func | ||
) | [inline] |
Definition at line 17 of file unit_converter.h.
static double canopen::UnitConverter::avg | ( | const double * | vals, |
int | num | ||
) | [inline, static, private] |
Definition at line 74 of file unit_converter.h.
static double* canopen::UnitConverter::createVariable | ( | const char * | name, |
void * | userdata | ||
) | [inline, static, private] |
Definition at line 44 of file unit_converter.h.
static double canopen::UnitConverter::deg2rad | ( | double | d | ) | [inline, static, private] |
Definition at line 61 of file unit_converter.h.
double canopen::UnitConverter::evaluate | ( | ) | [inline] |
Definition at line 39 of file unit_converter.h.
static double canopen::UnitConverter::norm | ( | double | val, |
double | min, | ||
double | max | ||
) | [inline, static, private] |
Definition at line 64 of file unit_converter.h.
static double canopen::UnitConverter::rad2deg | ( | double | r | ) | [inline, static, private] |
Definition at line 58 of file unit_converter.h.
void canopen::UnitConverter::reset | ( | ) | [inline] |
Definition at line 34 of file unit_converter.h.
static double canopen::UnitConverter::smooth | ( | double | val, |
double | old_val, | ||
double | alpha | ||
) | [inline, static, private] |
Definition at line 69 of file unit_converter.h.
mu::Parser canopen::UnitConverter::parser_ [private] |
Definition at line 56 of file unit_converter.h.
Definition at line 54 of file unit_converter.h.
Definition at line 53 of file unit_converter.h.