6 #ifndef SWIFT_CORE_AIRSPACE_ANALYZER_H
7 #define SWIFT_CORE_AIRSPACE_ANALYZER_H
13 #include <QReadWriteLock>
30 namespace swift::misc::aviation
32 class CAircraftSituation;
39 class CAirspaceMonitor;
86 setSimulatorRenderRestrictionsChanged(
bool restricted,
bool enabled,
int maxAircraft,
137 void watchdogCheckTimeouts();
140 void analyzeAirspace();
145 std::chrono::seconds m_timeoutAircraft { 15 };
146 std::chrono::seconds m_timeoutAtc { 50 };
147 qint64 m_lastWatchdogCallMsSinceEpoch;
148 qint64 m_doNotRunAgainBefore = -1;
149 std::atomic_bool m_enabledWatchdog {
true };
150 misc::CThreadedTimer m_updateTimer;
154 bool m_simulatorRenderedAircraftRestricted =
false;
155 bool m_simulatorRenderingEnabled =
true;
156 int m_simulatorMaxRenderedAircraft = -1;
158 mutable QReadWriteLock m_lockSnapshot;
159 mutable QReadWriteLock m_lockRestrictions;
Class monitoring and analyzing (closest aircraft, outdated aircraft / watchdog) airspace in backgroun...
void timeoutAircraft(const swift::misc::aviation::CCallsign &callsign)
Callsign has timed out.
void setEnabledWatchdog(bool enabled)
Enable/disable watchdog.
void timeoutAtc(const swift::misc::aviation::CCallsign &callsign)
Callsign has timed out.
~CAirspaceAnalyzer()=default
Destructor.
void airspaceAircraftSnapshot(const swift::misc::simulation::CAirspaceAircraftSnapshot &snapshot)
New aircraft snapshot.
CAirspaceAnalyzer & operator=(CAirspaceAnalyzer &&)=delete
Move assignment.
CAirspaceAnalyzer & operator=(const CAirspaceAnalyzer &)=delete
Copy assignment.
CAirspaceAnalyzer(CAirspaceAnalyzer &&)=delete
Move constructor.
CAirspaceAnalyzer(const CAirspaceAnalyzer &)=delete
Copy constructor.
Keeps track of other entities in the airspace: aircraft, ATC stations, etc. Central instance of data ...
FSD client Todo: Send (interim) data updates automatically Todo Check ':' in FSD messages....
Base class for a long-lived worker object which lives in its own thread.
Value object encapsulating information of an aircraft's situation.
Value object encapsulating information about an ATC station.
Value object encapsulating information of a callsign.
Value object encapsulating information about a connection status.
Physical unit length (length)
Current situation in the skies analyzed.
Delegating class which can be directly used to access an.
Class which can be directly used to access an.
Direct threadsafe in memory access to own aircraft.
Backend services of the swift project, like dealing with the network or the simulators.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.