4 #ifndef SWIFT_SIM_XSWIFTBUS_CONFIG_H
5 #define SWIFT_SIM_XSWIFTBUS_CONFIG_H
31 void setFilePath(
const std::string &filePath) { m_filePath = filePath; }
64 bool parseDBusMode(
const std::string &value);
65 bool parseDBusAddress(
const std::string &value);
66 bool parseDBusPort(
const std::string &value);
67 bool parseDebug(
const std::string &value);
68 bool parseTcas(
const std::string &value);
69 bool writeConfigFile()
const;
71 static std::string dbusModeToString(
DBusMode mode);
72 static std::string boolToOnOff(
bool on);
74 std::string m_filePath;
76 std::string m_dbusAddress =
"127.0.0.1";
77 int m_dbusPort = 45001;
xswiftbus configuration class
int getDBusPort() const
Get current DBus server port.
void setFilePath(const std::string &filePath)
Set config file path.
void setTcasEnabled(bool on)
Set TCAS traffic on/off.
DBusMode
DBus Server Mode.
bool getDebugMode() const
Get debug on/off.
void print()
Print the current configuration to the X-Plane log.
DBusMode getDBusMode() const
Get current DBus mode.
bool writeConfig(bool tcas, bool debug)
Update and write config file.
bool getTcasEnabled() const
Get TCAS traffic on/off.
void parse()
Load and parse config file.
void setDebugMode(bool on)
Set debug mode.
std::string getDBusAddress() const
Get current DBus server address.
Plugin loaded by X-Plane which publishes a DBus service.