chore: move header files to includes folder
This commit is contained in:
26
include/NodeContext.h
Normal file
26
include/NodeContext.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include <TaskSchedulerDeclarations.h>
|
||||
#include <WiFiUdp.h>
|
||||
#include <map>
|
||||
#include "NodeInfo.h"
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include "Config.h"
|
||||
|
||||
class NodeContext {
|
||||
public:
|
||||
NodeContext();
|
||||
~NodeContext();
|
||||
Scheduler* scheduler;
|
||||
WiFiUDP* udp;
|
||||
String hostname;
|
||||
IPAddress localIP;
|
||||
std::map<String, NodeInfo>* memberList;
|
||||
Config config;
|
||||
|
||||
using EventCallback = std::function<void(void*)>;
|
||||
std::map<std::string, std::vector<EventCallback>> eventRegistry;
|
||||
|
||||
void on(const std::string& event, EventCallback cb);
|
||||
void fire(const std::string& event, void* data);
|
||||
};
|
||||
Reference in New Issue
Block a user