Hello, this is my first post here.
I am in the middle of my ESP32 project where i mostly use Kolban's cpp libraries. All my different modules are almost done Web config using SPIFFS, Wifi, sensor readings, etc. Before trying to link them all i want to ask here how do you route the data from example sensor reading tasks to web client?
I am using WebSocketHandler in my code to read the WebSocket buffer in onMessage handle but WebSocketHandler class doesnt keep a reference to WebSocket or HttpServer classes. So either i should use static variables or queues between the different RTOS tasks.
Please give me some tips
How do you share data between modules
Re: How do you share data between modules
The queue is not universal solution. In my app_main i have an wifi object started softAP controlled in callbacks. Then HTTPServer using WebSocketHandler. My Web config interface is served by the web server from Spiffs and it uses WebSocket to transfer data and scan results for access points back and forth. I cannot block any of them waiting to read from queue.
May be a static instances of the modules for direct control can help in my case.
May be a static instances of the modules for direct control can help in my case.
Re: How do you share data between modules
Hi meneldor,
https://www.freertos.org/a00118.html
This can do not block your code. Please read this API reference.
P.S.
If you wanna let the others understand your software structure even faster, you really wanna try to draw a chart. I use http://www.draw.io in case you do not have one.
cheers
Gfast2
https://www.freertos.org/a00118.html
This can do not block your code. Please read this API reference.
P.S.
If you wanna let the others understand your software structure even faster, you really wanna try to draw a chart. I use http://www.draw.io in case you do not have one.
cheers
Gfast2
Who is online
Users browsing this forum: Google [Bot] and 133 guests