4#ifndef SWIFT_SIM_XSWIFTBUS_PLUGIN_H
5#define SWIFT_SIM_XSWIFTBUS_PLUGIN_H
22#include "dbusconnection.h"
23#include "dbusdispatcher.h"
24#include "dbusserver.h"
30#include "XPLM/XPLMCamera.h"
69 virtual bool writeConfig(
bool tcas,
bool debug)
override {
return m_pluginConfig.writeConfig(tcas, debug); }
74 std::unique_ptr<CDBusServer> m_dbusP2PServer;
75 std::shared_ptr<CDBusConnection> m_dbusConnection;
76 std::unique_ptr<CService> m_service;
77 std::unique_ptr<CTraffic> m_traffic;
80 CMenuItem m_enableDisableXPlaneAtisMenuItem;
81 CMenu m_messageWindowSubMenu;
84 CMenuItem m_disappearMessageWindowMenuItem;
85 CMenu m_planeViewSubMenu;
89 decltype(m_atisEnabled.
get()) m_atisSaved = 0;
91 std::thread m_dbusThread;
92 bool m_isRunning =
false;
93 bool m_shouldStop =
false;
98 static float startServerDeferred(
float,
float,
int,
void *refcon);
99 static float flightLoopCallback(
float,
float,
int,
void *refcon);
xswiftbus configuration class
void onSceneryLoaded()
Called by XPluginReceiveMessage when some scenery is loaded.
void onAircraftRepositioned()
Called by XPluginReceiveMessage when the aircraft is positioned at an airport.
virtual bool writeConfig(bool tcas, bool debug)
Write a config file with these new values.
bool shouldStop() const
Should stop.
void onAircraftModelChanged()
Called by XPluginReceiveMessage when the model is changed.
bool isRunning() const
Is running.
virtual const CConfig & getConfig() const
Get settings from xswiftbus.conf (needed during plugin initialization).
xswiftbus service object which is accessible through DBus
Something owning the settings.
xswiftbus service object for traffic aircraft which is accessible through DBus
Class providing access to a single X-Plane dataref.
DataRefType get() const
Get the value of the dataref.
Plugin loaded by X-Plane which publishes a DBus service.