Newer
Older
/****************************************************************************
*
* (c) 2009-2020 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
#include <QGeoCoordinate>
#include "airmap/traffic.h"
#include <memory>
/**
* @class AirMapTrafficMonitor
*
*/
class AirMapTrafficMonitor : public QObject, public LifetimeChecker
{
Q_OBJECT
public:
AirMapTrafficMonitor (AirMapSharedState& shared);
virtual ~AirMapTrafficMonitor ();
void startConnection (const QString& flightID);
void error (const QString& what, const QString& airmapdMessage, const QString& airmapdDetails);
void trafficUpdate (bool alert, QString traffic_id, QString vehicle_id, QGeoCoordinate location, float heading);
void _update (airmap::Traffic::Update::Type type, const std::vector<airmap::Traffic::Update>& update);