Package com.viam.component.motor.v1
Class Motor.IsPoweredResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Motor.IsPoweredResponse,Motor.IsPoweredResponse.Builder>
com.viam.component.motor.v1.Motor.IsPoweredResponse.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,Motor.IsPoweredResponseOrBuilder
,Cloneable
- Enclosing class:
- Motor.IsPoweredResponse
public static final class Motor.IsPoweredResponse.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<Motor.IsPoweredResponse,Motor.IsPoweredResponse.Builder>
implements Motor.IsPoweredResponseOrBuilder
Protobuf type
viam.component.motor.v1.IsPoweredResponse
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionReturns true if the motor is onReturns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor.boolean
getIsOn()
Returns true if the motor is ondouble
Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor.setIsOn
(boolean value) Returns true if the motor is onsetPowerPct
(double value) Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getIsOn
public boolean getIsOn()Returns true if the motor is on
bool is_on = 1 [json_name = "isOn"];
- Specified by:
getIsOn
in interfaceMotor.IsPoweredResponseOrBuilder
- Returns:
- The isOn.
-
setIsOn
Returns true if the motor is on
bool is_on = 1 [json_name = "isOn"];
- Parameters:
value
- The isOn to set.- Returns:
- This builder for chaining.
-
clearIsOn
Returns true if the motor is on
bool is_on = 1 [json_name = "isOn"];
- Returns:
- This builder for chaining.
-
getPowerPct
public double getPowerPct()Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor. If the last command was a stop command, this value will be 0.
double power_pct = 2 [json_name = "powerPct"];
- Specified by:
getPowerPct
in interfaceMotor.IsPoweredResponseOrBuilder
- Returns:
- The powerPct.
-
setPowerPct
Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor. If the last command was a stop command, this value will be 0.
double power_pct = 2 [json_name = "powerPct"];
- Parameters:
value
- The powerPct to set.- Returns:
- This builder for chaining.
-
clearPowerPct
Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor. If the last command was a stop command, this value will be 0.
double power_pct = 2 [json_name = "powerPct"];
- Returns:
- This builder for chaining.
-