Package edu.wpi.first.math.proto
Class Trajectory.ProtobufTrajectoryState
java.lang.Object
us.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
edu.wpi.first.math.proto.Trajectory.ProtobufTrajectoryState
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- Trajectory
public static final class Trajectory.ProtobufTrajectoryState extends us.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState> implements Cloneable
Protobuf type
ProtobufTrajectoryState
-
Field Summary
-
Method Summary
Modifier and Type Method Description Trajectory.ProtobufTrajectoryState
clear()
Trajectory.ProtobufTrajectoryState
clearAcceleration()
optional double acceleration = 3;
Trajectory.ProtobufTrajectoryState
clearCurvature()
optional double curvature = 5;
Trajectory.ProtobufTrajectoryState
clearPose()
optional .wpi.proto.ProtobufPose2d pose = 4;
Trajectory.ProtobufTrajectoryState
clearQuick()
Trajectory.ProtobufTrajectoryState
clearTime()
optional double time = 1;
Trajectory.ProtobufTrajectoryState
clearVelocity()
optional double velocity = 2;
Trajectory.ProtobufTrajectoryState
clone()
protected int
computeSerializedSize()
Trajectory.ProtobufTrajectoryState
copyFrom(Trajectory.ProtobufTrajectoryState other)
boolean
equals(Object o)
double
getAcceleration()
optional double acceleration = 3;
double
getCurvature()
optional double curvature = 5;
static us.hebi.quickbuf.Descriptors.Descriptor
getDescriptor()
static us.hebi.quickbuf.MessageFactory<Trajectory.ProtobufTrajectoryState>
getFactory()
Geometry2D.ProtobufPose2d
getMutablePose()
optional .wpi.proto.ProtobufPose2d pose = 4;
This method returns the internal storage object and sets the corresponding has state.Geometry2D.ProtobufPose2d
getPose()
optional .wpi.proto.ProtobufPose2d pose = 4;
This method returns the internal storage object without modifying any has state.double
getTime()
optional double time = 1;
double
getVelocity()
optional double velocity = 2;
boolean
hasAcceleration()
optional double acceleration = 3;
boolean
hasCurvature()
optional double curvature = 5;
boolean
hasPose()
optional .wpi.proto.ProtobufPose2d pose = 4;
boolean
hasTime()
optional double time = 1;
boolean
hasVelocity()
optional double velocity = 2;
boolean
isEmpty()
Trajectory.ProtobufTrajectoryState
mergeFrom(Trajectory.ProtobufTrajectoryState other)
Trajectory.ProtobufTrajectoryState
mergeFrom(us.hebi.quickbuf.JsonSource input)
Trajectory.ProtobufTrajectoryState
mergeFrom(us.hebi.quickbuf.ProtoSource input)
static Trajectory.ProtobufTrajectoryState
newInstance()
static Trajectory.ProtobufTrajectoryState
parseFrom(byte[] data)
static Trajectory.ProtobufTrajectoryState
parseFrom(us.hebi.quickbuf.JsonSource input)
static Trajectory.ProtobufTrajectoryState
parseFrom(us.hebi.quickbuf.ProtoSource input)
Trajectory.ProtobufTrajectoryState
setAcceleration(double value)
optional double acceleration = 3;
Trajectory.ProtobufTrajectoryState
setCurvature(double value)
optional double curvature = 5;
Trajectory.ProtobufTrajectoryState
setPose(Geometry2D.ProtobufPose2d value)
optional .wpi.proto.ProtobufPose2d pose = 4;
Trajectory.ProtobufTrajectoryState
setTime(double value)
optional double time = 1;
Trajectory.ProtobufTrajectoryState
setVelocity(double value)
optional double velocity = 2;
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
ProtobufTrajectoryState
-
hasTime
optional double time = 1;
- Returns:
- whether the time field is set
-
clearTime
optional double time = 1;
- Returns:
- this
-
getTime
optional double time = 1;
- Returns:
- the time
-
setTime
optional double time = 1;
- Parameters:
value
- the time to set- Returns:
- this
-
hasVelocity
optional double velocity = 2;
- Returns:
- whether the velocity field is set
-
clearVelocity
optional double velocity = 2;
- Returns:
- this
-
getVelocity
optional double velocity = 2;
- Returns:
- the velocity
-
setVelocity
optional double velocity = 2;
- Parameters:
value
- the velocity to set- Returns:
- this
-
hasAcceleration
optional double acceleration = 3;
- Returns:
- whether the acceleration field is set
-
clearAcceleration
optional double acceleration = 3;
- Returns:
- this
-
getAcceleration
optional double acceleration = 3;
- Returns:
- the acceleration
-
setAcceleration
optional double acceleration = 3;
- Parameters:
value
- the acceleration to set- Returns:
- this
-
hasCurvature
optional double curvature = 5;
- Returns:
- whether the curvature field is set
-
clearCurvature
optional double curvature = 5;
- Returns:
- this
-
getCurvature
optional double curvature = 5;
- Returns:
- the curvature
-
setCurvature
optional double curvature = 5;
- Parameters:
value
- the curvature to set- Returns:
- this
-
hasPose
optional .wpi.proto.ProtobufPose2d pose = 4;
- Returns:
- whether the pose field is set
-
clearPose
optional .wpi.proto.ProtobufPose2d pose = 4;
- Returns:
- this
-
getPose
optional .wpi.proto.ProtobufPose2d pose = 4;
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. UsegetMutablePose()
if you want to modify it.- Returns:
- internal storage object for reading
-
getMutablePose
optional .wpi.proto.ProtobufPose2d pose = 4;
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
-
setPose
optional .wpi.proto.ProtobufPose2d pose = 4;
- Parameters:
value
- the pose to set- Returns:
- this
-
copyFrom
- Specified by:
copyFrom
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
-
mergeFrom
- Overrides:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
-
clear
- Specified by:
clear
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
-
clearQuick
- Overrides:
clearQuick
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
-
equals
- Specified by:
equals
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
-
writeTo
- Specified by:
writeTo
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
- Throws:
IOException
-
computeSerializedSize
- Specified by:
computeSerializedSize
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
-
mergeFrom
public Trajectory.ProtobufTrajectoryState mergeFrom(us.hebi.quickbuf.ProtoSource input) throws IOException- Specified by:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
- Throws:
IOException
-
writeTo
- Overrides:
writeTo
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
- Throws:
IOException
-
mergeFrom
public Trajectory.ProtobufTrajectoryState mergeFrom(us.hebi.quickbuf.JsonSource input) throws IOException- Overrides:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
- Throws:
IOException
-
clone
- Specified by:
clone
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
-
isEmpty
- Overrides:
isEmpty
in classus.hebi.quickbuf.ProtoMessage<Trajectory.ProtobufTrajectoryState>
-
parseFrom
public static Trajectory.ProtobufTrajectoryState parseFrom(byte[] data) throws us.hebi.quickbuf.InvalidProtocolBufferException- Throws:
us.hebi.quickbuf.InvalidProtocolBufferException
-
parseFrom
public static Trajectory.ProtobufTrajectoryState parseFrom(us.hebi.quickbuf.ProtoSource input) throws IOException- Throws:
IOException
-
parseFrom
public static Trajectory.ProtobufTrajectoryState parseFrom(us.hebi.quickbuf.JsonSource input) throws IOException- Throws:
IOException
-
getFactory
- Returns:
- factory for creating ProtobufTrajectoryState messages
-
getDescriptor
- Returns:
- this type's descriptor.
-