AirMapVehicleManager.h 1.49 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8 9 10 11
 *
 * 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
12
#include "AirspaceManager.h"
13
#include "AirspaceVehicleManager.h"
Gus Grubba's avatar
Gus Grubba committed
14 15 16 17
#include "AirMapSharedState.h"
#include "AirMapFlightManager.h"
#include "AirMapTelemetry.h"
#include "AirMapTrafficMonitor.h"
18 19 20 21 22 23 24

/// AirMap per vehicle management class.

class AirMapVehicleManager : public AirspaceVehicleManager
{
    Q_OBJECT
public:
25
    AirMapVehicleManager        (AirMapSharedState& shared, const Vehicle& vehicle);
Gus Grubba's avatar
Gus Grubba committed
26
    ~AirMapVehicleManager       () override = default;
27 28 29

    void startTelemetryStream   () override;
    void stopTelemetryStream    () override;
30
    bool isTelemetryStreaming   () override;
31 32 33 34 35 36 37 38

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
39 40 41 42
    void vehicleMavlinkMessageReceived(const mavlink_message_t& message) override;

private slots:
    void _flightIDChanged       (QString flightID);
43 44 45 46 47 48 49

private:
    AirMapSharedState&           _shared;
    AirMapFlightManager          _flightManager;
    AirMapTelemetry              _telemetry;
    AirMapTrafficMonitor         _trafficMonitor;
};