- Notifications
You must be signed in to change notification settings - Fork3
Add classes for standard cbor encoders/decoders#33
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecovbot commentedJun 4, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #33 +/- ##==========================================+ Coverage 29.85% 30.21% +0.36%========================================== Files 27 29 +2 Lines 1819 1830 +11 ==========================================+ Hits 543 553 +10- Misses 1276 1277 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Memory usage change @4e40624
Click for full report table
Click for full report CSV
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Instead ofWiFIFWVersionMessageEncoder
, why don't we call itVersionMessageEncoder
? We can make it generic and reuse it by providing a Cbor tag and message id as parameters in the constructor, like this:
structVersionMessage { Message c;struct {constchar *versionString; } params;};VersionMessageEncoder(CborTag tag, MessageId id): CBORMessageEncoderInterface(tag, id) {}VersionMessageEncoderWiFiFWVersionEncoder(CBORWiFiFWVersionMessage, WiFiFWVersionMessageId);typedef VersionMessage WiFiFWVersionMessage;
In this way we can encode all kind of version messages with just this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you add some examples to improve code coverage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Done
ArduinoStandardMessageStartId = 0x000, | ||
ArduinoIOTCloudStartMessageId = 0x100, | ||
ArduinoProvisioningStartMessageId = 0x200, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
ArduinoStandardMessageStartId=0x000, | |
ArduinoIOTCloudStartMessageId=0x100, | |
ArduinoProvisioningStartMessageId=0x200, | |
ArduinoMessageStartId=0x000, | |
ArduinoIOTCloudStartMessageId=0x100, | |
ArduinoProvisioningStartMessageId=0x200, | |
ArduinoVersionsStartId=0x300, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I prefer keeping the versions messages IDs starting from ArduinoStandardMessageStartId. My idea is that the StandardMessageEncoder is a collection of common encoders
Memory usage change @ed7b70b
Click for full report table
Click for full report CSV
|
Changes