Record Class SparkLowLevel.PeriodicStatus4
java.lang.Object
java.lang.Record
com.revrobotics.spark.SparkLowLevel.PeriodicStatus4
- All Implemented Interfaces:
StatusFrame
- Enclosing class:
SparkLowLevel
public static record SparkLowLevel.PeriodicStatus4(double externalOrAltEncoderVelocity, double externalOrAltEncoderPosition, int revlibError, long timestamp)
extends Record
implements StatusFrame
-
Constructor Summary
ConstructorsConstructorDescriptionPeriodicStatus4(double externalOrAltEncoderVelocity, double externalOrAltEncoderPosition, int revlibError, long timestamp) Creates an instance of aPeriodicStatus4record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theexternalOrAltEncoderPositionrecord component.doubleReturns the value of theexternalOrAltEncoderVelocityrecord component.final inthashCode()Returns a hash code value for this object.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
-
PeriodicStatus4
public PeriodicStatus4(double externalOrAltEncoderVelocity, double externalOrAltEncoderPosition, int revlibError, long timestamp) Creates an instance of aPeriodicStatus4record class.- Parameters:
externalOrAltEncoderVelocity- the value for theexternalOrAltEncoderVelocityrecord componentexternalOrAltEncoderPosition- the value for theexternalOrAltEncoderPositionrecord 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. -
externalOrAltEncoderVelocity
public double externalOrAltEncoderVelocity()Returns the value of theexternalOrAltEncoderVelocityrecord component.- Returns:
- the value of the
externalOrAltEncoderVelocityrecord component
-
externalOrAltEncoderPosition
public double externalOrAltEncoderPosition()Returns the value of theexternalOrAltEncoderPositionrecord component.- Returns:
- the value of the
externalOrAltEncoderPositionrecord 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
-