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

A GenericComponent represents any component that can execute arbitrary commands. More...

#include "components/generic.hpp"

+ Inheritance diagram for viam::sdk::GenericComponent:

Public Member Functions

virtual AttributeMap do_command (const AttributeMap &command)=0
 Send/receive arbitrary commands to the resource.
 
std::vector< GeometryConfigget_geometries ()
 Returns GeometryConfigs associated with the calling camera.
 
virtual std::vector< GeometryConfigget_geometries (const AttributeMap &extra)=0
 
API api () const override
 Creates a GenericComponent API.
 
- Public Member Functions inherited from viam::sdk::Component
viam::common::v1::ResourceName get_resource_name (std::string name) const override
 Returns a ResourceName for a particular resource name.
 
- 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

 GenericComponent (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Component
 Component (std::string name)
 

Detailed Description

A GenericComponent represents any component that can execute arbitrary commands.

This acts as an abstract base class to be inherited from by any drivers representing specific generic implementations. This class cannot be used on its own.

Member Function Documentation

◆ api()

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

Creates a GenericComponent API.

Implements viam::sdk::Resource.

◆ do_command()

virtual AttributeMap viam::sdk::GenericComponent::do_command ( const AttributeMap & command)
pure virtual

Send/receive arbitrary commands to the resource.

Parameters
commandthe command to execute.
Returns
The result of the executed command.

Implemented in viam::sdk::impl::GenericComponentClient.

◆ get_geometries()

std::vector< GeometryConfig > viam::sdk::GenericComponent::get_geometries ( )
inline

Returns GeometryConfigs associated with the calling camera.

Returns
The requested GeometryConfigs associated with the component.

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