Viam C++ SDK current
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
viam::sdk::Discovery Class Referenceabstract

A Discovery service is used to discover resources that are physically connected to your machine. More...

#include "services/discovery.hpp"

+ Inheritance diagram for viam::sdk::Discovery:

Public Member Functions

std::vector< ResourceConfigdiscover_resources ()
 Discover valid viam configuration of resources that are physically connected to your machine.
 
virtual std::vector< ResourceConfigdiscover_resources (const ProtoStruct &extra)=0
 Discover valid viam configuration of resources that are physically connected to your machine.
 
virtual ProtoStruct do_command (const ProtoStruct &command)=0
 Do an arbitrary command.
 
API api () const override
 Returns the API associated with a particular resource.
 
- Public Member Functions inherited from viam::sdk::Service
Name get_resource_name () const override
 Returns the Name for a particular resource.
 
- Public Member Functions inherited from viam::sdk::Resource
 Resource (std::string name)
 
virtual std::string name () const
 Return the resource's name.
 

Protected Member Functions

 Discovery (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Service
 Service (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Resource
Name get_resource_name (const std::string &type) const
 

Detailed Description

A Discovery service is used to discover resources that are physically connected to your machine.

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.

Member Function Documentation

◆ api()

API viam::sdk::Discovery::api ( ) const
overridevirtual

Returns the API associated with a particular resource.

Implements viam::sdk::Resource.

◆ discover_resources() [1/2]

std::vector< ResourceConfig > viam::sdk::Discovery::discover_resources ( )
inline

Discover valid viam configuration of resources that are physically connected to your machine.

Returns
array of potential viam configurations for hardware physically connected to your viam server

◆ discover_resources() [2/2]

virtual std::vector< ResourceConfig > viam::sdk::Discovery::discover_resources ( const ProtoStruct & extra)
pure virtual

Discover valid viam configuration of resources that are physically connected to your machine.

Parameters
extraAny additional arguments to the method.
Returns
array of potential viam configurations for hardware physically

Implemented in viam::sdk::impl::DiscoveryClient.

◆ do_command()

virtual ProtoStruct viam::sdk::Discovery::do_command ( const ProtoStruct & command)
pure virtual

Do an arbitrary command.

Parameters
commandFreeform fields that are service-specific.
Returns
Freeform result of the command.

Implemented in viam::sdk::impl::DiscoveryClient.


The documentation for this class was generated from the following file: