Record Class CANLightControllerOutputConfig
java.lang.Object
java.lang.Record
xbot.common.injection.electrical_contract.CANLightControllerOutputConfig
- Record Components:
stripType- The type of LED stripbrightness- The brightness level (0.0 to 1.0)ledStripLengths- An array specifying the length of each LED strip connected to the controller. Each LED strip is independently controllable as a "slot".
public record CANLightControllerOutputConfig(LEDStripType stripType, double brightness, int[] ledStripLengths)
extends Record
Configuration data for CAN light controllers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionA default configuration with GRB strip type, full brightness, and two LED strips of lengths 8 and 30. -
Constructor Summary
ConstructorsConstructorDescriptionCANLightControllerOutputConfig(LEDStripType stripType, double brightness, int[] ledStripLengths) Creates an instance of aCANLightControllerOutputConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thebrightnessrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.int[]Returns the value of theledStripLengthsrecord component.Returns the value of thestripTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Default
A default configuration with GRB strip type, full brightness, and two LED strips of lengths 8 and 30.
-
-
Constructor Details
-
CANLightControllerOutputConfig
public CANLightControllerOutputConfig(LEDStripType stripType, double brightness, int[] ledStripLengths) Creates an instance of aCANLightControllerOutputConfigrecord class.- Parameters:
stripType- the value for thestripTyperecord componentbrightness- the value for thebrightnessrecord componentledStripLengths- the value for theledStripLengthsrecord 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 '=='. -
stripType
Returns the value of thestripTyperecord component.- Returns:
- the value of the
stripTyperecord component
-
brightness
public double brightness()Returns the value of thebrightnessrecord component.- Returns:
- the value of the
brightnessrecord component
-
ledStripLengths
public int[] ledStripLengths()Returns the value of theledStripLengthsrecord component.- Returns:
- the value of the
ledStripLengthsrecord component
-