[XSwiftBus] Allow to write an updated xswiftbus.conf file

In a distributed core/UI swift we need to write on XPlane side
This commit is contained in:
Klaus Basan
2020-03-18 23:15:43 +01:00
committed by Mat Sutcliffe
parent 80e97f749f
commit fd3ad207bd
6 changed files with 80 additions and 1 deletions

View File

@@ -53,9 +53,18 @@ namespace XSwiftBus
//! Get debug on/off
bool getDebugMode() const { return m_debug; }
//! Get tcas traffic on/off
//! Set debug mode
void setDebugMode(bool on) { m_debug = on; }
//! Get TCAS traffic on/off
bool getTcasEnabled() const { return m_tcas; }
//! Set TCAS traffic on/off
void setTcasEnabled(bool on) { m_tcas = on; }
//! Update and write config file
bool writeConfig(bool tcas, bool debug);
private:
bool parseDBusMode (const std::string &value);
bool parseDBusAddress(const std::string &value);
@@ -65,6 +74,7 @@ namespace XSwiftBus
bool writeConfigFile () const;
static std::string dbusModeToString(DBusMode mode);
static std::string boolToOnOff(bool on);
std::string m_filePath;
DBusMode m_dbusMode = DBusP2P;