swift
|
Dummy implementation for testing purpose. More...
Public Member Functions | |
CRemoteAircraftProviderDummy (QObject *parent=nullptr) | |
Constructor. | |
void | insertNewSituation (const aviation::CAircraftSituation &situation) |
For testing, add new situation and fire signals. | |
void | insertNewSituations (const aviation::CAircraftSituationList &situations) |
For testing, add new situation and fire signals. | |
void | insertNewAircraftParts (const aviation::CCallsign &callsign, const aviation::CAircraftParts &parts, bool removeOutdatedParts) |
For testing, add new situation and fire signals. | |
void | insertNewAircraftParts (const aviation::CCallsign &callsign, const aviation::CAircraftPartsList &partsList, bool removeOutdatedParts) |
For testing, add new situation and fire signals. | |
virtual QObject * | asQObject () |
Members not implenented or fully implenented by CRemoteAircraftProvider. | |
virtual CAirspaceAircraftSnapshot | getLatestAirspaceAircraftSnapshot () const |
Members not implenented or fully implenented by CRemoteAircraftProvider. | |
![]() | |
CRemoteAircraftProvider (QObject *parent) | |
Constructor. | |
virtual CSimulatedAircraftList | getAircraftInRange () const |
All remote aircraft. More... | |
virtual aviation::CCallsignSet | getAircraftInRangeCallsigns () const |
Unique callsigns for aircraft in range. More... | |
virtual CSimulatedAircraft | getAircraftInRangeForCallsign (const aviation::CCallsign &callsign) const |
Aircraft for callsign. More... | |
virtual CAircraftModel | getAircraftInRangeModelForCallsign (const aviation::CCallsign &callsign) const |
Aircraft model for callsign. More... | |
virtual int | getAircraftInRangeCount () const |
Count remote aircraft. More... | |
virtual bool | isAircraftInRange (const aviation::CCallsign &callsign) const |
Is aircraft in range? More... | |
virtual bool | isVtolAircraft (const aviation::CCallsign &callsign) const |
Is VTOL aircraft? More... | |
virtual aviation::CAircraftSituationList | remoteAircraftSituations (const aviation::CCallsign &callsign) const |
Rendered aircraft situations (per callsign, time history) More... | |
virtual aviation::CAircraftSituation | remoteAircraftSituation (const aviation::CCallsign &callsign, int index) const |
Rendered aircraft situations (per callsign and index) More... | |
virtual MillisecondsMinMaxMean | remoteAircraftSituationsTimestampDifferenceMinMaxMean (const aviation::CCallsign &callsign) const |
Average update time. More... | |
virtual aviation::CAircraftSituationList | latestRemoteAircraftSituations () const |
Latest aircraft situation for all callsigns. More... | |
virtual aviation::CAircraftSituationList | latestOnGroundProviderElevations () const |
Latest aircraft situation "on ground" having a provider elevation. More... | |
virtual int | remoteAircraftSituationsCount (const aviation::CCallsign &callsign) const |
Number of remote aircraft situations for callsign. More... | |
virtual aviation::CAircraftPartsList | remoteAircraftParts (const aviation::CCallsign &callsign) const |
All parts (per callsign, time history) More... | |
virtual int | remoteAircraftPartsCount (const aviation::CCallsign &callsign) const |
All parts (per callsign, time history) More... | |
virtual bool | isRemoteAircraftSupportingParts (const aviation::CCallsign &callsign) const |
Is remote aircraft supporting parts? More... | |
virtual int | getRemoteAircraftSupportingPartsCount () const |
Number of aircraft supporting parts. More... | |
virtual aviation::CCallsignSet | remoteAircraftSupportingParts () const |
Remote aircraft supporting parts. More... | |
virtual aviation::CAircraftSituationChangeList | remoteAircraftSituationChanges (const aviation::CCallsign &callsign) const |
Aircraft changes. More... | |
virtual int | remoteAircraftSituationChangesCount (const aviation::CCallsign &callsign) const |
Aircraft changes count. More... | |
virtual bool | updateAircraftEnabled (const aviation::CCallsign &callsign, bool enabledForRendering) |
Enable/disable aircraft and follow up logic like sending signals. More... | |
virtual bool | setAircraftEnabledFlag (const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering) |
Just set enable/disable aircraft flag, no further logic. More... | |
virtual int | updateMultipleAircraftEnabled (const aviation::CCallsignSet &callsigns, bool enabledForRendering) |
Enable/disable aircraft. More... | |
virtual bool | updateAircraftModel (const aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) |
Change model. More... | |
virtual bool | updateAircraftNetworkModel (const aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) |
Change network model. More... | |
virtual bool | updateFastPositionEnabled (const aviation::CCallsign &callsign, bool enableFastPositonUpdates) |
Change fast position updates. More... | |
virtual bool | updateAircraftRendered (const aviation::CCallsign &callsign, bool rendered) |
Set aircraft rendered. More... | |
virtual int | updateMultipleAircraftRendered (const aviation::CCallsignSet &callsigns, bool rendered) |
Set aircraft rendered. More... | |
virtual int | updateAircraftGroundElevation (const aviation::CCallsign &callsign, const geo::CElevationPlane &elevation, aviation::CAircraftSituation::GndElevationInfo info, bool *setForOnGroundPosition) |
Update the ground elevation. More... | |
virtual bool | updateCG (const aviation::CCallsign &callsign, const physical_quantities::CLength &cg) |
Update the CG. More... | |
virtual bool | updateCGAndModelString (const aviation::CCallsign &callsign, const physical_quantities::CLength &cg, const QString &modelString) |
Update the CG and model string. More... | |
virtual aviation::CCallsignSet | updateCGForModel (const QString &modelString, const physical_quantities::CLength &cg) |
Update the CG for this model string. More... | |
virtual physical_quantities::CLength | getCGFromDB (const aviation::CCallsign &callsign) const |
CG values from DB. More... | |
virtual physical_quantities::CLength | getCGFromDB (const QString &modelString) const |
CG values from DB. More... | |
virtual void | rememberCGFromDB (const physical_quantities::CLength &cgFromDB, const aviation::CCallsign &callsign) |
CG values from DB. More... | |
virtual void | rememberCGFromDB (const physical_quantities::CLength &cgFromDB, const QString &modelString) |
CG values from DB. More... | |
virtual void | updateMarkAllAsNotRendered () |
Mark all as not rendered. More... | |
virtual CStatusMessageList | getAircraftPartsHistory (const aviation::CCallsign &callsign) const |
Get aircraft parts history. More... | |
virtual bool | isAircraftPartsHistoryEnabled () const |
Is storing aircraft parts history enabled? More... | |
virtual void | enableAircraftPartsHistory (bool enabled) |
Enable storing of aircraft parts history. More... | |
virtual int | aircraftSituationsAdded () const |
Number of situations added. More... | |
virtual int | aircraftPartsAdded () const |
Number of parts added. More... | |
virtual qint64 | situationsLastModified (const aviation::CCallsign &callsign) const |
When last modified. More... | |
virtual qint64 | partsLastModified (const aviation::CCallsign &callsign) const |
When last modified. More... | |
virtual geo::CElevationPlane | averageElevationOfNonMovingAircraft (const aviation::CAircraftSituation &reference, const physical_quantities::CLength &range, int minValues=1, int sufficientValues=2) const |
Average elevation of aircraft in given range, which are NOT moving. More... | |
virtual QList< QMetaObject::Connection > | connectRemoteAircraftProviderSignals (QObject *receiver, std::function< void(const aviation::CAircraftSituation &)> addedSituationSlot, std::function< void(const aviation::CCallsign &, const aviation::CAircraftParts &)> addedPartsSlot, std::function< void(const aviation::CCallsign &)> removedAircraftSlot, std::function< void(const CAirspaceAircraftSnapshot &)> aircraftSnapshotSlot) |
Connect signals to slot receiver. As the interface is no QObject, slots can not be connected directly. In order to disconnect a list of connections is provided, which have to be disconnected manually. More... | |
virtual void | enableReverseLookupMessages (ReverseLookupLogging enable) |
Enable reverse lookup logging. More... | |
virtual ReverseLookupLogging | isReverseLookupMessagesEnabled () const |
Enabled reverse lookup logging? More... | |
virtual swift::misc::CStatusMessageList | getReverseLookupMessages (const swift::misc::aviation::CCallsign &callsign) const |
Get reverse lookup meesages. More... | |
void | clear () |
Clear all data. | |
bool | hasTestAltitudeOffset (const aviation::CCallsign &callsign) const |
Has test offset value? | |
bool | hasTestAltitudeOffsetGlobalValue () const |
Has test offset value? | |
bool | testAddAltitudeOffset (const aviation::CCallsign &callsign, const physical_quantities::CLength &offset) |
Offset for callsign. | |
void | addReverseLookupMessages (const aviation::CCallsign &callsign, const CStatusMessageList &messages) |
Reverse lookup messages. More... | |
void | addReverseLookupMessage (const aviation::CCallsign &callsign, const CStatusMessage &message) |
Reverse lookup messages. More... | |
void | addReverseLookupMessage (const aviation::CCallsign &callsign, const QString &message, CStatusMessage::StatusSeverity severity=CStatusMessage::SeverityInfo) |
Reverse lookup messages. More... | |
![]() | |
virtual | ~IRemoteAircraftProvider () |
Destructor. | |
IRemoteAircraftProvider (const IRemoteAircraftProvider &)=delete | |
Copy constructor. | |
IRemoteAircraftProvider & | operator= (const IRemoteAircraftProvider &)=delete |
Copy assignment operator. | |
aviation::CAircraftParts | getLatestAircraftParts (const aviation::CCallsign &callsign) const |
Get the latest aircraft parts (if any, otherwise default) More... | |
![]() | |
virtual | ~IProvider () |
Dtor. | |
IProvider (const IProvider &)=delete | |
Copy constructor. | |
IProvider & | operator= (const IProvider &)=delete |
Copy assignment operator. | |
![]() | |
const CIdentifier & | identifier () const |
Get identifier. | |
void | setIdentifier (const CIdentifier &identifier) |
Set identifier, allows to set an external identifier. | |
bool | isMyIdentifier (const CIdentifier &otherIdentifier) const |
My identifier? | |
Static Public Member Functions | |
static CRemoteAircraftProviderDummy * | instance () |
Singleton. | |
![]() | |
static const QStringList & | getLogCategories () |
Log categories. | |
![]() | |
static void | removeOutdatedParts (aviation::CAircraftPartsList &partsList) |
Remove outdated aircraft parts, but never the most recent one. | |
static const aviation::CCallsign & | testAltitudeOffsetCallsign () |
Wildcard callsign. | |
Additional Inherited Members | |
![]() | |
void | addedAircraft (const swift::misc::simulation::CSimulatedAircraft &remoteAircraft) |
A new aircraft appeared. | |
void | addedAircraftParts (const swift::misc::aviation::CCallsign &callsign, const swift::misc::aviation::CAircraftParts &parts) |
Parts added. | |
void | addedAircraftSituation (const swift::misc::aviation::CAircraftSituation &situation) |
Situation added. | |
void | changedAircraftInRange () |
Aircraft were changed. | |
void | removedAircraft (const swift::misc::aviation::CCallsign &callsign) |
An aircraft disappeared. | |
void | airspaceAircraftSnapshot (const swift::misc::simulation::CAirspaceAircraftSnapshot &snapshot) |
New aircraft snapshot. More... | |
![]() | |
static constexpr int | MaxSituationsPerCallsign = 50 |
How many situations we keep per callsign. | |
static constexpr int | MaxPartsPerCallsign = 50 |
How many parts we keep per callsign. | |
static constexpr int | MaxPartsAgePerCallsignSecs = 60 |
How many seconds to keep parts for interpolation. | |
![]() | |
bool | removeAircraft (const aviation::CCallsign &callsign) |
Remove all aircraft in range. More... | |
void | removeAllAircraft () |
Remove all aircraft in range. More... | |
void | removeReverseLookupMessages (const aviation::CCallsign &callsign) |
Remove the lookup messages. More... | |
bool | addNewAircraftInRange (const CSimulatedAircraft &aircraft) |
Add new aircraft, ignored if aircraft already exists. More... | |
CSimulatedAircraft | addOrUpdateAircraftInRange (const aviation::CCallsign &callsign, const QString &aircraftIcao, const QString &airlineIcao, const QString &livery, const QString &modelString, CAircraftModel::ModelType modelType, CStatusMessageList *log=nullptr) |
Init a new aircraft and add it or update model of existing aircraft. More... | |
int | updateAircraftInRange (const aviation::CCallsign &callsign, const CPropertyIndexVariantMap &vm, bool skipEqualValues=true) |
Update aircraft. More... | |
bool | updateAircraftInRangeDistanceBearing (const aviation::CCallsign &callsign, const aviation::CAircraftSituation &situation, const physical_quantities::CLength &distance, const physical_quantities::CAngle &bearing) |
Update aircraft bearing, distance and situation. More... | |
virtual aviation::CAircraftSituation | storeAircraftSituation (const aviation::CAircraftSituation &situation, bool allowTestAltitudeOffset=true) |
Store an aircraft situation. More... | |
bool | guessOnGroundAndUpdateModelCG (aviation::CAircraftSituation &situation, const aviation::CAircraftSituationChange &change, const CAircraftModel &aircraftModel) |
Guess situation "on ground" and update model's CG if applicable. More... | |
aviation::CAircraftSituation | addTestAltitudeOffsetToSituation (const aviation::CAircraftSituation &situation) const |
Add an offset for testing. | |
ReverseLookupLogging | whatToReverseLog () const |
What to log? More... | |
void | storeAircraftParts (const aviation::CCallsign &callsign, const aviation::CAircraftParts &parts, bool removeOutdated) |
Store an aircraft part. More... | |
void | storeAircraftParts (const aviation::CCallsign &callsign, const QJsonObject &jsonObject, qint64 currentOffsetMs) |
![]() | |
IRemoteAircraftProvider () | |
Constructor. | |
![]() | |
IProvider () | |
Constructor. | |
![]() | |
CIdentifiable (const QString &objectName) | |
Use literal based object name. | |
CIdentifiable (QObject *nameProvider) | |
Connect with QObject providing the name. | |
CIdentifiable () | |
Construct without a name. | |
~CIdentifiable () | |
Destructor. | |
CIdentifiable (const CIdentifiable &)=default | |
Copy constructor. | |
CIdentifiable & | operator= (const CIdentifiable &)=default |
Copy assignment operator. | |
![]() | |
static int | setGroundElevationCheckedAndGuessGround (aviation::CAircraftSituationList &situations, const geo::CElevationPlane &elevationPlane, aviation::CAircraftSituation::GndElevationInfo info, const simulation::CAircraftModel &model, aviation::CAircraftSituationChange *changeOut, bool *setForOnGroundPosition) |
Set ground elevation from elevation plane and guess ground. More... | |
Dummy implementation for testing purpose.
Definition at line 20 of file remoteaircraftproviderdummy.h.