From 7e6d150be53901fd1150e8de8a8e9a8e9052809b Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Mon, 27 Dec 2021 07:23:41 +0100 Subject: [PATCH] Move config structs back to DStarGatwayConfig.h --- DStarGatewayConfig.h | 53 ++++++++++++++++++++++++++++++++++++++++++++ Defs.h | 51 ------------------------------------------ 2 files changed, 53 insertions(+), 51 deletions(-) diff --git a/DStarGatewayConfig.h b/DStarGatewayConfig.h index 4b83cb2..59fdcbd 100644 --- a/DStarGatewayConfig.h +++ b/DStarGatewayConfig.h @@ -16,6 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#pragma once #include #include @@ -24,6 +25,58 @@ using namespace libconfig; +typedef struct { + std::string callsign; + std::string address; + std::string hbAddress; + unsigned int hbPort; + std::string icomAddress; + unsigned int icomPort; + double latitude; + double longitude; + std::string description1; + std::string description2; + std::string url; +} TGateway; + +typedef struct { + std::string band; + std::string callsign; + std::string reflector; + std::string address; + unsigned int port; + HW_TYPE hwType; + bool reflectorAtStartup; + RECONNECT reflectorReconnect; +#ifdef USE_DRATS + bool dRatsEnabled; +#endif + double frequency; + double offset; + double range; + double latitude; + double longitude; + double agl; + std::string description1; + std::string description2; + std::string url; + char band1; + char band2; + char band3; +} TRepeater; + +typedef struct { + std::string hostname; + std::string username; + std::string password; + bool isQuadNet; +} TircDDB; + +typedef struct { + std::string logDir; + std::string dataDir; +} Tpaths; + class CDStarGatewayConfig { public: CDStarGatewayConfig(const std::string &pathname); diff --git a/Defs.h b/Defs.h index d298712..273ed25 100644 --- a/Defs.h +++ b/Defs.h @@ -139,54 +139,3 @@ enum GATEWAY_TYPE { const unsigned int TIME_PER_TIC_MS = 5U; -typedef struct { - std::string callsign; - std::string address; - std::string hbAddress; - unsigned int hbPort; - std::string icomAddress; - unsigned int icomPort; - double latitude; - double longitude; - std::string description1; - std::string description2; - std::string url; -} TGateway; - -typedef struct { - std::string band; - std::string callsign; - std::string reflector; - std::string address; - unsigned int port; - HW_TYPE hwType; - bool reflectorAtStartup; - RECONNECT reflectorReconnect; -#ifdef USE_DRATS - bool dRatsEnabled; -#endif - double frequency; - double offset; - double range; - double latitude; - double longitude; - double agl; - std::string description1; - std::string description2; - std::string url; - char band1; - char band2; - char band3; -} TRepeater; - -typedef struct { - std::string hostname; - std::string username; - std::string password; - bool isQuadNet; -} TircDDB; - -typedef struct { - std::string logDir; - std::string dataDir; -} Tpaths; \ No newline at end of file