HrMesg.cs 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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 Hr profile message.
  27. /// </summary>
  28. public class HrMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public HrMesg() : base(Profile.GetMesg(MesgNum.Hr))
  34. {
  35. }
  36. public HrMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the Timestamp field</summary>
  43. /// <returns>Returns DateTime representing the Timestamp field</returns>
  44. public DateTime GetTimestamp()
  45. {
  46. return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
  47. }
  48. /// <summary>
  49. /// Set Timestamp field</summary>
  50. /// <param name="timestamp_">Nullable field value to be set</param>
  51. public void SetTimestamp(DateTime timestamp_)
  52. {
  53. SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
  54. }
  55. ///<summary>
  56. /// Retrieves the FractionalTimestamp field
  57. /// Units: s</summary>
  58. /// <returns>Returns nullable float representing the FractionalTimestamp field</returns>
  59. public float? GetFractionalTimestamp()
  60. {
  61. return (float?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  62. }
  63. /// <summary>
  64. /// Set FractionalTimestamp field
  65. /// Units: s</summary>
  66. /// <param name="fractionalTimestamp_">Nullable field value to be set</param>
  67. public void SetFractionalTimestamp(float? fractionalTimestamp_)
  68. {
  69. SetFieldValue(0, 0, fractionalTimestamp_, Fit.SubfieldIndexMainField);
  70. }
  71. ///<summary>
  72. /// Retrieves the Time256 field
  73. /// Units: s</summary>
  74. /// <returns>Returns nullable float representing the Time256 field</returns>
  75. public float? GetTime256()
  76. {
  77. return (float?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  78. }
  79. /// <summary>
  80. /// Set Time256 field
  81. /// Units: s</summary>
  82. /// <param name="time256_">Nullable field value to be set</param>
  83. public void SetTime256(float? time256_)
  84. {
  85. SetFieldValue(1, 0, time256_, Fit.SubfieldIndexMainField);
  86. }
  87. /// <summary>
  88. ///
  89. /// </summary>
  90. /// <returns>returns number of elements in field FilteredBpm</returns>
  91. public int GetNumFilteredBpm()
  92. {
  93. return GetNumFieldValues(6, Fit.SubfieldIndexMainField);
  94. }
  95. ///<summary>
  96. /// Retrieves the FilteredBpm field
  97. /// Units: bpm</summary>
  98. /// <param name="index">0 based index of FilteredBpm element to retrieve</param>
  99. /// <returns>Returns nullable byte representing the FilteredBpm field</returns>
  100. public byte? GetFilteredBpm(int index)
  101. {
  102. return (byte?)GetFieldValue(6, index, Fit.SubfieldIndexMainField);
  103. }
  104. /// <summary>
  105. /// Set FilteredBpm field
  106. /// Units: bpm</summary>
  107. /// <param name="index">0 based index of filtered_bpm</param>
  108. /// <param name="filteredBpm_">Nullable field value to be set</param>
  109. public void SetFilteredBpm(int index, byte? filteredBpm_)
  110. {
  111. SetFieldValue(6, index, filteredBpm_, Fit.SubfieldIndexMainField);
  112. }
  113. /// <summary>
  114. ///
  115. /// </summary>
  116. /// <returns>returns number of elements in field EventTimestamp</returns>
  117. public int GetNumEventTimestamp()
  118. {
  119. return GetNumFieldValues(9, Fit.SubfieldIndexMainField);
  120. }
  121. ///<summary>
  122. /// Retrieves the EventTimestamp field
  123. /// Units: s</summary>
  124. /// <param name="index">0 based index of EventTimestamp element to retrieve</param>
  125. /// <returns>Returns nullable float representing the EventTimestamp field</returns>
  126. public float? GetEventTimestamp(int index)
  127. {
  128. return (float?)GetFieldValue(9, index, Fit.SubfieldIndexMainField);
  129. }
  130. /// <summary>
  131. /// Set EventTimestamp field
  132. /// Units: s</summary>
  133. /// <param name="index">0 based index of event_timestamp</param>
  134. /// <param name="eventTimestamp_">Nullable field value to be set</param>
  135. public void SetEventTimestamp(int index, float? eventTimestamp_)
  136. {
  137. SetFieldValue(9, index, eventTimestamp_, Fit.SubfieldIndexMainField);
  138. }
  139. /// <summary>
  140. ///
  141. /// </summary>
  142. /// <returns>returns number of elements in field EventTimestamp12</returns>
  143. public int GetNumEventTimestamp12()
  144. {
  145. return GetNumFieldValues(10, Fit.SubfieldIndexMainField);
  146. }
  147. ///<summary>
  148. /// Retrieves the EventTimestamp12 field</summary>
  149. /// <param name="index">0 based index of EventTimestamp12 element to retrieve</param>
  150. /// <returns>Returns nullable byte representing the EventTimestamp12 field</returns>
  151. public byte? GetEventTimestamp12(int index)
  152. {
  153. return (byte?)GetFieldValue(10, index, Fit.SubfieldIndexMainField);
  154. }
  155. /// <summary>
  156. /// Set EventTimestamp12 field</summary>
  157. /// <param name="index">0 based index of event_timestamp_12</param>
  158. /// <param name="eventTimestamp12_">Nullable field value to be set</param>
  159. public void SetEventTimestamp12(int index, byte? eventTimestamp12_)
  160. {
  161. SetFieldValue(10, index, eventTimestamp12_, Fit.SubfieldIndexMainField);
  162. }
  163. #endregion // Methods
  164. } // Class
  165. } // namespace