mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-06-15 09:30:30 +02:00
34 lines
1.3 KiB
Java
34 lines
1.3 KiB
Java
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.fieldDefinitions.FieldDefinitionSleepStage.SleepStage;
|
|
|
|
//
|
|
// WARNING: This class was auto-generated, please avoid modifying it directly.
|
|
// See nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen
|
|
//
|
|
public class FitSleepStage extends RecordData {
|
|
public FitSleepStage(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
|
super(recordDefinition, recordHeader);
|
|
|
|
final int globalNumber = recordDefinition.getGlobalFITMessage().getNumber();
|
|
if (globalNumber != 275) {
|
|
throw new IllegalArgumentException("FitSleepStage expects global messages of " + 275 + ", got " + globalNumber);
|
|
}
|
|
}
|
|
|
|
@Nullable
|
|
public SleepStage getSleepStage() {
|
|
return (SleepStage) getFieldByNumber(0);
|
|
}
|
|
|
|
@Nullable
|
|
public Long getTimestamp() {
|
|
return (Long) getFieldByNumber(253);
|
|
}
|
|
}
|