SegmentLeaderboardEntryMesg.cs 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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 SegmentLeaderboardEntry profile message.
  27. /// </summary>
  28. public class SegmentLeaderboardEntryMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public SegmentLeaderboardEntryMesg() : base(Profile.GetMesg(MesgNum.SegmentLeaderboardEntry))
  34. {
  35. }
  36. public SegmentLeaderboardEntryMesg(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 Name field
  57. /// Comment: Friendly name assigned to leader</summary>
  58. /// <returns>Returns byte[] representing the Name field</returns>
  59. public byte[] GetName()
  60. {
  61. return (byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  62. }
  63. ///<summary>
  64. /// Retrieves the Name field
  65. /// Comment: Friendly name assigned to leader</summary>
  66. /// <returns>Returns String representing the Name field</returns>
  67. public String GetNameAsString()
  68. {
  69. return Encoding.UTF8.GetString((byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField));
  70. }
  71. ///<summary>
  72. /// Set Name field
  73. /// Comment: Friendly name assigned to leader</summary>
  74. /// <param name="name_"> field value to be set</param>
  75. public void SetName(String name_)
  76. {
  77. SetFieldValue(0, 0, System.Text.Encoding.UTF8.GetBytes(name_), Fit.SubfieldIndexMainField);
  78. }
  79. /// <summary>
  80. /// Set Name field
  81. /// Comment: Friendly name assigned to leader</summary>
  82. /// <param name="name_">field value to be set</param>
  83. public void SetName(byte[] name_)
  84. {
  85. SetFieldValue(0, 0, name_, Fit.SubfieldIndexMainField);
  86. }
  87. ///<summary>
  88. /// Retrieves the Type field
  89. /// Comment: Leader classification</summary>
  90. /// <returns>Returns nullable SegmentLeaderboardType enum representing the Type field</returns>
  91. new public SegmentLeaderboardType? GetType()
  92. {
  93. object obj = GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  94. SegmentLeaderboardType? value = obj == null ? (SegmentLeaderboardType?)null : (SegmentLeaderboardType)obj;
  95. return value;
  96. }
  97. /// <summary>
  98. /// Set Type field
  99. /// Comment: Leader classification</summary>
  100. /// <param name="type_">Nullable field value to be set</param>
  101. public void SetType(SegmentLeaderboardType? type_)
  102. {
  103. SetFieldValue(1, 0, type_, Fit.SubfieldIndexMainField);
  104. }
  105. ///<summary>
  106. /// Retrieves the GroupPrimaryKey field
  107. /// Comment: Primary user ID of this leader</summary>
  108. /// <returns>Returns nullable uint representing the GroupPrimaryKey field</returns>
  109. public uint? GetGroupPrimaryKey()
  110. {
  111. return (uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  112. }
  113. /// <summary>
  114. /// Set GroupPrimaryKey field
  115. /// Comment: Primary user ID of this leader</summary>
  116. /// <param name="groupPrimaryKey_">Nullable field value to be set</param>
  117. public void SetGroupPrimaryKey(uint? groupPrimaryKey_)
  118. {
  119. SetFieldValue(2, 0, groupPrimaryKey_, Fit.SubfieldIndexMainField);
  120. }
  121. ///<summary>
  122. /// Retrieves the ActivityId field
  123. /// Comment: ID of the activity associated with this leader time</summary>
  124. /// <returns>Returns nullable uint representing the ActivityId field</returns>
  125. public uint? GetActivityId()
  126. {
  127. return (uint?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  128. }
  129. /// <summary>
  130. /// Set ActivityId field
  131. /// Comment: ID of the activity associated with this leader time</summary>
  132. /// <param name="activityId_">Nullable field value to be set</param>
  133. public void SetActivityId(uint? activityId_)
  134. {
  135. SetFieldValue(3, 0, activityId_, Fit.SubfieldIndexMainField);
  136. }
  137. ///<summary>
  138. /// Retrieves the SegmentTime field
  139. /// Units: s
  140. /// Comment: Segment Time (includes pauses)</summary>
  141. /// <returns>Returns nullable float representing the SegmentTime field</returns>
  142. public float? GetSegmentTime()
  143. {
  144. return (float?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  145. }
  146. /// <summary>
  147. /// Set SegmentTime field
  148. /// Units: s
  149. /// Comment: Segment Time (includes pauses)</summary>
  150. /// <param name="segmentTime_">Nullable field value to be set</param>
  151. public void SetSegmentTime(float? segmentTime_)
  152. {
  153. SetFieldValue(4, 0, segmentTime_, Fit.SubfieldIndexMainField);
  154. }
  155. ///<summary>
  156. /// Retrieves the ActivityIdString field
  157. /// Comment: String version of the activity_id. 21 characters long, express in decimal</summary>
  158. /// <returns>Returns byte[] representing the ActivityIdString field</returns>
  159. public byte[] GetActivityIdString()
  160. {
  161. return (byte[])GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
  162. }
  163. ///<summary>
  164. /// Retrieves the ActivityIdString field
  165. /// Comment: String version of the activity_id. 21 characters long, express in decimal</summary>
  166. /// <returns>Returns String representing the ActivityIdString field</returns>
  167. public String GetActivityIdStringAsString()
  168. {
  169. return Encoding.UTF8.GetString((byte[])GetFieldValue(5, 0, Fit.SubfieldIndexMainField));
  170. }
  171. ///<summary>
  172. /// Set ActivityIdString field
  173. /// Comment: String version of the activity_id. 21 characters long, express in decimal</summary>
  174. /// <param name="activityIdString_"> field value to be set</param>
  175. public void SetActivityIdString(String activityIdString_)
  176. {
  177. SetFieldValue(5, 0, System.Text.Encoding.UTF8.GetBytes(activityIdString_), Fit.SubfieldIndexMainField);
  178. }
  179. /// <summary>
  180. /// Set ActivityIdString field
  181. /// Comment: String version of the activity_id. 21 characters long, express in decimal</summary>
  182. /// <param name="activityIdString_">field value to be set</param>
  183. public void SetActivityIdString(byte[] activityIdString_)
  184. {
  185. SetFieldValue(5, 0, activityIdString_, Fit.SubfieldIndexMainField);
  186. }
  187. #endregion // Methods
  188. } // Class
  189. } // namespace