Viam C++ SDK current
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
viam::sdk::impl::GripperClient Class Reference

gRPC client implementation of a Gripper component More...

#include <gripper_client.hpp>

+ Inheritance diagram for viam::sdk::impl::GripperClient:

Public Types

using interface_type = Gripper
 

Public Member Functions

 GripperClient (std::string names, std::shared_ptr< grpc::Channel > channel)
 
void open (const ProtoStruct &extra) override
 Open the gripper.
 
bool grab (const ProtoStruct &extra) override
 Instruct the gripper to grab.
 
void stop (const ProtoStruct &extra) override
 Stops a resource from running.
 
bool is_moving () override
 Reports if the gripper is in motion.
 
ProtoStruct do_command (const ProtoStruct &command) override
 Send/receive arbitrary commands to the resource.
 
std::vector< GeometryConfigget_geometries (const ProtoStruct &extra) override
 Returns GeometryConfigs associated with the calling arm.
 
std::vector< GeometryConfigget_geometries ()
 Returns GeometryConfigs associated with the calling arm.
 
virtual std::vector< GeometryConfigget_geometries (const ProtoStruct &extra)=0
 Returns GeometryConfigs associated with the calling arm.
 
bool grab ()
 Instruct the gripper to grab.
 
virtual bool grab (const ProtoStruct &extra)=0
 Instruct the gripper to grab.
 
void open ()
 Open the gripper.
 
virtual void open (const ProtoStruct &extra)=0
 Open the gripper.
 
- Public Member Functions inherited from viam::sdk::Gripper
void open ()
 Open the gripper.
 
bool grab ()
 Instruct the gripper to grab.
 
std::vector< GeometryConfigget_geometries ()
 Returns GeometryConfigs associated with the calling arm.
 
API api () const override
 Returns the API associated with a particular resource.
 
- Public Member Functions inherited from viam::sdk::Component
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.
 
- Public Member Functions inherited from viam::sdk::Stoppable
void stop ()
 Stops a resource from running.
 

Additional Inherited Members

- Static Public Member Functions inherited from viam::sdk::Stoppable
static void stop_if_stoppable (const std::shared_ptr< Resource > &resource, const ProtoStruct &extra)
 Stops a Resource if it is Stoppable.
 
static void stop_if_stoppable (const std::shared_ptr< Resource > &resource)
 Stops a Resource if it is Stoppable.
 
- Protected Member Functions inherited from viam::sdk::Gripper
 Gripper (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Component
 Component (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Resource
Name get_resource_name (const std::string &type) const
 

Detailed Description

gRPC client implementation of a Gripper component

Member Function Documentation

◆ do_command()

ProtoStruct viam::sdk::impl::GripperClient::do_command ( const ProtoStruct & command)
overridevirtual

Send/receive arbitrary commands to the resource.

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

Implements viam::sdk::Gripper.

◆ get_geometries() [1/2]

std::vector< GeometryConfig > viam::sdk::impl::GripperClient::get_geometries ( const ProtoStruct & extra)
overridevirtual

Returns GeometryConfigs associated with the calling arm.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Gripper.

◆ get_geometries() [2/2]

virtual std::vector< GeometryConfig > viam::sdk::Gripper::get_geometries ( const ProtoStruct & extra)
virtual

Returns GeometryConfigs associated with the calling arm.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Gripper.

◆ grab() [1/3]

bool viam::sdk::Gripper::grab ( )
inline

Instruct the gripper to grab.

Returns
bool indicating if the gripper grabbed something.

◆ grab() [2/3]

bool viam::sdk::impl::GripperClient::grab ( const ProtoStruct & extra)
overridevirtual

Instruct the gripper to grab.

Parameters
extraAny additional arguments to the method.
Returns
bool indicating if the gripper grabbed something.

Implements viam::sdk::Gripper.

◆ grab() [3/3]

virtual bool viam::sdk::Gripper::grab ( const ProtoStruct & extra)
virtual

Instruct the gripper to grab.

Parameters
extraAny additional arguments to the method.
Returns
bool indicating if the gripper grabbed something.

Implements viam::sdk::Gripper.

◆ is_moving()

bool viam::sdk::impl::GripperClient::is_moving ( )
overridevirtual

Reports if the gripper is in motion.

Implements viam::sdk::Gripper.

◆ open() [1/2]

void viam::sdk::impl::GripperClient::open ( const ProtoStruct & extra)
overridevirtual

Open the gripper.

Parameters
extraAny additional arguments to the method.

Implements viam::sdk::Gripper.

◆ open() [2/2]

virtual void viam::sdk::Gripper::open ( const ProtoStruct & extra)
virtual

Open the gripper.

Parameters
extraAny additional arguments to the method.

Implements viam::sdk::Gripper.

◆ stop()

void viam::sdk::impl::GripperClient::stop ( const ProtoStruct & extra)
overridevirtual

Stops a resource from running.

Parameters
extraExtra arguments to pass to the resource's stop method.

Implements viam::sdk::Stoppable.


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