AirMapVehicleManager.h 1.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
/****************************************************************************
 *
 *   (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
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);
26 27 28 29
    ~AirMapVehicleManager       () = default;

    void startTelemetryStream   () override;
    void stopTelemetryStream    () override;
30
    bool isTelemetryStreaming   () override;
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

signals:
    void error                  (const QString& what, const QString& airmapdMessage, const QString& airmapdDetails);

public slots:
    void endFlight              () override;

protected slots:
    virtual void vehicleMavlinkMessageReceived(const mavlink_message_t& message) override;

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