ScheduleMesg.cs 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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 Schedule profile message.
  27. /// </summary>
  28. public class ScheduleMesg : Mesg
  29. {
  30. #region Fields
  31. static class ProductSubfield
  32. {
  33. public static ushort GarminProduct = 0;
  34. public static ushort Subfields = 1;
  35. public static ushort Active = Fit.SubfieldIndexActiveSubfield;
  36. public static ushort MainField = Fit.SubfieldIndexMainField;
  37. }
  38. #endregion
  39. #region Constructors
  40. public ScheduleMesg() : base(Profile.GetMesg(MesgNum.Schedule))
  41. {
  42. }
  43. public ScheduleMesg(Mesg mesg) : base(mesg)
  44. {
  45. }
  46. #endregion // Constructors
  47. #region Methods
  48. ///<summary>
  49. /// Retrieves the Manufacturer field
  50. /// Comment: Corresponds to file_id of scheduled workout / course.</summary>
  51. /// <returns>Returns nullable ushort representing the Manufacturer field</returns>
  52. public ushort? GetManufacturer()
  53. {
  54. return (ushort?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  55. }
  56. /// <summary>
  57. /// Set Manufacturer field
  58. /// Comment: Corresponds to file_id of scheduled workout / course.</summary>
  59. /// <param name="manufacturer_">Nullable field value to be set</param>
  60. public void SetManufacturer(ushort? manufacturer_)
  61. {
  62. SetFieldValue(0, 0, manufacturer_, Fit.SubfieldIndexMainField);
  63. }
  64. ///<summary>
  65. /// Retrieves the Product field
  66. /// Comment: Corresponds to file_id of scheduled workout / course.</summary>
  67. /// <returns>Returns nullable ushort representing the Product field</returns>
  68. public ushort? GetProduct()
  69. {
  70. return (ushort?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  71. }
  72. /// <summary>
  73. /// Set Product field
  74. /// Comment: Corresponds to file_id of scheduled workout / course.</summary>
  75. /// <param name="product_">Nullable field value to be set</param>
  76. public void SetProduct(ushort? product_)
  77. {
  78. SetFieldValue(1, 0, product_, Fit.SubfieldIndexMainField);
  79. }
  80. /// <summary>
  81. /// Retrieves the GarminProduct subfield</summary>
  82. /// <returns>Nullable ushort representing the GarminProduct subfield</returns>
  83. public ushort? GetGarminProduct()
  84. {
  85. return (ushort?)GetFieldValue(1, 0, ProductSubfield.GarminProduct);
  86. }
  87. /// <summary>
  88. ///
  89. /// Set GarminProduct subfield</summary>
  90. /// <param name="garminProduct">Subfield value to be set</param>
  91. public void SetGarminProduct(ushort? garminProduct)
  92. {
  93. SetFieldValue(1, 0, garminProduct, ProductSubfield.GarminProduct);
  94. }
  95. ///<summary>
  96. /// Retrieves the SerialNumber field
  97. /// Comment: Corresponds to file_id of scheduled workout / course.</summary>
  98. /// <returns>Returns nullable uint representing the SerialNumber field</returns>
  99. public uint? GetSerialNumber()
  100. {
  101. return (uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  102. }
  103. /// <summary>
  104. /// Set SerialNumber field
  105. /// Comment: Corresponds to file_id of scheduled workout / course.</summary>
  106. /// <param name="serialNumber_">Nullable field value to be set</param>
  107. public void SetSerialNumber(uint? serialNumber_)
  108. {
  109. SetFieldValue(2, 0, serialNumber_, Fit.SubfieldIndexMainField);
  110. }
  111. ///<summary>
  112. /// Retrieves the TimeCreated field
  113. /// Comment: Corresponds to file_id of scheduled workout / course.</summary>
  114. /// <returns>Returns DateTime representing the TimeCreated field</returns>
  115. public DateTime GetTimeCreated()
  116. {
  117. return TimestampToDateTime((uint?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField));
  118. }
  119. /// <summary>
  120. /// Set TimeCreated field
  121. /// Comment: Corresponds to file_id of scheduled workout / course.</summary>
  122. /// <param name="timeCreated_">Nullable field value to be set</param>
  123. public void SetTimeCreated(DateTime timeCreated_)
  124. {
  125. SetFieldValue(3, 0, timeCreated_.GetTimeStamp(), Fit.SubfieldIndexMainField);
  126. }
  127. ///<summary>
  128. /// Retrieves the Completed field
  129. /// Comment: TRUE if this activity has been started</summary>
  130. /// <returns>Returns nullable Bool enum representing the Completed field</returns>
  131. public Bool? GetCompleted()
  132. {
  133. object obj = GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  134. Bool? value = obj == null ? (Bool?)null : (Bool)obj;
  135. return value;
  136. }
  137. /// <summary>
  138. /// Set Completed field
  139. /// Comment: TRUE if this activity has been started</summary>
  140. /// <param name="completed_">Nullable field value to be set</param>
  141. public void SetCompleted(Bool? completed_)
  142. {
  143. SetFieldValue(4, 0, completed_, Fit.SubfieldIndexMainField);
  144. }
  145. ///<summary>
  146. /// Retrieves the Type field</summary>
  147. /// <returns>Returns nullable Schedule enum representing the Type field</returns>
  148. new public Schedule? GetType()
  149. {
  150. object obj = GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
  151. Schedule? value = obj == null ? (Schedule?)null : (Schedule)obj;
  152. return value;
  153. }
  154. /// <summary>
  155. /// Set Type field</summary>
  156. /// <param name="type_">Nullable field value to be set</param>
  157. public void SetType(Schedule? type_)
  158. {
  159. SetFieldValue(5, 0, type_, Fit.SubfieldIndexMainField);
  160. }
  161. ///<summary>
  162. /// Retrieves the ScheduledTime field</summary>
  163. /// <returns>Returns nullable uint representing the ScheduledTime field</returns>
  164. public uint? GetScheduledTime()
  165. {
  166. return (uint?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
  167. }
  168. /// <summary>
  169. /// Set ScheduledTime field</summary>
  170. /// <param name="scheduledTime_">Nullable field value to be set</param>
  171. public void SetScheduledTime(uint? scheduledTime_)
  172. {
  173. SetFieldValue(6, 0, scheduledTime_, Fit.SubfieldIndexMainField);
  174. }
  175. #endregion // Methods
  176. } // Class
  177. } // namespace