Record Class DetachedEncoder.PeriodicStatus2
java.lang.Object
java.lang.Record
com.revrobotics.encoder.DetachedEncoder.PeriodicStatus2
- All Implemented Interfaces:
StatusFrame
- Enclosing class:
DetachedEncoder
public static record DetachedEncoder.PeriodicStatus2(float rawAngle, float angle, int revlibError, long timestamp)
extends Record
implements StatusFrame
-
Constructor Summary
ConstructorsConstructorDescriptionPeriodicStatus2(float rawAngle, float angle, int revlibError, long timestamp) Creates an instance of aPeriodicStatus2record class. -
Method Summary
Modifier and TypeMethodDescriptionfloatangle()Returns the value of theanglerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatrawAngle()Returns the value of therawAnglerecord component.intReturns the value of therevlibErrorrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface StatusFrame
getRevlibError
-
Constructor Details
-
PeriodicStatus2
public PeriodicStatus2(float rawAngle, float angle, int revlibError, long timestamp) Creates an instance of aPeriodicStatus2record class.- Parameters:
rawAngle- the value for therawAnglerecord componentangle- the value for theanglerecord componentrevlibError- the value for therevlibErrorrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
toString
-
hashCode
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
rawAngle
public float rawAngle()Returns the value of therawAnglerecord component.- Returns:
- the value of the
rawAnglerecord component
-
angle
public float angle()Returns the value of theanglerecord component.- Returns:
- the value of the
anglerecord component
-
revlibError
public int revlibError()Returns the value of therevlibErrorrecord component.- Specified by:
revlibErrorin interfaceStatusFrame- Returns:
- the value of the
revlibErrorrecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceStatusFrame- Returns:
- the value of the
timestamprecord component
-