Package swervelib.parser
Record Class SwerveParser.SwerveModuleDevices
java.lang.Object
java.lang.Record
swervelib.parser.SwerveParser.SwerveModuleDevices
- Record Components:
drive- Raw drive motor controller device (e.g. a vendorSparkMaxorTalonFXinstance).azimuth- Raw azimuth/angle motor controller device.absoluteEncoder- Raw absolute encoder device (e.g. aCANcoder,AnalogEncoder, orDutyCycleEncoderinstance, or the azimuth motor controller's own device when its integrated absolute encoder feedback is used instead of a separate device).
- Enclosing class:
- SwerveParser
public static record SwerveParser.SwerveModuleDevices(Object drive, Object azimuth, Object absoluteEncoder)
extends Record
Raw hardware devices created for a single
SwerveModule by SwerveParser.-
Constructor Summary
ConstructorsConstructorDescriptionSwerveModuleDevices(Object drive, Object azimuth, Object absoluteEncoder) Creates an instance of aSwerveModuleDevicesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theabsoluteEncoderrecord component.azimuth()Returns the value of theazimuthrecord component.drive()Returns the value of thedriverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SwerveModuleDevices
Creates an instance of aSwerveModuleDevicesrecord class.- Parameters:
drive- the value for thedriverecord componentazimuth- the value for theazimuthrecord componentabsoluteEncoder- the value for theabsoluteEncoderrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
drive
Returns the value of thedriverecord component.- Returns:
- the value of the
driverecord component
-
azimuth
Returns the value of theazimuthrecord component.- Returns:
- the value of the
azimuthrecord component
-
absoluteEncoder
Returns the value of theabsoluteEncoderrecord component.- Returns:
- the value of the
absoluteEncoderrecord component
-