Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connectionhandler redesign of internal structures #136

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

andreagilardoni
Copy link
Contributor

@andreagilardoni andreagilardoni commented Apr 3, 2025

The objective of this PR is to make the implementation of the various connection handler more generic.

with this change it was possible to create a GenericConnection handler that is able to be instantiated in conditions where the kind of connection has to be decided at runtime.

@andreagilardoni andreagilardoni changed the title Connectionhandler settings Connectionhandler redesign of internal structures Apr 3, 2025
Copy link

github-actions bot commented Apr 3, 2025

Memory usage change @ 0ca6d61

Board flash % RAM for global variables %
arduino:esp32:nano_nora 🔺 +408 - +704 +0.01 - +0.02 🔺 +8 - +96 0.0 - +0.03
arduino:mbed:envie_m7 N/A N/A N/A N/A
arduino:mbed_edge:edge_control 🔺 +128 - +192 +0.01 - +0.02 🔺 +8 - +224 0.0 - +0.09
arduino:mbed_giga:giga 🔺 +128 - +192 +0.01 - +0.01 🔺 +8 - +96 0.0 - +0.02
arduino:mbed_nano:nanorp2040connect 🔺 +126 - +178 0.0 - 0.0 🔺 +8 - +96 0.0 - +0.04
arduino:mbed_nicla:nicla_vision 🔺 +128 - +128 +0.01 - +0.01 🔺 +8 - +96 0.0 - +0.02
arduino:mbed_opta:opta 🔺 +128 - +256 +0.01 - +0.01 🔺 0 - +8 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 🔺 +136 - +232 +0.01 - +0.01 🔺 +8 - +128 0.0 - +0.02
arduino:renesas_uno:unor4wifi 🔺 +128 - +176 +0.05 - +0.07 🔺 +8 - +96 +0.02 - +0.29
arduino:samd:mkr1000 🔺 +128 - +184 +0.05 - +0.07 🔺 +8 - +96 +0.02 - +0.29
arduino:samd:mkrgsm1400 🔺 +128 - +208 +0.05 - +0.08 🔺 +8 - +228 +0.02 - +0.7
arduino:samd:mkrnb1500 🔺 +128 - +208 +0.05 - +0.08 🔺 +8 - +228 +0.02 - +0.7
arduino:samd:mkrwan1300 🔺 +128 - +168 +0.05 - +0.06 🔺 +8 - +52 +0.02 - +0.16
arduino:samd:mkrwan1310 🔺 +128 - +168 +0.05 - +0.06 🔺 +8 - +52 +0.02 - +0.16
arduino:samd:mkrwifi1010 🔺 +128 - +184 +0.05 - +0.07 🔺 +8 - +96 +0.02 - +0.29
arduino:samd:nano_33_iot 🔺 +128 - +184 +0.05 - +0.07 🔺 +8 - +96 +0.02 - +0.29
esp32:esp32:esp32 🔺 +412 - +636 +0.03 - +0.05 🔺 +8 - +96 0.0 - +0.03
esp8266:esp8266:huzzah 🔺 +304 - +304 +0.03 - +0.03 🔺 +96 - +96 +0.12 - +0.12
rp2040:rp2040:rpipicow 🔺 +192 - +344 +0.01 - +0.02 🔺 +24 - +96 +0.01 - +0.04
Click for full report table
Board examples/ConnectionHandlerDemo
flash
% examples/ConnectionHandlerDemo
RAM for global variables
% examples/ConnectionHandlerDemo-Notecard
flash
% examples/ConnectionHandlerDemo-Notecard
RAM for global variables
%
arduino:esp32:nano_nora 704 0.02 96 0.03 408 0.01 8 0.0
arduino:mbed:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_edge:edge_control 192 0.02 224 0.09 128 0.01 8 0.0
arduino:mbed_giga:giga 192 0.01 96 0.02 128 0.01 8 0.0
arduino:mbed_nano:nanorp2040connect 178 0.0 96 0.04 126 0.0 8 0.0
arduino:mbed_nicla:nicla_vision 128 0.01 96 0.02 128 0.01 8 0.0
arduino:mbed_opta:opta 256 0.01 0 0.0 128 0.01 8 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 232 0.01 128 0.02 136 0.01 8 0.0
arduino:renesas_uno:unor4wifi 176 0.07 96 0.29 128 0.05 8 0.02
arduino:samd:mkr1000 184 0.07 96 0.29 128 0.05 8 0.02
arduino:samd:mkrgsm1400 208 0.08 228 0.7 128 0.05 8 0.02
arduino:samd:mkrnb1500 208 0.08 228 0.7 128 0.05 8 0.02
arduino:samd:mkrwan1300 168 0.06 52 0.16 128 0.05 8 0.02
arduino:samd:mkrwan1310 168 0.06 52 0.16 128 0.05 8 0.02
arduino:samd:mkrwifi1010 184 0.07 96 0.29 128 0.05 8 0.02
arduino:samd:nano_33_iot 184 0.07 96 0.29 128 0.05 8 0.02
esp32:esp32:esp32 636 0.05 96 0.03 412 0.03 8 0.0
esp8266:esp8266:huzzah 304 0.03 96 0.12
rp2040:rp2040:rpipicow 192 0.01 96 0.04 344 0.02 24 0.01
Click for full report CSV
Board,examples/ConnectionHandlerDemo<br>flash,%,examples/ConnectionHandlerDemo<br>RAM for global variables,%,examples/ConnectionHandlerDemo-Notecard<br>flash,%,examples/ConnectionHandlerDemo-Notecard<br>RAM for global variables,%
arduino:esp32:nano_nora,704,0.02,96,0.03,408,0.01,8,0.0
arduino:mbed:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_edge:edge_control,192,0.02,224,0.09,128,0.01,8,0.0
arduino:mbed_giga:giga,192,0.01,96,0.02,128,0.01,8,0.0
arduino:mbed_nano:nanorp2040connect,178,0.0,96,0.04,126,0.0,8,0.0
arduino:mbed_nicla:nicla_vision,128,0.01,96,0.02,128,0.01,8,0.0
arduino:mbed_opta:opta,256,0.01,0,0.0,128,0.01,8,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:renesas_portenta:portenta_c33,232,0.01,128,0.02,136,0.01,8,0.0
arduino:renesas_uno:unor4wifi,176,0.07,96,0.29,128,0.05,8,0.02
arduino:samd:mkr1000,184,0.07,96,0.29,128,0.05,8,0.02
arduino:samd:mkrgsm1400,208,0.08,228,0.7,128,0.05,8,0.02
arduino:samd:mkrnb1500,208,0.08,228,0.7,128,0.05,8,0.02
arduino:samd:mkrwan1300,168,0.06,52,0.16,128,0.05,8,0.02
arduino:samd:mkrwan1310,168,0.06,52,0.16,128,0.05,8,0.02
arduino:samd:mkrwifi1010,184,0.07,96,0.29,128,0.05,8,0.02
arduino:samd:nano_33_iot,184,0.07,96,0.29,128,0.05,8,0.02
esp32:esp32:esp32,636,0.05,96,0.03,412,0.03,8,0.0
esp8266:esp8266:huzzah,304,0.03,96,0.12,,,,
rp2040:rp2040:rpipicow,192,0.01,96,0.04,344,0.02,24,0.01

This change will allow GenericConnectionHandler to perform callback
management itslef instead of relying on the inner connection handler
thus making it possible to keep callbacks between inner
connectionHandler change
Copy link

github-actions bot commented Apr 3, 2025

Memory usage change @ 6fbe6b6

Board flash % RAM for global variables %
arduino:esp32:nano_nora 🔺 +492 - +776 +0.02 - +0.02 🔺 +8 - +96 0.0 - +0.03
arduino:mbed:envie_m7 N/A N/A N/A N/A
arduino:mbed_edge:edge_control 🔺 +144 - +272 +0.01 - +0.03 🔺 +8 - +224 0.0 - +0.09
arduino:mbed_giga:giga 🔺 +144 - +208 +0.01 - +0.01 🔺 +8 - +96 0.0 - +0.02
arduino:mbed_nano:nanorp2040connect 🔺 +170 - +218 0.0 - 0.0 🔺 +8 - +96 0.0 - +0.04
arduino:mbed_nicla:nicla_vision 🔺 +208 - +208 +0.01 - +0.01 🔺 +8 - +96 0.0 - +0.02
arduino:mbed_opta:opta 🔺 +144 - +272 +0.01 - +0.01 🔺 0 - +8 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 🔺 +176 - +280 +0.01 - +0.01 🔺 +8 - +128 0.0 - +0.02
arduino:renesas_uno:unor4wifi 🔺 +176 - +224 +0.07 - +0.09 🔺 +8 - +96 +0.02 - +0.29
arduino:samd:mkr1000 🔺 +176 - +224 +0.07 - +0.09 🔺 +8 - +96 +0.02 - +0.29
arduino:samd:mkrgsm1400 🔺 +176 - +264 +0.07 - +0.1 🔺 +8 - +228 +0.02 - +0.7
arduino:samd:mkrnb1500 🔺 +176 - +256 +0.07 - +0.1 🔺 +8 - +228 +0.02 - +0.7
arduino:samd:mkrwan1300 🔺 +176 - +208 +0.07 - +0.08 🔺 +8 - +52 +0.02 - +0.16
arduino:samd:mkrwan1310 🔺 +168 - +208 +0.06 - +0.08 🔺 +8 - +52 +0.02 - +0.16
arduino:samd:mkrwifi1010 🔺 +176 - +224 +0.07 - +0.09 🔺 +8 - +96 +0.02 - +0.29
arduino:samd:nano_33_iot 🔺 +168 - +224 +0.06 - +0.09 🔺 +8 - +96 +0.02 - +0.29
esp32:esp32:esp32 🔺 +492 - +712 +0.04 - +0.05 🔺 +8 - +96 0.0 - +0.03
esp8266:esp8266:huzzah 🔺 +368 - +368 +0.04 - +0.04 🔺 +96 - +96 +0.12 - +0.12
rp2040:rp2040:rpipicow 🔺 +232 - +392 +0.01 - +0.02 🔺 +24 - +96 +0.01 - +0.04
Click for full report table
Board examples/ConnectionHandlerDemo
flash
% examples/ConnectionHandlerDemo
RAM for global variables
% examples/ConnectionHandlerDemo-Notecard
flash
% examples/ConnectionHandlerDemo-Notecard
RAM for global variables
%
arduino:esp32:nano_nora 776 0.02 96 0.03 492 0.02 8 0.0
arduino:mbed:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_edge:edge_control 272 0.03 224 0.09 144 0.01 8 0.0
arduino:mbed_giga:giga 208 0.01 96 0.02 144 0.01 8 0.0
arduino:mbed_nano:nanorp2040connect 218 0.0 96 0.04 170 0.0 8 0.0
arduino:mbed_nicla:nicla_vision 208 0.01 96 0.02 208 0.01 8 0.0
arduino:mbed_opta:opta 272 0.01 0 0.0 144 0.01 8 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 280 0.01 128 0.02 176 0.01 8 0.0
arduino:renesas_uno:unor4wifi 224 0.09 96 0.29 176 0.07 8 0.02
arduino:samd:mkr1000 224 0.09 96 0.29 176 0.07 8 0.02
arduino:samd:mkrgsm1400 264 0.1 228 0.7 176 0.07 8 0.02
arduino:samd:mkrnb1500 256 0.1 228 0.7 176 0.07 8 0.02
arduino:samd:mkrwan1300 208 0.08 52 0.16 176 0.07 8 0.02
arduino:samd:mkrwan1310 208 0.08 52 0.16 168 0.06 8 0.02
arduino:samd:mkrwifi1010 224 0.09 96 0.29 176 0.07 8 0.02
arduino:samd:nano_33_iot 224 0.09 96 0.29 168 0.06 8 0.02
esp32:esp32:esp32 712 0.05 96 0.03 492 0.04 8 0.0
esp8266:esp8266:huzzah 368 0.04 96 0.12
rp2040:rp2040:rpipicow 232 0.01 96 0.04 392 0.02 24 0.01
Click for full report CSV
Board,examples/ConnectionHandlerDemo<br>flash,%,examples/ConnectionHandlerDemo<br>RAM for global variables,%,examples/ConnectionHandlerDemo-Notecard<br>flash,%,examples/ConnectionHandlerDemo-Notecard<br>RAM for global variables,%
arduino:esp32:nano_nora,776,0.02,96,0.03,492,0.02,8,0.0
arduino:mbed:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_edge:edge_control,272,0.03,224,0.09,144,0.01,8,0.0
arduino:mbed_giga:giga,208,0.01,96,0.02,144,0.01,8,0.0
arduino:mbed_nano:nanorp2040connect,218,0.0,96,0.04,170,0.0,8,0.0
arduino:mbed_nicla:nicla_vision,208,0.01,96,0.02,208,0.01,8,0.0
arduino:mbed_opta:opta,272,0.01,0,0.0,144,0.01,8,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:renesas_portenta:portenta_c33,280,0.01,128,0.02,176,0.01,8,0.0
arduino:renesas_uno:unor4wifi,224,0.09,96,0.29,176,0.07,8,0.02
arduino:samd:mkr1000,224,0.09,96,0.29,176,0.07,8,0.02
arduino:samd:mkrgsm1400,264,0.1,228,0.7,176,0.07,8,0.02
arduino:samd:mkrnb1500,256,0.1,228,0.7,176,0.07,8,0.02
arduino:samd:mkrwan1300,208,0.08,52,0.16,176,0.07,8,0.02
arduino:samd:mkrwan1310,208,0.08,52,0.16,168,0.06,8,0.02
arduino:samd:mkrwifi1010,224,0.09,96,0.29,176,0.07,8,0.02
arduino:samd:nano_33_iot,224,0.09,96,0.29,168,0.06,8,0.02
esp32:esp32:esp32,712,0.05,96,0.03,492,0.04,8,0.0
esp8266:esp8266:huzzah,368,0.04,96,0.12,,,,
rp2040:rp2040:rpipicow,232,0.01,96,0.04,392,0.02,24,0.01

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants