GoalMesg.cs 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. #region Copyright
  2. ////////////////////////////////////////////////////////////////////////////////
  3. // The following FIT Protocol software provided may be used with FIT protocol
  4. // devices only and remains the copyrighted property of Dynastream Innovations Inc.
  5. // The software is being provided on an "as-is" basis and as an accommodation,
  6. // and therefore all warranties, representations, or guarantees of any kind
  7. // (whether express, implied or statutory) including, without limitation,
  8. // warranties of merchantability, non-infringement, or fitness for a particular
  9. // purpose, are specifically disclaimed.
  10. //
  11. // Copyright 2016 Dynastream Innovations Inc.
  12. ////////////////////////////////////////////////////////////////////////////////
  13. // ****WARNING**** This file is auto-generated! Do NOT edit this file.
  14. // Profile Version = 16.60Release
  15. // Tag = production-akw-16.60.00-0-g5d3d436
  16. ////////////////////////////////////////////////////////////////////////////////
  17. #endregion
  18. using System;
  19. using System.Collections.Generic;
  20. using System.Diagnostics;
  21. using System.Text;
  22. using System.IO;
  23. namespace Dynastream.Fit
  24. {
  25. /// <summary>
  26. /// Implements the Goal profile message.
  27. /// </summary>
  28. public class GoalMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public GoalMesg() : base(Profile.GetMesg(MesgNum.Goal))
  34. {
  35. }
  36. public GoalMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the MessageIndex field</summary>
  43. /// <returns>Returns nullable ushort representing the MessageIndex field</returns>
  44. public ushort? GetMessageIndex()
  45. {
  46. return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
  47. }
  48. /// <summary>
  49. /// Set MessageIndex field</summary>
  50. /// <param name="messageIndex_">Nullable field value to be set</param>
  51. public void SetMessageIndex(ushort? messageIndex_)
  52. {
  53. SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
  54. }
  55. ///<summary>
  56. /// Retrieves the Sport field</summary>
  57. /// <returns>Returns nullable Sport enum representing the Sport field</returns>
  58. public Sport? GetSport()
  59. {
  60. object obj = GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  61. Sport? value = obj == null ? (Sport?)null : (Sport)obj;
  62. return value;
  63. }
  64. /// <summary>
  65. /// Set Sport field</summary>
  66. /// <param name="sport_">Nullable field value to be set</param>
  67. public void SetSport(Sport? sport_)
  68. {
  69. SetFieldValue(0, 0, sport_, Fit.SubfieldIndexMainField);
  70. }
  71. ///<summary>
  72. /// Retrieves the SubSport field</summary>
  73. /// <returns>Returns nullable SubSport enum representing the SubSport field</returns>
  74. public SubSport? GetSubSport()
  75. {
  76. object obj = GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  77. SubSport? value = obj == null ? (SubSport?)null : (SubSport)obj;
  78. return value;
  79. }
  80. /// <summary>
  81. /// Set SubSport field</summary>
  82. /// <param name="subSport_">Nullable field value to be set</param>
  83. public void SetSubSport(SubSport? subSport_)
  84. {
  85. SetFieldValue(1, 0, subSport_, Fit.SubfieldIndexMainField);
  86. }
  87. ///<summary>
  88. /// Retrieves the StartDate field</summary>
  89. /// <returns>Returns DateTime representing the StartDate field</returns>
  90. public DateTime GetStartDate()
  91. {
  92. return TimestampToDateTime((uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField));
  93. }
  94. /// <summary>
  95. /// Set StartDate field</summary>
  96. /// <param name="startDate_">Nullable field value to be set</param>
  97. public void SetStartDate(DateTime startDate_)
  98. {
  99. SetFieldValue(2, 0, startDate_.GetTimeStamp(), Fit.SubfieldIndexMainField);
  100. }
  101. ///<summary>
  102. /// Retrieves the EndDate field</summary>
  103. /// <returns>Returns DateTime representing the EndDate field</returns>
  104. public DateTime GetEndDate()
  105. {
  106. return TimestampToDateTime((uint?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField));
  107. }
  108. /// <summary>
  109. /// Set EndDate field</summary>
  110. /// <param name="endDate_">Nullable field value to be set</param>
  111. public void SetEndDate(DateTime endDate_)
  112. {
  113. SetFieldValue(3, 0, endDate_.GetTimeStamp(), Fit.SubfieldIndexMainField);
  114. }
  115. ///<summary>
  116. /// Retrieves the Type field</summary>
  117. /// <returns>Returns nullable Goal enum representing the Type field</returns>
  118. new public Goal? GetType()
  119. {
  120. object obj = GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  121. Goal? value = obj == null ? (Goal?)null : (Goal)obj;
  122. return value;
  123. }
  124. /// <summary>
  125. /// Set Type field</summary>
  126. /// <param name="type_">Nullable field value to be set</param>
  127. public void SetType(Goal? type_)
  128. {
  129. SetFieldValue(4, 0, type_, Fit.SubfieldIndexMainField);
  130. }
  131. ///<summary>
  132. /// Retrieves the Value field</summary>
  133. /// <returns>Returns nullable uint representing the Value field</returns>
  134. public uint? GetValue()
  135. {
  136. return (uint?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
  137. }
  138. /// <summary>
  139. /// Set Value field</summary>
  140. /// <param name="value_">Nullable field value to be set</param>
  141. public void SetValue(uint? value_)
  142. {
  143. SetFieldValue(5, 0, value_, Fit.SubfieldIndexMainField);
  144. }
  145. ///<summary>
  146. /// Retrieves the Repeat field</summary>
  147. /// <returns>Returns nullable Bool enum representing the Repeat field</returns>
  148. public Bool? GetRepeat()
  149. {
  150. object obj = GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
  151. Bool? value = obj == null ? (Bool?)null : (Bool)obj;
  152. return value;
  153. }
  154. /// <summary>
  155. /// Set Repeat field</summary>
  156. /// <param name="repeat_">Nullable field value to be set</param>
  157. public void SetRepeat(Bool? repeat_)
  158. {
  159. SetFieldValue(6, 0, repeat_, Fit.SubfieldIndexMainField);
  160. }
  161. ///<summary>
  162. /// Retrieves the TargetValue field</summary>
  163. /// <returns>Returns nullable uint representing the TargetValue field</returns>
  164. public uint? GetTargetValue()
  165. {
  166. return (uint?)GetFieldValue(7, 0, Fit.SubfieldIndexMainField);
  167. }
  168. /// <summary>
  169. /// Set TargetValue field</summary>
  170. /// <param name="targetValue_">Nullable field value to be set</param>
  171. public void SetTargetValue(uint? targetValue_)
  172. {
  173. SetFieldValue(7, 0, targetValue_, Fit.SubfieldIndexMainField);
  174. }
  175. ///<summary>
  176. /// Retrieves the Recurrence field</summary>
  177. /// <returns>Returns nullable GoalRecurrence enum representing the Recurrence field</returns>
  178. public GoalRecurrence? GetRecurrence()
  179. {
  180. object obj = GetFieldValue(8, 0, Fit.SubfieldIndexMainField);
  181. GoalRecurrence? value = obj == null ? (GoalRecurrence?)null : (GoalRecurrence)obj;
  182. return value;
  183. }
  184. /// <summary>
  185. /// Set Recurrence field</summary>
  186. /// <param name="recurrence_">Nullable field value to be set</param>
  187. public void SetRecurrence(GoalRecurrence? recurrence_)
  188. {
  189. SetFieldValue(8, 0, recurrence_, Fit.SubfieldIndexMainField);
  190. }
  191. ///<summary>
  192. /// Retrieves the RecurrenceValue field</summary>
  193. /// <returns>Returns nullable ushort representing the RecurrenceValue field</returns>
  194. public ushort? GetRecurrenceValue()
  195. {
  196. return (ushort?)GetFieldValue(9, 0, Fit.SubfieldIndexMainField);
  197. }
  198. /// <summary>
  199. /// Set RecurrenceValue field</summary>
  200. /// <param name="recurrenceValue_">Nullable field value to be set</param>
  201. public void SetRecurrenceValue(ushort? recurrenceValue_)
  202. {
  203. SetFieldValue(9, 0, recurrenceValue_, Fit.SubfieldIndexMainField);
  204. }
  205. ///<summary>
  206. /// Retrieves the Enabled field</summary>
  207. /// <returns>Returns nullable Bool enum representing the Enabled field</returns>
  208. public Bool? GetEnabled()
  209. {
  210. object obj = GetFieldValue(10, 0, Fit.SubfieldIndexMainField);
  211. Bool? value = obj == null ? (Bool?)null : (Bool)obj;
  212. return value;
  213. }
  214. /// <summary>
  215. /// Set Enabled field</summary>
  216. /// <param name="enabled_">Nullable field value to be set</param>
  217. public void SetEnabled(Bool? enabled_)
  218. {
  219. SetFieldValue(10, 0, enabled_, Fit.SubfieldIndexMainField);
  220. }
  221. #endregion // Methods
  222. } // Class
  223. } // namespace