BloodPressureMesg.cs 9.5 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 BloodPressure profile message.
  27. /// </summary>
  28. public class BloodPressureMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public BloodPressureMesg() : base(Profile.GetMesg(MesgNum.BloodPressure))
  34. {
  35. }
  36. public BloodPressureMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the Timestamp field
  43. /// Units: s</summary>
  44. /// <returns>Returns DateTime representing the Timestamp field</returns>
  45. public DateTime GetTimestamp()
  46. {
  47. return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
  48. }
  49. /// <summary>
  50. /// Set Timestamp field
  51. /// Units: s</summary>
  52. /// <param name="timestamp_">Nullable field value to be set</param>
  53. public void SetTimestamp(DateTime timestamp_)
  54. {
  55. SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
  56. }
  57. ///<summary>
  58. /// Retrieves the SystolicPressure field
  59. /// Units: mmHg</summary>
  60. /// <returns>Returns nullable ushort representing the SystolicPressure field</returns>
  61. public ushort? GetSystolicPressure()
  62. {
  63. return (ushort?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  64. }
  65. /// <summary>
  66. /// Set SystolicPressure field
  67. /// Units: mmHg</summary>
  68. /// <param name="systolicPressure_">Nullable field value to be set</param>
  69. public void SetSystolicPressure(ushort? systolicPressure_)
  70. {
  71. SetFieldValue(0, 0, systolicPressure_, Fit.SubfieldIndexMainField);
  72. }
  73. ///<summary>
  74. /// Retrieves the DiastolicPressure field
  75. /// Units: mmHg</summary>
  76. /// <returns>Returns nullable ushort representing the DiastolicPressure field</returns>
  77. public ushort? GetDiastolicPressure()
  78. {
  79. return (ushort?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  80. }
  81. /// <summary>
  82. /// Set DiastolicPressure field
  83. /// Units: mmHg</summary>
  84. /// <param name="diastolicPressure_">Nullable field value to be set</param>
  85. public void SetDiastolicPressure(ushort? diastolicPressure_)
  86. {
  87. SetFieldValue(1, 0, diastolicPressure_, Fit.SubfieldIndexMainField);
  88. }
  89. ///<summary>
  90. /// Retrieves the MeanArterialPressure field
  91. /// Units: mmHg</summary>
  92. /// <returns>Returns nullable ushort representing the MeanArterialPressure field</returns>
  93. public ushort? GetMeanArterialPressure()
  94. {
  95. return (ushort?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  96. }
  97. /// <summary>
  98. /// Set MeanArterialPressure field
  99. /// Units: mmHg</summary>
  100. /// <param name="meanArterialPressure_">Nullable field value to be set</param>
  101. public void SetMeanArterialPressure(ushort? meanArterialPressure_)
  102. {
  103. SetFieldValue(2, 0, meanArterialPressure_, Fit.SubfieldIndexMainField);
  104. }
  105. ///<summary>
  106. /// Retrieves the Map3SampleMean field
  107. /// Units: mmHg</summary>
  108. /// <returns>Returns nullable ushort representing the Map3SampleMean field</returns>
  109. public ushort? GetMap3SampleMean()
  110. {
  111. return (ushort?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  112. }
  113. /// <summary>
  114. /// Set Map3SampleMean field
  115. /// Units: mmHg</summary>
  116. /// <param name="map3SampleMean_">Nullable field value to be set</param>
  117. public void SetMap3SampleMean(ushort? map3SampleMean_)
  118. {
  119. SetFieldValue(3, 0, map3SampleMean_, Fit.SubfieldIndexMainField);
  120. }
  121. ///<summary>
  122. /// Retrieves the MapMorningValues field
  123. /// Units: mmHg</summary>
  124. /// <returns>Returns nullable ushort representing the MapMorningValues field</returns>
  125. public ushort? GetMapMorningValues()
  126. {
  127. return (ushort?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  128. }
  129. /// <summary>
  130. /// Set MapMorningValues field
  131. /// Units: mmHg</summary>
  132. /// <param name="mapMorningValues_">Nullable field value to be set</param>
  133. public void SetMapMorningValues(ushort? mapMorningValues_)
  134. {
  135. SetFieldValue(4, 0, mapMorningValues_, Fit.SubfieldIndexMainField);
  136. }
  137. ///<summary>
  138. /// Retrieves the MapEveningValues field
  139. /// Units: mmHg</summary>
  140. /// <returns>Returns nullable ushort representing the MapEveningValues field</returns>
  141. public ushort? GetMapEveningValues()
  142. {
  143. return (ushort?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
  144. }
  145. /// <summary>
  146. /// Set MapEveningValues field
  147. /// Units: mmHg</summary>
  148. /// <param name="mapEveningValues_">Nullable field value to be set</param>
  149. public void SetMapEveningValues(ushort? mapEveningValues_)
  150. {
  151. SetFieldValue(5, 0, mapEveningValues_, Fit.SubfieldIndexMainField);
  152. }
  153. ///<summary>
  154. /// Retrieves the HeartRate field
  155. /// Units: bpm</summary>
  156. /// <returns>Returns nullable byte representing the HeartRate field</returns>
  157. public byte? GetHeartRate()
  158. {
  159. return (byte?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
  160. }
  161. /// <summary>
  162. /// Set HeartRate field
  163. /// Units: bpm</summary>
  164. /// <param name="heartRate_">Nullable field value to be set</param>
  165. public void SetHeartRate(byte? heartRate_)
  166. {
  167. SetFieldValue(6, 0, heartRate_, Fit.SubfieldIndexMainField);
  168. }
  169. ///<summary>
  170. /// Retrieves the HeartRateType field</summary>
  171. /// <returns>Returns nullable HrType enum representing the HeartRateType field</returns>
  172. public HrType? GetHeartRateType()
  173. {
  174. object obj = GetFieldValue(7, 0, Fit.SubfieldIndexMainField);
  175. HrType? value = obj == null ? (HrType?)null : (HrType)obj;
  176. return value;
  177. }
  178. /// <summary>
  179. /// Set HeartRateType field</summary>
  180. /// <param name="heartRateType_">Nullable field value to be set</param>
  181. public void SetHeartRateType(HrType? heartRateType_)
  182. {
  183. SetFieldValue(7, 0, heartRateType_, Fit.SubfieldIndexMainField);
  184. }
  185. ///<summary>
  186. /// Retrieves the Status field</summary>
  187. /// <returns>Returns nullable BpStatus enum representing the Status field</returns>
  188. public BpStatus? GetStatus()
  189. {
  190. object obj = GetFieldValue(8, 0, Fit.SubfieldIndexMainField);
  191. BpStatus? value = obj == null ? (BpStatus?)null : (BpStatus)obj;
  192. return value;
  193. }
  194. /// <summary>
  195. /// Set Status field</summary>
  196. /// <param name="status_">Nullable field value to be set</param>
  197. public void SetStatus(BpStatus? status_)
  198. {
  199. SetFieldValue(8, 0, status_, Fit.SubfieldIndexMainField);
  200. }
  201. ///<summary>
  202. /// Retrieves the UserProfileIndex field
  203. /// Comment: Associates this blood pressure message to a user. This corresponds to the index of the user profile message in the blood pressure file.</summary>
  204. /// <returns>Returns nullable ushort representing the UserProfileIndex field</returns>
  205. public ushort? GetUserProfileIndex()
  206. {
  207. return (ushort?)GetFieldValue(9, 0, Fit.SubfieldIndexMainField);
  208. }
  209. /// <summary>
  210. /// Set UserProfileIndex field
  211. /// Comment: Associates this blood pressure message to a user. This corresponds to the index of the user profile message in the blood pressure file.</summary>
  212. /// <param name="userProfileIndex_">Nullable field value to be set</param>
  213. public void SetUserProfileIndex(ushort? userProfileIndex_)
  214. {
  215. SetFieldValue(9, 0, userProfileIndex_, Fit.SubfieldIndexMainField);
  216. }
  217. #endregion // Methods
  218. } // Class
  219. } // namespace