Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
shadow_console_echo.c File Reference
Echo received Delta message. More...
Go to the source code of this file.
Functions | |
| bool | buildJSONForReported (char *pJsonDocument, size_t maxSizeOfJsonDocument, const char *pReceivedDeltaData, uint32_t lengthDelta) |
| This function builds a full Shadow expected JSON document by putting the data in the reported section. | |
Detailed Description
Echo received Delta message.
This application will echo the message received in delta, as reported. for example: Received Delta message { "state": { "switch": "on" } } This delta message means the desired switch position has changed to "on"
This application will take this delta message and publish it back as the reported message from the device. { "state": { "reported": { "switch": "on" } } }
This update message will remove the delta that was created. If this message was not removed then the AWS IoT Thing Shadow is going to always have a delta and keep sending delta any time an update is applied to the Shadow This example will not use any of the json builder/helper functions provided in the aws_iot_shadow_json_data.h.
- Note:
- Ensure the buffer sizes in aws_iot_config.h are big enough to receive the delta message. The delta message will also contain the metadata with the timestamps
Definition in file shadow_console_echo.c.
Function Documentation
| bool buildJSONForReported | ( | char * | pJsonDocument, |
| size_t | maxSizeOfJsonDocument, | ||
| const char * | pReceivedDeltaData, | ||
| uint32_t | lengthDelta | ||
| ) |
This function builds a full Shadow expected JSON document by putting the data in the reported section.
- Parameters:
-
pJsonDocument Buffer to be filled up with the JSON data maxSizeOfJsonDocument maximum size of the buffer that could be used to fill pReceivedDeltaData This is the data that will be embedded in the reported section of the JSON document lengthDelta Length of the data
Definition at line 197 of file shadow_console_echo.c.
Generated on Tue Jul 12 2022 19:02:38 by
1.7.2