Skip to content

Commit 4996a4f

Browse files
committed
Add notes about binary data in result
1 parent e4ef962 commit 4996a4f

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

samples/service_clients/commands/commands-sandbox/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,9 @@ You can also provide a result with the update:
440440
update-command-execution <execution-id> IN_PROGRESS result=battery_ok:true;message:"doing something"
441441
```
442442

443+
> [!NOTE]
444+
> You can also pass binary data in the result field using the CommandExecutionResult::Bin member, which is not supported in this sample.
445+
443446
Then this AWS CLI command
444447
```shell
445448
aws iot get-command-execution --target-arn "<thing ARN>" --execution-id <IoT command execution ID> --include-result

samples/service_clients/commands/commands-sandbox/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ static Aws::Crt::String s_extractValue(std::istringstream &stream)
144144
static Aws::Iotcommands::CommandExecutionResult s_makeResultEntry(const Aws::Crt::String &value)
145145
{
146146
Aws::Iotcommands::CommandExecutionResult entry;
147+
// NOTE: CommandExecutionResult also supports binary data via the `Bin` member, which is not demonstrated in this
148+
// sample.
147149
if (value == "true" || value == "false")
148150
{
149151
entry.B = (value == "true");

0 commit comments

Comments
 (0)