mirror of
https://gitlab.com/wirelos/sprocket-lib.git
synced 2025-12-14 12:46:50 +01:00
keep network ref
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"stationMode": 1,
|
"stationMode": 0,
|
||||||
"channel": 11,
|
"channel": 11,
|
||||||
"meshPort": 5555,
|
"meshPort": 5555,
|
||||||
"meshSSID": "whateverYouLike",
|
"meshSSID": "whateverYouLike",
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ Sprocket* Sprocket::join(Network& net){
|
|||||||
net.init(&scheduler);
|
net.init(&scheduler);
|
||||||
//net.onReceive(bind(&Sprocket::dispatch,this, _1, _2));
|
//net.onReceive(bind(&Sprocket::dispatch,this, _1, _2));
|
||||||
net.connect();
|
net.connect();
|
||||||
|
network = net;
|
||||||
return activate(&scheduler, &net);
|
return activate(&scheduler, &net);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,10 @@ using namespace std::placeholders;
|
|||||||
|
|
||||||
class Sprocket : public Mediator {
|
class Sprocket : public Mediator {
|
||||||
protected:
|
protected:
|
||||||
|
// TODO move scheduler out of Sprocket
|
||||||
|
// => see difference between standalone and mesh sprochet usage of scheduler
|
||||||
Scheduler scheduler;
|
Scheduler scheduler;
|
||||||
|
Network network;
|
||||||
public:
|
public:
|
||||||
SprocketConfig config;
|
SprocketConfig config;
|
||||||
std::vector<Plugin*> plugins;
|
std::vector<Plugin*> plugins;
|
||||||
|
|||||||
Reference in New Issue
Block a user