21 lines
482 B
C++
21 lines
482 B
C++
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
#include <ESP8266WiFi.h>
|
|
#include "config/ConfigManager.h"
|
|
|
|
class NetworkManager {
|
|
public:
|
|
bool begin(const WifiConfig& config, const String& hostname);
|
|
void update();
|
|
void startAccessPoint(const WifiConfig& config, const String& hostname);
|
|
bool isAccessPoint() const;
|
|
bool isConnected() const;
|
|
String modeName() const;
|
|
String ipAddress() const;
|
|
|
|
private:
|
|
bool accessPoint_ = false;
|
|
unsigned long lastReconnectAttempt_ = 0;
|
|
};
|