|
swift
|
Class representing a SimConnect object. More...
#include <simconnectobject.h>
Public Types | |
| enum | SimObjectType { AircraftNonAtc , AircraftSimulatedObject , TerrainProbe , AllTypes } |
| Type. More... | |
Public Member Functions | |
| CSimConnectObject () | |
| Constructor. | |
| CSimConnectObject (SimObjectType type) | |
| Constructor. | |
| CSimConnectObject (const swift::misc::simulation::CSimulatedAircraft &aircraft, DWORD requestId, swift::misc::simulation::ISimulationEnvironmentProvider *simEnvProvider, swift::misc::simulation::IInterpolationSetupProvider *setupProvider, swift::misc::simulation::IRemoteAircraftProvider *remoteAircraftProvider, swift::misc::simulation::CInterpolationLogger *logger) | |
| Constructor providing initial situation/parts. | |
| const swift::misc::aviation::CCallsign & | getCallsign () const |
| Get callsign. | |
| const QString & | getCallsignAsString () const |
| Get callsign. | |
| bool | hasCallsign () const |
| Callsign? | |
| const swift::misc::simulation::CSimulatedAircraft & | getAircraft () const |
| Simulated aircraft (as added). | |
| const swift::misc::simulation::CAircraftModel & | getAircraftModel () const |
| Simulated aircraft model. | |
| const QString & | getAircraftModelString () const |
| Simulated aircraft model string. | |
| SimObjectType | getType () const |
| Object type. | |
| const QString & | getTypeAsString () const |
| Type as string. | |
| bool | isAircraft () const |
| Aircraft? | |
| bool | isAircraftSimulatedObject () const |
| Aircraft simulated object? | |
| bool | isAircraftNonAtc () const |
| Aircraft NON ATC? | |
| bool | isTerrainProbe () const |
| Probe? | |
| void | setType (SimObjectType type) |
| Set the type. | |
| void | setAircraft (const swift::misc::simulation::CSimulatedAircraft &aircraft) |
| Set the aircraft. | |
| void | setAircraftModelString (const QString &modelString) |
| Set model string. | |
| void | setAircraftCG (const swift::misc::physical_quantities::CLength &cg) |
| Set CG. | |
| const swift::misc::aviation::CAircraftLights & | getCurrentLightsInSimulator () const |
| Get current lights (requested from simulator). | |
| bool | hasCurrentLightsInSimulator () const |
| Received lights in simulator. | |
| void | setCurrentLightsInSimulator (const swift::misc::aviation::CAircraftLights &lights) |
| Set current lights when received from simulator. | |
| void | fakeCurrentLightsInSimulator () |
| Pretend to have received lights from simulator. | |
| const swift::misc::aviation::CAircraftLights & | getLightsAsSent () const |
| Lights as sent to simulator. | |
| void | setLightsAsSent (const swift::misc::aviation::CAircraftLights &lights) |
| Lights as sent to simulator. | |
| SIMCONNECT_PERIOD | getSimDataPeriod () const |
| How often do we request data from simulator for this remote aircraft. | |
| void | setSimDataPeriod (SIMCONNECT_PERIOD period) |
| How often do we request data from simulator for this remote aircraft. | |
| void | setRequestId (DWORD id) |
| Set Simconnect request id. | |
| DWORD | getRequestId () const |
| Get SimConnect request id. | |
| DWORD | getRequestId (CSimConnectDefinitions::SimObjectRequest offset) const |
| Get SimConnect with offset. | |
| void | setObjectId (DWORD id) |
| Set Simconnect object id. | |
| DWORD | getObjectId () const |
| Get SimConnect object id. | |
| QString | getObjectIdAsString () const |
| Get SimConnect object id. | |
| bool | hasValidRequestId () const |
| Valid request id? | |
| bool | hasValidObjectId () const |
| Valid object id? | |
| bool | isPendingAdded () const |
| Object is requested in simulator, not yet confirmed added. | |
| bool | isOutdatedPendingAdded (qint64 thresholdMs=5000, qint64 currentMsSinceEpoch=-1) const |
| Still pending. | |
| bool | isConfirmedAdded () const |
| Adding is confirmed. | |
| void | setConfirmedAdded (bool confirm) |
| Marked as confirmed, means the simulator has "confirmed" the objectId as added and not instantly removed the object. | |
| bool | isPendingRemoved () const |
| Removing is pending. | |
| bool | isReadyToSend () const |
| Object which can be used for sending, not pending and valid ids. | |
| void | setPendingRemoved (bool pending) |
| Marked as pending for removal. | |
| bool | isPending () const |
| Pending added or removed? | |
| bool | hasCamera () const |
| Has camera? | |
| void | resetCameraPositions () |
| Reset camera positions. | |
| const SIMCONNECT_DATA_XYZ & | cameraPosition () const |
| Camera position. | |
| const SIMCONNECT_DATA_PBH & | cameraRotation () const |
| Camera rotation;. | |
| void | setCameraPositionAndRotation (const SIMCONNECT_DATA_XYZ &position, const SIMCONNECT_DATA_PBH &rotation) |
| Camera position/rotation. | |
| GUID | getCameraGUID () const |
| Camera GUID. | |
| void | setCameraGUID (GUID guid) |
| Set camera GUID. | |
| void | removeCamera () |
| No camera anymore. | |
| void | setObserverName (const QString &observer) |
| Set observer. | |
| const QString & | getObserverName () const |
| Observer name. | |
| void | resetState () |
| Reset the state (like it was a new onject) without affecting interpolator and aircraft. | |
| void | resetToAddAgain () |
| Reset so it can be added again. | |
| void | resetTimestampToNow () |
| Reset the timestamp. | |
| bool | isVtol () const |
| VTOL? | |
| bool | isValid () const |
| Valid? | |
| bool | isInvalid () const |
| Invalid? | |
| bool | hasCreatedTimestamp () const |
| Created timestamp? | |
| qint64 | getCreatedTimestamp () const |
| Created timestamp. | |
| int | getEngineCount () const |
| Engine count. | |
| bool | hasValidRequestAndObjectId () const |
| Was the object really added to simulator. | |
| int | getAddingExceptions () const |
| Adding has been failed before. | |
| void | setAddingExceptions (int number) |
| Set adding failed before. | |
| void | increaseAddingExceptions () |
| Increase adding exception. | |
| void | decreaseAddingExceptions () |
| Decrease adding exception. | |
| int | getAddingDirectlyRemoved () const |
| Adding and directly removed. | |
| void | setAddingDirectlyRemoved (int number) |
| Set adding and directly removed. | |
| void | increaseAddingDirectlyRemoved () |
| Increase adding and directly removed. | |
| void | copyAddingFailureCounters (const CSimConnectObject &otherObject) |
| Copy the counters from another object. | |
| const QByteArray & | getCallsignByteArray () const |
| Callsign as LATIN1. | |
| QString | getInterpolatorInfo (swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const |
| Get an interpolator info string (for debug info). | |
| void | attachInterpolatorLogger (swift::misc::simulation::CInterpolationLogger *logger) const |
| Attach an observer to read the interpolator's state for debugging. | |
| swift::misc::simulation::CInterpolationResult | getInterpolation (qint64 currentTimeSinceEpoch, const swift::misc::simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const |
| Get interpolated situation. | |
| const swift::misc::aviation::CAircraftSituation & | getLastInterpolatedSituation (swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const |
| Latest interpolation result. | |
| const swift::misc::CStatusMessageList & | getInterpolationMessages (swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const |
| Interpolation messages. | |
| swift::misc::simulation::CInterpolatorMulti * | getInterpolator () const |
| Interpolator. | |
| QString | toQString () const |
| SimObject as string. | |
| bool | isAddedWhileRemoving () |
| Special states. | |
| void | setAddedWhileRemoving (bool addedWileRemoved) |
| Special states. | |
| bool | isRemovedWhileAdding () const |
| Special states. | |
| void | setRemovedWhileAdding (bool removedWhileAdding) |
| Special states. | |
Static Public Member Functions | |
| static SimObjectType | requestIdToType (DWORD requestId) |
| Type of id. | |
| static const QString & | typeToString (SimObjectType type) |
| Type to string. | |
| static bool | isSameTypeGroup (SimObjectType t1, SimObjectType t2) |
| Same type. | |
| static bool | isAircraft (SimObjectType type) |
| Aircraft? | |
Class representing a SimConnect object.
Definition at line 21 of file simconnectobject.h.
Type.
Definition at line 25 of file simconnectobject.h.
| swift::simplugin::fsxcommon::CSimConnectObject::CSimConnectObject | ( | ) |
Constructor.
Definition at line 21 of file simconnectobject.cpp.
| swift::simplugin::fsxcommon::CSimConnectObject::CSimConnectObject | ( | CSimConnectObject::SimObjectType | type | ) |
Constructor.
Definition at line 23 of file simconnectobject.cpp.
| swift::simplugin::fsxcommon::CSimConnectObject::CSimConnectObject | ( | const swift::misc::simulation::CSimulatedAircraft & | aircraft, |
| DWORD | requestId, | ||
| swift::misc::simulation::ISimulationEnvironmentProvider * | simEnvProvider, | ||
| swift::misc::simulation::IInterpolationSetupProvider * | setupProvider, | ||
| swift::misc::simulation::IRemoteAircraftProvider * | remoteAircraftProvider, | ||
| swift::misc::simulation::CInterpolationLogger * | logger ) |
Constructor providing initial situation/parts.
Definition at line 28 of file simconnectobject.cpp.
| void swift::simplugin::fsxcommon::CSimConnectObject::attachInterpolatorLogger | ( | swift::misc::simulation::CInterpolationLogger * | logger | ) | const |
Attach an observer to read the interpolator's state for debugging.
bool log flag Definition at line 207 of file simconnectobject.cpp.
|
inline |
Camera position.
Definition at line 191 of file simconnectobject.h.
|
inline |
Camera rotation;.
Definition at line 194 of file simconnectobject.h.
| void swift::simplugin::fsxcommon::CSimConnectObject::copyAddingFailureCounters | ( | const CSimConnectObject & | otherObject | ) |
Copy the counters from another object.
Definition at line 195 of file simconnectobject.cpp.
|
inline |
Decrease adding exception.
Definition at line 262 of file simconnectobject.h.
|
inline |
Pretend to have received lights from simulator.
Definition at line 113 of file simconnectobject.h.
|
inline |
Adding and directly removed.
Definition at line 271 of file simconnectobject.h.
|
inline |
Adding has been failed before.
Definition at line 253 of file simconnectobject.h.
|
inline |
Simulated aircraft (as added).
Definition at line 56 of file simconnectobject.h.
|
inline |
Simulated aircraft model.
Definition at line 59 of file simconnectobject.h.
|
inline |
Simulated aircraft model string.
Definition at line 62 of file simconnectobject.h.
|
inline |
Get callsign.
Definition at line 47 of file simconnectobject.h.
|
inline |
Get callsign.
Definition at line 50 of file simconnectobject.h.
|
inline |
Callsign as LATIN1.
Definition at line 283 of file simconnectobject.h.
|
inline |
Camera GUID.
Definition at line 204 of file simconnectobject.h.
|
inline |
Created timestamp.
Definition at line 244 of file simconnectobject.h.
|
inline |
Get current lights (requested from simulator).
Definition at line 98 of file simconnectobject.h.
|
inline |
Engine count.
Definition at line 247 of file simconnectobject.h.
| CInterpolationResult swift::simplugin::fsxcommon::CSimConnectObject::getInterpolation | ( | qint64 | currentTimeSinceEpoch, |
| const swift::misc::simulation::CInterpolationAndRenderingSetupPerCallsign & | setup, | ||
| uint32_t | aircraftNumber ) const |
Get interpolated situation.
| currentTimeSinceEpoch | milliseconds since epoch for which the situation should be interpolated |
| setup | interpolation setup |
| aircraftNumber | number used to spread the computational load of part interpolation |
Definition at line 213 of file simconnectobject.cpp.
| const CStatusMessageList & swift::simplugin::fsxcommon::CSimConnectObject::getInterpolationMessages | ( | swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode | mode | ) | const |
Interpolation messages.
Definition at line 235 of file simconnectobject.cpp.
|
inline |
Interpolator.
Definition at line 307 of file simconnectobject.h.
| QString swift::simplugin::fsxcommon::CSimConnectObject::getInterpolatorInfo | ( | swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode | mode | ) | const |
Get an interpolator info string (for debug info).
Definition at line 201 of file simconnectobject.cpp.
| const CAircraftSituation & swift::simplugin::fsxcommon::CSimConnectObject::getLastInterpolatedSituation | ( | swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode | mode | ) | const |
Latest interpolation result.
Definition at line 225 of file simconnectobject.cpp.
|
inline |
Lights as sent to simulator.
Definition at line 116 of file simconnectobject.h.
|
inline |
Get SimConnect object id.
Definition at line 140 of file simconnectobject.h.
|
inline |
Get SimConnect object id.
Definition at line 143 of file simconnectobject.h.
|
inline |
Observer name.
Definition at line 220 of file simconnectobject.h.
|
inline |
Get SimConnect request id.
Definition at line 131 of file simconnectobject.h.
| DWORD swift::simplugin::fsxcommon::CSimConnectObject::getRequestId | ( | CSimConnectDefinitions::SimObjectRequest | offset | ) | const |
Get SimConnect with offset.
Definition at line 75 of file simconnectobject.cpp.
|
inline |
How often do we request data from simulator for this remote aircraft.
Definition at line 122 of file simconnectobject.h.
|
inline |
Object type.
Definition at line 65 of file simconnectobject.h.
|
inline |
Type as string.
Definition at line 68 of file simconnectobject.h.
|
inline |
Callsign?
Definition at line 53 of file simconnectobject.h.
|
inline |
Has camera?
Definition at line 185 of file simconnectobject.h.
|
inline |
Created timestamp?
Definition at line 241 of file simconnectobject.h.
|
inline |
Received lights in simulator.
Definition at line 104 of file simconnectobject.h.
|
inline |
Valid object id?
Definition at line 149 of file simconnectobject.h.
| bool swift::simplugin::fsxcommon::CSimConnectObject::hasValidRequestAndObjectId | ( | ) | const |
Was the object really added to simulator.
Definition at line 190 of file simconnectobject.cpp.
|
inline |
Valid request id?
Definition at line 146 of file simconnectobject.h.
|
inline |
Increase adding and directly removed.
Definition at line 277 of file simconnectobject.h.
|
inline |
Increase adding exception.
Definition at line 259 of file simconnectobject.h.
|
inline |
Special states.
Definition at line 166 of file simconnectobject.h.
|
inline |
Aircraft?
Definition at line 71 of file simconnectobject.h.
|
static |
Aircraft?
Definition at line 297 of file simconnectobject.cpp.
|
inline |
Aircraft NON ATC?
Definition at line 80 of file simconnectobject.h.
|
inline |
Aircraft simulated object?
Definition at line 77 of file simconnectobject.h.
| bool swift::simplugin::fsxcommon::CSimConnectObject::isConfirmedAdded | ( | ) | const |
Adding is confirmed.
Definition at line 121 of file simconnectobject.cpp.
|
inline |
Invalid?
Definition at line 238 of file simconnectobject.h.
| bool swift::simplugin::fsxcommon::CSimConnectObject::isOutdatedPendingAdded | ( | qint64 | thresholdMs = 5000, |
| qint64 | currentMsSinceEpoch = -1 ) const |
Still pending.
Definition at line 103 of file simconnectobject.cpp.
|
inline |
Pending added or removed?
Definition at line 182 of file simconnectobject.h.
| bool swift::simplugin::fsxcommon::CSimConnectObject::isPendingAdded | ( | ) | const |
Object is requested in simulator, not yet confirmed added.
Definition at line 101 of file simconnectobject.cpp.
|
inline |
Removing is pending.
Definition at line 173 of file simconnectobject.h.
| bool swift::simplugin::fsxcommon::CSimConnectObject::isReadyToSend | ( | ) | const |
Object which can be used for sending, not pending and valid ids.
Definition at line 142 of file simconnectobject.cpp.
|
inline |
Special states.
Definition at line 168 of file simconnectobject.h.
|
static |
Same type.
Definition at line 288 of file simconnectobject.cpp.
|
inline |
Probe?
Definition at line 83 of file simconnectobject.h.
|
inline |
Valid?
Definition at line 235 of file simconnectobject.h.
|
inline |
VTOL?
Definition at line 232 of file simconnectobject.h.
|
inline |
No camera anymore.
Definition at line 214 of file simconnectobject.h.
|
static |
Type of id.
Definition at line 258 of file simconnectobject.cpp.
| void swift::simplugin::fsxcommon::CSimConnectObject::resetCameraPositions | ( | ) |
Reset camera positions.
Definition at line 155 of file simconnectobject.cpp.
| void swift::simplugin::fsxcommon::CSimConnectObject::resetState | ( | ) |
Reset the state (like it was a new onject) without affecting interpolator and aircraft.
Definition at line 165 of file simconnectobject.cpp.
|
inline |
Reset the timestamp.
Definition at line 229 of file simconnectobject.h.
| void swift::simplugin::fsxcommon::CSimConnectObject::resetToAddAgain | ( | ) |
Reset so it can be added again.
Definition at line 183 of file simconnectobject.cpp.
| void swift::simplugin::fsxcommon::CSimConnectObject::setAddedWhileRemoving | ( | bool | addedWileRemoved | ) |
Special states.
Definition at line 135 of file simconnectobject.cpp.
|
inline |
Set adding and directly removed.
Definition at line 274 of file simconnectobject.h.
|
inline |
Set adding failed before.
Definition at line 256 of file simconnectobject.h.
| void swift::simplugin::fsxcommon::CSimConnectObject::setAircraft | ( | const swift::misc::simulation::CSimulatedAircraft & | aircraft | ) |
Set the aircraft.
Definition at line 42 of file simconnectobject.cpp.
| void swift::simplugin::fsxcommon::CSimConnectObject::setAircraftCG | ( | const swift::misc::physical_quantities::CLength & | cg | ) |
Set CG.
Definition at line 58 of file simconnectobject.cpp.
| void swift::simplugin::fsxcommon::CSimConnectObject::setAircraftModelString | ( | const QString & | modelString | ) |
Set model string.
Definition at line 49 of file simconnectobject.cpp.
|
inline |
Set camera GUID.
Definition at line 207 of file simconnectobject.h.
|
inline |
Camera position/rotation.
Definition at line 197 of file simconnectobject.h.
| void swift::simplugin::fsxcommon::CSimConnectObject::setConfirmedAdded | ( | bool | confirm | ) |
Marked as confirmed, means the simulator has "confirmed" the objectId as added and not instantly removed the object.
Definition at line 127 of file simconnectobject.cpp.
|
inline |
Set current lights when received from simulator.
Definition at line 107 of file simconnectobject.h.
|
inline |
Lights as sent to simulator.
Definition at line 119 of file simconnectobject.h.
| void swift::simplugin::fsxcommon::CSimConnectObject::setObjectId | ( | DWORD | id | ) |
Set Simconnect object id.
Definition at line 95 of file simconnectobject.cpp.
|
inline |
Set observer.
Definition at line 217 of file simconnectobject.h.
| void swift::simplugin::fsxcommon::CSimConnectObject::setPendingRemoved | ( | bool | pending | ) |
Marked as pending for removal.
Definition at line 147 of file simconnectobject.cpp.
| void swift::simplugin::fsxcommon::CSimConnectObject::setRemovedWhileAdding | ( | bool | removedWhileAdding | ) |
Special states.
Definition at line 137 of file simconnectobject.cpp.
| void swift::simplugin::fsxcommon::CSimConnectObject::setRequestId | ( | DWORD | id | ) |
Set Simconnect request id.
Definition at line 67 of file simconnectobject.cpp.
|
inline |
How often do we request data from simulator for this remote aircraft.
Definition at line 125 of file simconnectobject.h.
|
inline |
Set the type.
Definition at line 86 of file simconnectobject.h.
| QString swift::simplugin::fsxcommon::CSimConnectObject::toQString | ( | ) | const |
SimObject as string.
Definition at line 245 of file simconnectobject.cpp.
|
static |
Type to string.
Definition at line 272 of file simconnectobject.cpp.