123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576 |
- #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
- {
- /// <summary>
- /// Implements the UserProfile profile message.
- /// </summary>
- public class UserProfileMesg : Mesg
- {
- #region Fields
- #endregion
- #region Constructors
- public UserProfileMesg() : base(Profile.GetMesg(MesgNum.UserProfile))
- {
- }
- public UserProfileMesg(Mesg mesg) : base(mesg)
- {
- }
- #endregion // Constructors
- #region Methods
- ///<summary>
- /// Retrieves the MessageIndex field</summary>
- /// <returns>Returns nullable ushort representing the MessageIndex field</returns>
- public ushort? GetMessageIndex()
- {
- return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set MessageIndex field</summary>
- /// <param name="messageIndex_">Nullable field value to be set</param>
- public void SetMessageIndex(ushort? messageIndex_)
- {
- SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the FriendlyName field</summary>
- /// <returns>Returns byte[] representing the FriendlyName field</returns>
- public byte[] GetFriendlyName()
- {
- return (byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the FriendlyName field</summary>
- /// <returns>Returns String representing the FriendlyName field</returns>
- public String GetFriendlyNameAsString()
- {
- return Encoding.UTF8.GetString((byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField));
- }
-
-
- ///<summary>
- /// Set FriendlyName field</summary>
- /// <param name="friendlyName_"> field value to be set</param>
- public void SetFriendlyName(String friendlyName_)
- {
- SetFieldValue(0, 0, System.Text.Encoding.UTF8.GetBytes(friendlyName_), Fit.SubfieldIndexMainField);
- }
-
- /// <summary>
- /// Set FriendlyName field</summary>
- /// <param name="friendlyName_">field value to be set</param>
- public void SetFriendlyName(byte[] friendlyName_)
- {
- SetFieldValue(0, 0, friendlyName_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Gender field</summary>
- /// <returns>Returns nullable Gender enum representing the Gender field</returns>
- public Gender? GetGender()
- {
- object obj = GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
- Gender? value = obj == null ? (Gender?)null : (Gender)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set Gender field</summary>
- /// <param name="gender_">Nullable field value to be set</param>
- public void SetGender(Gender? gender_)
- {
- SetFieldValue(1, 0, gender_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Age field
- /// Units: years</summary>
- /// <returns>Returns nullable byte representing the Age field</returns>
- public byte? GetAge()
- {
- return (byte?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set Age field
- /// Units: years</summary>
- /// <param name="age_">Nullable field value to be set</param>
- public void SetAge(byte? age_)
- {
- SetFieldValue(2, 0, age_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Height field
- /// Units: m</summary>
- /// <returns>Returns nullable float representing the Height field</returns>
- public float? GetHeight()
- {
- return (float?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set Height field
- /// Units: m</summary>
- /// <param name="height_">Nullable field value to be set</param>
- public void SetHeight(float? height_)
- {
- SetFieldValue(3, 0, height_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Weight field
- /// Units: kg</summary>
- /// <returns>Returns nullable float representing the Weight field</returns>
- public float? GetWeight()
- {
- return (float?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set Weight field
- /// Units: kg</summary>
- /// <param name="weight_">Nullable field value to be set</param>
- public void SetWeight(float? weight_)
- {
- SetFieldValue(4, 0, weight_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Language field</summary>
- /// <returns>Returns nullable Language enum representing the Language field</returns>
- public Language? GetLanguage()
- {
- object obj = GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
- Language? value = obj == null ? (Language?)null : (Language)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set Language field</summary>
- /// <param name="language_">Nullable field value to be set</param>
- public void SetLanguage(Language? language_)
- {
- SetFieldValue(5, 0, language_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the ElevSetting field</summary>
- /// <returns>Returns nullable DisplayMeasure enum representing the ElevSetting field</returns>
- public DisplayMeasure? GetElevSetting()
- {
- object obj = GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
- DisplayMeasure? value = obj == null ? (DisplayMeasure?)null : (DisplayMeasure)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set ElevSetting field</summary>
- /// <param name="elevSetting_">Nullable field value to be set</param>
- public void SetElevSetting(DisplayMeasure? elevSetting_)
- {
- SetFieldValue(6, 0, elevSetting_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the WeightSetting field</summary>
- /// <returns>Returns nullable DisplayMeasure enum representing the WeightSetting field</returns>
- public DisplayMeasure? GetWeightSetting()
- {
- object obj = GetFieldValue(7, 0, Fit.SubfieldIndexMainField);
- DisplayMeasure? value = obj == null ? (DisplayMeasure?)null : (DisplayMeasure)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set WeightSetting field</summary>
- /// <param name="weightSetting_">Nullable field value to be set</param>
- public void SetWeightSetting(DisplayMeasure? weightSetting_)
- {
- SetFieldValue(7, 0, weightSetting_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the RestingHeartRate field
- /// Units: bpm</summary>
- /// <returns>Returns nullable byte representing the RestingHeartRate field</returns>
- public byte? GetRestingHeartRate()
- {
- return (byte?)GetFieldValue(8, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set RestingHeartRate field
- /// Units: bpm</summary>
- /// <param name="restingHeartRate_">Nullable field value to be set</param>
- public void SetRestingHeartRate(byte? restingHeartRate_)
- {
- SetFieldValue(8, 0, restingHeartRate_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the DefaultMaxRunningHeartRate field
- /// Units: bpm</summary>
- /// <returns>Returns nullable byte representing the DefaultMaxRunningHeartRate field</returns>
- public byte? GetDefaultMaxRunningHeartRate()
- {
- return (byte?)GetFieldValue(9, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set DefaultMaxRunningHeartRate field
- /// Units: bpm</summary>
- /// <param name="defaultMaxRunningHeartRate_">Nullable field value to be set</param>
- public void SetDefaultMaxRunningHeartRate(byte? defaultMaxRunningHeartRate_)
- {
- SetFieldValue(9, 0, defaultMaxRunningHeartRate_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the DefaultMaxBikingHeartRate field
- /// Units: bpm</summary>
- /// <returns>Returns nullable byte representing the DefaultMaxBikingHeartRate field</returns>
- public byte? GetDefaultMaxBikingHeartRate()
- {
- return (byte?)GetFieldValue(10, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set DefaultMaxBikingHeartRate field
- /// Units: bpm</summary>
- /// <param name="defaultMaxBikingHeartRate_">Nullable field value to be set</param>
- public void SetDefaultMaxBikingHeartRate(byte? defaultMaxBikingHeartRate_)
- {
- SetFieldValue(10, 0, defaultMaxBikingHeartRate_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the DefaultMaxHeartRate field
- /// Units: bpm</summary>
- /// <returns>Returns nullable byte representing the DefaultMaxHeartRate field</returns>
- public byte? GetDefaultMaxHeartRate()
- {
- return (byte?)GetFieldValue(11, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set DefaultMaxHeartRate field
- /// Units: bpm</summary>
- /// <param name="defaultMaxHeartRate_">Nullable field value to be set</param>
- public void SetDefaultMaxHeartRate(byte? defaultMaxHeartRate_)
- {
- SetFieldValue(11, 0, defaultMaxHeartRate_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the HrSetting field</summary>
- /// <returns>Returns nullable DisplayHeart enum representing the HrSetting field</returns>
- public DisplayHeart? GetHrSetting()
- {
- object obj = GetFieldValue(12, 0, Fit.SubfieldIndexMainField);
- DisplayHeart? value = obj == null ? (DisplayHeart?)null : (DisplayHeart)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set HrSetting field</summary>
- /// <param name="hrSetting_">Nullable field value to be set</param>
- public void SetHrSetting(DisplayHeart? hrSetting_)
- {
- SetFieldValue(12, 0, hrSetting_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the SpeedSetting field</summary>
- /// <returns>Returns nullable DisplayMeasure enum representing the SpeedSetting field</returns>
- public DisplayMeasure? GetSpeedSetting()
- {
- object obj = GetFieldValue(13, 0, Fit.SubfieldIndexMainField);
- DisplayMeasure? value = obj == null ? (DisplayMeasure?)null : (DisplayMeasure)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set SpeedSetting field</summary>
- /// <param name="speedSetting_">Nullable field value to be set</param>
- public void SetSpeedSetting(DisplayMeasure? speedSetting_)
- {
- SetFieldValue(13, 0, speedSetting_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the DistSetting field</summary>
- /// <returns>Returns nullable DisplayMeasure enum representing the DistSetting field</returns>
- public DisplayMeasure? GetDistSetting()
- {
- object obj = GetFieldValue(14, 0, Fit.SubfieldIndexMainField);
- DisplayMeasure? value = obj == null ? (DisplayMeasure?)null : (DisplayMeasure)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set DistSetting field</summary>
- /// <param name="distSetting_">Nullable field value to be set</param>
- public void SetDistSetting(DisplayMeasure? distSetting_)
- {
- SetFieldValue(14, 0, distSetting_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the PowerSetting field</summary>
- /// <returns>Returns nullable DisplayPower enum representing the PowerSetting field</returns>
- public DisplayPower? GetPowerSetting()
- {
- object obj = GetFieldValue(16, 0, Fit.SubfieldIndexMainField);
- DisplayPower? value = obj == null ? (DisplayPower?)null : (DisplayPower)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set PowerSetting field</summary>
- /// <param name="powerSetting_">Nullable field value to be set</param>
- public void SetPowerSetting(DisplayPower? powerSetting_)
- {
- SetFieldValue(16, 0, powerSetting_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the ActivityClass field</summary>
- /// <returns>Returns nullable ActivityClass enum representing the ActivityClass field</returns>
- public ActivityClass? GetActivityClass()
- {
- object obj = GetFieldValue(17, 0, Fit.SubfieldIndexMainField);
- ActivityClass? value = obj == null ? (ActivityClass?)null : (ActivityClass)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set ActivityClass field</summary>
- /// <param name="activityClass_">Nullable field value to be set</param>
- public void SetActivityClass(ActivityClass? activityClass_)
- {
- SetFieldValue(17, 0, activityClass_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the PositionSetting field</summary>
- /// <returns>Returns nullable DisplayPosition enum representing the PositionSetting field</returns>
- public DisplayPosition? GetPositionSetting()
- {
- object obj = GetFieldValue(18, 0, Fit.SubfieldIndexMainField);
- DisplayPosition? value = obj == null ? (DisplayPosition?)null : (DisplayPosition)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set PositionSetting field</summary>
- /// <param name="positionSetting_">Nullable field value to be set</param>
- public void SetPositionSetting(DisplayPosition? positionSetting_)
- {
- SetFieldValue(18, 0, positionSetting_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the TemperatureSetting field</summary>
- /// <returns>Returns nullable DisplayMeasure enum representing the TemperatureSetting field</returns>
- public DisplayMeasure? GetTemperatureSetting()
- {
- object obj = GetFieldValue(21, 0, Fit.SubfieldIndexMainField);
- DisplayMeasure? value = obj == null ? (DisplayMeasure?)null : (DisplayMeasure)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set TemperatureSetting field</summary>
- /// <param name="temperatureSetting_">Nullable field value to be set</param>
- public void SetTemperatureSetting(DisplayMeasure? temperatureSetting_)
- {
- SetFieldValue(21, 0, temperatureSetting_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the LocalId field</summary>
- /// <returns>Returns nullable ushort representing the LocalId field</returns>
- public ushort? GetLocalId()
- {
- return (ushort?)GetFieldValue(22, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set LocalId field</summary>
- /// <param name="localId_">Nullable field value to be set</param>
- public void SetLocalId(ushort? localId_)
- {
- SetFieldValue(22, 0, localId_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field GlobalId</returns>
- public int GetNumGlobalId()
- {
- return GetNumFieldValues(23, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the GlobalId field</summary>
- /// <param name="index">0 based index of GlobalId element to retrieve</param>
- /// <returns>Returns nullable byte representing the GlobalId field</returns>
- public byte? GetGlobalId(int index)
- {
- return (byte?)GetFieldValue(23, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set GlobalId field</summary>
- /// <param name="index">0 based index of global_id</param>
- /// <param name="globalId_">Nullable field value to be set</param>
- public void SetGlobalId(int index, byte? globalId_)
- {
- SetFieldValue(23, index, globalId_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the HeightSetting field</summary>
- /// <returns>Returns nullable DisplayMeasure enum representing the HeightSetting field</returns>
- public DisplayMeasure? GetHeightSetting()
- {
- object obj = GetFieldValue(30, 0, Fit.SubfieldIndexMainField);
- DisplayMeasure? value = obj == null ? (DisplayMeasure?)null : (DisplayMeasure)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set HeightSetting field</summary>
- /// <param name="heightSetting_">Nullable field value to be set</param>
- public void SetHeightSetting(DisplayMeasure? heightSetting_)
- {
- SetFieldValue(30, 0, heightSetting_, Fit.SubfieldIndexMainField);
- }
-
- #endregion // Methods
- } // Class
- } // namespace
|