Skip to content

Cbor messages #17

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

Merged
merged 11 commits into from
Feb 26, 2025
Merged

Cbor messages #17

merged 11 commits into from
Feb 26, 2025

Conversation

andreagilardoni
Copy link
Collaborator

Creating a module to handle CBOR message encode and decode for Arduino Cloud related features

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@andreagilardoni andreagilardoni force-pushed the cbor-messages branch 2 times, most recently from 326dbac to bb59ceb Compare February 10, 2025 12:25
@andreagilardoni andreagilardoni marked this pull request as ready for review February 10, 2025 12:57
Copy link
Collaborator

@pennam pennam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/interfaces/Decoder.h could potentially clash with src/lzss/decoder.h so i would rename one or the other

Decoder Encoder and message interfaces are not shared among all libraries modules, so i would move them inside the src/cbor folder. If in the future they become shared interfaces we will move them in a shared interfaces folder

What about the FIXME and TODO comments ? They should be solved before merging the PR or are leftovers?

@andreagilardoni andreagilardoni force-pushed the cbor-messages branch 2 times, most recently from 805d90a to d613a6f Compare February 25, 2025 11:45
@andreagilardoni
Copy link
Collaborator Author

src/interfaces/Decoder.h could potentially clash with src/lzss/decoder.h so i would rename one or the other

I will rename the following src/interfaces/Decoder.h to src/interfaces/MessageDecoder.h, because I think the latter better describes the content of the file. The same applies to the encoder counterpart.

However I don't see the clash, the filename is the same, but the directory structure should be enough to differentiate between those names, otherwise I don't see any advantage of using sub directories. Am I missing something hidden in the build system?

@pennam
Copy link
Collaborator

pennam commented Feb 25, 2025

However I don't see the clash, the filename is the same, but the directory structure should be enough to differentiate between those names, otherwise I don't see any advantage of using sub directories. Am I missing something hidden in the build system?

No, you are rigth, there is no clash. I did not think about folders and considered only the name 🙂 Anyway MessageDecoder is a much better name.

What about the //FIXME better names, and other //TODO comments ? Are you still thinking about renaming ? Otherwise i will remove the comments and merge the PR.

Please remove 77c003d because is included also in #19

Copy link

Memory usage change @ 5fd19ba

Board flash % RAM for global variables %
arduino:esp32:nano_nora 🔺 +272 - +272 +0.01 - +0.01 0 - 0 0.0 - 0.0
arduino:mbed_edge:edge_control 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nicla:nicla_vision 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_opta:opta 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:renesas_uno:unor4wifi 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkr1000 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1300 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
esp32:esp32:esp32 🔺 +272 - +272 +0.02 - +0.02 0 - 0 0.0 - 0.0
Click for full report table
Board examples/lzssDecoder
flash
% examples/lzssDecoder
RAM for global variables
% examples/crc32
flash
% examples/crc32
RAM for global variables
% examples/crc16
flash
% examples/crc16
RAM for global variables
% examples/sha256
flash
% examples/sha256
RAM for global variables
% examples/customCborDecoder
flash
% examples/customCborDecoder
RAM for global variables
% examples/customCborEncoder
flash
% examples/customCborEncoder
RAM for global variables
%
arduino:esp32:nano_nora 272 0.01 0 0.0 272 0.01 0 0.0 272 0.01 0 0.0 272 0.01 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_edge:edge_control 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_giga:giga 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_nano:nanorp2040connect 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_nicla:nicla_vision 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_opta:opta 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
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
arduino:renesas_portenta:portenta_c33 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:renesas_uno:unor4wifi 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:samd:mkr1000 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:samd:mkrgsm1400 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:samd:mkrnb1500 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:samd:mkrwan1300 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:samd:mkrwifi1010 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:samd:nano_33_iot 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
esp32:esp32:esp32 272 0.02 0 0.0 272 0.02 0 0.0 272 0.02 0 0.0 272 0.02 0 0.0 N/A N/A N/A N/A N/A N/A N/A N/A
Click for full report CSV
Board,examples/lzssDecoder<br>flash,%,examples/lzssDecoder<br>RAM for global variables,%,examples/crc32<br>flash,%,examples/crc32<br>RAM for global variables,%,examples/crc16<br>flash,%,examples/crc16<br>RAM for global variables,%,examples/sha256<br>flash,%,examples/sha256<br>RAM for global variables,%,examples/customCborDecoder<br>flash,%,examples/customCborDecoder<br>RAM for global variables,%,examples/customCborEncoder<br>flash,%,examples/customCborEncoder<br>RAM for global variables,%
arduino:esp32:nano_nora,272,0.01,0,0.0,272,0.01,0,0.0,272,0.01,0,0.0,272,0.01,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_edge:edge_control,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_giga:giga,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_nano:nanorp2040connect,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_nicla:nicla_vision,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_opta:opta,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
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
arduino:renesas_portenta:portenta_c33,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:renesas_uno:unor4wifi,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:samd:mkr1000,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:samd:mkrgsm1400,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:samd:mkrnb1500,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:samd:mkrwan1300,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:samd:mkrwifi1010,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:samd:nano_33_iot,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
esp32:esp32:esp32,272,0.02,0,0.0,272,0.02,0,0.0,272,0.02,0,0.0,272,0.02,0,0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A

@pennam pennam merged commit afac651 into arduino-libraries:main Feb 26, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants