DUNE: Uniform Navigational Environment  2019.02.1
Autonomy::OnEvent::Sampler Class Reference

Detailed Description

Data sampler for on event behavior launcher.

Public Types

Public Member Functions

 Sampler (void)
 
 Sampler (double pos_thresh, unsigned pos_samples, double neg_thresh, unsigned neg_samples)
 
SamplerState insert (double sample)
 
void reset (void)
 

Member Enumeration Documentation

Sampler state.

Enumerator
ST_NOT_DETECTED 
ST_RE_POSITIVE 
ST_POSITIVE 
ST_DETECTED 
ST_FE_NEGATIVE 
ST_NEGATIVE 

Constructor & Destructor Documentation

Autonomy::OnEvent::Sampler::Sampler ( void  )
inline

Constructor.

References ST_NOT_DETECTED.

Autonomy::OnEvent::Sampler::Sampler ( double  pos_thresh,
unsigned  pos_samples,
double  neg_thresh,
unsigned  neg_samples 
)
inline

Constructor with different parameters.

Parameters
[in]pos_threshpositive threshold for detection.
[in]pos_samplesminimum number of positive samples.
[in]neg_threshnegative threshold for detection.
[in]neg_samplesminimum number of negative samples.

References ST_NOT_DETECTED.

Member Function Documentation

SamplerState Autonomy::OnEvent::Sampler::insert ( double  sample)
inline

Add new sample to the mix.

Parameters
[in]samplenew sample.
Returns
sampler state.

Referenced by Autonomy::OnEvent::Task::consume().

void Autonomy::OnEvent::Sampler::reset ( void  )
inline
Collaboration diagram for Autonomy::OnEvent::Sampler:
Collaboration graph