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"
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
bool writeConfig(bool tcas, bool debug)
Update and write config file.
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.
virtual const CConfig & getConfig() const
Get settings from xswiftbus.conf (needed during plugin initialization)
bool isRunning() const
Is running.
Something owning the settings.
DataRefType get() const
Get the value of the dataref.
Plugin loaded by X-Plane which publishes a DBus service.