Skip to content

Commit

Permalink
Remove C++ doCommand code for now (#3574)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Oct 15, 2024
1 parent 0e783a3 commit 1367e6f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
22 changes: 0 additions & 22 deletions static/include/components/apis/generated/generic_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,6 @@ var result = myArm.doCommand(command);

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/Resource/doCommand.html).

{{% /tab %}}
{{% tab name="C++" %}}

**Parameters:**

- `command` [(AttributeMap)](https://github.com/viamrobotics/viam-cpp-sdk/blob/main/src/viam/sdk/common/proto_type.hpp#L13): The command to execute.

**Returns:**

- [(AttributeMap)](https://github.com/viamrobotics/viam-cpp-sdk/blob/main/src/viam/sdk/common/proto_type.hpp#L13): Result of the executed command.

```cpp {class="line-numbers linkable-line-numbers"}
auto my_generic = robot->resource_by_name<GenericComponent>("my_generic_component");
auto example = std::make_shared<ProtoType>(std::string("example"));
AttributeMap command =
std::make_shared<std::unordered_map<std::string, std::shared_ptr<ProtoType>>>();
command->insert({{std::string("command"), example}});
auto resp = my_generic->do_command(command);
```
For more information, see the [C++ SDK Docs](https://cpp.viam.dev/classviam_1_1sdk_1_1GenericComponent.html)
{{% /tab %}}
{{< /tabs >}}

Expand Down
22 changes: 0 additions & 22 deletions static/include/services/apis/generated/generic_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,6 @@ result, err := myGenericService.DoCommand(context.Background(), command)

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/resource#Resource).

{{% /tab %}}
{{% tab name="C++" %}}

**Parameters:**

- `command` [(AttributeMap)](https://github.com/viamrobotics/viam-cpp-sdk/blob/main/src/viam/sdk/common/proto_type.hpp#L13): The command to execute.

**Returns:**

- [(AttributeMap)](https://github.com/viamrobotics/viam-cpp-sdk/blob/main/src/viam/sdk/common/proto_type.hpp#L13): Result of the executed command.

```cpp {class="line-numbers linkable-line-numbers"}
auto my_generic = robot->resource_by_name<GenericService>("my_generic_service");
auto example = std::make_shared<ProtoType>(std::string("example"));
AttributeMap command =
std::make_shared<std::unordered_map<std::string, std::shared_ptr<ProtoType>>>();
command->insert({{std::string("command"), example}});
auto resp = my_generic->do_command(command);
```
For more information, see the [C++ SDK Docs](https://cpp.viam.dev/classviam_1_1sdk_1_1GenericService.html)
{{% /tab %}}
{{< /tabs >}}

Expand Down

0 comments on commit 1367e6f

Please sign in to comment.