DUNE: Uniform Navigational Environment  2.5.0-rc1
Maneuver::YoYo::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onUpdateParameters (void)
 
void onResourceRelease (void)
 
void consume (const IMC::YoYo *maneuver)
 
void consume (const IMC::PathControlState *pcs)
 
void consume (const IMC::EstimatedState *state)
 
void update (double state_z, double theta)
 
- Public Member Functions inherited from DUNE::IMC::Message
 Message (void)
 
virtual ~Message (void)
 
virtual Messageclone (void) const =0
 
virtual void clear (void)=0
 
virtual int validate (void) const =0
 
virtual const char * getName (void) const =0
 
virtual uint16_t getId (void) const =0
 
double setTimeStamp (double ts)
 
double setTimeStamp (void)
 
double getTimeStamp (void) const
 
uint16_t getSource (void) const
 
void setSource (uint16_t src)
 
uint8_t getSourceEntity (void) const
 
void setSourceEntity (uint8_t src_ent)
 
uint16_t getDestination (void) const
 
void setDestination (uint16_t dst)
 
uint8_t getDestinationEntity (void) const
 
void setDestinationEntity (uint8_t dst_ent)
 
virtual uint16_t getSubId (void) const
 
virtual void setSubId (uint16_t subid)
 
virtual fp64_t getValueFP (void) const
 
virtual void setValueFP (fp64_t val)
 
unsigned getSerializationSize (void) const
 
unsigned getPayloadSerializationSize (void) const
 
virtual unsigned getFixedSerializationSize (void) const
 
virtual unsigned getVariableSerializationSize (void) const
 
void toJSON (std::ostream &os) const
 
void toText (std::ostream &os) const
 
virtual uint8_t * serializeFields (uint8_t *bfr) const =0
 
virtual uint16_t deserializeFields (const uint8_t *bfr, uint16_t len)=0
 
virtual uint16_t reverseDeserializeFields (const uint8_t *bfr, uint16_t len)=0
 
virtual void fieldsToJSON (std::ostream &os, unsigned indent_level) const
 
bool operator== (const Message &other) const
 
bool operator!= (const Message &other) const
 

Public Attributes

IMC::DesiredPath m_path
 
IMC::DesiredPitch m_pitch
 
IMC::ZUnits m_zunits
 
DUNE::Control::YoYoMotionm_yoyo
 
bool m_on_course
 
bool m_course_recovered
 
bool m_dispatched
 
Arguments m_args
 

Additional Inherited Members

- Protected Member Functions inherited from DUNE::IMC::Message
virtual void setTimeStampNested (double value)
 
virtual void setSourceNested (uint16_t value)
 
virtual void setSourceEntityNested (uint8_t value)
 
virtual void setDestinationNested (uint16_t value)
 
virtual void setDestinationEntityNested (uint8_t value)
 
virtual bool fieldsEqual (const Message &other) const
 
- Protected Attributes inherited from DUNE::IMC::Message
Header m_header
 

Constructor & Destructor Documentation

Maneuver::YoYo::Task::Task ( const std::string &  name,
Tasks::Context &  ctx 
)
inline

Member Function Documentation

void Maneuver::YoYo::Task::consume ( const IMC::YoYo *  maneuver)
inline
void Maneuver::YoYo::Task::consume ( const IMC::PathControlState *  pcs)
inline
void Maneuver::YoYo::Task::consume ( const IMC::EstimatedState *  state)
inline

References m_zunits, and update().

void Maneuver::YoYo::Task::onResourceRelease ( void  )
inline

References m_yoyo.

void Maneuver::YoYo::Task::onUpdateParameters ( void  )
inline
void Maneuver::YoYo::Task::update ( double  state_z,
double  theta 
)
inline

update the maneuver with a depth or altitude value a negative value will be interpreted as an altitude

Parameters
[in]state_zcurrent z position
[in]thetacurrent pitch angle

References m_course_recovered, m_dispatched, m_on_course, m_pitch, m_yoyo, DUNE::Control::YoYoMotion::stabilize(), and DUNE::Control::YoYoMotion::update().

Referenced by consume().

Member Data Documentation

Arguments Maneuver::YoYo::Task::m_args

Task arguments.

Referenced by consume(), onUpdateParameters(), and Task().

bool Maneuver::YoYo::Task::m_course_recovered

Course recovered flag.

Referenced by consume(), and update().

bool Maneuver::YoYo::Task::m_dispatched

Some pitch reference has been dispatched already.

Referenced by update().

bool Maneuver::YoYo::Task::m_on_course

On course flag.

Referenced by consume(), and update().

IMC::DesiredPath Maneuver::YoYo::Task::m_path

Desired path message.

Referenced by consume().

IMC::DesiredPitch Maneuver::YoYo::Task::m_pitch

Desired pitch message.

Referenced by consume(), and update().

DUNE::Control::YoYoMotion* Maneuver::YoYo::Task::m_yoyo

Yoyo motion controller.

Referenced by consume(), onResourceRelease(), and update().

IMC::ZUnits Maneuver::YoYo::Task::m_zunits

Z units for this maneuver.

Referenced by consume().

Collaboration diagram for Maneuver::YoYo::Task:
Collaboration graph