DUNE: Uniform Navigational Environment  2.3.2
Plan::Engine::Calibration Class Reference

Detailed Description

Plan Specification parser.

Public Types

enum  CalibrationState {
  CS_NONE, CS_NOT_STARTED, CS_IN_PROGRESS, CS_DONE,
  CS_FAILED
}
 

Public Member Functions

 Calibration (uint16_t min_time)
 
void setTime (float time)
 
void start (void)
 
void stop (void)
 
void setFailed (const std::string &info)
 
void forceRemainingTime (float time)
 
float getTime (void) const
 
float getRemaining (void) const
 
bool pastMinimum (void) const
 
bool inProgress (void) const
 
bool notStarted (void) const
 
bool isDone (void) const
 
bool hasFailed (void) const
 
const std::string & getInfo (void) const
 

Member Enumeration Documentation

Calibration state.

Enumerator
CS_NONE 

Not available as in, no need for calibration.

CS_NOT_STARTED 

Must be done but has not started yet.

CS_IN_PROGRESS 

In progress.

CS_DONE 

Calibration done.

CS_FAILED 

Calibration failed.

Constructor & Destructor Documentation

Plan::Engine::Calibration::Calibration ( uint16_t  min_time)
inline

Default constructor.

Member Function Documentation

void Plan::Engine::Calibration::forceRemainingTime ( float  time)
inline

Set new remaining time for calibration Calibration time cannot increase.

Parameters
[in]timenew calibration time

Referenced by Plan::Engine::Task::consume().

const std::string& Plan::Engine::Calibration::getInfo ( void  ) const
inline

Get error message.

Returns
error string message

Referenced by Plan::Engine::Task::consume().

float Plan::Engine::Calibration::getRemaining ( void  ) const
inline

Get remaining time in calibration.

Returns
remaining time
float Plan::Engine::Calibration::getTime ( void  ) const
inline

Get the calibration time.

Returns
calibration time

Referenced by Plan::Engine::Plan::calibrationStarted(), and Plan::Engine::Task::vehicleRequest().

bool Plan::Engine::Calibration::hasFailed ( void  ) const
inline

Calibration has failed.

Returns
true if calibration has failed

References CS_FAILED.

Referenced by Plan::Engine::Task::consume().

bool Plan::Engine::Calibration::inProgress ( void  ) const
inline

Check if calibration is in progress.

Returns
true if in progress

References CS_IN_PROGRESS.

Referenced by Plan::Engine::Task::consume().

bool Plan::Engine::Calibration::isDone ( void  ) const
inline

Calibration is done.

Returns
true if calibration is done

References CS_DONE.

bool Plan::Engine::Calibration::notStarted ( void  ) const
inline

Check if calibration has not yet started.

Returns
true if it has not yet started

References CS_NOT_STARTED.

bool Plan::Engine::Calibration::pastMinimum ( void  ) const
inline

Check if calibration time is past minimum time.

Returns
true if elapsed calibration time is larger than minimum

Referenced by Plan::Engine::Task::consume().

void Plan::Engine::Calibration::setFailed ( const std::string &  info)
inline

Flag as failed.

Parameters
[in]inforeason for failed calibration

References CS_FAILED.

void Plan::Engine::Calibration::setTime ( float  time)
inline

Set the calibration time.

Parameters
[in]timetime to set in calibration

References CS_NONE, and CS_NOT_STARTED.

Referenced by Plan::Engine::Task::startPlan().

void Plan::Engine::Calibration::start ( void  )
inline

Start calibration.

References CS_IN_PROGRESS, and CS_NONE.

Referenced by Plan::Engine::Task::consume().

void Plan::Engine::Calibration::stop ( void  )
inline

Stop calibration.

References CS_DONE.

Referenced by Plan::Engine::Task::consume().

Collaboration diagram for Plan::Engine::Calibration:
Collaboration graph