DUNE: Uniform Navigational Environment  2016.09.0
Maneuver::Multiplexer::Task Struct Reference

Public Types

typedef std::map< uint32_t,
uint8_t > 
MultiplexMap
 

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onUpdateParameters (void)
 
void onResourceInitialization (void)
 
template<typename Type , typename Args >
AbstractMuxcreate (Args *args)
 
template<typename Type >
AbstractMuxcreate (void)
 
void onResourceAcquisition (void)
 
void onResourceRelease (void)
 
void onEntityReservation (void)
 
void onManeuverDeactivation (void)
 
void changeEntity (void)
 
void consume (const IMC::Maneuver *maneuver)
 
void consume (const IMC::Brake *msg)
 
void consume (const IMC::EstimatedState *msg)
 
void consume (const IMC::GpsFix *msg)
 
void consume (const IMC::VehicleMedium *msg)
 
void onPathControlState (const IMC::PathControlState *pcs)
 
void onStateReport (void)
 
- 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

ManeuverType m_type
 
unsigned m_ents [TYPE_TOTAL]
 
std::vector< uint32_t > m_supported
 
MultiplexMap m_map
 
AbstractMuxm_maneuvers [TYPE_TOTAL]
 
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
 

Member Typedef Documentation

typedef std::map<uint32_t, uint8_t> Maneuver::Multiplexer::Task::MultiplexMap

Map of message id to maneuver type.

Constructor & Destructor Documentation

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

References Maneuver::Multiplexer::DislodgeArgs::attempts, Maneuver::Multiplexer::DislodgeArgs::burst_time, Maneuver::Multiplexer::DislodgeArgs::bursts, Maneuver::Multiplexer::YoYoArgs::check_errors, Maneuver::Multiplexer::DislodgeArgs::depth_threshold, Maneuver::Multiplexer::Arguments::dislodge, Maneuver::Multiplexer::PopUpArgs::elev_radius, Maneuver::Multiplexer::Arguments::elevator, Maneuver::Multiplexer::DislodgeArgs::interval_time, Maneuver::Multiplexer::Arguments::labels, Maneuver::Multiplexer::Arguments::loiter, m_args, m_maneuvers, Maneuver::Multiplexer::YoYoArgs::max_depth, Maneuver::Multiplexer::PopUpArgs::max_sk_dist, Maneuver::Multiplexer::ScheduledArgs::max_speed, Maneuver::Multiplexer::YoYoArgs::min_alt, Maneuver::Multiplexer::PopUpArgs::min_distance, Maneuver::Multiplexer::DislodgeArgs::min_distance, Maneuver::Multiplexer::StationKeepingArgs::min_radius, Maneuver::Multiplexer::LoiterArgs::min_radius, Maneuver::Multiplexer::ElevatorArgs::min_radius, Maneuver::Multiplexer::PopUpArgs::min_sats, Maneuver::Multiplexer::ScheduledArgs::min_speed, Maneuver::Multiplexer::Arguments::popup, Maneuver::Multiplexer::ElevatorArgs::radius_tolerance, Maneuver::Multiplexer::PopUpArgs::report, Maneuver::Multiplexer::DislodgeArgs::safe_gap, Maneuver::Multiplexer::Arguments::scheduled, Maneuver::Multiplexer::Arguments::sk, Maneuver::Multiplexer::TYPE_TOTAL, Maneuver::Multiplexer::YoYoArgs::u_course, Maneuver::Multiplexer::YoYoArgs::u_ctrack, Maneuver::Multiplexer::Arguments::unsupported, Maneuver::Multiplexer::YoYoArgs::variation, Maneuver::Multiplexer::ElevatorArgs::vmonitor_speed, Maneuver::Multiplexer::ElevatorArgs::vmonitor_timeout, and Maneuver::Multiplexer::Arguments::yoyo.

Member Function Documentation

void Maneuver::Multiplexer::Task::changeEntity ( void  )
inline

References m_ents, and m_type.

Referenced by consume().

void Maneuver::Multiplexer::Task::consume ( const IMC::Maneuver *  maneuver)
inline
void Maneuver::Multiplexer::Task::consume ( const IMC::Brake *  msg)
inline
void Maneuver::Multiplexer::Task::consume ( const IMC::EstimatedState *  msg)
inline
void Maneuver::Multiplexer::Task::consume ( const IMC::GpsFix *  msg)
inline
void Maneuver::Multiplexer::Task::consume ( const IMC::VehicleMedium *  msg)
inline
template<typename Type , typename Args >
AbstractMux* Maneuver::Multiplexer::Task::create ( Args *  args)
inline
template<typename Type >
AbstractMux* Maneuver::Multiplexer::Task::create ( void  )
inline
void Maneuver::Multiplexer::Task::onEntityReservation ( void  )
inline
void Maneuver::Multiplexer::Task::onManeuverDeactivation ( void  )
inline
void Maneuver::Multiplexer::Task::onPathControlState ( const IMC::PathControlState *  pcs)
inline
void Maneuver::Multiplexer::Task::onResourceInitialization ( void  )
inline

References m_supported.

void Maneuver::Multiplexer::Task::onResourceRelease ( void  )
inline
void Maneuver::Multiplexer::Task::onStateReport ( void  )
inline

Member Data Documentation

Arguments Maneuver::Multiplexer::Task::m_args
unsigned Maneuver::Multiplexer::Task::m_ents[TYPE_TOTAL]

Array of entity ids.

Referenced by changeEntity(), and onEntityReservation().

AbstractMux* Maneuver::Multiplexer::Task::m_maneuvers[TYPE_TOTAL]
MultiplexMap Maneuver::Multiplexer::Task::m_map

Referenced by consume(), and onUpdateParameters().

std::vector<uint32_t> Maneuver::Multiplexer::Task::m_supported

Vector of supported maneuver IDs.

Referenced by onResourceInitialization(), and onUpdateParameters().

ManeuverType Maneuver::Multiplexer::Task::m_type

Type of maneuver to perform.

Referenced by changeEntity(), consume(), onPathControlState(), and onStateReport().

Collaboration diagram for Maneuver::Multiplexer::Task:
Collaboration graph