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

Remove internal global functions and unwanted public functions #387

Closed
wants to merge 4 commits into from

Conversation

pennam
Copy link
Collaborator

@pennam pennam commented Oct 10, 2023

Issue

To handle timezone and thing-id changes from the cloud UI the following global functions were added:

Together with other public functions that should be only used for internal purposes:

Changes

This PR removes the global functions and unwanted public methods to handle thing-id and timezone changes.

Other Info

Regarding commit 1917639 I'm not sure if this behaviour was intended or not, but I've found out that for read-only property the cloud_value is never updated. This change allows to update the cloud_value of a read-only property allowing also the possibility to manually change the local value calling the fromCloudTiLocal() function. This is a bit hacky and not 100% correct. To fix this we should add a local update policy [manual/auto] to add the possibility to handle the property local_value update manually.

@pennam pennam changed the title Remove global functions Remove internal global functions and unwanted public functions Oct 10, 2023
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (6a9acc2) 95.00% compared to head (c15c145) 94.84%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #387      +/-   ##
==========================================
- Coverage   95.00%   94.84%   -0.16%     
==========================================
  Files          27       27              
  Lines        1220     1223       +3     
==========================================
+ Hits         1159     1160       +1     
- Misses         61       63       +2     
Files Coverage Δ
src/property/PropertyContainer.cpp 87.09% <100.00%> (+0.21%) ⬆️
src/property/types/CloudString.h 93.75% <0.00%> (-6.25%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link

Memory usage change @ c15c145

Board flash % RAM for global variables %
arduino:esp32:nano_nora 🔺 +1028 - +1420 +0.03 - +0.05 🔺 +288 - +288 +0.09 - +0.09
arduino:mbed_giga:giga 🔺 +488 - +3272 +0.02 - +0.17 🔺 +256 - +288 +0.05 - +0.06
arduino:mbed_nano:nanorp2040connect 🔺 +324 - +3132 0.0 - +0.02 🔺 +272 - +272 +0.1 - +0.1
arduino:mbed_nicla:nicla_vision 🔺 +480 - +3280 +0.02 - +0.17 🔺 +256 - +288 +0.05 - +0.06
arduino:mbed_opta:opta 🔺 +480 - +3208 +0.02 - +0.16 🔺 +256 - +288 +0.05 - +0.06
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 🔺 +72 - +2840 0.0 - +0.14 🔺 +256 - +288 +0.05 - +0.06
arduino:renesas_uno:unor4wifi 🔺 +304 - +464 +0.12 - +0.18 🔺 +272 - +272 +0.83 - +0.83
arduino:samd:mkr1000 🔺 +88 - +3536 +0.03 - +1.35 🔺 +272 - +272 +0.83 - +0.83
arduino:samd:mkrgsm1400 🔺 +312 - +3536 +0.12 - +1.35 🔺 +272 - +272 +0.83 - +0.83
arduino:samd:mkrnb1500 🔺 +88 - +3536 +0.03 - +1.35 🔺 +272 - +272 +0.83 - +0.83
arduino:samd:mkrwan1300 🔺 +1120 - +3168 +0.43 - +1.21 🔺 +272 - +272 +0.83 - +0.83
arduino:samd:mkrwifi1010 🔺 +368 - +3768 +0.14 - +1.44 🔺 +272 - +272 +0.83 - +0.83
arduino:samd:nano_33_iot 🔺 +368 - +3768 +0.14 - +1.44 🔺 +272 - +272 +0.83 - +0.83
esp32:esp32:esp32 🔺 +1084 - +1400 +0.08 - +0.11 🔺 +288 - +288 +0.09 - +0.09
esp8266:esp8266:huzzah ❔ -64 - +496 -0.01 - +0.05 🔺 +272 - +272 +0.33 - +0.33
Click for full report table
Board examples/ArduinoIoTCloud-Advanced
flash
% examples/ArduinoIoTCloud-Advanced
RAM for global variables
% examples/ArduinoIoTCloud-Basic
flash
% examples/ArduinoIoTCloud-Basic
RAM for global variables
% examples/ArduinoIoTCloud-Callbacks
flash
% examples/ArduinoIoTCloud-Callbacks
RAM for global variables
% examples/ArduinoIoTCloud-Schedule
flash
% examples/ArduinoIoTCloud-Schedule
RAM for global variables
% examples/utility/ArduinoIoTCloud_Travis_CI
flash
% examples/utility/ArduinoIoTCloud_Travis_CI
RAM for global variables
% examples/ArduinoIoTCloud-DeferredOTA
flash
% examples/ArduinoIoTCloud-DeferredOTA
RAM for global variables
% examples/utility/Provisioning
flash
% examples/utility/Provisioning
RAM for global variables
% examples/utility/SelfProvisioning
flash
% examples/utility/SelfProvisioning
RAM for global variables
%
arduino:esp32:nano_nora 1112 0.04 288 0.09 1408 0.04 288 0.09 1028 0.03 288 0.09 1112 0.04 288 0.09 1420 0.05 288 0.09 1096 0.03 288 0.09
arduino:mbed_giga:giga 552 0.03 288 0.06 680 0.03 256 0.05 488 0.02 288 0.06 488 0.02 256 0.05 736 0.04 256 0.05 488 0.02 288 0.06 3272 0.17 256 0.05
arduino:mbed_nano:nanorp2040connect 350 0.0 272 0.1 480 0.0 272 0.1 324 0.0 272 0.1 350 0.0 272 0.1 502 0.0 272 0.1 352 0.0 272 0.1 3132 0.02 272 0.1 3098 0.02 272 0.1
arduino:mbed_nicla:nicla_vision 480 0.02 288 0.06 616 0.03 256 0.05 488 0.02 256 0.05 480 0.02 288 0.06 680 0.03 256 0.05 488 0.02 256 0.05 3280 0.17 256 0.05
arduino:mbed_opta:opta 544 0.03 288 0.06 672 0.03 256 0.05 480 0.02 256 0.05 480 0.02 288 0.06 744 0.04 256 0.05 480 0.02 256 0.05 3208 0.16 288 0.06
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 112 0.01 256 0.05 448 0.02 288 0.06 72 0.0 256 0.05 104 0.0 288 0.06 512 0.02 288 0.06 2840 0.14 256 0.05
arduino:renesas_uno:unor4wifi 320 0.12 272 0.83 448 0.17 272 0.83 304 0.12 272 0.83 336 0.13 272 0.83 464 0.18 272 0.83
arduino:samd:mkr1000 128 0.05 272 0.83 456 0.17 272 0.83 88 0.03 272 0.83 128 0.05 272 0.83 520 0.2 272 0.83 3536 1.35 272 0.83
arduino:samd:mkrgsm1400 352 0.13 272 0.83 472 0.18 272 0.83 312 0.12 272 0.83 352 0.13 272 0.83 496 0.19 272 0.83 3536 1.35 272 0.83
arduino:samd:mkrnb1500 120 0.05 272 0.83 456 0.17 272 0.83 88 0.03 272 0.83 120 0.05 272 0.83 520 0.2 272 0.83 3536 1.35 272 0.83
arduino:samd:mkrwan1300 1808 0.69 272 0.83 1440 0.55 272 0.83 3168 1.21 272 0.83 2104 0.8 272 0.83 1120 0.43 272 0.83
arduino:samd:mkrwifi1010 400 0.15 272 0.83 520 0.2 272 0.83 368 0.14 272 0.83 400 0.15 272 0.83 544 0.21 272 0.83 400 0.15 272 0.83 3768 1.44 272 0.83 3680 1.4 272 0.83
arduino:samd:nano_33_iot 400 0.15 272 0.83 520 0.2 272 0.83 368 0.14 272 0.83 400 0.15 272 0.83 544 0.21 272 0.83 400 0.15 272 0.83 3768 1.44 272 0.83 3672 1.4 272 0.83
esp32:esp32:esp32 1124 0.09 288 0.09 1396 0.11 288 0.09 1084 0.08 288 0.09 1112 0.08 288 0.09 1400 0.11 288 0.09 1120 0.09 288 0.09
esp8266:esp8266:huzzah 0 0.0 272 0.33 400 0.04 272 0.33 -64 -0.01 272 0.33 0 0.0 272 0.33 496 0.05 272 0.33
Click for full report CSV
Board,examples/ArduinoIoTCloud-Advanced<br>flash,%,examples/ArduinoIoTCloud-Advanced<br>RAM for global variables,%,examples/ArduinoIoTCloud-Basic<br>flash,%,examples/ArduinoIoTCloud-Basic<br>RAM for global variables,%,examples/ArduinoIoTCloud-Callbacks<br>flash,%,examples/ArduinoIoTCloud-Callbacks<br>RAM for global variables,%,examples/ArduinoIoTCloud-Schedule<br>flash,%,examples/ArduinoIoTCloud-Schedule<br>RAM for global variables,%,examples/utility/ArduinoIoTCloud_Travis_CI<br>flash,%,examples/utility/ArduinoIoTCloud_Travis_CI<br>RAM for global variables,%,examples/ArduinoIoTCloud-DeferredOTA<br>flash,%,examples/ArduinoIoTCloud-DeferredOTA<br>RAM for global variables,%,examples/utility/Provisioning<br>flash,%,examples/utility/Provisioning<br>RAM for global variables,%,examples/utility/SelfProvisioning<br>flash,%,examples/utility/SelfProvisioning<br>RAM for global variables,%
arduino:esp32:nano_nora,1112,0.04,288,0.09,1408,0.04,288,0.09,1028,0.03,288,0.09,1112,0.04,288,0.09,1420,0.05,288,0.09,1096,0.03,288,0.09
arduino:mbed_giga:giga,552,0.03,288,0.06,680,0.03,256,0.05,488,0.02,288,0.06,488,0.02,256,0.05,736,0.04,256,0.05,488,0.02,288,0.06,3272,0.17,256,0.05
arduino:mbed_nano:nanorp2040connect,350,0.0,272,0.1,480,0.0,272,0.1,324,0.0,272,0.1,350,0.0,272,0.1,502,0.0,272,0.1,352,0.0,272,0.1,3132,0.02,272,0.1,3098,0.02,272,0.1
arduino:mbed_nicla:nicla_vision,480,0.02,288,0.06,616,0.03,256,0.05,488,0.02,256,0.05,480,0.02,288,0.06,680,0.03,256,0.05,488,0.02,256,0.05,3280,0.17,256,0.05,,,,
arduino:mbed_opta:opta,544,0.03,288,0.06,672,0.03,256,0.05,480,0.02,256,0.05,480,0.02,288,0.06,744,0.04,256,0.05,480,0.02,256,0.05,3208,0.16,288,0.06,,,,
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,,,,
arduino:renesas_portenta:portenta_c33,112,0.01,256,0.05,448,0.02,288,0.06,72,0.0,256,0.05,104,0.0,288,0.06,512,0.02,288,0.06,,,,,2840,0.14,256,0.05,,,,
arduino:renesas_uno:unor4wifi,320,0.12,272,0.83,448,0.17,272,0.83,304,0.12,272,0.83,336,0.13,272,0.83,464,0.18,272,0.83,,,,,,,,,,,,
arduino:samd:mkr1000,128,0.05,272,0.83,456,0.17,272,0.83,88,0.03,272,0.83,128,0.05,272,0.83,520,0.2,272,0.83,,,,,3536,1.35,272,0.83,,,,
arduino:samd:mkrgsm1400,352,0.13,272,0.83,472,0.18,272,0.83,312,0.12,272,0.83,352,0.13,272,0.83,496,0.19,272,0.83,,,,,3536,1.35,272,0.83,,,,
arduino:samd:mkrnb1500,120,0.05,272,0.83,456,0.17,272,0.83,88,0.03,272,0.83,120,0.05,272,0.83,520,0.2,272,0.83,,,,,3536,1.35,272,0.83,,,,
arduino:samd:mkrwan1300,1808,0.69,272,0.83,1440,0.55,272,0.83,3168,1.21,272,0.83,2104,0.8,272,0.83,1120,0.43,272,0.83,,,,,,,,,,,,
arduino:samd:mkrwifi1010,400,0.15,272,0.83,520,0.2,272,0.83,368,0.14,272,0.83,400,0.15,272,0.83,544,0.21,272,0.83,400,0.15,272,0.83,3768,1.44,272,0.83,3680,1.4,272,0.83
arduino:samd:nano_33_iot,400,0.15,272,0.83,520,0.2,272,0.83,368,0.14,272,0.83,400,0.15,272,0.83,544,0.21,272,0.83,400,0.15,272,0.83,3768,1.44,272,0.83,3672,1.4,272,0.83
esp32:esp32:esp32,1124,0.09,288,0.09,1396,0.11,288,0.09,1084,0.08,288,0.09,1112,0.08,288,0.09,1400,0.11,288,0.09,1120,0.09,288,0.09,,,,,,,,
esp8266:esp8266:huzzah,0,0.0,272,0.33,400,0.04,272,0.33,-64,-0.01,272,0.33,0,0.0,272,0.33,496,0.05,272,0.33,,,,,,,,,,,,

@pennam
Copy link
Collaborator Author

pennam commented Apr 24, 2024

superseded by #440

@pennam pennam closed this Apr 24, 2024
@per1234 per1234 added conclusion: duplicate Has already been submitted type: enhancement Proposed improvement topic: code Related to content of the project itself labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted 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.

2 participants