Package frc.lib.lowlevel
Record Class Whacknet.RobotTelemetry
java.lang.Object
java.lang.Record
frc.lib.lowlevel.Whacknet.RobotTelemetry
- Enclosing class:
- Whacknet
public static record Whacknet.RobotTelemetry(long timestampUs, Angle roll, Angle pitch, Angle yaw, AngularVelocity rollVel, AngularVelocity pitchVel, AngularVelocity yawVel)
extends Record
A record representing the robot's telemetry data.
-
Constructor Summary
ConstructorsConstructorDescriptionRobotTelemetry(long timestampUs, Angle roll, Angle pitch, Angle yaw, AngularVelocity rollVel, AngularVelocity pitchVel, AngularVelocity yawVel) Creates an instance of aRobotTelemetryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.pitch()Returns the value of thepitchrecord component.pitchVel()Returns the value of thepitchVelrecord component.roll()Returns the value of therollrecord component.rollVel()Returns the value of therollVelrecord component.longReturns the value of thetimestampUsrecord component.final StringtoString()Returns a string representation of this record class.yaw()Returns the value of theyawrecord component.yawVel()Returns the value of theyawVelrecord component.
-
Constructor Details
-
RobotTelemetry
public RobotTelemetry(long timestampUs, Angle roll, Angle pitch, Angle yaw, AngularVelocity rollVel, AngularVelocity pitchVel, AngularVelocity yawVel) Creates an instance of aRobotTelemetryrecord class.- Parameters:
timestampUs- the value for thetimestampUsrecord componentroll- the value for therollrecord componentpitch- the value for thepitchrecord componentyaw- the value for theyawrecord componentrollVel- the value for therollVelrecord componentpitchVel- the value for thepitchVelrecord componentyawVel- the value for theyawVelrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
timestampUs
public long timestampUs()Returns the value of thetimestampUsrecord component.- Returns:
- the value of the
timestampUsrecord component
-
roll
Returns the value of therollrecord component.- Returns:
- the value of the
rollrecord component
-
pitch
Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-
yaw
Returns the value of theyawrecord component.- Returns:
- the value of the
yawrecord component
-
rollVel
Returns the value of therollVelrecord component.- Returns:
- the value of the
rollVelrecord component
-
pitchVel
Returns the value of thepitchVelrecord component.- Returns:
- the value of the
pitchVelrecord component
-
yawVel
Returns the value of theyawVelrecord component.- Returns:
- the value of the
yawVelrecord component
-