TimestampCorrelationMesg.cs 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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 TimestampCorrelation profile message.
  27. /// </summary>
  28. public class TimestampCorrelationMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public TimestampCorrelationMesg() : base(Profile.GetMesg(MesgNum.TimestampCorrelation))
  34. {
  35. }
  36. public TimestampCorrelationMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the Timestamp field
  43. /// Units: s
  44. /// Comment: Whole second part of UTC timestamp at the time the system timestamp was recorded.</summary>
  45. /// <returns>Returns DateTime representing the Timestamp field</returns>
  46. public DateTime GetTimestamp()
  47. {
  48. return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
  49. }
  50. /// <summary>
  51. /// Set Timestamp field
  52. /// Units: s
  53. /// Comment: Whole second part of UTC timestamp at the time the system timestamp was recorded.</summary>
  54. /// <param name="timestamp_">Nullable field value to be set</param>
  55. public void SetTimestamp(DateTime timestamp_)
  56. {
  57. SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
  58. }
  59. ///<summary>
  60. /// Retrieves the FractionalTimestamp field
  61. /// Units: s
  62. /// Comment: Fractional part of the UTC timestamp at the time the system timestamp was recorded.</summary>
  63. /// <returns>Returns nullable float representing the FractionalTimestamp field</returns>
  64. public float? GetFractionalTimestamp()
  65. {
  66. return (float?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  67. }
  68. /// <summary>
  69. /// Set FractionalTimestamp field
  70. /// Units: s
  71. /// Comment: Fractional part of the UTC timestamp at the time the system timestamp was recorded.</summary>
  72. /// <param name="fractionalTimestamp_">Nullable field value to be set</param>
  73. public void SetFractionalTimestamp(float? fractionalTimestamp_)
  74. {
  75. SetFieldValue(0, 0, fractionalTimestamp_, Fit.SubfieldIndexMainField);
  76. }
  77. ///<summary>
  78. /// Retrieves the SystemTimestamp field
  79. /// Units: s
  80. /// Comment: Whole second part of the system timestamp</summary>
  81. /// <returns>Returns DateTime representing the SystemTimestamp field</returns>
  82. public DateTime GetSystemTimestamp()
  83. {
  84. return TimestampToDateTime((uint?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField));
  85. }
  86. /// <summary>
  87. /// Set SystemTimestamp field
  88. /// Units: s
  89. /// Comment: Whole second part of the system timestamp</summary>
  90. /// <param name="systemTimestamp_">Nullable field value to be set</param>
  91. public void SetSystemTimestamp(DateTime systemTimestamp_)
  92. {
  93. SetFieldValue(1, 0, systemTimestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
  94. }
  95. ///<summary>
  96. /// Retrieves the FractionalSystemTimestamp field
  97. /// Units: s
  98. /// Comment: Fractional part of the system timestamp</summary>
  99. /// <returns>Returns nullable float representing the FractionalSystemTimestamp field</returns>
  100. public float? GetFractionalSystemTimestamp()
  101. {
  102. return (float?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  103. }
  104. /// <summary>
  105. /// Set FractionalSystemTimestamp field
  106. /// Units: s
  107. /// Comment: Fractional part of the system timestamp</summary>
  108. /// <param name="fractionalSystemTimestamp_">Nullable field value to be set</param>
  109. public void SetFractionalSystemTimestamp(float? fractionalSystemTimestamp_)
  110. {
  111. SetFieldValue(2, 0, fractionalSystemTimestamp_, Fit.SubfieldIndexMainField);
  112. }
  113. ///<summary>
  114. /// Retrieves the LocalTimestamp field
  115. /// Units: s
  116. /// Comment: timestamp epoch expressed in local time used to convert timestamps to local time </summary>
  117. /// <returns>Returns nullable uint representing the LocalTimestamp field</returns>
  118. public uint? GetLocalTimestamp()
  119. {
  120. return (uint?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  121. }
  122. /// <summary>
  123. /// Set LocalTimestamp field
  124. /// Units: s
  125. /// Comment: timestamp epoch expressed in local time used to convert timestamps to local time </summary>
  126. /// <param name="localTimestamp_">Nullable field value to be set</param>
  127. public void SetLocalTimestamp(uint? localTimestamp_)
  128. {
  129. SetFieldValue(3, 0, localTimestamp_, Fit.SubfieldIndexMainField);
  130. }
  131. ///<summary>
  132. /// Retrieves the TimestampMs field
  133. /// Units: ms
  134. /// Comment: Millisecond part of the UTC timestamp at the time the system timestamp was recorded.</summary>
  135. /// <returns>Returns nullable ushort representing the TimestampMs field</returns>
  136. public ushort? GetTimestampMs()
  137. {
  138. return (ushort?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  139. }
  140. /// <summary>
  141. /// Set TimestampMs field
  142. /// Units: ms
  143. /// Comment: Millisecond part of the UTC timestamp at the time the system timestamp was recorded.</summary>
  144. /// <param name="timestampMs_">Nullable field value to be set</param>
  145. public void SetTimestampMs(ushort? timestampMs_)
  146. {
  147. SetFieldValue(4, 0, timestampMs_, Fit.SubfieldIndexMainField);
  148. }
  149. ///<summary>
  150. /// Retrieves the SystemTimestampMs field
  151. /// Units: ms
  152. /// Comment: Millisecond part of the system timestamp</summary>
  153. /// <returns>Returns nullable ushort representing the SystemTimestampMs field</returns>
  154. public ushort? GetSystemTimestampMs()
  155. {
  156. return (ushort?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
  157. }
  158. /// <summary>
  159. /// Set SystemTimestampMs field
  160. /// Units: ms
  161. /// Comment: Millisecond part of the system timestamp</summary>
  162. /// <param name="systemTimestampMs_">Nullable field value to be set</param>
  163. public void SetSystemTimestampMs(ushort? systemTimestampMs_)
  164. {
  165. SetFieldValue(5, 0, systemTimestampMs_, Fit.SubfieldIndexMainField);
  166. }
  167. #endregion // Methods
  168. } // Class
  169. } // namespace