#region Copyright
////////////////////////////////////////////////////////////////////////////////
// The following FIT Protocol software provided may be used with FIT protocol
// devices only and remains the copyrighted property of Dynastream Innovations Inc.
// The software is being provided on an "as-is" basis and as an accommodation,
// and therefore all warranties, representations, or guarantees of any kind
// (whether express, implied or statutory) including, without limitation,
// warranties of merchantability, non-infringement, or fitness for a particular
// purpose, are specifically disclaimed.
//
// Copyright 2016 Dynastream Innovations Inc.
////////////////////////////////////////////////////////////////////////////////
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
// Profile Version = 16.60Release
// Tag = production-akw-16.60.00-0-g5d3d436
////////////////////////////////////////////////////////////////////////////////
#endregion
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.IO;
namespace Dynastream.Fit
{
///
/// Implements the WeightScale profile message.
///
public class WeightScaleMesg : Mesg
{
#region Fields
#endregion
#region Constructors
public WeightScaleMesg() : base(Profile.GetMesg(MesgNum.WeightScale))
{
}
public WeightScaleMesg(Mesg mesg) : base(mesg)
{
}
#endregion // Constructors
#region Methods
///
/// Retrieves the Timestamp field
/// Units: s
/// Returns DateTime representing the Timestamp field
public DateTime GetTimestamp()
{
return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
}
///
/// Set Timestamp field
/// Units: s
/// Nullable field value to be set
public void SetTimestamp(DateTime timestamp_)
{
SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
}
///
/// Retrieves the Weight field
/// Units: kg
/// Returns nullable float representing the Weight field
public float? GetWeight()
{
return (float?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
}
///
/// Set Weight field
/// Units: kg
/// Nullable field value to be set
public void SetWeight(float? weight_)
{
SetFieldValue(0, 0, weight_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the PercentFat field
/// Units: %
/// Returns nullable float representing the PercentFat field
public float? GetPercentFat()
{
return (float?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
}
///
/// Set PercentFat field
/// Units: %
/// Nullable field value to be set
public void SetPercentFat(float? percentFat_)
{
SetFieldValue(1, 0, percentFat_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the PercentHydration field
/// Units: %
/// Returns nullable float representing the PercentHydration field
public float? GetPercentHydration()
{
return (float?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
}
///
/// Set PercentHydration field
/// Units: %
/// Nullable field value to be set
public void SetPercentHydration(float? percentHydration_)
{
SetFieldValue(2, 0, percentHydration_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the VisceralFatMass field
/// Units: kg
/// Returns nullable float representing the VisceralFatMass field
public float? GetVisceralFatMass()
{
return (float?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
}
///
/// Set VisceralFatMass field
/// Units: kg
/// Nullable field value to be set
public void SetVisceralFatMass(float? visceralFatMass_)
{
SetFieldValue(3, 0, visceralFatMass_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the BoneMass field
/// Units: kg
/// Returns nullable float representing the BoneMass field
public float? GetBoneMass()
{
return (float?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
}
///
/// Set BoneMass field
/// Units: kg
/// Nullable field value to be set
public void SetBoneMass(float? boneMass_)
{
SetFieldValue(4, 0, boneMass_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the MuscleMass field
/// Units: kg
/// Returns nullable float representing the MuscleMass field
public float? GetMuscleMass()
{
return (float?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
}
///
/// Set MuscleMass field
/// Units: kg
/// Nullable field value to be set
public void SetMuscleMass(float? muscleMass_)
{
SetFieldValue(5, 0, muscleMass_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the BasalMet field
/// Units: kcal/day
/// Returns nullable float representing the BasalMet field
public float? GetBasalMet()
{
return (float?)GetFieldValue(7, 0, Fit.SubfieldIndexMainField);
}
///
/// Set BasalMet field
/// Units: kcal/day
/// Nullable field value to be set
public void SetBasalMet(float? basalMet_)
{
SetFieldValue(7, 0, basalMet_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the PhysiqueRating field
/// Returns nullable byte representing the PhysiqueRating field
public byte? GetPhysiqueRating()
{
return (byte?)GetFieldValue(8, 0, Fit.SubfieldIndexMainField);
}
///
/// Set PhysiqueRating field
/// Nullable field value to be set
public void SetPhysiqueRating(byte? physiqueRating_)
{
SetFieldValue(8, 0, physiqueRating_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the ActiveMet field
/// Units: kcal/day
/// Comment: ~4kJ per kcal, 0.25 allows max 16384 kcal
/// Returns nullable float representing the ActiveMet field
public float? GetActiveMet()
{
return (float?)GetFieldValue(9, 0, Fit.SubfieldIndexMainField);
}
///
/// Set ActiveMet field
/// Units: kcal/day
/// Comment: ~4kJ per kcal, 0.25 allows max 16384 kcal
/// Nullable field value to be set
public void SetActiveMet(float? activeMet_)
{
SetFieldValue(9, 0, activeMet_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the MetabolicAge field
/// Units: years
/// Returns nullable byte representing the MetabolicAge field
public byte? GetMetabolicAge()
{
return (byte?)GetFieldValue(10, 0, Fit.SubfieldIndexMainField);
}
///
/// Set MetabolicAge field
/// Units: years
/// Nullable field value to be set
public void SetMetabolicAge(byte? metabolicAge_)
{
SetFieldValue(10, 0, metabolicAge_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the VisceralFatRating field
/// Returns nullable byte representing the VisceralFatRating field
public byte? GetVisceralFatRating()
{
return (byte?)GetFieldValue(11, 0, Fit.SubfieldIndexMainField);
}
///
/// Set VisceralFatRating field
/// Nullable field value to be set
public void SetVisceralFatRating(byte? visceralFatRating_)
{
SetFieldValue(11, 0, visceralFatRating_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the UserProfileIndex field
/// Comment: Associates this weight scale message to a user. This corresponds to the index of the user profile message in the weight scale file.
/// Returns nullable ushort representing the UserProfileIndex field
public ushort? GetUserProfileIndex()
{
return (ushort?)GetFieldValue(12, 0, Fit.SubfieldIndexMainField);
}
///
/// Set UserProfileIndex field
/// Comment: Associates this weight scale message to a user. This corresponds to the index of the user profile message in the weight scale file.
/// Nullable field value to be set
public void SetUserProfileIndex(ushort? userProfileIndex_)
{
SetFieldValue(12, 0, userProfileIndex_, Fit.SubfieldIndexMainField);
}
#endregion // Methods
} // Class
} // namespace