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 vendor SparkMax or TalonFX instance).
azimuth - Raw azimuth/angle motor controller device.
absoluteEncoder - Raw absolute encoder device (e.g. a CANcoder, AnalogEncoder, or DutyCycleEncoder instance, 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 Details

    • SwerveModuleDevices

      public SwerveModuleDevices(Object drive, Object azimuth, Object absoluteEncoder)
      Creates an instance of a SwerveModuleDevices record class.
      Parameters:
      drive - the value for the drive record component
      azimuth - the value for the azimuth record component
      absoluteEncoder - the value for the absoluteEncoder record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • drive

      public Object drive()
      Returns the value of the drive record component.
      Returns:
      the value of the drive record component
    • azimuth

      public Object azimuth()
      Returns the value of the azimuth record component.
      Returns:
      the value of the azimuth record component
    • absoluteEncoder

      public Object absoluteEncoder()
      Returns the value of the absoluteEncoder record component.
      Returns:
      the value of the absoluteEncoder record component