Files
energy_storage/src/app/Config.h

41 lines
572 B
C
Raw Normal View History

#pragma once
#include <string>
struct DatabaseOption
{
std::string host;
int port;
std::string user;
std::string passwd;
std::string dbname;
};
struct AppOption
{
DatabaseOption database;
struct {
bool useToken {true};
int port {0};
} http;
2025-09-04 19:31:04 +08:00
struct {
std::string host;
std::string username;
std::string password;
} mqtt;
std::string webSrvUrl;
std::string lunchDate;
};
class Config
{
public:
static bool init(std::string filename);
static AppOption option;
};