#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 BikeProfile profile message. /// public class BikeProfileMesg : Mesg { #region Fields #endregion #region Constructors public BikeProfileMesg() : base(Profile.GetMesg(MesgNum.BikeProfile)) { } public BikeProfileMesg(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 Name field /// Returns byte[] representing the Name field public byte[] GetName() { return (byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField); } /// /// Retrieves the Name field /// Returns String representing the Name field public String GetNameAsString() { return Encoding.UTF8.GetString((byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField)); } /// /// Set Name field /// field value to be set public void SetName(String name_) { SetFieldValue(0, 0, System.Text.Encoding.UTF8.GetBytes(name_), Fit.SubfieldIndexMainField); } /// /// Set Name field /// field value to be set public void SetName(byte[] name_) { SetFieldValue(0, 0, name_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Sport field /// Returns nullable Sport enum representing the Sport field public Sport? GetSport() { object obj = GetFieldValue(1, 0, Fit.SubfieldIndexMainField); Sport? value = obj == null ? (Sport?)null : (Sport)obj; return value; } /// /// Set Sport field /// Nullable field value to be set public void SetSport(Sport? sport_) { SetFieldValue(1, 0, sport_, Fit.SubfieldIndexMainField); } /// /// Retrieves the SubSport field /// Returns nullable SubSport enum representing the SubSport field public SubSport? GetSubSport() { object obj = GetFieldValue(2, 0, Fit.SubfieldIndexMainField); SubSport? value = obj == null ? (SubSport?)null : (SubSport)obj; return value; } /// /// Set SubSport field /// Nullable field value to be set public void SetSubSport(SubSport? subSport_) { SetFieldValue(2, 0, subSport_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Odometer field /// Units: m /// Returns nullable float representing the Odometer field public float? GetOdometer() { return (float?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField); } /// /// Set Odometer field /// Units: m /// Nullable field value to be set public void SetOdometer(float? odometer_) { SetFieldValue(3, 0, odometer_, Fit.SubfieldIndexMainField); } /// /// Retrieves the BikeSpdAntId field /// Returns nullable ushort representing the BikeSpdAntId field public ushort? GetBikeSpdAntId() { return (ushort?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField); } /// /// Set BikeSpdAntId field /// Nullable field value to be set public void SetBikeSpdAntId(ushort? bikeSpdAntId_) { SetFieldValue(4, 0, bikeSpdAntId_, Fit.SubfieldIndexMainField); } /// /// Retrieves the BikeCadAntId field /// Returns nullable ushort representing the BikeCadAntId field public ushort? GetBikeCadAntId() { return (ushort?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField); } /// /// Set BikeCadAntId field /// Nullable field value to be set public void SetBikeCadAntId(ushort? bikeCadAntId_) { SetFieldValue(5, 0, bikeCadAntId_, Fit.SubfieldIndexMainField); } /// /// Retrieves the BikeSpdcadAntId field /// Returns nullable ushort representing the BikeSpdcadAntId field public ushort? GetBikeSpdcadAntId() { return (ushort?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField); } /// /// Set BikeSpdcadAntId field /// Nullable field value to be set public void SetBikeSpdcadAntId(ushort? bikeSpdcadAntId_) { SetFieldValue(6, 0, bikeSpdcadAntId_, Fit.SubfieldIndexMainField); } /// /// Retrieves the BikePowerAntId field /// Returns nullable ushort representing the BikePowerAntId field public ushort? GetBikePowerAntId() { return (ushort?)GetFieldValue(7, 0, Fit.SubfieldIndexMainField); } /// /// Set BikePowerAntId field /// Nullable field value to be set public void SetBikePowerAntId(ushort? bikePowerAntId_) { SetFieldValue(7, 0, bikePowerAntId_, Fit.SubfieldIndexMainField); } /// /// Retrieves the CustomWheelsize field /// Units: m /// Returns nullable float representing the CustomWheelsize field public float? GetCustomWheelsize() { return (float?)GetFieldValue(8, 0, Fit.SubfieldIndexMainField); } /// /// Set CustomWheelsize field /// Units: m /// Nullable field value to be set public void SetCustomWheelsize(float? customWheelsize_) { SetFieldValue(8, 0, customWheelsize_, Fit.SubfieldIndexMainField); } /// /// Retrieves the AutoWheelsize field /// Units: m /// Returns nullable float representing the AutoWheelsize field public float? GetAutoWheelsize() { return (float?)GetFieldValue(9, 0, Fit.SubfieldIndexMainField); } /// /// Set AutoWheelsize field /// Units: m /// Nullable field value to be set public void SetAutoWheelsize(float? autoWheelsize_) { SetFieldValue(9, 0, autoWheelsize_, Fit.SubfieldIndexMainField); } /// /// Retrieves the BikeWeight field /// Units: kg /// Returns nullable float representing the BikeWeight field public float? GetBikeWeight() { return (float?)GetFieldValue(10, 0, Fit.SubfieldIndexMainField); } /// /// Set BikeWeight field /// Units: kg /// Nullable field value to be set public void SetBikeWeight(float? bikeWeight_) { SetFieldValue(10, 0, bikeWeight_, Fit.SubfieldIndexMainField); } /// /// Retrieves the PowerCalFactor field /// Units: % /// Returns nullable float representing the PowerCalFactor field public float? GetPowerCalFactor() { return (float?)GetFieldValue(11, 0, Fit.SubfieldIndexMainField); } /// /// Set PowerCalFactor field /// Units: % /// Nullable field value to be set public void SetPowerCalFactor(float? powerCalFactor_) { SetFieldValue(11, 0, powerCalFactor_, Fit.SubfieldIndexMainField); } /// /// Retrieves the AutoWheelCal field /// Returns nullable Bool enum representing the AutoWheelCal field public Bool? GetAutoWheelCal() { object obj = GetFieldValue(12, 0, Fit.SubfieldIndexMainField); Bool? value = obj == null ? (Bool?)null : (Bool)obj; return value; } /// /// Set AutoWheelCal field /// Nullable field value to be set public void SetAutoWheelCal(Bool? autoWheelCal_) { SetFieldValue(12, 0, autoWheelCal_, Fit.SubfieldIndexMainField); } /// /// Retrieves the AutoPowerZero field /// Returns nullable Bool enum representing the AutoPowerZero field public Bool? GetAutoPowerZero() { object obj = GetFieldValue(13, 0, Fit.SubfieldIndexMainField); Bool? value = obj == null ? (Bool?)null : (Bool)obj; return value; } /// /// Set AutoPowerZero field /// Nullable field value to be set public void SetAutoPowerZero(Bool? autoPowerZero_) { SetFieldValue(13, 0, autoPowerZero_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Id field /// Returns nullable byte representing the Id field public byte? GetId() { return (byte?)GetFieldValue(14, 0, Fit.SubfieldIndexMainField); } /// /// Set Id field /// Nullable field value to be set public void SetId(byte? id_) { SetFieldValue(14, 0, id_, Fit.SubfieldIndexMainField); } /// /// Retrieves the SpdEnabled field /// Returns nullable Bool enum representing the SpdEnabled field public Bool? GetSpdEnabled() { object obj = GetFieldValue(15, 0, Fit.SubfieldIndexMainField); Bool? value = obj == null ? (Bool?)null : (Bool)obj; return value; } /// /// Set SpdEnabled field /// Nullable field value to be set public void SetSpdEnabled(Bool? spdEnabled_) { SetFieldValue(15, 0, spdEnabled_, Fit.SubfieldIndexMainField); } /// /// Retrieves the CadEnabled field /// Returns nullable Bool enum representing the CadEnabled field public Bool? GetCadEnabled() { object obj = GetFieldValue(16, 0, Fit.SubfieldIndexMainField); Bool? value = obj == null ? (Bool?)null : (Bool)obj; return value; } /// /// Set CadEnabled field /// Nullable field value to be set public void SetCadEnabled(Bool? cadEnabled_) { SetFieldValue(16, 0, cadEnabled_, Fit.SubfieldIndexMainField); } /// /// Retrieves the SpdcadEnabled field /// Returns nullable Bool enum representing the SpdcadEnabled field public Bool? GetSpdcadEnabled() { object obj = GetFieldValue(17, 0, Fit.SubfieldIndexMainField); Bool? value = obj == null ? (Bool?)null : (Bool)obj; return value; } /// /// Set SpdcadEnabled field /// Nullable field value to be set public void SetSpdcadEnabled(Bool? spdcadEnabled_) { SetFieldValue(17, 0, spdcadEnabled_, Fit.SubfieldIndexMainField); } /// /// Retrieves the PowerEnabled field /// Returns nullable Bool enum representing the PowerEnabled field public Bool? GetPowerEnabled() { object obj = GetFieldValue(18, 0, Fit.SubfieldIndexMainField); Bool? value = obj == null ? (Bool?)null : (Bool)obj; return value; } /// /// Set PowerEnabled field /// Nullable field value to be set public void SetPowerEnabled(Bool? powerEnabled_) { SetFieldValue(18, 0, powerEnabled_, Fit.SubfieldIndexMainField); } /// /// Retrieves the CrankLength field /// Units: mm /// Returns nullable float representing the CrankLength field public float? GetCrankLength() { return (float?)GetFieldValue(19, 0, Fit.SubfieldIndexMainField); } /// /// Set CrankLength field /// Units: mm /// Nullable field value to be set public void SetCrankLength(float? crankLength_) { SetFieldValue(19, 0, crankLength_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Enabled field /// Returns nullable Bool enum representing the Enabled field public Bool? GetEnabled() { object obj = GetFieldValue(20, 0, Fit.SubfieldIndexMainField); Bool? value = obj == null ? (Bool?)null : (Bool)obj; return value; } /// /// Set Enabled field /// Nullable field value to be set public void SetEnabled(Bool? enabled_) { SetFieldValue(20, 0, enabled_, Fit.SubfieldIndexMainField); } /// /// Retrieves the BikeSpdAntIdTransType field /// Returns nullable byte representing the BikeSpdAntIdTransType field public byte? GetBikeSpdAntIdTransType() { return (byte?)GetFieldValue(21, 0, Fit.SubfieldIndexMainField); } /// /// Set BikeSpdAntIdTransType field /// Nullable field value to be set public void SetBikeSpdAntIdTransType(byte? bikeSpdAntIdTransType_) { SetFieldValue(21, 0, bikeSpdAntIdTransType_, Fit.SubfieldIndexMainField); } /// /// Retrieves the BikeCadAntIdTransType field /// Returns nullable byte representing the BikeCadAntIdTransType field public byte? GetBikeCadAntIdTransType() { return (byte?)GetFieldValue(22, 0, Fit.SubfieldIndexMainField); } /// /// Set BikeCadAntIdTransType field /// Nullable field value to be set public void SetBikeCadAntIdTransType(byte? bikeCadAntIdTransType_) { SetFieldValue(22, 0, bikeCadAntIdTransType_, Fit.SubfieldIndexMainField); } /// /// Retrieves the BikeSpdcadAntIdTransType field /// Returns nullable byte representing the BikeSpdcadAntIdTransType field public byte? GetBikeSpdcadAntIdTransType() { return (byte?)GetFieldValue(23, 0, Fit.SubfieldIndexMainField); } /// /// Set BikeSpdcadAntIdTransType field /// Nullable field value to be set public void SetBikeSpdcadAntIdTransType(byte? bikeSpdcadAntIdTransType_) { SetFieldValue(23, 0, bikeSpdcadAntIdTransType_, Fit.SubfieldIndexMainField); } /// /// Retrieves the BikePowerAntIdTransType field /// Returns nullable byte representing the BikePowerAntIdTransType field public byte? GetBikePowerAntIdTransType() { return (byte?)GetFieldValue(24, 0, Fit.SubfieldIndexMainField); } /// /// Set BikePowerAntIdTransType field /// Nullable field value to be set public void SetBikePowerAntIdTransType(byte? bikePowerAntIdTransType_) { SetFieldValue(24, 0, bikePowerAntIdTransType_, Fit.SubfieldIndexMainField); } /// /// Retrieves the OdometerRollover field /// Comment: Rollover counter that can be used to extend the odometer /// Returns nullable byte representing the OdometerRollover field public byte? GetOdometerRollover() { return (byte?)GetFieldValue(37, 0, Fit.SubfieldIndexMainField); } /// /// Set OdometerRollover field /// Comment: Rollover counter that can be used to extend the odometer /// Nullable field value to be set public void SetOdometerRollover(byte? odometerRollover_) { SetFieldValue(37, 0, odometerRollover_, Fit.SubfieldIndexMainField); } /// /// Retrieves the FrontGearNum field /// Comment: Number of front gears /// Returns nullable byte representing the FrontGearNum field public byte? GetFrontGearNum() { return (byte?)GetFieldValue(38, 0, Fit.SubfieldIndexMainField); } /// /// Set FrontGearNum field /// Comment: Number of front gears /// Nullable field value to be set public void SetFrontGearNum(byte? frontGearNum_) { SetFieldValue(38, 0, frontGearNum_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field FrontGear public int GetNumFrontGear() { return GetNumFieldValues(39, Fit.SubfieldIndexMainField); } /// /// Retrieves the FrontGear field /// Comment: Number of teeth on each gear 0 is innermost /// 0 based index of FrontGear element to retrieve /// Returns nullable byte representing the FrontGear field public byte? GetFrontGear(int index) { return (byte?)GetFieldValue(39, index, Fit.SubfieldIndexMainField); } /// /// Set FrontGear field /// Comment: Number of teeth on each gear 0 is innermost /// 0 based index of front_gear /// Nullable field value to be set public void SetFrontGear(int index, byte? frontGear_) { SetFieldValue(39, index, frontGear_, Fit.SubfieldIndexMainField); } /// /// Retrieves the RearGearNum field /// Comment: Number of rear gears /// Returns nullable byte representing the RearGearNum field public byte? GetRearGearNum() { return (byte?)GetFieldValue(40, 0, Fit.SubfieldIndexMainField); } /// /// Set RearGearNum field /// Comment: Number of rear gears /// Nullable field value to be set public void SetRearGearNum(byte? rearGearNum_) { SetFieldValue(40, 0, rearGearNum_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field RearGear public int GetNumRearGear() { return GetNumFieldValues(41, Fit.SubfieldIndexMainField); } /// /// Retrieves the RearGear field /// Comment: Number of teeth on each gear 0 is innermost /// 0 based index of RearGear element to retrieve /// Returns nullable byte representing the RearGear field public byte? GetRearGear(int index) { return (byte?)GetFieldValue(41, index, Fit.SubfieldIndexMainField); } /// /// Set RearGear field /// Comment: Number of teeth on each gear 0 is innermost /// 0 based index of rear_gear /// Nullable field value to be set public void SetRearGear(int index, byte? rearGear_) { SetFieldValue(41, index, rearGear_, Fit.SubfieldIndexMainField); } /// /// Retrieves the ShimanoDi2Enabled field /// Returns nullable Bool enum representing the ShimanoDi2Enabled field public Bool? GetShimanoDi2Enabled() { object obj = GetFieldValue(44, 0, Fit.SubfieldIndexMainField); Bool? value = obj == null ? (Bool?)null : (Bool)obj; return value; } /// /// Set ShimanoDi2Enabled field /// Nullable field value to be set public void SetShimanoDi2Enabled(Bool? shimanoDi2Enabled_) { SetFieldValue(44, 0, shimanoDi2Enabled_, Fit.SubfieldIndexMainField); } #endregion // Methods } // Class } // namespace