|
Viam C++ SDK current
|
gRPC client implementation of a Motor component.
More...
#include <motor_client.hpp>
Inheritance diagram for viam::sdk::impl::MotorClient:Public Types | |
| using | interface_type = Motor |
Public Types inherited from viam::sdk::Motor | |
| typedef double | position |
Public Member Functions | |
| MotorClient (std::string name, std::shared_ptr< grpc::Channel > channel) | |
| void | set_power (double power_pct, const ProtoStruct &extra) override |
| Sets the percentage of the motor's total power that should be employed. | |
| void | go_for (double rpm, double revolutions, const ProtoStruct &extra) override |
| Instructs the motor to turn at a specified speed, which is expressed in RPM, for a specified number of rotations relative to its starting position. | |
| void | go_to (double rpm, double position_revolutions, const ProtoStruct &extra) override |
| Move the motor to a specific position that is relative to its home position at a specified speed which is expressed in RPM. | |
| void | set_rpm (double rpm, const ProtoStruct &extra) override |
| Move the motor indefinitely at a specified speed which is expressed in RPM. | |
| void | reset_zero_position (double offset, const ProtoStruct &extra) override |
| Sets the current position of the motor as the new zero position. | |
| position | get_position (const ProtoStruct &extra) override |
| Reports the position of the robot's motor relative to its zero position. | |
| properties | get_properties (const ProtoStruct &extra) override |
| Returns the properties of the motor which comprises the booleans indicating. | |
| void | stop (const ProtoStruct &extra) override |
| Stops a resource from running. | |
| power_status | get_power_status (const ProtoStruct &extra) override |
| std::vector< GeometryConfig > | get_geometries (const ProtoStruct &extra) override |
Returns GeometryConfigs associated with the calling motor. | |
| bool | is_moving () override |
| Reports if a component is in motion. | |
| 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 motor. | |
| virtual std::vector< GeometryConfig > | get_geometries (const ProtoStruct &extra)=0 |
Returns GeometryConfigs associated with the calling motor. | |
| position | get_position () |
| Reports the position of the robot's motor relative to its zero position. | |
| virtual position | get_position (const ProtoStruct &extra)=0 |
| Reports the position of the robot's motor relative to its zero position. | |
| power_status | get_power_status () |
| virtual power_status | get_power_status (const ProtoStruct &extra)=0 |
| properties | get_properties () |
| Returns the properties of the motor which comprises the booleans indicating which optional features the robot's motor supports. | |
| virtual properties | get_properties (const ProtoStruct &extra)=0 |
| Returns the properties of the motor which comprises the booleans indicating. | |
| void | go_for (double rpm, double revolutions) |
| Instructs the motor to turn at a specified speed, which is expressed in RPM, for a specified number of rotations relative to its starting position. | |
| virtual void | go_for (double rpm, double revolutions, const ProtoStruct &extra)=0 |
| Instructs the motor to turn at a specified speed, which is expressed in RPM, for a specified number of rotations relative to its starting position. | |
| void | go_to (double rpm, double position_revolutions) |
| Move the motor to a specific position that is relative to its home position at a specified speed which is expressed in RPM. | |
| virtual void | go_to (double rpm, double position_revolutions, const ProtoStruct &extra)=0 |
| Move the motor to a specific position that is relative to its home position at a specified speed which is expressed in RPM. | |
| void | reset_zero_position (double offset) |
| Sets the current position of the motor as the new zero position. | |
| virtual void | reset_zero_position (double offset, const ProtoStruct &extra)=0 |
| Sets the current position of the motor as the new zero position. | |
| void | set_power (double power_pct) |
| Sets the percentage of the motor's total power that should be employed. | |
| virtual void | set_power (double power_pct, const ProtoStruct &extra)=0 |
| Sets the percentage of the motor's total power that should be employed. | |
| void | set_rpm (double rpm) |
| Move the motor indefinitely at a specified speed which is expressed in RPM. | |
| virtual void | set_rpm (double rpm, const ProtoStruct &extra)=0 |
| Move the motor indefinitely at a specified speed which is expressed in RPM. | |
Public Member Functions inherited from viam::sdk::Motor | |
| void | set_power (double power_pct) |
| Sets the percentage of the motor's total power that should be employed. | |
| void | go_for (double rpm, double revolutions) |
| Instructs the motor to turn at a specified speed, which is expressed in RPM, for a specified number of rotations relative to its starting position. | |
| void | go_to (double rpm, double position_revolutions) |
| Move the motor to a specific position that is relative to its home position at a specified speed which is expressed in RPM. | |
| void | set_rpm (double rpm) |
| Move the motor indefinitely at a specified speed which is expressed in RPM. | |
| void | reset_zero_position (double offset) |
| Sets the current position of the motor as the new zero position. | |
| position | get_position () |
| Reports the position of the robot's motor relative to its zero position. | |
| properties | get_properties () |
| Returns the properties of the motor which comprises the booleans indicating which optional features the robot's motor supports. | |
| power_status | get_power_status () |
| std::vector< GeometryConfig > | get_geometries () |
Returns GeometryConfigs associated with the calling motor. | |
| 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. | |
| 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. | |
Additional Inherited Members | |
Protected Member Functions inherited from viam::sdk::Motor | |
| Motor (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 Motor component.
|
overridevirtual |
Send/receive arbitrary commands to the resource.
| Command | the command to execute. |
Implements viam::sdk::Motor.
|
inline |
Returns GeometryConfigs associated with the calling motor.
GeometryConfigs associated with the component.
|
overridevirtual |
Returns GeometryConfigs associated with the calling motor.
| extra | Any additional arguments to the method. |
GeometryConfigs associated with the component. Implements viam::sdk::Motor.
|
virtual |
Returns GeometryConfigs associated with the calling motor.
| extra | Any additional arguments to the method. |
GeometryConfigs associated with the component. Implements viam::sdk::Motor.
|
inline |
Reports the position of the robot's motor relative to its zero position.
| `Exception` | if position reporting is not supported |
|
overridevirtual |
Reports the position of the robot's motor relative to its zero position.
| extra | Any additional arguments to the method |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
virtual |
Reports the position of the robot's motor relative to its zero position.
| extra | Any additional arguments to the method |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
inline |
|
overridevirtual |
| extra | Any additional arguments to the method |
Implements viam::sdk::Motor.
|
virtual |
| extra | Any additional arguments to the method |
Implements viam::sdk::Motor.
|
overridevirtual |
Returns the properties of the motor which comprises the booleans indicating.
| extra | Any additional arguments to the method which optional features the robot's motor supports |
Implements viam::sdk::Motor.
|
virtual |
Returns the properties of the motor which comprises the booleans indicating.
| extra | Any additional arguments to the method which optional features the robot's motor supports |
Implements viam::sdk::Motor.
|
inline |
Instructs the motor to turn at a specified speed, which is expressed in RPM, for a specified number of rotations relative to its starting position.
| rpm | Speed of motor travel in rotations per minute |
| revolutions | Number of revolutions relative to motor's start position. If revolutions == 0, this will run the motor at rpm indefinetely. If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in. |
| `Exception` | if position reporting is not supported |
|
overridevirtual |
Instructs the motor to turn at a specified speed, which is expressed in RPM, for a specified number of rotations relative to its starting position.
| rpm | Speed of motor travel in rotations per minute |
| revolutions | Number of revolutions relative to motor's start position. If revolutions == 0, this will run the motor at rpm indefinetely. If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in. |
| extra | Any additional arguments to the method. |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
virtual |
Instructs the motor to turn at a specified speed, which is expressed in RPM, for a specified number of rotations relative to its starting position.
| rpm | Speed of motor travel in rotations per minute |
| revolutions | Number of revolutions relative to motor's start position. If revolutions == 0, this will run the motor at rpm indefinetely. If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in. |
| extra | Any additional arguments to the method. |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
inline |
Move the motor to a specific position that is relative to its home position at a specified speed which is expressed in RPM.
| rpm | Speed of motor travel in rotations per minute |
| position_revolutions | Number of revolutions relative to motor's home home/zero |
| `Exception` | if position reporting is not supported |
|
overridevirtual |
Move the motor to a specific position that is relative to its home position at a specified speed which is expressed in RPM.
| rpm | Speed of motor travel in rotations per minute |
| position_revolutions | Number of revolutions relative to motor's home home/zero |
| extra | Any additional arguments to the method. |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
virtual |
Move the motor to a specific position that is relative to its home position at a specified speed which is expressed in RPM.
| rpm | Speed of motor travel in rotations per minute |
| position_revolutions | Number of revolutions relative to motor's home home/zero |
| extra | Any additional arguments to the method. |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
overridevirtual |
Reports if a component is in motion.
Implements viam::sdk::Motor.
|
inline |
Sets the current position of the motor as the new zero position.
| offset | Motor position |
| `Exception` | if position reporting is not supported |
|
overridevirtual |
Sets the current position of the motor as the new zero position.
| offset | Motor position |
| extra | Any additional arguments to the method |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
virtual |
Sets the current position of the motor as the new zero position.
| offset | Motor position |
| extra | Any additional arguments to the method |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
inline |
Sets the percentage of the motor's total power that should be employed.
| power_pct | Percentage of motor's power, between -1 and 1, where negative values indicate a backwards direction and positive values, a forward direction. |
|
overridevirtual |
Sets the percentage of the motor's total power that should be employed.
| power_pct | Percentage of motor's power, between -1 and 1, where negative values indicate a backwards direction and positive values, a forward direction. |
| extra | Any additional arguments to the method. |
Implements viam::sdk::Motor.
|
virtual |
Sets the percentage of the motor's total power that should be employed.
| power_pct | Percentage of motor's power, between -1 and 1, where negative values indicate a backwards direction and positive values, a forward direction. |
| extra | Any additional arguments to the method. |
Implements viam::sdk::Motor.
|
inline |
Move the motor indefinitely at a specified speed which is expressed in RPM.
| rpm | Speed of motor travel in rotations per minute |
| `Exception` | if position reporting is not supported |
|
overridevirtual |
Move the motor indefinitely at a specified speed which is expressed in RPM.
| rpm | Speed of motor travel in rotations per minute |
| extra | Any additional arguments to the method. |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
virtual |
Move the motor indefinitely at a specified speed which is expressed in RPM.
| rpm | Speed of motor travel in rotations per minute |
| extra | Any additional arguments to the method. |
| `Exception` | if position reporting is not supported |
Implements viam::sdk::Motor.
|
overridevirtual |
Stops a resource from running.
| extra | Extra arguments to pass to the resource's stop method. |
Implements viam::sdk::Stoppable.