Initial commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
|
||||
namespace gateway {
|
||||
|
||||
enum class AppRole {
|
||||
kGateway,
|
||||
kReceiver,
|
||||
kTelemetry,
|
||||
};
|
||||
|
||||
struct BootProfile {
|
||||
AppRole role;
|
||||
std::string_view instance_name;
|
||||
bool enable_wifi;
|
||||
bool enable_ble;
|
||||
bool enable_eth;
|
||||
bool enable_espnow;
|
||||
bool enable_usb;
|
||||
};
|
||||
|
||||
class GatewayCore {
|
||||
public:
|
||||
explicit GatewayCore(BootProfile profile);
|
||||
|
||||
void start() const;
|
||||
const BootProfile& profile() const;
|
||||
|
||||
static const char* RoleToString(AppRole role);
|
||||
|
||||
private:
|
||||
BootProfile profile_;
|
||||
};
|
||||
|
||||
} // namespace gateway
|
||||
Reference in New Issue
Block a user