Bandplan system

This commit is contained in:
Ryzerth
2020-08-04 21:34:56 +02:00
parent cd7e5cf1bc
commit 022898c61d
155 changed files with 49138 additions and 107 deletions

38
src/bandplan.h Normal file
View File

@ -0,0 +1,38 @@
#pragma once
#include <json.hpp>
#include <fstream>
#include <spdlog/spdlog.h>
#include <filesystem>
using nlohmann::json;
namespace bandplan {
struct Band_t {
std::string name;
std::string type;
float start;
float end;
};
void to_json(json& j, const Band_t& b);
void from_json(const json& j, Band_t& b);
struct BandPlan_t {
std::string name;
std::string countryName;
std::string countryCode;
std::string authorName;
std::string authorURL;
std::vector<Band_t> bands;
};
void to_json(json& j, const BandPlan_t& b);
void from_json(const json& j, BandPlan_t& b);
void loadBandPlan(std::string path);
void loadFromDir(std::string path);
extern std::map<std::string, BandPlan_t> bandplans;
extern std::vector<std::string> bandplanNames;
extern std::string bandplanNameTxt;
};