Skip to content
Snippets Groups Projects
AirMapVehicleManager.h 1.48 KiB
Newer Older
  • Learn to ignore specific revisions
  • /****************************************************************************
     *
     *   (c) 2017 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
     *
     * QGroundControl is licensed according to the terms in the file
     * COPYING.md in the root of the source code directory.
     *
     ****************************************************************************/
    
    #pragma once
    
    
    Gus Grubba's avatar
    Gus Grubba committed
    #include "AirspaceManager.h"
    
    #include "AirspaceVehicleManager.h"
    
    Gus Grubba's avatar
    Gus Grubba committed
    #include "AirMapSharedState.h"
    #include "AirMapFlightManager.h"
    #include "AirMapTelemetry.h"
    #include "AirMapTrafficMonitor.h"
    
    
    /// AirMap per vehicle management class.
    
    class AirMapVehicleManager : public AirspaceVehicleManager
    {
        Q_OBJECT
    public:
    
        AirMapVehicleManager        (AirMapSharedState& shared, const Vehicle& vehicle);
    
    Gus Grubba's avatar
    Gus Grubba committed
        ~AirMapVehicleManager       () override = default;
    
    
        void startTelemetryStream   () override;
        void stopTelemetryStream    () override;
    
        bool isTelemetryStreaming   () override;
    
    
    signals:
        void error                  (const QString& what, const QString& airmapdMessage, const QString& airmapdDetails);
    
    public slots:
        void endFlight              () override;
    
    protected slots:
    
    Gus Grubba's avatar
    Gus Grubba committed
        void vehicleMavlinkMessageReceived(const mavlink_message_t& message) override;
    
    private slots:
        void _flightIDChanged       (QString flightID);
    
    
    private:
        AirMapSharedState&           _shared;
        AirMapFlightManager          _flightManager;
        AirMapTelemetry              _telemetry;
        AirMapTrafficMonitor         _trafficMonitor;
    };