DUNE: Uniform Navigational Environment  2019.02.0
DUNE::Monitors::MediumHandler Class Reference

Detailed Description

MediumHandler handles vehicle medium data.

Author
José Braga.

Public Member Functions

 MediumHandler (void)
 
void update (const IMC::VehicleMedium *msg)
 
bool isKnown (void)
 
bool changed (void)
 
bool inWater (void)
 
bool outWater (void)
 
bool isUnderwater (void)
 
bool isWaterSurface (void)
 

Constructor & Destructor Documentation

DUNE::Monitors::MediumHandler::MediumHandler ( void  )
inline

Constructor.

Member Function Documentation

bool DUNE::Monitors::MediumHandler::changed ( void  )
inline

This functions checks if medium has changed.

Returns
true if medium has changed, false otherwise.
bool DUNE::Monitors::MediumHandler::inWater ( void  )
inline

This functions checks if medium is water.

Returns
true if medium is water, false otherwise.

References isUnderwater(), and isWaterSurface().

bool DUNE::Monitors::MediumHandler::isKnown ( void  )
inline

This functions checks if medium is known.

Returns
true if medium is known, false otherwise.
bool DUNE::Monitors::MediumHandler::isUnderwater ( void  )
inline
bool DUNE::Monitors::MediumHandler::isWaterSurface ( void  )
inline

This functions checks if system is on water surface.

Returns
true if system is on water surface, false otherwise.

References DUNE::IMC::VehicleMedium::medium, and DUNE::IMC::VehicleMedium::VM_WATER.

Referenced by inWater(), and Monitors::Emergency::Task::sendDistress().

bool DUNE::Monitors::MediumHandler::outWater ( void  )
inline

This functions checks if system is out of water.

Returns
true if system is out of water, false otherwise.

References DUNE::IMC::VehicleMedium::medium, DUNE::IMC::VehicleMedium::VM_AIR, and DUNE::IMC::VehicleMedium::VM_GROUND.

void DUNE::Monitors::MediumHandler::update ( const IMC::VehicleMedium msg)
inline

Update with new info.

Parameters
[in]msglatest vehicle medium message.

References DUNE::IMC::VehicleMedium::medium, and DUNE::IMC::VehicleMedium::VM_UNKNOWN.

Referenced by Sensors::CyclopsC7::Task::consume(), and Monitors::Emergency::Task::consume().

Collaboration diagram for DUNE::Monitors::MediumHandler:
Collaboration graph