SegmentIdMesg.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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 SegmentId profile message.
  27. /// </summary>
  28. public class SegmentIdMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public SegmentIdMesg() : base(Profile.GetMesg(MesgNum.SegmentId))
  34. {
  35. }
  36. public SegmentIdMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the Name field
  43. /// Comment: Friendly name assigned to segment</summary>
  44. /// <returns>Returns byte[] representing the Name field</returns>
  45. public byte[] GetName()
  46. {
  47. return (byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  48. }
  49. ///<summary>
  50. /// Retrieves the Name field
  51. /// Comment: Friendly name assigned to segment</summary>
  52. /// <returns>Returns String representing the Name field</returns>
  53. public String GetNameAsString()
  54. {
  55. return Encoding.UTF8.GetString((byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField));
  56. }
  57. ///<summary>
  58. /// Set Name field
  59. /// Comment: Friendly name assigned to segment</summary>
  60. /// <param name="name_"> field value to be set</param>
  61. public void SetName(String name_)
  62. {
  63. SetFieldValue(0, 0, System.Text.Encoding.UTF8.GetBytes(name_), Fit.SubfieldIndexMainField);
  64. }
  65. /// <summary>
  66. /// Set Name field
  67. /// Comment: Friendly name assigned to segment</summary>
  68. /// <param name="name_">field value to be set</param>
  69. public void SetName(byte[] name_)
  70. {
  71. SetFieldValue(0, 0, name_, Fit.SubfieldIndexMainField);
  72. }
  73. ///<summary>
  74. /// Retrieves the Uuid field
  75. /// Comment: UUID of the segment</summary>
  76. /// <returns>Returns byte[] representing the Uuid field</returns>
  77. public byte[] GetUuid()
  78. {
  79. return (byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  80. }
  81. ///<summary>
  82. /// Retrieves the Uuid field
  83. /// Comment: UUID of the segment</summary>
  84. /// <returns>Returns String representing the Uuid field</returns>
  85. public String GetUuidAsString()
  86. {
  87. return Encoding.UTF8.GetString((byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField));
  88. }
  89. ///<summary>
  90. /// Set Uuid field
  91. /// Comment: UUID of the segment</summary>
  92. /// <param name="uuid_"> field value to be set</param>
  93. public void SetUuid(String uuid_)
  94. {
  95. SetFieldValue(1, 0, System.Text.Encoding.UTF8.GetBytes(uuid_), Fit.SubfieldIndexMainField);
  96. }
  97. /// <summary>
  98. /// Set Uuid field
  99. /// Comment: UUID of the segment</summary>
  100. /// <param name="uuid_">field value to be set</param>
  101. public void SetUuid(byte[] uuid_)
  102. {
  103. SetFieldValue(1, 0, uuid_, Fit.SubfieldIndexMainField);
  104. }
  105. ///<summary>
  106. /// Retrieves the Sport field
  107. /// Comment: Sport associated with the segment</summary>
  108. /// <returns>Returns nullable Sport enum representing the Sport field</returns>
  109. public Sport? GetSport()
  110. {
  111. object obj = GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  112. Sport? value = obj == null ? (Sport?)null : (Sport)obj;
  113. return value;
  114. }
  115. /// <summary>
  116. /// Set Sport field
  117. /// Comment: Sport associated with the segment</summary>
  118. /// <param name="sport_">Nullable field value to be set</param>
  119. public void SetSport(Sport? sport_)
  120. {
  121. SetFieldValue(2, 0, sport_, Fit.SubfieldIndexMainField);
  122. }
  123. ///<summary>
  124. /// Retrieves the Enabled field
  125. /// Comment: Segment enabled for evaluation</summary>
  126. /// <returns>Returns nullable Bool enum representing the Enabled field</returns>
  127. public Bool? GetEnabled()
  128. {
  129. object obj = GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  130. Bool? value = obj == null ? (Bool?)null : (Bool)obj;
  131. return value;
  132. }
  133. /// <summary>
  134. /// Set Enabled field
  135. /// Comment: Segment enabled for evaluation</summary>
  136. /// <param name="enabled_">Nullable field value to be set</param>
  137. public void SetEnabled(Bool? enabled_)
  138. {
  139. SetFieldValue(3, 0, enabled_, Fit.SubfieldIndexMainField);
  140. }
  141. ///<summary>
  142. /// Retrieves the UserProfilePrimaryKey field
  143. /// Comment: Primary key of the user that created the segment </summary>
  144. /// <returns>Returns nullable uint representing the UserProfilePrimaryKey field</returns>
  145. public uint? GetUserProfilePrimaryKey()
  146. {
  147. return (uint?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  148. }
  149. /// <summary>
  150. /// Set UserProfilePrimaryKey field
  151. /// Comment: Primary key of the user that created the segment </summary>
  152. /// <param name="userProfilePrimaryKey_">Nullable field value to be set</param>
  153. public void SetUserProfilePrimaryKey(uint? userProfilePrimaryKey_)
  154. {
  155. SetFieldValue(4, 0, userProfilePrimaryKey_, Fit.SubfieldIndexMainField);
  156. }
  157. ///<summary>
  158. /// Retrieves the DeviceId field
  159. /// Comment: ID of the device that created the segment</summary>
  160. /// <returns>Returns nullable uint representing the DeviceId field</returns>
  161. public uint? GetDeviceId()
  162. {
  163. return (uint?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
  164. }
  165. /// <summary>
  166. /// Set DeviceId field
  167. /// Comment: ID of the device that created the segment</summary>
  168. /// <param name="deviceId_">Nullable field value to be set</param>
  169. public void SetDeviceId(uint? deviceId_)
  170. {
  171. SetFieldValue(5, 0, deviceId_, Fit.SubfieldIndexMainField);
  172. }
  173. ///<summary>
  174. /// Retrieves the DefaultRaceLeader field
  175. /// Comment: Index for the Leader Board entry selected as the default race participant</summary>
  176. /// <returns>Returns nullable byte representing the DefaultRaceLeader field</returns>
  177. public byte? GetDefaultRaceLeader()
  178. {
  179. return (byte?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
  180. }
  181. /// <summary>
  182. /// Set DefaultRaceLeader field
  183. /// Comment: Index for the Leader Board entry selected as the default race participant</summary>
  184. /// <param name="defaultRaceLeader_">Nullable field value to be set</param>
  185. public void SetDefaultRaceLeader(byte? defaultRaceLeader_)
  186. {
  187. SetFieldValue(6, 0, defaultRaceLeader_, Fit.SubfieldIndexMainField);
  188. }
  189. ///<summary>
  190. /// Retrieves the DeleteStatus field
  191. /// Comment: Indicates if any segments should be deleted</summary>
  192. /// <returns>Returns nullable SegmentDeleteStatus enum representing the DeleteStatus field</returns>
  193. public SegmentDeleteStatus? GetDeleteStatus()
  194. {
  195. object obj = GetFieldValue(7, 0, Fit.SubfieldIndexMainField);
  196. SegmentDeleteStatus? value = obj == null ? (SegmentDeleteStatus?)null : (SegmentDeleteStatus)obj;
  197. return value;
  198. }
  199. /// <summary>
  200. /// Set DeleteStatus field
  201. /// Comment: Indicates if any segments should be deleted</summary>
  202. /// <param name="deleteStatus_">Nullable field value to be set</param>
  203. public void SetDeleteStatus(SegmentDeleteStatus? deleteStatus_)
  204. {
  205. SetFieldValue(7, 0, deleteStatus_, Fit.SubfieldIndexMainField);
  206. }
  207. ///<summary>
  208. /// Retrieves the SelectionType field
  209. /// Comment: Indicates how the segment was selected to be sent to the device</summary>
  210. /// <returns>Returns nullable SegmentSelectionType enum representing the SelectionType field</returns>
  211. public SegmentSelectionType? GetSelectionType()
  212. {
  213. object obj = GetFieldValue(8, 0, Fit.SubfieldIndexMainField);
  214. SegmentSelectionType? value = obj == null ? (SegmentSelectionType?)null : (SegmentSelectionType)obj;
  215. return value;
  216. }
  217. /// <summary>
  218. /// Set SelectionType field
  219. /// Comment: Indicates how the segment was selected to be sent to the device</summary>
  220. /// <param name="selectionType_">Nullable field value to be set</param>
  221. public void SetSelectionType(SegmentSelectionType? selectionType_)
  222. {
  223. SetFieldValue(8, 0, selectionType_, Fit.SubfieldIndexMainField);
  224. }
  225. #endregion // Methods
  226. } // Class
  227. } // namespace