DUNE: Uniform Navigational Environment  2016.05.0
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 (void)
 
void setTime (float time)
 
void clear (void)
 
void start (void)
 
void stop (void)
 
void setFailed (const std::string &info)
 
void forceRemainingTime (float time)
 
float getRemaining (void) const
 
float getElapsedTime (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 ( void  )
inline

Default constructor.

References clear().

Member Function Documentation

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

Clear calibration.

References CS_NONE.

Referenced by Calibration(), and Plan::Engine::Plan::clear().

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::Plan::updateCalibration().

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

Get elapsed calibration time.

Returns
elapsed calibration time

Referenced by Plan::Engine::Plan::updateCalibration().

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

Get error message.

Returns
error string message
float Plan::Engine::Calibration::getRemaining ( void  ) const
inline

Get remaining time in calibration.

Returns
remaining time
bool Plan::Engine::Calibration::hasFailed ( void  ) const
inline

Calibration has failed.

Returns
true if calibration has failed

References CS_FAILED.

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::Plan::updateCalibration().

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.

Referenced by Plan::Engine::Plan::updateCalibration().

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::Plan::calibrationStarted().

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

Start calibration.

References CS_IN_PROGRESS, and CS_NONE.

Referenced by Plan::Engine::Plan::updateCalibration().

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

Stop calibration.

References CS_DONE.

Referenced by Plan::Engine::Plan::updateCalibration().

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