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

gRPC client implementation of a Gantry component. More...

#include <gantry_client.hpp>

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

Public Types

using interface_type = Gantry
 

Public Member Functions

 GantryClient (std::string names, std::shared_ptr< grpc::Channel > channel)
 
std::vector< double > get_position (const AttributeMap &extra) override
 Get the positions of the axes of the gantry in millimeters.
 
void move_to_position (const std::vector< movement_coordinate > &coordinates, const AttributeMap &extra) override
 Move the axes of the gantry to the desired positions (mm) at the requested speeds (mm/sec).
 
bool home (const AttributeMap &extra) override
 Run the homing sequence of the gantry to re-calibrate the axes with respect to the limit switches.
 
std::vector< double > get_lengths (const AttributeMap &extra) override
 Get the lengths of the axes of the gantry in millimeters.
 
bool is_moving () override
 Reports if the gantry is in motion.
 
void stop (const AttributeMap &extra) override
 Stops a resource from running.
 
AttributeMap do_command (const AttributeMap &command) override
 Send/receive arbitrary commands to the resource.
 
std::vector< GeometryConfigget_geometries (const AttributeMap &extra) override
 Returns GeometryConfigs associated with the calling gantry.
 
std::vector< GeometryConfigget_geometries ()
 Returns GeometryConfigs associated with the calling gantry.
 
virtual std::vector< GeometryConfigget_geometries (const AttributeMap &extra)=0
 Returns GeometryConfigs associated with the calling gantry.
 
std::vector< double > get_lengths ()
 Get the lengths of the axes of the gantry in millimeters.
 
virtual std::vector< double > get_lengths (const AttributeMap &extra)=0
 Get the lengths of the axes of the gantry in millimeters.
 
std::vector< double > get_position ()
 Get the positions of the axes of the gantry in millimeters.
 
virtual std::vector< double > get_position (const AttributeMap &extra)=0
 Get the positions of the axes of the gantry in millimeters.
 
bool home ()
 Run the homing sequence of the gantry to re-calibrate the axes with respect to the limit switches.
 
virtual bool home (const AttributeMap &extra)=0
 Run the homing sequence of the gantry to re-calibrate the axes with respect to the limit switches.
 
void move_to_position (const std::vector< movement_coordinate > &coordinates)
 Move the axes of the gantry to the desired positions (mm) at the requested speeds (mm/sec).
 
virtual void move_to_position (const std::vector< movement_coordinate > &coordinates, const AttributeMap &extra)=0
 Move the axes of the gantry to the desired positions (mm) at the requested speeds (mm/sec).
 
- Public Member Functions inherited from viam::sdk::Gantry
std::vector< double > get_position ()
 Get the positions of the axes of the gantry in millimeters.
 
void move_to_position (const std::vector< movement_coordinate > &coordinates)
 Move the axes of the gantry to the desired positions (mm) at the requested speeds (mm/sec).
 
bool home ()
 Run the homing sequence of the gantry to re-calibrate the axes with respect to the limit switches.
 
std::vector< double > get_lengths ()
 Get the lengths of the axes of the gantry in millimeters.
 
std::vector< GeometryConfigget_geometries ()
 Returns GeometryConfigs associated with the calling gantry.
 
API api () const override
 Returns the API associated with a particular resource.
 
- 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.
 
- 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 AttributeMap &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::Gantry
 Component ()
 
 Component (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Component
 Component (std::string name)
 

Detailed Description

gRPC client implementation of a Gantry component.

Member Function Documentation

◆ do_command()

AttributeMap viam::sdk::impl::GantryClient::do_command ( const AttributeMap & command)
overridevirtual

Send/receive arbitrary commands to the resource.

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

Implements viam::sdk::Gantry.

◆ get_geometries() [1/2]

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

Returns GeometryConfigs associated with the calling gantry.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Gantry.

◆ get_geometries() [2/2]

virtual std::vector< GeometryConfig > viam::sdk::Gantry::get_geometries ( const AttributeMap & extra)
virtual

Returns GeometryConfigs associated with the calling gantry.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Gantry.

◆ get_lengths() [1/2]

std::vector< double > viam::sdk::impl::GantryClient::get_lengths ( const AttributeMap & extra)
overridevirtual

Get the lengths of the axes of the gantry in millimeters.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Gantry.

◆ get_lengths() [2/2]

virtual std::vector< double > viam::sdk::Gantry::get_lengths ( const AttributeMap & extra)
virtual

Get the lengths of the axes of the gantry in millimeters.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Gantry.

◆ get_position() [1/2]

std::vector< double > viam::sdk::impl::GantryClient::get_position ( const AttributeMap & extra)
overridevirtual

Get the positions of the axes of the gantry in millimeters.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Gantry.

◆ get_position() [2/2]

virtual std::vector< double > viam::sdk::Gantry::get_position ( const AttributeMap & extra)
virtual

Get the positions of the axes of the gantry in millimeters.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Gantry.

◆ home() [1/3]

bool viam::sdk::Gantry::home ( )
inline

Run the homing sequence of the gantry to re-calibrate the axes with respect to the limit switches.

Returns
Whether the gantry has run the homing sequence successfully.

◆ home() [2/3]

bool viam::sdk::impl::GantryClient::home ( const AttributeMap & extra)
overridevirtual

Run the homing sequence of the gantry to re-calibrate the axes with respect to the limit switches.

Parameters
extraAny additional arguments to the method
Returns
Whether the gantry has run the homing sequence successfully.

Implements viam::sdk::Gantry.

◆ home() [3/3]

virtual bool viam::sdk::Gantry::home ( const AttributeMap & extra)
virtual

Run the homing sequence of the gantry to re-calibrate the axes with respect to the limit switches.

Parameters
extraAny additional arguments to the method
Returns
Whether the gantry has run the homing sequence successfully.

Implements viam::sdk::Gantry.

◆ is_moving()

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

Reports if the gantry is in motion.

Implements viam::sdk::Gantry.

◆ move_to_position() [1/3]

void viam::sdk::Gantry::move_to_position ( const std::vector< movement_coordinate > & coordinates)
inline

Move the axes of the gantry to the desired positions (mm) at the requested speeds (mm/sec).

Parameters
coordinatesA vector whose entries represent the position and speed pairs for each axis.

◆ move_to_position() [2/3]

void viam::sdk::impl::GantryClient::move_to_position ( const std::vector< movement_coordinate > & coordinates,
const AttributeMap & extra )
overridevirtual

Move the axes of the gantry to the desired positions (mm) at the requested speeds (mm/sec).

Parameters
coordinatesA vector whose entries represent the position and speed pairs for each axis.
extraAny additional arguments to the method

Implements viam::sdk::Gantry.

◆ move_to_position() [3/3]

virtual void viam::sdk::Gantry::move_to_position ( const std::vector< movement_coordinate > & coordinates,
const AttributeMap & extra )
virtual

Move the axes of the gantry to the desired positions (mm) at the requested speeds (mm/sec).

Parameters
coordinatesA vector whose entries represent the position and speed pairs for each axis.
extraAny additional arguments to the method

Implements viam::sdk::Gantry.

◆ stop()

void viam::sdk::impl::GantryClient::stop ( const AttributeMap & 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: