DUNE: Uniform Navigational Environment  2019.02.0
DUNE::Navigation::UsblTools::Target Class Reference

Detailed Description

USBL tools handler ticket.

Public Member Functions

 Target (std::string name, bool fix, uint16_t period)
 
bool trigger (void)
 
bool compare (std::string name)
 
void reset (bool fix, uint16_t period)
 
std::string getName (void)
 
bool wantsFix (void)
 
bool hasFailed (void)
 
void resetErrors (void)
 

Constructor & Destructor Documentation

DUNE::Navigation::UsblTools::Target::Target ( std::string  name,
bool  fix,
uint16_t  period 
)
inline

Constructor.

Parameters
[in]nametarget's name.
[in]fixabsolute fix or relative positioning
[in]periodtarget's desired periodicity.

References DUNE::Time::Counter< T >::setTop().

Member Function Documentation

bool DUNE::Navigation::UsblTools::Target::compare ( std::string  name)
inline

Compare name with target name.

Parameters
[in]namename of target.
Returns
true if target's name is matched.
std::string DUNE::Navigation::UsblTools::Target::getName ( void  )
inline

Get target's name.

Returns
target's name.
bool DUNE::Navigation::UsblTools::Target::hasFailed ( void  )
inline

Check if the target node has failed.

Returns
true if target has reached threshold, false otherwise.

References DUNE::Navigation::UsblTools::c_max_comm_timeout.

void DUNE::Navigation::UsblTools::Target::reset ( bool  fix,
uint16_t  period 
)
inline

Reset variables of target.

Parameters
[in]returnabsolute fixes or relative position.
[in]perioddesired periodicity.

References resetErrors(), and DUNE::Time::Counter< T >::setTop().

void DUNE::Navigation::UsblTools::Target::resetErrors ( void  )
inline

Reset count of errors.

Referenced by reset().

bool DUNE::Navigation::UsblTools::Target::trigger ( void  )
inline

Time to track target.

Returns
true, if timer has overflown.

References DUNE::Time::Counter< T >::overflow(), and DUNE::Time::Counter< T >::reset().

bool DUNE::Navigation::UsblTools::Target::wantsFix ( void  )
inline

Check if target node wants absolute fix.

Returns
true if target's wants absolute fix, false otherwise.
Collaboration diagram for DUNE::Navigation::UsblTools::Target:
Collaboration graph