Package edu.wpi.first.math.proto
Class Kinematics.ProtobufSwerveModuleState
java.lang.Object
us.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
edu.wpi.first.math.proto.Kinematics.ProtobufSwerveModuleState
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- Kinematics
public static final class Kinematics.ProtobufSwerveModuleState extends us.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState> implements Cloneable
Protobuf type
ProtobufSwerveModuleState
-
Field Summary
-
Method Summary
Modifier and Type Method Description Kinematics.ProtobufSwerveModuleState
clear()
Kinematics.ProtobufSwerveModuleState
clearAngle()
optional .wpi.proto.ProtobufRotation2d angle = 2;
Kinematics.ProtobufSwerveModuleState
clearQuick()
Kinematics.ProtobufSwerveModuleState
clearSpeed()
optional double speed = 1;
Kinematics.ProtobufSwerveModuleState
clone()
protected int
computeSerializedSize()
Kinematics.ProtobufSwerveModuleState
copyFrom(Kinematics.ProtobufSwerveModuleState other)
boolean
equals(Object o)
Geometry2D.ProtobufRotation2d
getAngle()
optional .wpi.proto.ProtobufRotation2d angle = 2;
This method returns the internal storage object without modifying any has state.static us.hebi.quickbuf.Descriptors.Descriptor
getDescriptor()
static us.hebi.quickbuf.MessageFactory<Kinematics.ProtobufSwerveModuleState>
getFactory()
Geometry2D.ProtobufRotation2d
getMutableAngle()
optional .wpi.proto.ProtobufRotation2d angle = 2;
This method returns the internal storage object and sets the corresponding has state.double
getSpeed()
optional double speed = 1;
boolean
hasAngle()
optional .wpi.proto.ProtobufRotation2d angle = 2;
boolean
hasSpeed()
optional double speed = 1;
boolean
isEmpty()
Kinematics.ProtobufSwerveModuleState
mergeFrom(Kinematics.ProtobufSwerveModuleState other)
Kinematics.ProtobufSwerveModuleState
mergeFrom(us.hebi.quickbuf.JsonSource input)
Kinematics.ProtobufSwerveModuleState
mergeFrom(us.hebi.quickbuf.ProtoSource input)
static Kinematics.ProtobufSwerveModuleState
newInstance()
static Kinematics.ProtobufSwerveModuleState
parseFrom(byte[] data)
static Kinematics.ProtobufSwerveModuleState
parseFrom(us.hebi.quickbuf.JsonSource input)
static Kinematics.ProtobufSwerveModuleState
parseFrom(us.hebi.quickbuf.ProtoSource input)
Kinematics.ProtobufSwerveModuleState
setAngle(Geometry2D.ProtobufRotation2d value)
optional .wpi.proto.ProtobufRotation2d angle = 2;
Kinematics.ProtobufSwerveModuleState
setSpeed(double value)
optional double speed = 1;
void
writeTo(us.hebi.quickbuf.JsonSink output)
void
writeTo(us.hebi.quickbuf.ProtoSink output)
Methods inherited from class us.hebi.quickbuf.ProtoMessage
bytesDefaultValue, checkInitialized, getCachedSize, getMissingFields, getMissingFields, getMissingFields, getMissingFields, getSerializedSize, getUnknownBytes, hashCode, isInitialized, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, rethrowFromParent, toByteArray, toByteArray, toByteArray, toString, writeDelimitedTo
-
Method Details
-
newInstance
- Returns:
- a new empty instance of
ProtobufSwerveModuleState
-
hasSpeed
optional double speed = 1;
- Returns:
- whether the speed field is set
-
clearSpeed
optional double speed = 1;
- Returns:
- this
-
getSpeed
optional double speed = 1;
- Returns:
- the speed
-
setSpeed
optional double speed = 1;
- Parameters:
value
- the speed to set- Returns:
- this
-
hasAngle
optional .wpi.proto.ProtobufRotation2d angle = 2;
- Returns:
- whether the angle field is set
-
clearAngle
optional .wpi.proto.ProtobufRotation2d angle = 2;
- Returns:
- this
-
getAngle
optional .wpi.proto.ProtobufRotation2d angle = 2;
This method returns the internal storage object without modifying any has state. The returned object should not be modified and be treated as read-only. UsegetMutableAngle()
if you want to modify it.- Returns:
- internal storage object for reading
-
getMutableAngle
optional .wpi.proto.ProtobufRotation2d angle = 2;
This method returns the internal storage object and sets the corresponding has state. The returned object will become part of this message and its contents may be modified as long as the has state is not cleared.- Returns:
- internal storage object for modifications
-
setAngle
optional .wpi.proto.ProtobufRotation2d angle = 2;
- Parameters:
value
- the angle to set- Returns:
- this
-
copyFrom
- Specified by:
copyFrom
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
-
mergeFrom
- Overrides:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
-
clear
- Specified by:
clear
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
-
clearQuick
- Overrides:
clearQuick
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
-
equals
- Specified by:
equals
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
-
writeTo
- Specified by:
writeTo
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
- Throws:
IOException
-
computeSerializedSize
- Specified by:
computeSerializedSize
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
-
mergeFrom
public Kinematics.ProtobufSwerveModuleState mergeFrom(us.hebi.quickbuf.ProtoSource input) throws IOException- Specified by:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
- Throws:
IOException
-
writeTo
- Overrides:
writeTo
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
- Throws:
IOException
-
mergeFrom
public Kinematics.ProtobufSwerveModuleState mergeFrom(us.hebi.quickbuf.JsonSource input) throws IOException- Overrides:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
- Throws:
IOException
-
clone
- Specified by:
clone
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
-
isEmpty
- Overrides:
isEmpty
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModuleState>
-
parseFrom
public static Kinematics.ProtobufSwerveModuleState parseFrom(byte[] data) throws us.hebi.quickbuf.InvalidProtocolBufferException- Throws:
us.hebi.quickbuf.InvalidProtocolBufferException
-
parseFrom
public static Kinematics.ProtobufSwerveModuleState parseFrom(us.hebi.quickbuf.ProtoSource input) throws IOException- Throws:
IOException
-
parseFrom
public static Kinematics.ProtobufSwerveModuleState parseFrom(us.hebi.quickbuf.JsonSource input) throws IOException- Throws:
IOException
-
getFactory
- Returns:
- factory for creating ProtobufSwerveModuleState messages
-
getDescriptor
- Returns:
- this type's descriptor.
-