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