This commit is contained in:
2018-06-12 19:44:22 +00:00
parent a6d17ba6a3
commit 16b4f254e5
17 changed files with 98 additions and 254 deletions

View File

@@ -1,12 +1,9 @@
#ifndef __SPROCKET_H__
#define __SPROCKET_H__
#include <TaskSchedulerDeclarations.h>
#include <Arduino.h>
#include "AppStack.h"
#include "App.h"
#include <FS.h>
#include "Network.h"
struct SprocketConfig {
@@ -17,18 +14,17 @@ struct SprocketConfig {
class Sprocket {
protected:
Scheduler scheduler;
private:
AppStack* stack; // REMOVE
public:
SprocketConfig config;
Sprocket();
Sprocket(SprocketConfig);
Sprocket* init(SprocketConfig);
Sprocket* join(Network&);
Sprocket* join(Network&, App&); // REMOVE
Sprocket* use(AppStack*); // REMOVE
Sprocket* addTask(Task&); // REMOVE ??
Sprocket* app(App&); // REMOVE
virtual void loop();
virtual Sprocket* activate(Scheduler* scheduler, Network* network) {}
virtual Sprocket* activate();
virtual Sprocket* activate(Scheduler*) {}
virtual Sprocket* activate(Scheduler*, Network*) {}
};
#endif