Record Class QuestNavProtocol.DeviceData
java.lang.Object
java.lang.Record
frc.robot.subsystems.vision.QuestNavProtocol.DeviceData
- Enclosing class:
QuestNavProtocol
public static record QuestNavProtocol.DeviceData(int trackingLostCounter, int batteryPercent)
extends Record
A decoded device status.
-
Constructor Summary
ConstructorsConstructorDescriptionDeviceData(int trackingLostCounter, int batteryPercent) Creates an instance of aDeviceDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebatteryPercentrecord 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.intReturns the value of thetrackingLostCounterrecord component.
-
Constructor Details
-
DeviceData
public DeviceData(int trackingLostCounter, int batteryPercent) Creates an instance of aDeviceDatarecord class.- Parameters:
trackingLostCounter- the value for thetrackingLostCounterrecord componentbatteryPercent- the value for thebatteryPercentrecord 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. -
trackingLostCounter
public int trackingLostCounter()Returns the value of thetrackingLostCounterrecord component.- Returns:
- the value of the
trackingLostCounterrecord component
-
batteryPercent
public int batteryPercent()Returns the value of thebatteryPercentrecord component.- Returns:
- the value of the
batteryPercentrecord component
-