|
Viam C++ SDK current
|
gRPC client implementation of a Servo component.
More...
#include <servo_client.hpp>
Inheritance diagram for viam::sdk::impl::ServoClient:Public Types | |
| using | interface_type = Servo |
| using | StubType = viam::component::servo::v1::ServoService::StubInterface |
Public Types inherited from viam::sdk::Servo | |
| typedef uint32_t | position |
Public Member Functions | |
| ServoClient (std::string name, std::shared_ptr< grpc::Channel > channel) | |
| void | move (uint32_t angle_deg, const ProtoStruct &extra) override |
| Move the servo to the provided angle. | |
| position | get_position (const ProtoStruct &extra) override |
| Reports the position of the robot's servo relative to its zero position. | |
| void | stop (const ProtoStruct &extra) override |
| Stops a resource from running. | |
| bool | is_moving () override |
| Reports if a component is in motion. | |
| std::vector< GeometryConfig > | get_geometries (const ProtoStruct &extra) override |
Returns GeometryConfigs associated with the calling servo. | |
| ProtoStruct | do_command (const ProtoStruct &command) override |
| Send/receive arbitrary commands to the resource. | |
| std::vector< GeometryConfig > | get_geometries () |
Returns GeometryConfigs associated with the calling servo. | |
| virtual std::vector< GeometryConfig > | get_geometries (const ProtoStruct &extra)=0 |
Returns GeometryConfigs associated with the calling servo. | |
| position | get_position () |
| Get the current angle (degrees) of the servo. | |
| virtual position | get_position (const ProtoStruct &extra)=0 |
| Reports the position of the robot's servo relative to its zero position. | |
| void | move (uint32_t angle_deg) |
| Move the servo to the provided angle. | |
| virtual void | move (uint32_t angle_deg, const ProtoStruct &extra)=0 |
| Move the servo to the provided angle. | |
Public Member Functions inherited from viam::sdk::Servo | |
| API | api () const override |
Returns the API associated with a particular resource. | |
| void | move (uint32_t angle_deg) |
| Move the servo to the provided angle. | |
| position | get_position () |
| Get the current angle (degrees) of the servo. | |
| std::vector< GeometryConfig > | get_geometries () |
Returns GeometryConfigs associated with the calling servo. | |
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. | |
| void | set_log_level (log_level) const |
| Set the log level for log messages originating from this Resource. | |
Public Member Functions inherited from viam::sdk::Stoppable | |
| void | stop () |
| Stops a resource from running. | |
Public Attributes | |
| std::unique_ptr< StubType > | stub_ |
| std::shared_ptr< grpc::Channel > | channel_ |
Additional Inherited Members | |
Protected Member Functions inherited from viam::sdk::Servo | |
| Servo (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 |
Protected Attributes inherited from viam::sdk::Resource | |
| LogSource | logger_ |
gRPC client implementation of a Servo component.
|
overridevirtual |
Send/receive arbitrary commands to the resource.
| Command | the command to execute. |
Implements viam::sdk::Servo.
|
inline |
Returns GeometryConfigs associated with the calling servo.
GeometryConfigs associated with the component.
|
overridevirtual |
Returns GeometryConfigs associated with the calling servo.
| extra | Any additional arguments to the method. |
GeometryConfigs associated with the component. Implements viam::sdk::Servo.
|
virtual |
Returns GeometryConfigs associated with the calling servo.
| extra | Any additional arguments to the method. |
GeometryConfigs associated with the component. Implements viam::sdk::Servo.
|
inline |
Get the current angle (degrees) of the servo.
| `Exception` | if position reporting is not supported |
|
overridevirtual |
Reports the position of the robot's servo relative to its zero position.
| extra | Any additional arguments to the method |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Servo.
|
virtual |
Reports the position of the robot's servo relative to its zero position.
| extra | Any additional arguments to the method |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Servo.
|
overridevirtual |
Reports if a component is in motion.
Implements viam::sdk::Servo.
|
inline |
Move the servo to the provided angle.
| angle_deg | The desired angle of the servo in degrees. |
|
overridevirtual |
Move the servo to the provided angle.
| angle_deg | The desired angle of the servo in degrees. |
| extra | Any additional arguments to the method. |
Implements viam::sdk::Servo.
|
virtual |
Move the servo to the provided angle.
| angle_deg | The desired angle of the servo in degrees. |
| extra | Any additional arguments to the method. |
Implements viam::sdk::Servo.
|
overridevirtual |
Stops a resource from running.
| extra | Extra arguments to pass to the resource's stop method. |
Implements viam::sdk::Stoppable.