-
Notifications
You must be signed in to change notification settings - Fork 27
[RSDK-9624] Add discovery service #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fb3daa6 to
75c73e4
Compare
| # Check if clang-format is installed | ||
| if ! command -v clang-format >/dev/null 2>&1; then | ||
| echo "Error: clang-format is not installed" | ||
| echo "Please install it using: brew install clang-format" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove this - but it helped me figure out clang-format wasn't installed through brew on my mac. The original error returned was that xargs couldn't find a file.
bbe666d to
4b45a7e
Compare
stuqdog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One or two minor things but otherwise this looks good to me!
| } | ||
|
|
||
| ProtoStruct MockDiscovery::do_command(const sdk::ProtoStruct& command) { | ||
| return ProtoStruct{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) can we return the fake_map here instead? I tend to prefer returning something that isn't just the default constructed value, just out of an abundance of caution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
lia-viam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, feel free to merge if you're done!
src/viam/sdk/services/discovery.hpp
Outdated
| /// | ||
| /// This acts as an abstract parent class to be inherited from by any drivers representing | ||
| /// specific discovery implementations. This class cannot be used on its own. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line needs to be deleted for the doxygen comment to bind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I need to build docs locally as well or will CI do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI does that yeah!
Co-authored-by: lia <167905060+lia-viam@users.noreply.github.com>
Co-authored-by: lia <167905060+lia-viam@users.noreply.github.com>
This PR adds the Discovery Service wrapper to the C++ SDK.
I mainly followed the pattern in #323.
I followed the
arm.get_geometriesmethod pattern to return an array of aResourceConfigfromdiscovery.discover_resources, which is intended to return a valid config with meaningful attributes for physically connected devices to viam-server.