Skip to content

Commit b901f59

Browse files
authored
[RSDK-10768] Use the expected name for single input tensors (viamrobotics#439)
1 parent 777f1fd commit b901f59

34 files changed

+158
-114
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ docker build --build-arg BASE_TAG=base/bullseye --build-arg GIT_TAG=[...] -f etc
3737
```
3838

3939
This will use `base/bullseye` as a base to build the SDK version provided in `GIT_TAG`,
40-
which should be a tagged release version. The SDK will be cloned from
40+
which should be a tagged release version. The SDK will be cloned from
4141
https://github.com/viamrobotics/viam-cpp-sdk/. This is the recommended approach for
4242
C++ module development, which should generally be done against a tagged release.
4343

@@ -47,22 +47,22 @@ docker build --build-arg BASE_TAG=base/bullseye --build-arg REPO_SETUP=copy -f e
4747
```
4848

4949
Note the use of the build argument `REPO_SETUP=copy`, which adds a Docker instruction
50-
to copy the SDK repo from the current working directory, rather than cloning from
50+
to copy the SDK repo from the current working directory, rather than cloning from
5151
GitHub. This approach may make more sense for developing on the SDK itself, or if
5252
your C++ SDK development relies on a localversion of the SDK.
5353

5454
The examples above illustrated the use of several `--build-arg` arguments, namely
55-
`BASE_TAG`, `GIT_TAG`, and `REPO_SETUP`. Please see
55+
`BASE_TAG`, `GIT_TAG`, and `REPO_SETUP`. Please see
5656
[Dockerfile.sdk-build](etc/docker/Dockerfile.sdk-build) for a complete account of
5757
all build arguments and their defaults.
5858

5959
## Building Documentation Locally for Testing
6060
The C++ sdk uses [Doxygen](https://www.doxygen.nl/) to generate documentation.
6161
An automated workflow will generate and update our documentation on each merge,
62-
and publish it to [cpp.viam.dev](https://cpp.viam.dev).
62+
and publish it to [cpp.viam.dev](https://cpp.viam.dev).
6363

6464
Generating documentation locally to observe changes while developing with the
65-
C++ SDK is simple.
65+
C++ SDK is simple.
6666
First, make sure doxygen is installed, e.g.,
6767
```
6868
(on mac) brew install doxygen
@@ -91,10 +91,10 @@ quickly as possible.
9191
## A note on logging
9292

9393
Users should only interact with logging via the macros, classes, and functions in
94-
[`viam/sdk/log/logging.hpp`](src/viam/sdk/log/logging.hpp). Logging is
94+
[`viam/sdk/log/logging.hpp`](src/viam/sdk/log/logging.hpp). Logging is
9595
implemented using Boost.Log, but this is an implementation detail subject
9696
to change without warning. In particular, using Boost.Log macros such as
97-
`BOOST_LOG_TRIVIAL` or `BOOST_LOG_SEV` is undefined behavior which will likely
97+
`BOOST_LOG_TRIVIAL` or `BOOST_LOG_SEV` is undefined behavior which will likely
9898
fail to output log messages.
9999

100100
## License

src/viam/examples/modules/complex/gizmo/api.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ API API::traits<Gizmo>::api() {
2424
return {"viam", "component", "gizmo"};
2525
}
2626

27-
Gizmo::Gizmo(std::string name) : Component(std::move(name)){};
27+
Gizmo::Gizmo(std::string name) : Component(std::move(name)) {}
2828

2929
/* Gizmo server methods */
3030

3131
GizmoServer::GizmoServer(std::shared_ptr<ResourceManager> manager)
32-
: ResourceServer(std::move(manager)){};
32+
: ResourceServer(std::move(manager)) {}
3333

3434
grpc::Status GizmoServer::DoOne(grpc::ServerContext* context,
3535
const DoOneRequest* request,
@@ -170,7 +170,7 @@ grpc::Status GizmoServer::DoTwo(::grpc::ServerContext* context,
170170
/* Gizmo client methods */
171171

172172
GizmoClient::GizmoClient(std::string name, std::shared_ptr<grpc::Channel> channel)
173-
: Gizmo(std::move(name)), stub_(GizmoService::NewStub(channel)), channel_(std::move(channel)){};
173+
: Gizmo(std::move(name)), stub_(GizmoService::NewStub(channel)), channel_(std::move(channel)) {}
174174

175175
bool GizmoClient::do_one(std::string arg1) {
176176
return make_client_helper(this, *stub_, &StubType::DoOne)

src/viam/examples/modules/complex/gizmo/impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ using namespace viam::sdk;
1414
// `validate` method that checks config validity.
1515
class MyGizmo : public Gizmo, public Reconfigurable {
1616
public:
17-
MyGizmo(std::string name, std::string arg1) : Gizmo(std::move(name)), arg1_(std::move(arg1)){};
17+
MyGizmo(std::string name, std::string arg1) : Gizmo(std::move(name)), arg1_(std::move(arg1)) {}
1818
MyGizmo(const Dependencies& deps, const ResourceConfig& cfg) : Gizmo(cfg.name()) {
1919
this->reconfigure(deps, cfg);
20-
};
20+
}
2121
void reconfigure(const Dependencies& deps, const ResourceConfig& cfg) override;
2222
static std::vector<std::string> validate(ResourceConfig cfg);
2323

src/viam/examples/modules/complex/summation/api.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ API API::traits<Summation>::api() {
2424
return {"viam", "service", "summation"};
2525
}
2626

27-
Summation::Summation(std::string name) : Service(std::move(name)){};
27+
Summation::Summation(std::string name) : Service(std::move(name)) {}
2828

2929
/* Summation server methods */
3030

3131
SummationServer::SummationServer(std::shared_ptr<ResourceManager> manager)
32-
: ResourceServer(std::move(manager)){};
32+
: ResourceServer(std::move(manager)) {}
3333

3434
grpc::Status SummationServer::Sum(grpc::ServerContext* context,
3535
const SumRequest* request,
@@ -58,7 +58,7 @@ grpc::Status SummationServer::Sum(grpc::ServerContext* context,
5858
SummationClient::SummationClient(std::string name, std::shared_ptr<grpc::Channel> channel)
5959
: Summation(std::move(name)),
6060
stub_(SummationService::NewStub(channel)),
61-
channel_(std::move(channel)){};
61+
channel_(std::move(channel)) {}
6262

6363
double SummationClient::sum(std::vector<double> numbers) {
6464
return make_client_helper(this, *stub_, &StubType::Sum)

src/viam/examples/modules/complex/summation/impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ using namespace viam::sdk;
1313
class MySummation : public Summation, public Reconfigurable {
1414
public:
1515
MySummation(std::string name, bool subtract)
16-
: Summation(std::move(name)), subtract_(subtract){};
16+
: Summation(std::move(name)), subtract_(subtract) {}
1717
MySummation(const Dependencies& deps, const ResourceConfig& cfg) : Summation(cfg.name()) {
1818
this->reconfigure(deps, cfg);
19-
};
19+
}
2020
void reconfigure(const Dependencies& deps, const ResourceConfig& cfg) override;
2121
static std::vector<std::string> validate(ResourceConfig cfg);
2222

src/viam/sdk/components/base.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ bool operator==(const Base::properties& lhs, const Base::properties& rhs) {
2424
lhs.turning_radius_meters == rhs.turning_radius_meters;
2525
}
2626

27-
Base::Base(std::string name) : Component(std::move(name)){};
27+
Base::Base(std::string name) : Component(std::move(name)) {}
2828

2929
} // namespace sdk
3030
} // namespace viam

src/viam/sdk/components/board.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ API API::traits<Board>::api() {
1616
return {kRDK, kComponent, "board"};
1717
}
1818

19-
Board::Board(std::string name) : Component(std::move(name)){};
19+
Board::Board(std::string name) : Component(std::move(name)) {}
2020

2121
bool operator==(const Board::status& lhs, const Board::status& rhs) {
2222
return (lhs.analog_reader_values == rhs.analog_reader_values &&

src/viam/sdk/components/camera.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ std::string Camera::normalize_mime_type(const std::string& str) {
130130
return mime_type;
131131
}
132132

133-
Camera::Camera(std::string name) : Component(std::move(name)){};
133+
Camera::Camera(std::string name) : Component(std::move(name)) {}
134134

135135
bool operator==(const Camera::point_cloud& lhs, const Camera::point_cloud& rhs) {
136136
return lhs.mime_type == rhs.mime_type && lhs.pc == rhs.pc;

src/viam/sdk/components/encoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ API API::traits<Encoder>::api() {
1515
return {kRDK, kComponent, "encoder"};
1616
}
1717

18-
Encoder::Encoder(std::string name) : Component(std::move(name)){};
18+
Encoder::Encoder(std::string name) : Component(std::move(name)) {}
1919

2020
bool operator==(const Encoder::position& lhs, const Encoder::position& rhs) {
2121
return (lhs.value == rhs.value && lhs.type == rhs.type);

src/viam/sdk/components/generic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ API API::traits<GenericComponent>::api() {
1111
return {kRDK, kComponent, "generic"};
1212
}
1313

14-
GenericComponent::GenericComponent(std::string name) : Component(std::move(name)){};
14+
GenericComponent::GenericComponent(std::string name) : Component(std::move(name)) {}
1515

1616
} // namespace sdk
1717
} // namespace viam

0 commit comments

Comments
 (0)