DUNE: Uniform Navigational Environment  2017.01.0
DUNE::Monitors::MotorCurrentMonitor< Tc, Tr > Class Template Reference

Classes

class  Error
 

Public Member Functions

 MotorCurrentMonitor (const std::vector< Tc > &lin_points, const Tc threshold, const double detection_delay, const unsigned average_samples)
 
 ~MotorCurrentMonitor (void)
 
Tc updateAndTest (const Tc &curr_value, const Tr &rpm_value)
 

Constructor & Destructor Documentation

template<typename Tc , typename Tr >
DUNE::Monitors::MotorCurrentMonitor< Tc, Tr >::MotorCurrentMonitor ( const std::vector< Tc > &  lin_points,
const Tc  threshold,
const double  detection_delay,
const unsigned  average_samples 
)
inline

Constructor (assumes current and rpm values are of the same type)

Parameters
lin_pointspoints of the motor model to be used in piecewise linear function
thresholdcurrent error value above which a detection will trigger
detection_delaydelay in seconds before a detection is triggered
average_samplesnumber of samples to use in the delayed trigger
template<typename Tc , typename Tr >
DUNE::Monitors::MotorCurrentMonitor< Tc, Tr >::~MotorCurrentMonitor ( void  )
inline

Destructor.

References DUNE::Memory::clear().

Member Function Documentation

template<typename Tc , typename Tr >
Tc DUNE::Monitors::MotorCurrentMonitor< Tc, Tr >::updateAndTest ( const Tc &  curr_value,
const Tr &  rpm_value 
)
inline

Update function.

Parameters
curr_valuenew current measurement
rpm_valuenew rpm measurement
Returns
will be -1.0 if no detection triggers and the threshold value otherwise

References DUNE::Monitors::DelayedTrigger< T >::updateAndTest().

Collaboration diagram for DUNE::Monitors::MotorCurrentMonitor< Tc, Tr >:
Collaboration graph