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

t.21.120.2.source-code.DiveSummaryMesg 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 DiveSummaryMesg extends Mesg   {

    
    public static final int TimestampFieldNum = 253;
    
    public static final int ReferenceMesgFieldNum = 0;
    
    public static final int ReferenceIndexFieldNum = 1;
    
    public static final int AvgDepthFieldNum = 2;
    
    public static final int MaxDepthFieldNum = 3;
    
    public static final int SurfaceIntervalFieldNum = 4;
    
    public static final int StartCnsFieldNum = 5;
    
    public static final int EndCnsFieldNum = 6;
    
    public static final int StartN2FieldNum = 7;
    
    public static final int EndN2FieldNum = 8;
    
    public static final int O2ToxicityFieldNum = 9;
    
    public static final int DiveNumberFieldNum = 10;
    
    public static final int BottomTimeFieldNum = 11;
    
    public static final int AvgPressureSacFieldNum = 12;
    
    public static final int AvgVolumeSacFieldNum = 13;
    
    public static final int AvgRmvFieldNum = 14;
    
    public static final int DescentTimeFieldNum = 15;
    
    public static final int AscentTimeFieldNum = 16;
    
    public static final int AvgAscentRateFieldNum = 17;
    
    public static final int AvgDescentRateFieldNum = 22;
    
    public static final int MaxAscentRateFieldNum = 23;
    
    public static final int MaxDescentRateFieldNum = 24;
    
    public static final int HangTimeFieldNum = 25;
    

    protected static final  Mesg diveSummaryMesg;
    static {
        // dive_summary
        diveSummaryMesg = new Mesg("dive_summary", MesgNum.DIVE_SUMMARY);
        diveSummaryMesg.addField(new Field("timestamp", TimestampFieldNum, 134, 1, 0, "s", false, Profile.Type.DATE_TIME));
        
        diveSummaryMesg.addField(new Field("reference_mesg", ReferenceMesgFieldNum, 132, 1, 0, "", false, Profile.Type.MESG_NUM));
        
        diveSummaryMesg.addField(new Field("reference_index", ReferenceIndexFieldNum, 132, 1, 0, "", false, Profile.Type.MESSAGE_INDEX));
        
        diveSummaryMesg.addField(new Field("avg_depth", AvgDepthFieldNum, 134, 1000, 0, "m", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("max_depth", MaxDepthFieldNum, 134, 1000, 0, "m", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("surface_interval", SurfaceIntervalFieldNum, 134, 1, 0, "s", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("start_cns", StartCnsFieldNum, 2, 1, 0, "percent", false, Profile.Type.UINT8));
        
        diveSummaryMesg.addField(new Field("end_cns", EndCnsFieldNum, 2, 1, 0, "percent", false, Profile.Type.UINT8));
        
        diveSummaryMesg.addField(new Field("start_n2", StartN2FieldNum, 132, 1, 0, "percent", false, Profile.Type.UINT16));
        
        diveSummaryMesg.addField(new Field("end_n2", EndN2FieldNum, 132, 1, 0, "percent", false, Profile.Type.UINT16));
        
        diveSummaryMesg.addField(new Field("o2_toxicity", O2ToxicityFieldNum, 132, 1, 0, "OTUs", false, Profile.Type.UINT16));
        
        diveSummaryMesg.addField(new Field("dive_number", DiveNumberFieldNum, 134, 1, 0, "", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("bottom_time", BottomTimeFieldNum, 134, 1000, 0, "s", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("avg_pressure_sac", AvgPressureSacFieldNum, 132, 100, 0, "bar/min", false, Profile.Type.UINT16));
        
        diveSummaryMesg.addField(new Field("avg_volume_sac", AvgVolumeSacFieldNum, 132, 100, 0, "L/min", false, Profile.Type.UINT16));
        
        diveSummaryMesg.addField(new Field("avg_rmv", AvgRmvFieldNum, 132, 100, 0, "L/min", false, Profile.Type.UINT16));
        
        diveSummaryMesg.addField(new Field("descent_time", DescentTimeFieldNum, 134, 1000, 0, "s", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("ascent_time", AscentTimeFieldNum, 134, 1000, 0, "s", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("avg_ascent_rate", AvgAscentRateFieldNum, 133, 1000, 0, "m/s", false, Profile.Type.SINT32));
        
        diveSummaryMesg.addField(new Field("avg_descent_rate", AvgDescentRateFieldNum, 134, 1000, 0, "m/s", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("max_ascent_rate", MaxAscentRateFieldNum, 134, 1000, 0, "m/s", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("max_descent_rate", MaxDescentRateFieldNum, 134, 1000, 0, "m/s", false, Profile.Type.UINT32));
        
        diveSummaryMesg.addField(new Field("hang_time", HangTimeFieldNum, 134, 1000, 0, "s", false, Profile.Type.UINT32));
        
    }

    public DiveSummaryMesg() {
        super(Factory.createMesg(MesgNum.DIVE_SUMMARY));
    }

    public DiveSummaryMesg(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 reference_mesg field
     *
     * @return reference_mesg
     */
    public Integer getReferenceMesg() {
        return getFieldIntegerValue(0, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set reference_mesg field
     *
     * @param referenceMesg The new referenceMesg value to be set
     */
    public void setReferenceMesg(Integer referenceMesg) {
        setFieldValue(0, 0, referenceMesg, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get reference_index field
     *
     * @return reference_index
     */
    public Integer getReferenceIndex() {
        return getFieldIntegerValue(1, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set reference_index field
     *
     * @param referenceIndex The new referenceIndex value to be set
     */
    public void setReferenceIndex(Integer referenceIndex) {
        setFieldValue(1, 0, referenceIndex, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get avg_depth field
     * Units: m
     * Comment: 0 if above water
     *
     * @return avg_depth
     */
    public Float getAvgDepth() {
        return getFieldFloatValue(2, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set avg_depth field
     * Units: m
     * Comment: 0 if above water
     *
     * @param avgDepth The new avgDepth value to be set
     */
    public void setAvgDepth(Float avgDepth) {
        setFieldValue(2, 0, avgDepth, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get max_depth field
     * Units: m
     * Comment: 0 if above water
     *
     * @return max_depth
     */
    public Float getMaxDepth() {
        return getFieldFloatValue(3, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set max_depth field
     * Units: m
     * Comment: 0 if above water
     *
     * @param maxDepth The new maxDepth value to be set
     */
    public void setMaxDepth(Float maxDepth) {
        setFieldValue(3, 0, maxDepth, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get surface_interval field
     * Units: s
     * Comment: Time since end of last dive
     *
     * @return surface_interval
     */
    public Long getSurfaceInterval() {
        return getFieldLongValue(4, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set surface_interval field
     * Units: s
     * Comment: Time since end of last dive
     *
     * @param surfaceInterval The new surfaceInterval value to be set
     */
    public void setSurfaceInterval(Long surfaceInterval) {
        setFieldValue(4, 0, surfaceInterval, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get start_cns field
     * Units: percent
     *
     * @return start_cns
     */
    public Short getStartCns() {
        return getFieldShortValue(5, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set start_cns field
     * Units: percent
     *
     * @param startCns The new startCns value to be set
     */
    public void setStartCns(Short startCns) {
        setFieldValue(5, 0, startCns, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get end_cns field
     * Units: percent
     *
     * @return end_cns
     */
    public Short getEndCns() {
        return getFieldShortValue(6, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set end_cns field
     * Units: percent
     *
     * @param endCns The new endCns value to be set
     */
    public void setEndCns(Short endCns) {
        setFieldValue(6, 0, endCns, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get start_n2 field
     * Units: percent
     *
     * @return start_n2
     */
    public Integer getStartN2() {
        return getFieldIntegerValue(7, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set start_n2 field
     * Units: percent
     *
     * @param startN2 The new startN2 value to be set
     */
    public void setStartN2(Integer startN2) {
        setFieldValue(7, 0, startN2, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get end_n2 field
     * Units: percent
     *
     * @return end_n2
     */
    public Integer getEndN2() {
        return getFieldIntegerValue(8, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set end_n2 field
     * Units: percent
     *
     * @param endN2 The new endN2 value to be set
     */
    public void setEndN2(Integer endN2) {
        setFieldValue(8, 0, endN2, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get o2_toxicity field
     * Units: OTUs
     *
     * @return o2_toxicity
     */
    public Integer getO2Toxicity() {
        return getFieldIntegerValue(9, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set o2_toxicity field
     * Units: OTUs
     *
     * @param o2Toxicity The new o2Toxicity value to be set
     */
    public void setO2Toxicity(Integer o2Toxicity) {
        setFieldValue(9, 0, o2Toxicity, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get dive_number field
     *
     * @return dive_number
     */
    public Long getDiveNumber() {
        return getFieldLongValue(10, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set dive_number field
     *
     * @param diveNumber The new diveNumber value to be set
     */
    public void setDiveNumber(Long diveNumber) {
        setFieldValue(10, 0, diveNumber, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get bottom_time field
     * Units: s
     *
     * @return bottom_time
     */
    public Float getBottomTime() {
        return getFieldFloatValue(11, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set bottom_time field
     * Units: s
     *
     * @param bottomTime The new bottomTime value to be set
     */
    public void setBottomTime(Float bottomTime) {
        setFieldValue(11, 0, bottomTime, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get avg_pressure_sac field
     * Units: bar/min
     * Comment: Average pressure-based surface air consumption
     *
     * @return avg_pressure_sac
     */
    public Float getAvgPressureSac() {
        return getFieldFloatValue(12, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set avg_pressure_sac field
     * Units: bar/min
     * Comment: Average pressure-based surface air consumption
     *
     * @param avgPressureSac The new avgPressureSac value to be set
     */
    public void setAvgPressureSac(Float avgPressureSac) {
        setFieldValue(12, 0, avgPressureSac, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get avg_volume_sac field
     * Units: L/min
     * Comment: Average volumetric surface air consumption
     *
     * @return avg_volume_sac
     */
    public Float getAvgVolumeSac() {
        return getFieldFloatValue(13, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set avg_volume_sac field
     * Units: L/min
     * Comment: Average volumetric surface air consumption
     *
     * @param avgVolumeSac The new avgVolumeSac value to be set
     */
    public void setAvgVolumeSac(Float avgVolumeSac) {
        setFieldValue(13, 0, avgVolumeSac, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get avg_rmv field
     * Units: L/min
     * Comment: Average respiratory minute volume
     *
     * @return avg_rmv
     */
    public Float getAvgRmv() {
        return getFieldFloatValue(14, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set avg_rmv field
     * Units: L/min
     * Comment: Average respiratory minute volume
     *
     * @param avgRmv The new avgRmv value to be set
     */
    public void setAvgRmv(Float avgRmv) {
        setFieldValue(14, 0, avgRmv, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get descent_time field
     * Units: s
     * Comment: Time to reach deepest level stop
     *
     * @return descent_time
     */
    public Float getDescentTime() {
        return getFieldFloatValue(15, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set descent_time field
     * Units: s
     * Comment: Time to reach deepest level stop
     *
     * @param descentTime The new descentTime value to be set
     */
    public void setDescentTime(Float descentTime) {
        setFieldValue(15, 0, descentTime, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get ascent_time field
     * Units: s
     * Comment: Time after leaving bottom until reaching surface
     *
     * @return ascent_time
     */
    public Float getAscentTime() {
        return getFieldFloatValue(16, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set ascent_time field
     * Units: s
     * Comment: Time after leaving bottom until reaching surface
     *
     * @param ascentTime The new ascentTime value to be set
     */
    public void setAscentTime(Float ascentTime) {
        setFieldValue(16, 0, ascentTime, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get avg_ascent_rate field
     * Units: m/s
     * Comment: Average ascent rate, not including descents or stops
     *
     * @return avg_ascent_rate
     */
    public Float getAvgAscentRate() {
        return getFieldFloatValue(17, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set avg_ascent_rate field
     * Units: m/s
     * Comment: Average ascent rate, not including descents or stops
     *
     * @param avgAscentRate The new avgAscentRate value to be set
     */
    public void setAvgAscentRate(Float avgAscentRate) {
        setFieldValue(17, 0, avgAscentRate, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get avg_descent_rate field
     * Units: m/s
     * Comment: Average descent rate, not including ascents or stops
     *
     * @return avg_descent_rate
     */
    public Float getAvgDescentRate() {
        return getFieldFloatValue(22, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set avg_descent_rate field
     * Units: m/s
     * Comment: Average descent rate, not including ascents or stops
     *
     * @param avgDescentRate The new avgDescentRate value to be set
     */
    public void setAvgDescentRate(Float avgDescentRate) {
        setFieldValue(22, 0, avgDescentRate, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get max_ascent_rate field
     * Units: m/s
     * Comment: Maximum ascent rate
     *
     * @return max_ascent_rate
     */
    public Float getMaxAscentRate() {
        return getFieldFloatValue(23, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set max_ascent_rate field
     * Units: m/s
     * Comment: Maximum ascent rate
     *
     * @param maxAscentRate The new maxAscentRate value to be set
     */
    public void setMaxAscentRate(Float maxAscentRate) {
        setFieldValue(23, 0, maxAscentRate, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get max_descent_rate field
     * Units: m/s
     * Comment: Maximum descent rate
     *
     * @return max_descent_rate
     */
    public Float getMaxDescentRate() {
        return getFieldFloatValue(24, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set max_descent_rate field
     * Units: m/s
     * Comment: Maximum descent rate
     *
     * @param maxDescentRate The new maxDescentRate value to be set
     */
    public void setMaxDescentRate(Float maxDescentRate) {
        setFieldValue(24, 0, maxDescentRate, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Get hang_time field
     * Units: s
     * Comment: Time spent neither ascending nor descending
     *
     * @return hang_time
     */
    public Float getHangTime() {
        return getFieldFloatValue(25, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

    /**
     * Set hang_time field
     * Units: s
     * Comment: Time spent neither ascending nor descending
     *
     * @param hangTime The new hangTime value to be set
     */
    public void setHangTime(Float hangTime) {
        setFieldValue(25, 0, hangTime, Fit.SUBFIELD_INDEX_MAIN_FIELD);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy