esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
15.99k stars 13.33k forks source link

Finalize callback list implementation, and migrate wifi events to use it. #5781

Open devyte opened 5 years ago

devyte commented 5 years ago

Basic Infos

Platform

Settings in IDE

Problem Description

After some discussion, @hreintke pulled out the wifi callback event list implementation into a proposed standalone implementation. That implementation needs to be tested, covered by tests, examples, and the wifi event system needs to be migrated to use it. Once that is done, other callback systems could potentially make use of it.

Ref: #5710

hreintke commented 5 years ago

@devyte : I can work on this.

What is your idea on the way forward for this. I would propose to first focus on functionality and later on the implementation details (list/vector/move).

There is a simple example included in the initial PR. I'll do some first tests on memory usage/leaks. What other tests and examples are you thinking of ?

When these work OK, I'll make a start with wifi event migration.

devyte commented 5 years ago

@hreintke much appreciated! What I had in mind was along the lines of:

  1. Make sure functionality needed by the wifi event system isn't missing
  2. Check api (parameter passing, const refs, typedefs, container use, usability in general
  3. Look for other use cases in the core and in our libraries, and check whether additional functionality is needed in any such use cases found
  4. Implement simple usage examples based on the use case found in the previous point
hreintke commented 5 years ago

@devyte : OK.

Please let me know of possible usecases you know in core/libraries. it's not easy to search for those What is the expected timeline for 2.6.0. ?

devyte commented 4 years ago

Merged the callbacklist as experimental, now pending migration of the WiFi callbacks to use it. Pushing back for that second part.

devyte commented 4 years ago

This is a nice-to-have, so pushing back again pending some time window that allows implementing the code unification.