t.21.120.2.source-code.MaxMetDataMesg 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
/////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2023 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.120Release
// Tag = production/release/21.120.00-0-g2d77811
/////////////////////////////////////////////////////////////////////////////////////////////
package com.garmin.fit;
public class MaxMetDataMesg extends Mesg {
public static final int UpdateTimeFieldNum = 0;
public static final int Vo2MaxFieldNum = 2;
public static final int SportFieldNum = 5;
public static final int SubSportFieldNum = 6;
public static final int MaxMetCategoryFieldNum = 8;
public static final int CalibratedDataFieldNum = 9;
public static final int HrSourceFieldNum = 12;
public static final int SpeedSourceFieldNum = 13;
protected static final Mesg maxMetDataMesg;
static {
// max_met_data
maxMetDataMesg = new Mesg("max_met_data", MesgNum.MAX_MET_DATA);
maxMetDataMesg.addField(new Field("update_time", UpdateTimeFieldNum, 134, 1, 0, "", false, Profile.Type.DATE_TIME));
maxMetDataMesg.addField(new Field("vo2_max", Vo2MaxFieldNum, 132, 10, 0, "mL/kg/min", false, Profile.Type.UINT16));
maxMetDataMesg.addField(new Field("sport", SportFieldNum, 0, 1, 0, "", false, Profile.Type.SPORT));
maxMetDataMesg.addField(new Field("sub_sport", SubSportFieldNum, 0, 1, 0, "", false, Profile.Type.SUB_SPORT));
maxMetDataMesg.addField(new Field("max_met_category", MaxMetCategoryFieldNum, 0, 1, 0, "", false, Profile.Type.MAX_MET_CATEGORY));
maxMetDataMesg.addField(new Field("calibrated_data", CalibratedDataFieldNum, 0, 1, 0, "", false, Profile.Type.BOOL));
maxMetDataMesg.addField(new Field("hr_source", HrSourceFieldNum, 0, 1, 0, "", false, Profile.Type.MAX_MET_HEART_RATE_SOURCE));
maxMetDataMesg.addField(new Field("speed_source", SpeedSourceFieldNum, 0, 1, 0, "", false, Profile.Type.MAX_MET_SPEED_SOURCE));
}
public MaxMetDataMesg() {
super(Factory.createMesg(MesgNum.MAX_MET_DATA));
}
public MaxMetDataMesg(final Mesg mesg) {
super(mesg);
}
/**
* Get update_time field
* Comment: Time maxMET and vo2 were calculated
*
* @return update_time
*/
public DateTime getUpdateTime() {
return timestampToDateTime(getFieldLongValue(0, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD));
}
/**
* Set update_time field
* Comment: Time maxMET and vo2 were calculated
*
* @param updateTime The new updateTime value to be set
*/
public void setUpdateTime(DateTime updateTime) {
setFieldValue(0, 0, updateTime.getTimestamp(), Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get vo2_max field
* Units: mL/kg/min
*
* @return vo2_max
*/
public Float getVo2Max() {
return getFieldFloatValue(2, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set vo2_max field
* Units: mL/kg/min
*
* @param vo2Max The new vo2Max value to be set
*/
public void setVo2Max(Float vo2Max) {
setFieldValue(2, 0, vo2Max, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get sport field
*
* @return sport
*/
public Sport getSport() {
Short value = getFieldShortValue(5, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
if (value == null) {
return null;
}
return Sport.getByValue(value);
}
/**
* Set sport field
*
* @param sport The new sport value to be set
*/
public void setSport(Sport sport) {
setFieldValue(5, 0, sport.value, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get sub_sport field
*
* @return sub_sport
*/
public SubSport getSubSport() {
Short value = getFieldShortValue(6, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
if (value == null) {
return null;
}
return SubSport.getByValue(value);
}
/**
* Set sub_sport field
*
* @param subSport The new subSport value to be set
*/
public void setSubSport(SubSport subSport) {
setFieldValue(6, 0, subSport.value, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get max_met_category field
*
* @return max_met_category
*/
public MaxMetCategory getMaxMetCategory() {
Short value = getFieldShortValue(8, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
if (value == null) {
return null;
}
return MaxMetCategory.getByValue(value);
}
/**
* Set max_met_category field
*
* @param maxMetCategory The new maxMetCategory value to be set
*/
public void setMaxMetCategory(MaxMetCategory maxMetCategory) {
setFieldValue(8, 0, maxMetCategory.value, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get calibrated_data field
* Comment: Indicates if calibrated data was used in the calculation
*
* @return calibrated_data
*/
public Bool getCalibratedData() {
Short value = getFieldShortValue(9, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
if (value == null) {
return null;
}
return Bool.getByValue(value);
}
/**
* Set calibrated_data field
* Comment: Indicates if calibrated data was used in the calculation
*
* @param calibratedData The new calibratedData value to be set
*/
public void setCalibratedData(Bool calibratedData) {
setFieldValue(9, 0, calibratedData.value, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get hr_source field
* Comment: Indicates if the estimate was obtained using a chest strap or wrist heart rate
*
* @return hr_source
*/
public MaxMetHeartRateSource getHrSource() {
Short value = getFieldShortValue(12, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
if (value == null) {
return null;
}
return MaxMetHeartRateSource.getByValue(value);
}
/**
* Set hr_source field
* Comment: Indicates if the estimate was obtained using a chest strap or wrist heart rate
*
* @param hrSource The new hrSource value to be set
*/
public void setHrSource(MaxMetHeartRateSource hrSource) {
setFieldValue(12, 0, hrSource.value, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get speed_source field
* Comment: Indidcates if the estimate was obtained using onboard GPS or connected GPS
*
* @return speed_source
*/
public MaxMetSpeedSource getSpeedSource() {
Short value = getFieldShortValue(13, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
if (value == null) {
return null;
}
return MaxMetSpeedSource.getByValue(value);
}
/**
* Set speed_source field
* Comment: Indidcates if the estimate was obtained using onboard GPS or connected GPS
*
* @param speedSource The new speedSource value to be set
*/
public void setSpeedSource(MaxMetSpeedSource speedSource) {
setFieldValue(13, 0, speedSource.value, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
}