mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Ref T289, merge CSimulatorCommonn/ISimulator
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "blackcore/application.h"
|
||||
#include "blackcore/blackcoreexport.h"
|
||||
#include "blackmisc/simulation/settings/simulatorsettings.h"
|
||||
#include "blackmisc/simulation/aircraftmodellist.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||
@@ -35,6 +36,7 @@
|
||||
#include "blackmisc/identifier.h"
|
||||
#include "blackmisc/pixmap.h"
|
||||
#include "blackmisc/simplecommandparser.h"
|
||||
#include "blackmisc/tokenbucket.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
|
||||
#include <QFlags>
|
||||
@@ -77,11 +79,14 @@ namespace BlackCore
|
||||
Q_DECLARE_FLAGS(SimulatorStatus, SimulatorStatusFlag)
|
||||
Q_FLAG(SimulatorStatus)
|
||||
|
||||
//! Log categories
|
||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||
|
||||
//! Render all aircraft if number of aircraft >= MaxAircraftInfinite
|
||||
const int MaxAircraftInfinite = 100;
|
||||
|
||||
//! Destructor
|
||||
virtual ~ISimulator() {}
|
||||
virtual ~ISimulator();
|
||||
|
||||
//! Combined status
|
||||
virtual SimulatorStatus getSimulatorStatus() const;
|
||||
@@ -90,7 +95,7 @@ namespace BlackCore
|
||||
virtual bool isTimeSynchronized() const = 0;
|
||||
|
||||
//! Get the setup (simulator environment)
|
||||
virtual const BlackMisc::Simulation::CSimulatorInternals &getSimulatorInternals() const = 0;
|
||||
virtual const BlackMisc::Simulation::CSimulatorInternals &getSimulatorInternals() const { return m_simulatorInternals; }
|
||||
|
||||
//! Connect to simulator
|
||||
virtual bool connectTo() = 0;
|
||||
@@ -98,31 +103,31 @@ namespace BlackCore
|
||||
//! Disconnect from simulator
|
||||
virtual bool disconnectFrom() = 0;
|
||||
|
||||
//! Logically add a new aircraft. Depending on max. aircraft, enabled status etc.
|
||||
//! it will physically added to the simulator.
|
||||
//! Logically add a new aircraft.
|
||||
//! Depending on max. aircraft, enabled status etc. it will physically added to the simulator.
|
||||
//! \sa physicallyAddRemoteAircraft
|
||||
virtual bool logicallyAddRemoteAircraft(const BlackMisc::Simulation::CSimulatedAircraft &remoteAircraft) = 0;
|
||||
virtual bool logicallyAddRemoteAircraft(const BlackMisc::Simulation::CSimulatedAircraft &remoteAircraft);
|
||||
|
||||
//! Logically remove remote aircraft from simulator. Depending on max. aircraft, enabled status etc.
|
||||
//! it will physically added to the simulator.
|
||||
virtual bool logicallyRemoveRemoteAircraft(const BlackMisc::Aviation::CCallsign &callsign) = 0;
|
||||
//! Logically remove remote aircraft from simulator.
|
||||
//! Depending on max. aircraft, enabled status etc. it will physically added to the simulator.
|
||||
virtual bool logicallyRemoveRemoteAircraft(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Removes and adds again the aircraft
|
||||
//! \sa logicallyRemoveRemoteAircraft
|
||||
//! \sa logicallyAddRemoteAircraft
|
||||
virtual bool logicallyReAddRemoteAircraft(const BlackMisc::Aviation::CCallsign &callsign) = 0;
|
||||
virtual bool logicallyReAddRemoteAircraft(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Find the unrendered enabled aircraft
|
||||
virtual BlackMisc::Aviation::CCallsignSet unrenderedEnabledAircraft() const = 0;
|
||||
virtual BlackMisc::Aviation::CCallsignSet unrenderedEnabledAircraft() const;
|
||||
|
||||
//! Find the rendered disabled aircraft
|
||||
virtual BlackMisc::Aviation::CCallsignSet renderedDisabledAircraft() const = 0;
|
||||
virtual BlackMisc::Aviation::CCallsignSet renderedDisabledAircraft() const;
|
||||
|
||||
//! Change remote aircraft per property
|
||||
virtual bool changeRemoteAircraftModel(const BlackMisc::Simulation::CSimulatedAircraft &aircraft) = 0;
|
||||
virtual bool changeRemoteAircraftModel(const BlackMisc::Simulation::CSimulatedAircraft &aircraft);
|
||||
|
||||
//! Aircraft got enabled / disabled
|
||||
virtual bool changeRemoteAircraftEnabled(const BlackMisc::Simulation::CSimulatedAircraft &aircraft) = 0;
|
||||
virtual bool changeRemoteAircraftEnabled(const BlackMisc::Simulation::CSimulatedAircraft &aircraft);
|
||||
|
||||
//! Update own aircraft cockpit (usually from context)
|
||||
virtual bool updateOwnSimulatorCockpit(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, const BlackMisc::CIdentifier &originator) = 0;
|
||||
@@ -137,7 +142,7 @@ namespace BlackCore
|
||||
virtual void displayTextMessage(const BlackMisc::Network::CTextMessage &message) const = 0;
|
||||
|
||||
//! Airports in range from simulator, or if not available from web service
|
||||
virtual BlackMisc::Aviation::CAirportList getAirportsInRange() const = 0;
|
||||
virtual BlackMisc::Aviation::CAirportList getAirportsInRange() const;
|
||||
|
||||
//! Set time synchronization between simulator and user's computer time
|
||||
//! \remarks not all drivers implement this, e.g. if it is an intrinsic simulator feature
|
||||
@@ -155,20 +160,19 @@ namespace BlackCore
|
||||
virtual BlackMisc::Aviation::CCallsignSet physicallyRenderedAircraft() const = 0;
|
||||
|
||||
//! Highlight the aircraft for given time (or disable highlight)
|
||||
virtual void highlightAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraftToHighlight, bool enableHighlight, const BlackMisc::PhysicalQuantities::CTime &displayTime) = 0;
|
||||
virtual void highlightAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraftToHighlight, bool enableHighlight, const BlackMisc::PhysicalQuantities::CTime &displayTime);
|
||||
|
||||
//! Follow aircraft
|
||||
virtual bool followAircraft(const BlackMisc::Aviation::CCallsign &callsign)
|
||||
{
|
||||
Q_UNUSED(callsign);
|
||||
return false;
|
||||
}
|
||||
virtual bool followAircraft(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Activates or deactivates simulator weather
|
||||
virtual void setWeatherActivated(bool activated) = 0;
|
||||
virtual void setWeatherActivated(bool activated);
|
||||
|
||||
//! Reload weather settings
|
||||
void reloadWeatherSettings();
|
||||
|
||||
//! Driver will be unloaded
|
||||
virtual void unload() = 0;
|
||||
virtual void unload();
|
||||
|
||||
//! Are we connected to the simulator?
|
||||
virtual bool isConnected() const = 0;
|
||||
@@ -180,11 +184,11 @@ namespace BlackCore
|
||||
virtual bool isSimulating() const { return this->isConnected(); }
|
||||
|
||||
//! Clear all aircraft related data
|
||||
virtual void clearAllRemoteAircraftData() = 0;
|
||||
virtual void clearAllRemoteAircraftData();
|
||||
|
||||
//! Debug function to check state after all aircraft have been removed
|
||||
//! \remarks only in local developer builds
|
||||
virtual BlackMisc::CStatusMessageList debugVerifyStateAfterAllAircraftRemoved() const = 0;
|
||||
virtual BlackMisc::CStatusMessageList debugVerifyStateAfterAllAircraftRemoved() const;
|
||||
|
||||
//! Is overall (swift) application shutting down
|
||||
//! \threadsafe
|
||||
@@ -206,7 +210,7 @@ namespace BlackCore
|
||||
virtual QString getStatisticsSimulatorSpecific() const { return QString(); }
|
||||
|
||||
//! Reset the statistics
|
||||
virtual void resetAircraftStatistics() {}
|
||||
virtual void resetAircraftStatistics();
|
||||
|
||||
//! \copydoc BlackMisc::IProvider::asQObject
|
||||
virtual QObject *asQObject() override { return this; }
|
||||
@@ -214,12 +218,23 @@ namespace BlackCore
|
||||
//! \addtogroup swiftdotcommands
|
||||
//! @{
|
||||
//! <pre>
|
||||
//! .drv unload unload driver BlackCore::CSimulatorCommon
|
||||
//! .drv fsuipc on|off enable/disable FSUIPC (if applicable) BlackSimPlugin::FsCommon::CSimulatorFsCommon
|
||||
//! .drv unload unload plugin BlackCore::ISimulator
|
||||
//! .drv limit number limit the number of updates BlackCore::ISimulator
|
||||
//! .drv logint callsign log interpolator for callsign BlackCore::ISimulator
|
||||
//! .drv logint off no log information for interpolator BlackCore::ISimulator
|
||||
//! .drv logint write write interpolator log to file BlackCore::ISimulator
|
||||
//! .drv logint clear clear current log BlackCore::ISimulator
|
||||
//! .drv pos callsign shows current position in simulator BlackCore::ISimulator
|
||||
//! .drv spline|linear callsign interpolator spline or linear BlackCore::ISimulator
|
||||
//! .drv aircraft readd callsign re-add (add again) aircraft BlackCore::ISimulator
|
||||
//! .drv aircraft readd all re-add all aircraft BlackCore::ISimulator
|
||||
//! .drv aircraft rm callsign remove aircraft BlackCore::ISimulator
|
||||
//! .drv unload unload driver BlackCore::ISimulator
|
||||
//! .drv fsuipc on|off enable/disable FSUIPC (if applicable) BlackSimPlugin::FsCommon::CSimulatorFsCommon
|
||||
//! </pre>
|
||||
//! @}
|
||||
//! Parse command line
|
||||
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) = 0;
|
||||
//! Parse command line for simulator drivers, derived classes can add specific parsing by overriding ISimulator::parseDetails
|
||||
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator);
|
||||
|
||||
//! Consolidate setup with other data like from BlackMisc::Simulation::IRemoteAircraftProvider
|
||||
//! \threadsafe
|
||||
@@ -228,6 +243,46 @@ namespace BlackCore
|
||||
//! \copydoc BlackMisc::Simulation::IInterpolationSetupProvider::setInterpolationSetupGlobal
|
||||
virtual bool setInterpolationSetupGlobal(const BlackMisc::Simulation::CInterpolationAndRenderingSetupGlobal &setup) override;
|
||||
|
||||
//! Counter added aircraft
|
||||
int getStatisticsPhysicallyAddedAircraft() const { return m_statsPhysicallyAddedAircraft; }
|
||||
|
||||
//! Counter removed aircraft
|
||||
int getStatisticsPhysicallyRemovedAircraft() const { return m_statsPhysicallyRemovedAircraft; }
|
||||
|
||||
//! Current update time in ms
|
||||
double getStatisticsCurrentUpdateTimeMs() const { return m_statsCurrentUpdateTimeMs; }
|
||||
|
||||
//! Average update time in ms
|
||||
double getStatisticsAverageUpdateTimeMs() const { return m_statsUpdateAircraftTimeAvgMs; }
|
||||
|
||||
//! Total update time in ms
|
||||
qint64 getStatisticsTotalUpdateTimeMs() const { return m_statsUpdateAircraftTimeTotalMs; }
|
||||
|
||||
//! Max.update time in ms
|
||||
qint64 getStatisticsMaxUpdateTimeMs() const { return m_statsMaxUpdateTimeMs; }
|
||||
|
||||
//! Number of update runs
|
||||
int getStatisticsUpdateRuns() const { return m_statsUpdateAircraftRuns; }
|
||||
|
||||
//! Time between two update requests
|
||||
qint64 getStatisticsAircraftUpdatedRequestedDeltaMs() const { return m_statsUpdateAircraftRequestedDeltaMs; }
|
||||
|
||||
//! Access to logger
|
||||
const BlackMisc::Simulation::CInterpolationLogger &interpolationLogger() const { return m_interpolationLogger; }
|
||||
|
||||
//! The latest logged data formatted
|
||||
//! \remark public only for log. displays
|
||||
QString latestLoggedDataFormatted(const BlackMisc::Aviation::CCallsign &cs) const;
|
||||
|
||||
//! Info about update aircraft limitations
|
||||
QString updateAircraftLimitationInfo() const;
|
||||
|
||||
//! Reset the last sent values
|
||||
void resetLastSentValues();
|
||||
|
||||
//! Reset the last sent values per callsign
|
||||
void resetLastSentValues(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Register help
|
||||
static void registerHelp();
|
||||
|
||||
@@ -280,6 +335,31 @@ namespace BlackCore
|
||||
BlackMisc::Network::IClientProvider *clientProvider,
|
||||
QObject *parent = nullptr);
|
||||
|
||||
//! \name When swift DB data are read
|
||||
//! @{
|
||||
virtual void onSwiftDbAllDataRead();
|
||||
virtual void onSwiftDbModelMatchingEntitiesRead();
|
||||
virtual void onSwiftDbAirportsRead();
|
||||
//! @}
|
||||
|
||||
//! Parsed in derived classes
|
||||
virtual bool parseDetails(const BlackMisc::CSimpleCommandParser &parser) = 0;
|
||||
|
||||
//! Airports from web services
|
||||
BlackMisc::Aviation::CAirportList getWebServiceAirports() const;
|
||||
|
||||
//! Airport from web services by ICAO code
|
||||
BlackMisc::Aviation::CAirport getWebServiceAirport(const BlackMisc::Aviation::CAirportIcaoCode &icao) const;
|
||||
|
||||
//! Max.airports in range
|
||||
int maxAirportsInRange() const;
|
||||
|
||||
//! \name Connected with remote aircraft provider signals
|
||||
//! @{
|
||||
//! Recalculate the rendered aircraft, this happens when restrictions are applied (max. aircraft, range)
|
||||
virtual void onRecalculatedRenderedAircraft(const BlackMisc::Simulation::CAirspaceAircraftSnapshot &snapshot);
|
||||
//! @}
|
||||
|
||||
//! Add new remote aircraft physically to the simulator
|
||||
//! \sa changeRemoteAircraftEnabled to hide a remote aircraft
|
||||
virtual bool physicallyAddRemoteAircraft(const BlackMisc::Simulation::CSimulatedAircraft &remoteAircraft) = 0;
|
||||
@@ -288,7 +368,7 @@ namespace BlackCore
|
||||
virtual bool physicallyRemoveRemoteAircraft(const BlackMisc::Aviation::CCallsign &callsign) = 0;
|
||||
|
||||
//! Remove remote aircraft from simulator
|
||||
virtual int physicallyRemoveMultipleRemoteAircraft(const BlackMisc::Aviation::CCallsignSet &callsigns) = 0;
|
||||
virtual int physicallyRemoveMultipleRemoteAircraft(const BlackMisc::Aviation::CCallsignSet &callsigns);
|
||||
|
||||
//! Remove all remote aircraft
|
||||
virtual int physicallyRemoveAllRemoteAircraft() = 0;
|
||||
@@ -301,8 +381,153 @@ namespace BlackCore
|
||||
//! \sa simulatorStatusChanged;
|
||||
void emitSimulatorCombinedStatus(SimulatorStatus oldStatus = Unspecified);
|
||||
|
||||
//! Emit the signal
|
||||
//! \copydoc BlackMisc::Simulation::IInterpolationSetupProvider::emitInterpolationSetupChanged
|
||||
virtual void emitInterpolationSetupChanged() override;
|
||||
|
||||
//! Display a debug log message based on BlackMisc::Simulation::CInterpolationAndRenderingSetup
|
||||
//! remark shows log messages of functions calls
|
||||
void debugLogMessage(const QString &msg);
|
||||
|
||||
//! Display a debug log message based on BlackMisc::Simulation::CInterpolationAndRenderingSetup
|
||||
//! remark shows log messages of functions calls
|
||||
void debugLogMessage(const QString &funcInfo, const QString &msg);
|
||||
|
||||
//! Show log messages?
|
||||
bool showDebugLogMessage() const;
|
||||
|
||||
//! Restore aircraft from the provider data
|
||||
void resetAircraftFromProvider(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Clear the related data as statistics etc.
|
||||
virtual void clearData(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Full reset of state
|
||||
//! \remark reset as it was unloaded without unloading
|
||||
//! \sa ISimulator::clearAllRemoteAircraftData
|
||||
virtual void reset();
|
||||
|
||||
//! Reset highlighting
|
||||
void resetHighlighting();
|
||||
|
||||
//! Restore all highlighted aircraft
|
||||
void stopHighlighting();
|
||||
|
||||
//! Slow timer used to highlight aircraft, can be used for other things too
|
||||
virtual void oneSecondTimerTimeout();
|
||||
|
||||
//! Kill timer if id is valid
|
||||
void safeKillTimer();
|
||||
|
||||
//! Inject weather grid to simulator
|
||||
virtual void injectWeatherGrid(const BlackMisc::Weather::CWeatherGrid &weatherGrid);
|
||||
|
||||
//! Blink the highlighted aircraft
|
||||
void blinkHighlightedAircraft();
|
||||
|
||||
//! Equal to last sent situation
|
||||
bool isEqualLastSent(const BlackMisc::Aviation::CAircraftSituation &compare) const;
|
||||
|
||||
//! Equal to last sent situation
|
||||
bool isEqualLastSent(const BlackMisc::Aviation::CAircraftParts &compare, const BlackMisc::Aviation::CCallsign &callsign) const;
|
||||
|
||||
//! Remember as last sent
|
||||
void rememberLastSent(const BlackMisc::Aviation::CAircraftSituation &sent);
|
||||
|
||||
//! Remember as last sent
|
||||
void rememberLastSent(const BlackMisc::Aviation::CAircraftParts &sent, const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Last sent situations
|
||||
BlackMisc::Aviation::CAircraftSituationList getLastSentCanLikelySkipNearGroundInterpolation() const;
|
||||
|
||||
//! Limit reached (max number of updates by token bucket if enabled)
|
||||
bool isUpdateAircraftLimited(qint64 timestamp = -1);
|
||||
|
||||
//! Limited as ISimulator::isUpdateAircraftLimited plus updating statistics
|
||||
bool isUpdateAircraftLimitedWithStats(qint64 startTime = -1);
|
||||
|
||||
//! Limit to updates per second
|
||||
bool limitToUpdatesPerSecond(int numberPerSecond);
|
||||
|
||||
//! Set own model
|
||||
void reverseLookupAndUpdateOwnAircraftModel(const BlackMisc::Simulation::CAircraftModel &model);
|
||||
|
||||
//! Set own model
|
||||
void reverseLookupAndUpdateOwnAircraftModel(const QString &modelString);
|
||||
|
||||
//! Info about invalid situation
|
||||
QString getInvalidSituationLogMessage(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Simulation::CInterpolationStatus &status, const QString &details = {}) const;
|
||||
|
||||
//! Can a new log message be generated without generating a "message" overflow
|
||||
//! \remark works per callsign
|
||||
//! \remark use this function when there is a risk that a lot of log. messages will be generated in a short time
|
||||
bool clampedLog(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::CStatusMessage &message);
|
||||
|
||||
//! Mark as justed logged
|
||||
//! \remark touch, but also return if it can be logged
|
||||
//! \remark use this function when there is a risk that a lot of log. messages will be generated in a short time
|
||||
void removedClampedLog(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Update stats and flags
|
||||
void setStatsRemoteAircraftUpdate(qint64 startTime, bool limited = false);
|
||||
|
||||
//! Lookup against DB data
|
||||
static BlackMisc::Simulation::CAircraftModel reverseLookupModel(const BlackMisc::Simulation::CAircraftModel &model);
|
||||
|
||||
bool m_pausedSimFreezesInterpolation = false; //!< paused simulator will also pause interpolation (so AI aircraft will hold)
|
||||
bool m_autoCalcAirportDistance = true; //!< automatically calculate airport distance and bearing
|
||||
bool m_updateRemoteAircraftInProgress = false; //!< currently updating remote aircraft
|
||||
int m_timerId = -1; //!< dispatch timer id
|
||||
int m_statsUpdateAircraftRuns = 0; //!< statistics update count
|
||||
int m_statsUpdateAircraftLimited = 0; //!< skipped because of max.update limitations
|
||||
double m_statsUpdateAircraftTimeAvgMs = 0; //!< statistics average update time
|
||||
qint64 m_statsUpdateAircraftTimeTotalMs = 0; //!< statistics total update time
|
||||
qint64 m_statsCurrentUpdateTimeMs = 0; //!< statistics current update time
|
||||
qint64 m_statsMaxUpdateTimeMs = 0; //!< statistics max.update time
|
||||
qint64 m_statsLastUpdateAircraftRequestedMs = 0; //!< when was the last aircraft update requested
|
||||
qint64 m_statsUpdateAircraftRequestedDeltaMs = 0; //!< delta time between 2 aircraft updates
|
||||
|
||||
BlackMisc::Simulation::CSimulatorInternals m_simulatorInternals; //!< setup object
|
||||
BlackMisc::Simulation::CInterpolationLogger m_interpolationLogger; //!< log.interpolation
|
||||
BlackMisc::Aviation::CTimestampPerCallsign m_clampedLogMsg; //!< when logged last for this callsign, can be used so there is no log message overflow
|
||||
BlackMisc::Aviation::CAircraftSituationPerCallsign m_lastSentSituations; //!< last situation sent to simulator
|
||||
BlackMisc::Aviation::CAircraftPartsPerCallsign m_lastSentParts; //!< last parts sent to simulator
|
||||
|
||||
// some optional functionality which can be used by the simulators as needed
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_addAgainAircraftWhenRemoved; //!< add this model again when removed, normally used to change model
|
||||
|
||||
// limit the update aircraft to a maximum per second
|
||||
BlackMisc::CTokenBucket m_limitUpdateAircraftBucket { 5, 100, 5 }; //!< means 50 per second
|
||||
bool m_limitUpdateAircraft = false; //!< limit the update frequency by using BlackMisc::CTokenBucket
|
||||
|
||||
// weather
|
||||
bool m_isWeatherActivated = false; //!< Is simulator weather activated?
|
||||
BlackMisc::Geo::CCoordinateGeodetic m_lastWeatherPosition; //!< Own aircraft position at which weather was fetched and injected last
|
||||
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TSelectedWeatherScenario> m_weatherScenarioSettings { this, &ISimulator::reloadWeatherSettings }; //!< Selected weather scenario
|
||||
|
||||
private:
|
||||
// remote aircraft provider ("rap") bound
|
||||
void rapOnRecalculatedRenderedAircraft(const BlackMisc::Simulation::CAirspaceAircraftSnapshot &snapshot);
|
||||
void rapOnRemoteProviderRemovedAircraft(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
// call with counters updated
|
||||
void callPhysicallyAddRemoteAircraft(const BlackMisc::Simulation::CSimulatedAircraft &remoteAircraft);
|
||||
void callPhysicallyRemoveRemoteAircraft(const BlackMisc::Aviation::CCallsign &remoteCallsign, bool blinking = false);
|
||||
|
||||
//! Display a logged situation in simulator
|
||||
void displayLoggedSituationInSimulator(const BlackMisc::Aviation::CCallsign &cs, bool stopLogging, int times = 40);
|
||||
|
||||
bool m_blinkCycle = false; //!< used for highlighting
|
||||
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting
|
||||
int m_timerCounter = 0; //!< allows to calculate n seconds
|
||||
QTimer m_oneSecondTimer; //!< multi purpose timer with 1 sec. interval
|
||||
BlackMisc::Aviation::CCallsignSet m_callsignsToBeRendered; //!< callsigns which will be rendered
|
||||
BlackMisc::CConnectionGuard m_remoteAircraftProviderConnections; //!< connected signal/slots
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_highlightedAircraft; //!< all other aircraft are to be ignored
|
||||
|
||||
// statistics values of how often those functions are called
|
||||
// those are the added counters, overflow will not be an issue here (discussed in T171 review)
|
||||
int m_statsPhysicallyAddedAircraft = 0; //!< statistics, how many aircraft added
|
||||
int m_statsPhysicallyRemovedAircraft = 0; //!< statistics, how many aircraft removed
|
||||
};
|
||||
|
||||
//! Interface to a simulator listener.
|
||||
|
||||
Reference in New Issue
Block a user