com.garmin.fit.OhrSettingsMesg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fit Show documentation
Show all versions of fit Show documentation
The Official Garmin FIT SDK
The newest version!
/////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2024 Garmin International, Inc.
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
// may not use this file except in compliance with the Flexible and Interoperable Data
// Transfer (FIT) Protocol License.
/////////////////////////////////////////////////////////////////////////////////////////////
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
// Profile Version = 21.158.0Release
// Tag = production/release/21.158.0-0-gc9428aa
/////////////////////////////////////////////////////////////////////////////////////////////
package com.garmin.fit;
public class OhrSettingsMesg extends Mesg {
public static final int TimestampFieldNum = 253;
public static final int EnabledFieldNum = 0;
protected static final Mesg ohrSettingsMesg;
static {
// ohr_settings
ohrSettingsMesg = new Mesg("ohr_settings", MesgNum.OHR_SETTINGS);
ohrSettingsMesg.addField(new Field("timestamp", TimestampFieldNum, 134, 1, 0, "s", false, Profile.Type.DATE_TIME));
ohrSettingsMesg.addField(new Field("enabled", EnabledFieldNum, 0, 1, 0, "", false, Profile.Type.SWITCH));
}
public OhrSettingsMesg() {
super(Factory.createMesg(MesgNum.OHR_SETTINGS));
}
public OhrSettingsMesg(final Mesg mesg) {
super(mesg);
}
/**
* Get timestamp field
* Units: s
*
* @return timestamp
*/
public DateTime getTimestamp() {
return timestampToDateTime(getFieldLongValue(253, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD));
}
/**
* Set timestamp field
* Units: s
*
* @param timestamp The new timestamp value to be set
*/
public void setTimestamp(DateTime timestamp) {
setFieldValue(253, 0, timestamp.getTimestamp(), Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get enabled field
*
* @return enabled
*/
public Switch getEnabled() {
Short value = getFieldShortValue(0, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
if (value == null) {
return null;
}
return Switch.getByValue(value);
}
/**
* Set enabled field
*
* @param enabled The new enabled value to be set
*/
public void setEnabled(Switch enabled) {
setFieldValue(0, 0, enabled.value, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy