t.21.120.2.source-code.PowerZoneMesg 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 PowerZoneMesg extends Mesg {
public static final int MessageIndexFieldNum = 254;
public static final int HighValueFieldNum = 1;
public static final int NameFieldNum = 2;
protected static final Mesg powerZoneMesg;
static {
// power_zone
powerZoneMesg = new Mesg("power_zone", MesgNum.POWER_ZONE);
powerZoneMesg.addField(new Field("message_index", MessageIndexFieldNum, 132, 1, 0, "", false, Profile.Type.MESSAGE_INDEX));
powerZoneMesg.addField(new Field("high_value", HighValueFieldNum, 132, 1, 0, "watts", false, Profile.Type.UINT16));
powerZoneMesg.addField(new Field("name", NameFieldNum, 7, 1, 0, "", false, Profile.Type.STRING));
}
public PowerZoneMesg() {
super(Factory.createMesg(MesgNum.POWER_ZONE));
}
public PowerZoneMesg(final Mesg mesg) {
super(mesg);
}
/**
* Get message_index field
*
* @return message_index
*/
public Integer getMessageIndex() {
return getFieldIntegerValue(254, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set message_index field
*
* @param messageIndex The new messageIndex value to be set
*/
public void setMessageIndex(Integer messageIndex) {
setFieldValue(254, 0, messageIndex, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get high_value field
* Units: watts
*
* @return high_value
*/
public Integer getHighValue() {
return getFieldIntegerValue(1, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set high_value field
* Units: watts
*
* @param highValue The new highValue value to be set
*/
public void setHighValue(Integer highValue) {
setFieldValue(1, 0, highValue, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get name field
*
* @return name
*/
public String getName() {
return getFieldStringValue(2, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set name field
*
* @param name The new name value to be set
*/
public void setName(String name) {
setFieldValue(2, 0, name, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
}