mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
committed by
Mathew Sutcliffe
parent
79e2a7b805
commit
24094eaf61
@@ -11,13 +11,17 @@
|
|||||||
#include "blackmisc/logmessage.h"
|
#include "blackmisc/logmessage.h"
|
||||||
|
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
|
using namespace BlackMisc::Simulation;
|
||||||
using namespace BlackMisc::Aviation;
|
using namespace BlackMisc::Aviation;
|
||||||
using namespace BlackMisc::PhysicalQuantities;
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
|
|
||||||
namespace BlackCore
|
namespace BlackCore
|
||||||
{
|
{
|
||||||
|
|
||||||
CAirspaceAnalyzer::CAirspaceAnalyzer(INetwork *network, QObject *parent) : CContinuousWorker(parent, "CAirspaceAnalyzer")
|
CAirspaceAnalyzer::CAirspaceAnalyzer(const IOwnAircraftProviderReadOnly *ownAircraftProvider, const IRemoteAircraftProviderReadOnly *remoteAircraftProvider, INetwork *network, QObject *parent) :
|
||||||
|
CContinuousWorker(parent, "CAirspaceAnalyzer"),
|
||||||
|
COwnAircraftAwareReadOnly(ownAircraftProvider),
|
||||||
|
CRemoteAircraftAwareReadOnly(remoteAircraftProvider)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(network, Q_FUNC_INFO, "Network object required to connect");
|
Q_ASSERT_X(network, Q_FUNC_INFO, "Network object required to connect");
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
#define BLACKCORE_AIRSPACE_ANALYZER_H
|
#define BLACKCORE_AIRSPACE_ANALYZER_H
|
||||||
|
|
||||||
#include "blackcore/network.h"
|
#include "blackcore/network.h"
|
||||||
|
#include "blackmisc/simulation/remoteaircraftprovider.h"
|
||||||
|
#include "blackmisc/simulation/ownaircraftprovider.h"
|
||||||
#include "blackmisc/worker.h"
|
#include "blackmisc/worker.h"
|
||||||
#include "blackmisc/pq/time.h"
|
#include "blackmisc/pq/time.h"
|
||||||
#include "blackmisc/aviation/callsign.h"
|
#include "blackmisc/aviation/callsign.h"
|
||||||
@@ -21,6 +23,7 @@
|
|||||||
|
|
||||||
namespace BlackCore
|
namespace BlackCore
|
||||||
{
|
{
|
||||||
|
|
||||||
//! Class monitoring and analyzing (closests aircraft, outdated aircraft / watchdog) airspace
|
//! Class monitoring and analyzing (closests aircraft, outdated aircraft / watchdog) airspace
|
||||||
//! in background.
|
//! in background.
|
||||||
//!
|
//!
|
||||||
@@ -28,7 +31,10 @@ namespace BlackCore
|
|||||||
//! clients nearby. The server does not take care of that. When a client crashes, no delete packet is ever sent. This class therefore monitors callsigns and emits a timeout signal if it
|
//! clients nearby. The server does not take care of that. When a client crashes, no delete packet is ever sent. This class therefore monitors callsigns and emits a timeout signal if it
|
||||||
//! wasn't resetted during the specified timeout value.
|
//! wasn't resetted during the specified timeout value.
|
||||||
//!
|
//!
|
||||||
class CAirspaceAnalyzer : public BlackMisc::CContinuousWorker
|
class CAirspaceAnalyzer :
|
||||||
|
public BlackMisc::CContinuousWorker,
|
||||||
|
public BlackMisc::Simulation::COwnAircraftAwareReadOnly,
|
||||||
|
public BlackMisc::Simulation::CRemoteAircraftAwareReadOnly
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -37,7 +43,9 @@ namespace BlackCore
|
|||||||
typedef QHash<BlackMisc::Aviation::CCallsign, qint64> CCallsignTimestampSet;
|
typedef QHash<BlackMisc::Aviation::CCallsign, qint64> CCallsignTimestampSet;
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CAirspaceAnalyzer(INetwork *network, QObject *parent);
|
CAirspaceAnalyzer(const BlackMisc::Simulation::IOwnAircraftProviderReadOnly *ownAircraftProvider,
|
||||||
|
const BlackMisc::Simulation::IRemoteAircraftProviderReadOnly *remoteAircraftProvider,
|
||||||
|
INetwork *network, QObject *parent);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
//! Clear
|
//! Clear
|
||||||
|
|||||||
Reference in New Issue
Block a user