6 #include <QLatin1String>
11 class QDBusConnection;
13 #define XSWIFTBUS_SERVICE_SERVICENAME "org.swift-project.xswiftbus"
15 namespace swift::simplugin::xplane
25 s = connection.connect(
26 QString(),
"/xswiftbus/service",
"org.swift_project.xswiftbus.service",
"aircraftModelChanged",
this,
30 s = connection.connect(
31 QString(),
"/xswiftbus/service",
"org.swift_project.xswiftbus.service",
"airportsInRangeUpdated",
this,
32 SIGNAL(airportsInRangeUpdated(QStringList, QStringList, QList<double>, QList<double>, QList<double>)));
35 s = connection.connect(QString(),
"/xswiftbus/service",
"org.swift_project.xswiftbus.service",
43 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getVersionNumber"));
48 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getCommitHash"));
53 if (!o_xplaneData) {
return; }
54 QPointer<CXSwiftBusServiceProxy> myself(
this);
55 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
56 if (!myself) {
return; }
57 QDBusPendingReply<double, double, double, double, double, double, double, double> reply = *watcher;
62 o_xplaneData->
altitudeM = reply.argumentAt<2>();
64 o_xplaneData->
pitchDeg = reply.argumentAt<4>();
65 o_xplaneData->
rollDeg = reply.argumentAt<5>();
69 watcher->deleteLater();
71 m_dbusInterface->
callDBusAsync(QLatin1String(
"getOwnAircraftSituationData"), callback);
76 if (!o_xplaneData) {
return; }
77 QPointer<CXSwiftBusServiceProxy> myself(
this);
78 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
79 if (!myself) {
return; }
80 QDBusPendingReply<double, double, double, double, double, double> reply = *watcher;
91 m_dbusInterface->
callDBusAsync(QLatin1String(
"getOwnAircraftVelocityData"), callback);
96 if (!o_xplaneData) {
return; }
97 QPointer<CXSwiftBusServiceProxy> myself(
this);
98 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
99 if (!myself) {
return; }
100 QDBusPendingReply<int, int, double, bool, bool> reply = *watcher;
101 if (!reply.isError())
105 o_xplaneData->
com1Volume = reply.argumentAt<2>();
109 watcher->deleteLater();
111 m_dbusInterface->
callDBusAsync(QLatin1String(
"getOwnAircraftCom1Data"), callback);
116 if (!o_xplaneData) {
return; }
117 QPointer<CXSwiftBusServiceProxy> myself(
this);
118 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
119 if (!myself) {
return; }
120 QDBusPendingReply<int, int, double, bool, bool> reply = *watcher;
121 if (!reply.isError())
125 o_xplaneData->
com2Volume = reply.argumentAt<2>();
129 watcher->deleteLater();
131 m_dbusInterface->
callDBusAsync(QLatin1String(
"getOwnAircraftCom2Data"), callback);
136 if (!o_xplaneData) {
return; }
137 QPointer<CXSwiftBusServiceProxy> myself(
this);
138 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
139 if (!myself) {
return; }
140 QDBusPendingReply<int, int, bool> reply = *watcher;
141 if (!reply.isError())
143 o_xplaneData->
xpdrCode = reply.argumentAt<0>();
144 o_xplaneData->
xpdrMode = reply.argumentAt<1>();
145 o_xplaneData->
xpdrIdent = reply.argumentAt<2>();
147 watcher->deleteLater();
149 m_dbusInterface->
callDBusAsync(QLatin1String(
"getOwnAircraftXpdr"), callback);
154 if (!o_xplaneData) {
return; }
155 QPointer<CXSwiftBusServiceProxy> myself(
this);
156 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
157 if (!myself) {
return; }
158 QDBusPendingReply<bool, bool, bool, bool, bool> reply = *watcher;
159 if (!reply.isError())
167 watcher->deleteLater();
169 m_dbusInterface->
callDBusAsync(QLatin1String(
"getOwnAircraftLights"), callback);
174 if (!o_xplaneData) {
return; }
175 QPointer<CXSwiftBusServiceProxy> myself(
this);
176 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
177 if (!myself) {
return; }
178 QDBusPendingReply<double, double, double, QList<double>> reply = *watcher;
179 if (!reply.isError())
186 watcher->deleteLater();
188 m_dbusInterface->
callDBusAsync(QLatin1String(
"getOwnAircraftParts"), callback);
193 if (!o_xplaneData) {
return; }
194 QPointer<CXSwiftBusServiceProxy> myself(
this);
195 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
196 if (!myself) {
return; }
197 QDBusPendingReply<QString, QString> reply = *watcher;
198 if (!reply.isError())
203 watcher->deleteLater();
205 m_dbusInterface->
callDBusAsync(QLatin1String(
"getOwnAircraftModelData"), callback);
210 m_dbusInterface->
callDBus(QLatin1String(
"addTextMessage"), text, red, green, blue);
215 m_dbusInterface->
callDBus(QLatin1String(
"updateAirportsInRange"));
220 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getAircraftModelPath"));
224 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAircraftModelPath"), setterCallback(o_modelPath));
229 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getAircraftModelFilename"));
233 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAircraftModelFilename"), setterCallback(o_modelFilename));
238 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getAircraftLivery"));
242 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAircraftLivery"), setterCallback(o_modelLivery));
247 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getAircraftIcaoCode"));
251 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAircraftIcaoCode"), setterCallback(o_icaoCode));
256 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getAircraftDescription"));
260 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAircraftDescription"), setterCallback(o_description));
265 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getAircraftModelString"));
269 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAircraftModelString"), setterCallback(o_modelString));
274 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getAircraftName"));
278 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAircraftName"), setterCallback(o_name));
283 return m_dbusInterface->
callDBusRet<
int>(QLatin1String(
"getXPlaneVersionMajor"));
287 m_dbusInterface->
callDBusAsync(QLatin1String(
"getXPlaneVersionMajor"), setterCallback(o_versionMajor));
292 return m_dbusInterface->
callDBusRet<
int>(QLatin1String(
"getXPlaneVersionMinor"));
296 m_dbusInterface->
callDBusAsync(QLatin1String(
"getXPlaneVersionMinor"), setterCallback(o_versionMinor));
301 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getXPlaneInstallationPath"));
305 m_dbusInterface->
callDBusAsync(QLatin1String(
"getXPlaneInstallationPath"), setterCallback(o_installPath));
310 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getXPlanePreferencesPath"));
314 m_dbusInterface->
callDBusAsync(QLatin1String(
"getXPlanePreferencesPath"), setterCallback(o_prefsPath));
319 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"isPaused"));
323 m_dbusInterface->
callDBusAsync(QLatin1String(
"isPaused"), setterCallback(o_paused));
328 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"isUsingRealTime"));
332 m_dbusInterface->
callDBusAsync(QLatin1String(
"isUsingRealTime"), setterCallback(o_isRealTime));
336 double *o_minutesLate)
const
338 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
339 QDBusPendingReply<double, double, double, double> reply = *watcher;
340 if (!reply.isError())
342 *o_averageFps = reply.argumentAt<0>();
343 *o_simTimeRatio = reply.argumentAt<1>();
344 *o_trackMilesShort = reply.argumentAt<2>();
345 *o_minutesLate = reply.argumentAt<3>();
347 watcher->deleteLater();
349 m_dbusInterface->
callDBusAsync(QLatin1String(
"getFrameStats"), callback)->waitForFinished();
353 double *o_trackMilesShort,
double *o_minutesLate)
355 std::function<void(QDBusPendingCallWatcher *)> callback = [=](QDBusPendingCallWatcher *watcher) {
356 QDBusPendingReply<double, double, double, double> reply = *watcher;
357 if (!reply.isError())
359 *o_averageFps = reply.argumentAt<0>();
360 *o_simTimeRatio = reply.argumentAt<1>();
361 *o_trackMilesShort = reply.argumentAt<2>();
362 *o_minutesLate = reply.argumentAt<3>();
364 watcher->deleteLater();
366 m_dbusInterface->
callDBusAsync(QLatin1String(
"getFrameStats"), callback);
373 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getLatitudeDeg"));
377 m_dbusInterface->
callDBusAsync(QLatin1String(
"getLatitudeDeg"), setterCallback(o_latitude));
382 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getLongitudeDeg"));
386 m_dbusInterface->
callDBusAsync(QLatin1String(
"getLongitudeDeg"), setterCallback(o_longitude));
391 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getAltitudeMslM"));
395 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAltitudeMslM"), setterCallback(o_altitude));
400 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getPressureAltitudeFt"));
404 m_dbusInterface->
callDBusAsync(QLatin1String(
"getPressureAltitudeFt"), setterCallback(o_altitude));
409 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getHeightAglM"));
413 m_dbusInterface->
callDBusAsync(QLatin1String(
"getHeightAglM"), setterCallback(o_height));
418 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getGroundSpeedMps"));
422 m_dbusInterface->
callDBusAsync(QLatin1String(
"getGroundSpeedMps"), setterCallback(o_groundspeed));
427 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getIndicatedAirspeedKias"));
431 m_dbusInterface->
callDBusAsync(QLatin1String(
"getIndicatedAirspeedKias"), setterCallback(o_ias));
436 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getTrueAirspeedKias"));
440 m_dbusInterface->
callDBusAsync(QLatin1String(
"getTrueAirspeedKias"), setterCallback(o_tas));
445 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getPitchDeg"));
449 m_dbusInterface->
callDBusAsync(QLatin1String(
"getPitchDeg"), setterCallback(o_pitch));
454 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getRollDeg"));
458 m_dbusInterface->
callDBusAsync(QLatin1String(
"getRollDeg"), setterCallback(o_roll));
463 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getTrueHeadingDeg"));
467 m_dbusInterface->
callDBusAsync(QLatin1String(
"getTrueHeadingDeg"), setterCallback(o_heading));
472 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getLocalXVelocityMps"));
476 m_dbusInterface->
callDBusAsync(QLatin1String(
"getLocalXVelocityMps"), setterCallback(o_velocity));
481 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getLocalYVelocityMps"));
485 m_dbusInterface->
callDBusAsync(QLatin1String(
"getLocalYVelocityMps"), setterCallback(o_velocity));
490 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getLocalZVelocityMps"));
494 m_dbusInterface->
callDBusAsync(QLatin1String(
"getLocalZVelocityMps"), setterCallback(o_velocity));
499 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getPitchRadPerSec"));
503 m_dbusInterface->
callDBusAsync(QLatin1String(
"getPitchRadPerSec"), setterCallback(o_radPerSec));
508 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getRollRadPerSec"));
512 m_dbusInterface->
callDBusAsync(QLatin1String(
"getRollRadPerSec"), setterCallback(o_radPerSec));
517 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getHeadingRadPerSec"));
521 m_dbusInterface->
callDBusAsync(QLatin1String(
"getHeadingRadPerSec"), setterCallback(o_radPerSec));
526 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"getAnyWheelOnGround"));
530 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAnyWheelOnGround"), setterCallback(o_anyWheel));
535 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"getAllWheelsOnGround"));
539 m_dbusInterface->
callDBusAsync(QLatin1String(
"getAllWheelsOnGround"), setterCallback(o_allWheels));
544 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getGroundElevation"));
549 m_dbusInterface->
callDBusAsync(QLatin1String(
"getGroundElevation"), setterCallback(o_elevationM));
554 return m_dbusInterface->
callDBusRet<
int>(QLatin1String(
"getCom1ActiveKhz"));
558 m_dbusInterface->
callDBusAsync(QLatin1String(
"getCom1ActiveKhz"), setterCallback(o_com1Active));
563 return m_dbusInterface->
callDBusRet<
int>(QLatin1String(
"getCom1StandbyKhz"));
568 m_dbusInterface->
callDBusAsync(QLatin1String(
"getCom1StandbyKhz"), setterCallback(o_com1Standby));
573 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"isCom1Receiving"));
578 m_dbusInterface->
callDBusAsync(QLatin1String(
"isCom1Receiving"), setterCallback(o_com1Rec));
583 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"isCom1Transmitting"));
588 m_dbusInterface->
callDBusAsync(QLatin1String(
"isCom1Transmitting"), setterCallback(o_com1Tx));
593 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getCom1Volume"));
598 m_dbusInterface->
callDBusAsync(QLatin1String(
"getCom1Volume"), setterCallback(o_com1Volume));
603 return m_dbusInterface->
callDBusRet<
int>(QLatin1String(
"getCom2ActiveKhz"));
607 m_dbusInterface->
callDBusAsync(QLatin1String(
"getCom2ActiveKhz"), setterCallback(o_com2Active));
612 return m_dbusInterface->
callDBusRet<
int>(QLatin1String(
"getCom2StandbyKhz"));
616 m_dbusInterface->
callDBusAsync(QLatin1String(
"getCom2StandbyKhz"), setterCallback(o_com2Standby));
621 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"isCom2Receiving"));
626 m_dbusInterface->
callDBusAsync(QLatin1String(
"isCom2Receiving"), setterCallback(o_com2Rec));
631 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"isCom2Transmitting"));
636 m_dbusInterface->
callDBusAsync(QLatin1String(
"isCom2Transmitting"), setterCallback(o_com2Tx));
641 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getCom2Volume"));
646 m_dbusInterface->
callDBusAsync(QLatin1String(
"getCom2Volume"), setterCallback(o_com2Volume));
651 return m_dbusInterface->
callDBusRet<
int>(QLatin1String(
"getTransponderCode"));
655 m_dbusInterface->
callDBusAsync(QLatin1String(
"getTransponderCode"), setterCallback(o_xpdrCode));
660 return m_dbusInterface->
callDBusRet<
int>(QLatin1String(
"getTransponderMode"));
664 m_dbusInterface->
callDBusAsync(QLatin1String(
"getTransponderMode"), setterCallback(o_xpdrMode));
669 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"getTransponderIdent"));
673 m_dbusInterface->
callDBusAsync(QLatin1String(
"getTransponderIdent"), setterCallback(o_ident));
678 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"getBeaconLightsOn"));
683 m_dbusInterface->
callDBusAsync(QLatin1String(
"getBeaconLightsOn"), setterCallback(o_beaconLightsOn));
688 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"getLandingLightsOn"));
693 m_dbusInterface->
callDBusAsync(QLatin1String(
"getLandingLightsOn"), setterCallback(o_landingLightsOn));
698 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"getNavLightsOn"));
703 m_dbusInterface->
callDBusAsync(QLatin1String(
"getNavLightsOn"), setterCallback(o_navLightsOn));
709 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"getStrobeLightsOn"));
714 m_dbusInterface->
callDBusAsync(QLatin1String(
"getStrobeLightsOn"), setterCallback(o_strobeLightsOn));
719 return m_dbusInterface->
callDBusRet<
bool>(QLatin1String(
"getTaxiLightsOn"));
724 m_dbusInterface->
callDBusAsync(QLatin1String(
"getTaxiLightsOn"), setterCallback(o_taxiLightsOn));
729 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getQNHInHg"));
734 m_dbusInterface->
callDBusAsync(QLatin1String(
"getQNHInHg"), setterCallback(o_qnh));
739 m_dbusInterface->
callDBus(QLatin1String(
"setCom1ActiveKhz"), freq);
744 m_dbusInterface->
callDBus(QLatin1String(
"setCom1StandbyKhz"), freq);
749 m_dbusInterface->
callDBus(QLatin1String(
"setCom2ActiveKhz"), freq);
754 m_dbusInterface->
callDBus(QLatin1String(
"setCom2StandbyKhz"), freq);
759 m_dbusInterface->
callDBus(QLatin1String(
"setTransponderCode"), code);
764 m_dbusInterface->
callDBus(QLatin1String(
"setTransponderMode"), mode);
768 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getFlapsDeployRatio"));
773 m_dbusInterface->
callDBusAsync(QLatin1String(
"getFlapsDeployRatio"), setterCallback(o_flapsDeployRatio));
778 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getGearDeployRatio"));
783 m_dbusInterface->
callDBusAsync(QLatin1String(
"getGearDeployRatio"), setterCallback(o_gearDeployRatio));
788 return m_dbusInterface->
callDBusRet<
int>(QLatin1String(
"getNumberOfEngines"));
793 m_dbusInterface->
callDBusAsync(QLatin1String(
"getNumberOfEngines"), setterCallback(o_numberOfEngines));
798 return m_dbusInterface->
callDBusRet<QList<double>>(QLatin1String(
"getEngineN1Percentage"));
803 m_dbusInterface->
callDBusAsync(QLatin1String(
"getEngineN1Percentage"), setterCallback(o_engineN1Percentage));
808 return m_dbusInterface->
callDBusRet<
double>(QLatin1String(
"getSpeedBrakeRatio"));
813 m_dbusInterface->
callDBusAsync(QLatin1String(
"getSpeedBrakeRatio"), setterCallback(o_speedBrakeRatio));
818 return m_dbusInterface->
callDBusRet<QString>(QLatin1String(
"getSettingsJson"));
823 m_dbusInterface->
callDBusAsync(QLatin1String(
"getSettingsJson"), setterCallback(o_jsonSettings));
828 m_dbusInterface->
callDBus(QLatin1String(
"setSettingsJson"), json);
Used for hand written interface based on virtual methods.
void callDBus(QLatin1String method, Args &&...args)
Call DBus, no return value.
Ret callDBusRet(QLatin1String method, Args &&...args)
Call DBus with synchronous return value.
QDBusPendingCallWatcher * callDBusAsync(QLatin1String method, Func callback, Args &&...args)
Call DBus with asynchronous return value Callback can be any callable object taking a single argument...
double getLocalXVelocityMps() const
Get aircraft local velocity in world coordinates meters per second.
QString getCommitHash()
Get SHA1 of the last commit that could influence xswiftbus.
static const QString & InterfaceName()
Service name.
bool getBeaconLightsOn() const
Get whether landing lights are on.
void isUsingRealTimeAsync(bool *o_isRealTime)
True if sim time is tracking operating system time.
void getOwnAircraftModelDataAsync(swift::simplugin::xplane::XPlaneData *o_xplaneData)
Get own model data.
void getOwnAircraftCom2DataAsync(swift::simplugin::xplane::XPlaneData *o_xplaneData)
Get own aircraft COM2 data.
void setTransponderMode(int mode)
Set the current transponder mode (depends on the aircraft, 0 and 1 usually mean standby,...
void getAircraftLiveryAsync(QString *o_modelLivery)
Get current aircraft livery.
double getLocalYVelocityMps() const
Get aircraft local velocity in world coordinates meters per second.
void getTransponderModeAsync(int *o_xpdrMode)
Get the current transponder mode (depends on the aircraft, 0 and 1 usually mean standby,...
void getAltitudeMslMAsync(double *o_altitude)
Get aircraft altitude in meters.
void getEngineN1PercentageAsync(QList< double > *o_engineN1Percentage)
Get the N1 speed as percent of max (per engine)
int getNumberOfEngines() const
Get the number of engines of current aircraft.
double getLatitudeDeg() const
Get aircraft latitude in degrees.
QString getAircraftModelFilename() const
Get base filename of current aircraft model.
void updateAirportsInRange()
QString getXPlaneInstallationPath() const
Get root of X-Plane install path.
void getAircraftIcaoCodeAsync(QString *o_icaoCode)
Get the ICAO code of the current aircraft model.
bool getTaxiLightsOn() const
Get whether taxi lights are on.
void getAircraftModelPathAsync(QString *o_modelPath)
Get full path to current aircraft model.
void getAircraftModelFilenameAsync(QString *o_modelFilename)
Get base filename of current aircraft model.
void getPitchDegAsync(double *o_pitch)
Get aircraft pitch in degrees above horizon.
int getXPlaneVersionMajor() const
Get major version number.
void setCom2ActiveKhz(int freq)
Set the current COM2 active frequency in kHz.
QString getXPlanePreferencesPath() const
Get full path to X-Plane preferences file.
double getRollDeg() const
Get aircraft roll in degrees.
void getPitchRadPerSecAsync(double *o_radPerSec)
Get aircraft angular velocity in radians per second.
void getAllWheelsOnGroundAsync(bool *o_allWheels)
Get whether all wheels are on the ground.
double getCom2Volume() const
Get the COM2 volume 0..1.
static const QString & ObjectPath()
Service path.
double getGearDeployRatio() const
Get gear deploy ratio, where 0 is up and 1 is down.
QString getAircraftLivery() const
Get current aircraft livery.
void getBeaconLightsOnAsync(bool *o_beaconLightsOn)
Get whether landing lights are on.
void getLocalZVelocityMpsAsync(double *o_velocity)
Get aircraft local velocity in world coordinates meters per second.
double getLongitudeDeg() const
Get aircraft longitude in degrees.
void setTransponderCode(int code)
Set the current transponder code in decimal.
void getSpeedBrakeRatioAsync(double *o_speedBrakeRatio)
Get the ratio how much the speedbrakes surfaces are extended (0.0 is fully retracted,...
bool getLandingLightsOn() const
Get whether landing lights are on.
void getIndicatedAirspeedKiasAsync(double *o_ias)
Get aircraft IAS in knots.
void getTaxiLightsOnAsync(bool *o_taxiLightsOn)
Get whether taxi lights are on.
void addTextMessage(const QString &text, double red, double green, double blue)
Add a text message to the on-screen display, with RGB components in the range [0,1].
void getGroundElevationAsync(double *o_elevationM)
Get elevation of ground under the plane (in meters)
void sceneryLoaded()
Scenery was loaded.
void getRollRadPerSecAsync(double *o_radPerSec)
Get aircraft angular velocity in radians per second.
void setCom1StandbyKhz(int freq)
Set the current COM1 standby frequency in kHz.
bool isCom1Receiving() const
Is COM1 receiving?
void isCom1ReceivingAsync(bool *o_com1Rec)
Is COM1 receiving?
double getTrueAirspeedKias() const
Get aircraft TAS in meters per second.
void getOwnAircraftLightsAsync(swift::simplugin::xplane::XPlaneData *o_xplaneData)
Get own lights data.
void getCom1StandbyKhzAsync(int *o_com1Standby)
Get the current COM1 standby frequency in kHz.
void getOwnAircraftVelocityDataAsync(swift::simplugin::xplane::XPlaneData *o_xplaneData)
Get own aircraft velocity data.
void getAnyWheelOnGroundAsync(bool *o_anyWheel)
Get whether any wheel is on the ground.
void setCom1ActiveKhz(int freq)
Set the current COM1 active frequency in kHz.
void getOwnAircraftXpdrAsync(swift::simplugin::xplane::XPlaneData *o_xplaneData)
Get own XPDR data.
void getLandingLightsOnAsync(bool *o_landingLightsOn)
Get whether landing lights are on.
int getCom1StandbyKhz() const
Get the current COM1 standby frequency in kHz.
QString getAircraftDescription() const
Get the description of the current aircraft model.
void getXPlaneVersionMinorAsync(int *o_versionMinor)
Get minor version number.
void getStrobeLightsOnAsync(bool *o_strobeLightsOn)
Get whether strobe lights are on.
QString getAircraftName() const
Get name of current aircraft model.
bool getTransponderIdent() const
Get whether we are currently squawking ident.
void isPausedAsync(bool *o_paused)
True if sim is paused.
double getPitchDeg() const
Get aircraft pitch in degrees above horizon.
void isCom2TransmittingAsync(bool *o_com2Tx)
Is COM2 transmitting?
void getGroundSpeedMpsAsync(double *o_groundspeed)
Get aircraft groundspeed in meters per second.
double getCom1Volume() const
Get the COM1 volume 0..1.
int getTransponderMode() const
Get the current transponder mode (depends on the aircraft, 0 and 1 usually mean standby,...
void getTrueAirspeedKiasAsync(double *o_tas)
Get aircraft TAS in meters per second.
QString getSettingsJson() const
Get settings.
bool isPaused() const
True if sim is paused.
void getCom2VolumeAsync(double *o_com2Volume)
Get the COM2 volume 0..1.
bool isUsingRealTime() const
True if sim time is tracking operating system time.
int getCom2ActiveKhz() const
Get the current COM2 active frequency in kHz.
int getCom2StandbyKhz() const
Get the current COM2 standby frequency in kHz.
void isCom2ReceivingAsync(bool *o_com2Rec)
Is COM2 receiving?
void setSettingsJson(const QString &json)
Set settings.
void getCom2StandbyKhzAsync(int *o_com2Standby)
Get the current COM2 standby frequency in kHz.
QString getAircraftModelString() const
Get canonical swift model string of current aircraft model.
bool getStrobeLightsOn() const
Get whether strobe lights are on.
QString getAircraftIcaoCode() const
Get the ICAO code of the current aircraft model.
void getFlapsDeployRatioAsync(double *o_flapsDeployRatio)
Get flaps deploy ratio, where 0.0 is flaps fully retracted, and 1.0 is flaps fully extended.
void getGearDeployRatioAsync(double *o_gearDeployRatio)
Get gear deploy ratio, where 0 is up and 1 is down.
QString getAircraftModelPath() const
Get full path to current aircraft model.
QList< double > getEngineN1Percentage() const
Get the N1 speed as percent of max (per engine)
double getIndicatedAirspeedKias() const
Get aircraft IAS in knots.
void getXPlaneVersionMajorAsync(int *o_versionMajor)
Get major version number.
bool getNavLightsOn() const
Get whether nav lights are on.
void getLocalXVelocityMpsAsync(double *o_velocity)
Get aircraft local velocity in world coordinates meters per second.
double getRollRadPerSec() const
Get aircraft angular velocity in radians per second.
double getGroundElevation() const
Get elevation of ground under the plane (in meters)
double getFlapsDeployRatio() const
Get flaps deploy ratio, where 0.0 is flaps fully retracted, and 1.0 is flaps fully extended.
void getPressureAltitudeFtAsync(double *o_altitude)
Get aircraft pressure altitude in feet in standard atmosphere in X-Plane 12. NaN in earlier versions ...
void getTransponderCodeAsync(int *o_xpdrCode)
Get the current transponder code in decimal.
int getCom1ActiveKhz() const
Get the current COM1 active frequency in kHz.
int getTransponderCode() const
Get the current transponder code in decimal.
CXSwiftBusServiceProxy(QDBusConnection &connection, QObject *parent=nullptr, bool dummy=false)
Constructor.
void getAircraftModelStringAsync(QString *o_modelString)
Get canonical swift model string of current aircraft model.
void getFrameStats(double *o_averageFps, double *o_simTimeRatio, double *o_trackMilesShort, double *o_minutesLate) const
Frames-per-second, averaged over the last 500 frames, or since this function was last called,...
void getRollDegAsync(double *o_roll)
Get aircraft roll in degrees.
bool getAnyWheelOnGround() const
Get whether any wheel is on the ground.
void getOwnAircraftPartsAsync(swift::simplugin::xplane::XPlaneData *o_xplaneData)
Get own parts such as gear, flaps.
void getSettingsJsonAsync(QString *o_jsonSettings)
Get settings.
bool isCom2Receiving() const
Is COM2 receiving?
double getPressureAltitudeFt() const
Get aircraft pressure altitude in feet in standard atmosphere in X-Plane 12. NaN in earlier versions ...
void getCom2ActiveKhzAsync(int *o_com2Active)
Get the current COM2 active frequency in kHz.
void isCom1TransmittingAsync(bool *o_com1Tx)
Is COM1 transmitting?
double getTrueHeadingDeg() const
Get aircraft true heading in degrees.
void getNavLightsOnAsync(bool *o_navLightsOn)
Get whether nav lights are on.
bool isCom1Transmitting() const
Is COM1 transmitting?
void getHeightAglMAsync(double *o_height)
Get aircraft height in meters.
void aircraftModelChanged(const QString &path, const QString &filename, const QString &livery, const QString &icao, const QString &modelString, const QString &name, const QString &description)
Own aircraft model changed.
void getQNHInHgAsync(double *o_qnh)
Get barometric pressure at sea level in inches of mercury.
void getAircraftNameAsync(QString *o_name)
Get name of current aircraft model.
double getLocalZVelocityMps() const
Get aircraft local velocity in world coordinates meters per second.
void getLatitudeDegAsync(double *o_latitude)
Get aircraft latitude in degrees.
void getAircraftDescriptionAsync(QString *o_description)
Get the description of the current aircraft model.
void getCom1VolumeAsync(double *o_com1Volume)
Get the COM1 volume 0..1.
double getQNHInHg() const
Get barometric pressure at sea level in inches of mercury.
void getOwnAircraftSituationDataAsync(swift::simplugin::xplane::XPlaneData *o_xplaneData)
Get own aircraft situation data.
void getNumberOfEnginesAsync(double *o_numberOfEngines)
Get the number of engines of current aircraft.
double getGroundSpeedMps() const
Get aircraft groundspeed in meters per second.
void setCom2StandbyKhz(int freq)
Set the current COM2 standby frequency in kHz.
void getXPlaneInstallationPathAsync(QString *o_installPath)
Get root of X-Plane install path.
void resetFrameTotals()
Reset the monitoring of total miles and minutes lost due to low frame rate.
double getSpeedBrakeRatio() const
Get the ratio how much the speedbrakes surfaces are extended (0.0 is fully retracted,...
double getHeightAglM() const
Get aircraft height in meters.
void getLongitudeDegAsync(double *o_longitude)
Get aircraft longitude in degrees.
void getCom1ActiveKhzAsync(int *o_com1Active)
Get the current COM1 active frequency in kHz.
double getAltitudeMslM() const
Get aircraft altitude in meters.
int getXPlaneVersionMinor() const
Get minor version number.
bool getAllWheelsOnGround() const
Get whether all wheels are on the ground.
double getPitchRadPerSec() const
Get aircraft angular velocity in radians per second.
QString getVersionNumber()
Get xswiftbus version number.
void getOwnAircraftCom1DataAsync(swift::simplugin::xplane::XPlaneData *o_xplaneData)
Get own aircraft COM1 data.
void getLocalYVelocityMpsAsync(double *o_velocity)
Get aircraft local velocity in world coordinates meters per second.
double getHeadingRadPerSec() const
Get aircraft angular velocity in radians per second.
bool isCom2Transmitting() const
Is COM2 transmitting?
void getXPlanePreferencesPathAsync(QString *o_prefsPath)
Get full path to X-Plane preferences file.
void getHeadingRadPerSecAsync(double *o_radPerSec)
Get aircraft angular velocity in radians per second.
void getTrueHeadingDegAsync(double *o_heading)
Get aircraft true heading in degrees.
void getFrameStatsAsync(double *o_averageFps, double *o_simTimeRatio, double *o_trackMilesShort, double *o_minutesLate)
Frames-per-second, averaged over the last 500 frames, or since this function was last called,...
void getTransponderIdentAsync(bool *o_ident)
Get whether we are currently squawking ident.
double rollDeg
Roll [deg].
int com2StandbyKhz
COM2 standby [kHz].
double headingRadPerSec
Heading angular velocity [rad/s].
double groundspeedMs
Ground speed [m/s].
bool isCom1Receiving
COM1 receiving.
double com2Volume
COM2 volume 0..1.
double com1Volume
COM1 volume 0..1.
double longitudeDeg
Latitude [deg].
double localXVelocityMs
Local x velocity [m/s].
int xpdrMode
Transponder mode (off=0,stdby=1,on=2,test=3)
int com1ActiveKhz
COM1 active [kHz].
bool beaconLightsOn
Beacon lights on?
bool isCom1Transmitting
COM1 transmittings.
QString aircraftModelPath
Aircraft model path.
double flapsDeployRatio
Flaps deployment ratio [%].
double localZVelocityMs
Local z velocity [m/s].
bool taxiLightsOn
Taxi lights on?
bool isCom2Transmitting
COM2 transmittings.
bool strobeLightsOn
Strobe lights on?
double rollRadPerSec
Roll angular velocity [rad/s].
int xpdrCode
Transpondder code.
double gearDeployRatio
Gear deployment ratio [%].
double trueHeadingDeg
True heading [deg].
bool xpdrIdent
Is transponder in ident?
int com2ActiveKhz
COM2 active [kHz].
double altitudeM
Altitude [m].
QString aircraftIcaoCode
Aircraft ICAO code.
double latitudeDeg
Longitude [deg].
bool isCom2Receiving
COM2 receiving.
bool navLightsOn
NAV lights on?
double pitchRadPerSec
Pitch angular velocity [rad/s].
QList< double > enginesN1Percentage
N1 per engine [%].
double pitchDeg
Pitch [deg].
double speedBrakeRatio
Speed break ratio [%].
double seaLevelPressureInHg
Sea level pressure [inhg].
int com1StandbyKhz
COM1 standby [kHz].
bool landingLightsOn
Landing lights on?
double localYVelocityMs
Local y velocity [m/s].