mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
@@ -20,4 +20,5 @@ void periodicWsSend();
|
||||
void sendFileToWsByFrames(const String& filename, const String& header, const String& json, int client_id, size_t frameSize);
|
||||
void sendStringToWs(const String& header, String& payload, int client_id);
|
||||
|
||||
void sendDeviceList(uint8_t num);
|
||||
void sendDeviceList(uint8_t num);
|
||||
int getNumWSClients();
|
||||
@@ -11,7 +11,7 @@ struct IoTValue {
|
||||
class IoTItem {
|
||||
public:
|
||||
IoTItem(const String& parameters);
|
||||
virtual ~IoTItem() {}
|
||||
virtual ~IoTItem() {};
|
||||
virtual void loop();
|
||||
virtual void doByInterval();
|
||||
virtual IoTValue execute(String command, std::vector<IoTValue>& param);
|
||||
@@ -35,9 +35,12 @@ class IoTItem {
|
||||
void setInterval(long interval);
|
||||
void setIntFromNet(int interval);
|
||||
|
||||
unsigned long currentMillis;
|
||||
unsigned long prevMillis;
|
||||
unsigned long difference;
|
||||
// unsigned long currentMillis;
|
||||
// unsigned long prevMillis;
|
||||
// unsigned long difference;
|
||||
unsigned long nextMillis=0; // достаточно 1 переменной, надо экономить память
|
||||
// задержка следующего вызова, не изменяет текущий _interval
|
||||
void suspendNextDoByInt(unsigned long _delay); // 0 - force
|
||||
|
||||
IoTValue value; // хранение основного значения, которое обновляется из сценария, execute(), loop() или doByInterval()
|
||||
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
#include "Global.h"
|
||||
#include "MqttClient.h"
|
||||
#include <vector>
|
||||
// boolean isNetworkActive();
|
||||
inline boolean isNetworkActive() {return WiFi.status() == WL_CONNECTED;};
|
||||
boolean isNetworkActive();
|
||||
uint8_t getNumAPClients();
|
||||
void routerConnect();
|
||||
bool startAPMode();
|
||||
boolean RouterFind(std::vector<String> jArray);
|
||||
|
||||
Reference in New Issue
Block a user