Package edu.wpi.first.math.proto
Class Kinematics.ProtobufSwerveModulePosition
java.lang.Object
us.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
edu.wpi.first.math.proto.Kinematics.ProtobufSwerveModulePosition
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- Kinematics
public static final class Kinematics.ProtobufSwerveModulePosition
extends us.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
implements Cloneable
Protobuf type
ProtobufSwerveModulePosition
-
Field Summary
Fields inherited from class us.hebi.quickbuf.ProtoMessage
bitField0_, cachedSize, unknownBytesFieldName
-
Method Summary
Modifier and TypeMethodDescriptionclear()
optional .wpi.proto.ProtobufRotation2d angle = 2;
optional double distance = 1;
clone()
protected int
boolean
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
double
optional double distance = 1;
static us.hebi.quickbuf.MessageFactory<Kinematics.ProtobufSwerveModulePosition>
optional .wpi.proto.ProtobufRotation2d angle = 2;
This method returns the internal storage object and sets the corresponding has state.boolean
hasAngle()
optional .wpi.proto.ProtobufRotation2d angle = 2;
boolean
optional double distance = 1;
boolean
isEmpty()
mergeFrom
(us.hebi.quickbuf.JsonSource input) mergeFrom
(us.hebi.quickbuf.ProtoSource input) parseFrom
(byte[] data) parseFrom
(us.hebi.quickbuf.JsonSource input) parseFrom
(us.hebi.quickbuf.ProtoSource input) optional .wpi.proto.ProtobufRotation2d angle = 2;
setDistance
(double value) optional double distance = 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
ProtobufSwerveModulePosition
-
hasDistance
optional double distance = 1;
- Returns:
- whether the distance field is set
-
clearDistance
optional double distance = 1;
- Returns:
- this
-
getDistance
optional double distance = 1;
- Returns:
- the distance
-
setDistance
optional double distance = 1;
- Parameters:
value
- the distance 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
public Kinematics.ProtobufSwerveModulePosition copyFrom(Kinematics.ProtobufSwerveModulePosition other) - Specified by:
copyFrom
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
-
mergeFrom
public Kinematics.ProtobufSwerveModulePosition mergeFrom(Kinematics.ProtobufSwerveModulePosition other) - Overrides:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
-
clear
- Specified by:
clear
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
-
clearQuick
- Overrides:
clearQuick
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
-
equals
- Specified by:
equals
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
-
writeTo
- Specified by:
writeTo
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
- Throws:
IOException
-
computeSerializedSize
- Specified by:
computeSerializedSize
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
-
mergeFrom
public Kinematics.ProtobufSwerveModulePosition mergeFrom(us.hebi.quickbuf.ProtoSource input) throws IOException - Specified by:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
- Throws:
IOException
-
writeTo
- Overrides:
writeTo
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
- Throws:
IOException
-
mergeFrom
public Kinematics.ProtobufSwerveModulePosition mergeFrom(us.hebi.quickbuf.JsonSource input) throws IOException - Overrides:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
- Throws:
IOException
-
clone
- Specified by:
clone
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
-
isEmpty
- Overrides:
isEmpty
in classus.hebi.quickbuf.ProtoMessage<Kinematics.ProtobufSwerveModulePosition>
-
parseFrom
public static Kinematics.ProtobufSwerveModulePosition parseFrom(byte[] data) throws us.hebi.quickbuf.InvalidProtocolBufferException - Throws:
us.hebi.quickbuf.InvalidProtocolBufferException
-
parseFrom
public static Kinematics.ProtobufSwerveModulePosition parseFrom(us.hebi.quickbuf.ProtoSource input) throws IOException - Throws:
IOException
-
parseFrom
public static Kinematics.ProtobufSwerveModulePosition parseFrom(us.hebi.quickbuf.JsonSource input) throws IOException - Throws:
IOException
-
getFactory
- Returns:
- factory for creating ProtobufSwerveModulePosition messages
-
getDescriptor
- Returns:
- this type's descriptor.
-