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

FirmwarePluginManager is a singleton which is used to return the correct FirmwarePlugin for a MAV_AUTOPILOT type. More...

#include <FirmwarePluginManager.h>

+ Inheritance diagram for FirmwarePluginManager:
+ Collaboration diagram for FirmwarePluginManager:

Public Member Functions

 FirmwarePluginManager (QObject *parent=nullptr)
 
 ~FirmwarePluginManager ()
 Destructor for the FirmwarePluginManager class.
 
QList< QGCMAVLink::FirmwareClass_t > supportedFirmwareClasses ()
 Returns list of firmwares which are supported by the system.
 
bool firmwareClassSupported (QGCMAVLink::FirmwareClass_t firmwareClass)
 Returns true if the specified firmware class is supported by the system.
 
bool singleFirmwareSupport ()
 Returns true if the system supports only a single firmware class.
 
bool singleVehicleSupport ()
 Returns true if the system supports only a single firmware class with a single vehicle type.
 
QList< QGCMAVLink::VehicleClass_t > supportedVehicleClasses (QGCMAVLink::FirmwareClass_t firmwareClass)
 Returns the list of supported vehicle types for the specified firmware.
 
FirmwarePlugin * firmwarePluginForAutopilot (MAV_AUTOPILOT firmwareType, MAV_TYPE vehicleType)
 

Static Public Member Functions

static FirmwarePluginManager * instance ()
 

Detailed Description

FirmwarePluginManager is a singleton which is used to return the correct FirmwarePlugin for a MAV_AUTOPILOT type.

Definition at line 12 of file FirmwarePluginManager.h.

Constructor & Destructor Documentation

◆ FirmwarePluginManager()

FirmwarePluginManager::FirmwarePluginManager ( QObject *  parent = nullptr)
explicit

Constructs an FirmwarePluginManager object.

Parameters
parentThe parent QObject.

Definition at line 12 of file FirmwarePluginManager.cc.

◆ ~FirmwarePluginManager()

FirmwarePluginManager::~FirmwarePluginManager ( )

Destructor for the FirmwarePluginManager class.

Definition at line 18 of file FirmwarePluginManager.cc.

Member Function Documentation

◆ firmwareClassSupported()

bool FirmwarePluginManager::firmwareClassSupported ( QGCMAVLink::FirmwareClass_t  firmwareClass)

Returns true if the specified firmware class is supported by the system.

Definition at line 41 of file FirmwarePluginManager.cc.

References supportedFirmwareClasses().

Referenced by QGroundControlQmlGlobal::apmFirmwareSupported(), and QGroundControlQmlGlobal::px4ProFirmwareSupported().

◆ firmwarePluginForAutopilot()

FirmwarePlugin * FirmwarePluginManager::firmwarePluginForAutopilot ( MAV_AUTOPILOT  firmwareType,
MAV_TYPE  vehicleType 
)

Returns appropriate plugin for autopilot type.

Parameters
firmwareTypeType of firmwware to return plugin for.
vehicleTypeVehicle type to return plugin for.
Returns
Singleton FirmwarePlugin instance for the specified MAV_AUTOPILOT.

Definition at line 75 of file FirmwarePluginManager.cc.

References FirmwarePluginFactory::firmwarePluginForAutopilot().

Referenced by Vehicle::_offlineFirmwareTypeSettingChanged(), MissionCommandTree::getCommandsForCategory(), and MissionCommandTree::MissionCommandTree().

◆ instance()

◆ singleFirmwareSupport()

bool FirmwarePluginManager::singleFirmwareSupport ( )

Returns true if the system supports only a single firmware class.

Definition at line 46 of file FirmwarePluginManager.cc.

References supportedFirmwareClasses().

Referenced by QGroundControlQmlGlobal::singleFirmwareSupport().

◆ singleVehicleSupport()

bool FirmwarePluginManager::singleVehicleSupport ( )

Returns true if the system supports only a single firmware class with a single vehicle type.

Definition at line 51 of file FirmwarePluginManager.cc.

References supportedFirmwareClasses(), and supportedVehicleClasses().

Referenced by QGCCorePlugin::showInitialSetupVehiclePreferences(), and QGroundControlQmlGlobal::singleVehicleSupport().

◆ supportedFirmwareClasses()

◆ supportedVehicleClasses()

QList< QGCMAVLink::VehicleClass_t > FirmwarePluginManager::supportedVehicleClasses ( QGCMAVLink::FirmwareClass_t  firmwareClass)

Returns the list of supported vehicle types for the specified firmware.

Definition at line 57 of file FirmwarePluginManager.cc.

References QGCMAVLink::allVehicleClasses(), QGCMAVLink::FirmwareClassGeneric, FirmwarePluginFactory::supportedVehicleClasses(), and QGCMAVLinkTypes::VehicleClassGeneric.

Referenced by singleVehicleSupport().


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