QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MissionCommandTree Class Reference

#include <MissionCommandTree.h>

+ Inheritance diagram for MissionCommandTree:
+ Collaboration diagram for MissionCommandTree:

Public Member Functions

 MissionCommandTree (bool unitTest=false, QObject *parent=nullptr)
 
 ~MissionCommandTree ()
 Destructor for the MissionCommandTree class.
 
QStringList categoriesForVehicle (Vehicle *vehicle)
 
QVariantList getCommandsForCategory (Vehicle *vehicle, const QString &category, bool showFlyThroughCommands)
 
QString friendlyName (MAV_CMD command) const
 Returns the friendly name for the specified command.
 
QString rawName (MAV_CMD command) const
 Returns the raw name for the specified command.
 
bool isLandCommand (MAV_CMD command) const
 
bool isTakeoffCommand (MAV_CMD command) const
 
const QList< MAV_CMD > & allCommandIds () const
 
const MissionCommandUIInfogetUIInfo (Vehicle *vehicle, QGCMAVLink::VehicleClass_t vtolMode, MAV_CMD command)
 

Static Public Member Functions

static MissionCommandTreeinstance ()
 

Detailed Description

Manages a hierarchy of MissionCommandUIInfo.

The static hierarchy allows for overriding mission command ui info based on firmware and vehicle class. The hierarchy of the tree is: FirmwareClassGeneric - VehicleClassGeneric - Base set of all command definitions for any firmware, any vehicle, ui defined by mavlink spec FirmwareClassGeneric - VehicleClassFixedWing Known Firmware, Fixed Wing Any Firmware, Multi Rotor (all types) Known Firmware, Multi Rotor (all types) Any Firmware, VTOL (all types) Known Firmware, VTOL (all types) Any Firmware, Rover Known Firmware, Rover Any Firmware, Sub Known Firmware, Sub For known firmwares, the override files are requested from the FirmwarePlugin.

When ui info is requested for a specific vehicle the static hierarchy in _staticCommandTree is collapsed into the set of available commands in _allCommands taking into account the appropriate set of overrides for the MAV_AUTOPILOT/MAV_TYPE combination associated with the vehicle.

Definition at line 35 of file MissionCommandTree.h.

Constructor & Destructor Documentation

◆ MissionCommandTree()

◆ ~MissionCommandTree()

MissionCommandTree::~MissionCommandTree ( )

Destructor for the MissionCommandTree class.

Definition at line 43 of file MissionCommandTree.cc.

Member Function Documentation

◆ allCommandIds()

const QList< MAV_CMD > & MissionCommandTree::allCommandIds ( ) const

◆ categoriesForVehicle()

QStringList MissionCommandTree::categoriesForVehicle ( Vehicle vehicle)

Definition at line 192 of file MissionCommandTree.cc.

◆ friendlyName()

QString MissionCommandTree::friendlyName ( MAV_CMD  command) const

◆ getCommandsForCategory()

QVariantList MissionCommandTree::getCommandsForCategory ( Vehicle vehicle,
const QString &  category,
bool  showFlyThroughCommands 
)

◆ getUIInfo()

◆ instance()

◆ isLandCommand()

bool MissionCommandTree::isLandCommand ( MAV_CMD  command) const

◆ isTakeoffCommand()

bool MissionCommandTree::isTakeoffCommand ( MAV_CMD  command) const

◆ rawName()

QString MissionCommandTree::rawName ( MAV_CMD  command) const

The documentation for this class was generated from the following files: