#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 Goal profile message. /// public class GoalMesg : Mesg { #region Fields #endregion #region Constructors public GoalMesg() : base(Profile.GetMesg(MesgNum.Goal)) { } public GoalMesg(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 Sport field /// Returns nullable Sport enum representing the Sport field public Sport? GetSport() { object obj = GetFieldValue(0, 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(0, 0, sport_, Fit.SubfieldIndexMainField); } /// /// Retrieves the SubSport field /// Returns nullable SubSport enum representing the SubSport field public SubSport? GetSubSport() { object obj = GetFieldValue(1, 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(1, 0, subSport_, Fit.SubfieldIndexMainField); } /// /// Retrieves the StartDate field /// Returns DateTime representing the StartDate field public DateTime GetStartDate() { return TimestampToDateTime((uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField)); } /// /// Set StartDate field /// Nullable field value to be set public void SetStartDate(DateTime startDate_) { SetFieldValue(2, 0, startDate_.GetTimeStamp(), Fit.SubfieldIndexMainField); } /// /// Retrieves the EndDate field /// Returns DateTime representing the EndDate field public DateTime GetEndDate() { return TimestampToDateTime((uint?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField)); } /// /// Set EndDate field /// Nullable field value to be set public void SetEndDate(DateTime endDate_) { SetFieldValue(3, 0, endDate_.GetTimeStamp(), Fit.SubfieldIndexMainField); } /// /// Retrieves the Type field /// Returns nullable Goal enum representing the Type field new public Goal? GetType() { object obj = GetFieldValue(4, 0, Fit.SubfieldIndexMainField); Goal? value = obj == null ? (Goal?)null : (Goal)obj; return value; } /// /// Set Type field /// Nullable field value to be set public void SetType(Goal? type_) { SetFieldValue(4, 0, type_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Value field /// Returns nullable uint representing the Value field public uint? GetValue() { return (uint?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField); } /// /// Set Value field /// Nullable field value to be set public void SetValue(uint? value_) { SetFieldValue(5, 0, value_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Repeat field /// Returns nullable Bool enum representing the Repeat field public Bool? GetRepeat() { object obj = GetFieldValue(6, 0, Fit.SubfieldIndexMainField); Bool? value = obj == null ? (Bool?)null : (Bool)obj; return value; } /// /// Set Repeat field /// Nullable field value to be set public void SetRepeat(Bool? repeat_) { SetFieldValue(6, 0, repeat_, Fit.SubfieldIndexMainField); } /// /// Retrieves the TargetValue field /// Returns nullable uint representing the TargetValue field public uint? GetTargetValue() { return (uint?)GetFieldValue(7, 0, Fit.SubfieldIndexMainField); } /// /// Set TargetValue field /// Nullable field value to be set public void SetTargetValue(uint? targetValue_) { SetFieldValue(7, 0, targetValue_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Recurrence field /// Returns nullable GoalRecurrence enum representing the Recurrence field public GoalRecurrence? GetRecurrence() { object obj = GetFieldValue(8, 0, Fit.SubfieldIndexMainField); GoalRecurrence? value = obj == null ? (GoalRecurrence?)null : (GoalRecurrence)obj; return value; } /// /// Set Recurrence field /// Nullable field value to be set public void SetRecurrence(GoalRecurrence? recurrence_) { SetFieldValue(8, 0, recurrence_, Fit.SubfieldIndexMainField); } /// /// Retrieves the RecurrenceValue field /// Returns nullable ushort representing the RecurrenceValue field public ushort? GetRecurrenceValue() { return (ushort?)GetFieldValue(9, 0, Fit.SubfieldIndexMainField); } /// /// Set RecurrenceValue field /// Nullable field value to be set public void SetRecurrenceValue(ushort? recurrenceValue_) { SetFieldValue(9, 0, recurrenceValue_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Enabled field /// Returns nullable Bool enum representing the Enabled field public Bool? GetEnabled() { object obj = GetFieldValue(10, 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(10, 0, enabled_, Fit.SubfieldIndexMainField); } #endregion // Methods } // Class } // namespace