All Downloads are FREE. Search and download functionalities are using the official Maven repository.

t.21.120.2.source-code.ClimbProMesg Maven / Gradle / Ivy

There is a newer version: 21.141.0
Show newest version
/////////////////////////////////////////////////////////////////////////////////////////////
// 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 ClimbProMesg extends Mesg   {

    
    public static final int TimestampFieldNum = 253;
    
    public static final int PositionLatFieldNum = 0;
    
    public static final int PositionLongFieldNum = 1;
    
    public static final int ClimbProEventFieldNum = 2;
    
    public static final int ClimbNumberFieldNum = 3;
    
    public static final int ClimbCategoryFieldNum = 4;
    
    public static final int CurrentDistFieldNum = 5;
    

    protected static final  Mesg climbProMesg;
    static {
        // climb_pro
        climbProMesg = new Mesg("climb_pro", MesgNum.CLIMB_PRO);
        climbProMesg.addField(new Field("timestamp", TimestampFieldNum, 134, 1, 0, "s", false, Profile.Type.DATE_TIME));
        
        climbProMesg.addField(new Field("position_lat", PositionLatFieldNum, 133, 1, 0, "semicircles", false, Profile.Type.SINT32));
        
        climbProMesg.addField(new Field("position_long", PositionLongFieldNum, 133, 1, 0, "semicircles", false, Profile.Type.SINT32));
        
        climbProMesg.addField(new Field("climb_pro_event", ClimbProEventFieldNum, 0, 1, 0, "", false, Profile.Type.CLIMB_PRO_EVENT));
        
        climbProMesg.addField(new Field("climb_number", ClimbNumberFieldNum, 132, 1, 0, "", false, Profile.Type.UINT16));
        
        climbProMesg.addField(new Field("climb_category", ClimbCategoryFieldNum, 2, 1, 0, "", false, Profile.Type.UINT8));
        
        climbProMesg.addField(new Field("current_dist", CurrentDistFieldNum, 136, 1, 0, "m", false, Profile.Type.FLOAT32));
        
    }

    public ClimbProMesg() {
        super(Factory.createMesg(MesgNum.CLIMB_PRO));
    }

    public ClimbProMesg(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 position_lat field
     * Units: semicircles
     *
     * @return position_lat
     */
    public Integer getPositionLat() {
        return getFieldIntegerValue(0, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set position_lat field
     * Units: semicircles
     *
     * @param positionLat The new positionLat value to be set
     */
    public void setPositionLat(Integer positionLat) {
        setFieldValue(0, 0, positionLat, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get position_long field
     * Units: semicircles
     *
     * @return position_long
     */
    public Integer getPositionLong() {
        return getFieldIntegerValue(1, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set position_long field
     * Units: semicircles
     *
     * @param positionLong The new positionLong value to be set
     */
    public void setPositionLong(Integer positionLong) {
        setFieldValue(1, 0, positionLong, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get climb_pro_event field
     *
     * @return climb_pro_event
     */
    public ClimbProEvent getClimbProEvent() {
        Short value = getFieldShortValue(2, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
        if (value == null) {
            return null;
        }
        return ClimbProEvent.getByValue(value);
    }

    /**
     * Set climb_pro_event field
     *
     * @param climbProEvent The new climbProEvent value to be set
     */
    public void setClimbProEvent(ClimbProEvent climbProEvent) {
        setFieldValue(2, 0, climbProEvent.value, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get climb_number field
     *
     * @return climb_number
     */
    public Integer getClimbNumber() {
        return getFieldIntegerValue(3, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set climb_number field
     *
     * @param climbNumber The new climbNumber value to be set
     */
    public void setClimbNumber(Integer climbNumber) {
        setFieldValue(3, 0, climbNumber, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get climb_category field
     *
     * @return climb_category
     */
    public Short getClimbCategory() {
        return getFieldShortValue(4, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set climb_category field
     *
     * @param climbCategory The new climbCategory value to be set
     */
    public void setClimbCategory(Short climbCategory) {
        setFieldValue(4, 0, climbCategory, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get current_dist field
     * Units: m
     *
     * @return current_dist
     */
    public Float getCurrentDist() {
        return getFieldFloatValue(5, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set current_dist field
     * Units: m
     *
     * @param currentDist The new currentDist value to be set
     */
    public void setCurrentDist(Float currentDist) {
        setFieldValue(5, 0, currentDist, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy