-
-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Both buffer[512] and doc(512) are 512 bytes in size.
Does this fit all the Json Payload we are constructing below based on the maximum field lenght(s) of all the device name, ids, etc. fields ?
What is the DynamicJsonDocument anyway, I would assume this is actually allocating some more memory if needed ?
Also the deviceObj which is assigned the current DynamicJsonDocument doc should be dynamically allocated.
What does the serializeJson and publish Methods do as they operate on the fixed size buffer ?
Do we need to allocate another object before serialization and publishing the second instance of the doc in lines L212-222 which include the deviceObj as an element ?