AntTxMesg.cs 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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 AntTx profile message.
  27. /// </summary>
  28. public class AntTxMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public AntTxMesg() : base(Profile.GetMesg(MesgNum.AntTx))
  34. {
  35. }
  36. public AntTxMesg(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 FractionalTimestamp field
  59. /// Units: s</summary>
  60. /// <returns>Returns nullable float representing the FractionalTimestamp field</returns>
  61. public float? GetFractionalTimestamp()
  62. {
  63. return (float?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  64. }
  65. /// <summary>
  66. /// Set FractionalTimestamp field
  67. /// Units: s</summary>
  68. /// <param name="fractionalTimestamp_">Nullable field value to be set</param>
  69. public void SetFractionalTimestamp(float? fractionalTimestamp_)
  70. {
  71. SetFieldValue(0, 0, fractionalTimestamp_, Fit.SubfieldIndexMainField);
  72. }
  73. ///<summary>
  74. /// Retrieves the MesgId field</summary>
  75. /// <returns>Returns nullable byte representing the MesgId field</returns>
  76. public byte? GetMesgId()
  77. {
  78. return (byte?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  79. }
  80. /// <summary>
  81. /// Set MesgId field</summary>
  82. /// <param name="mesgId_">Nullable field value to be set</param>
  83. public void SetMesgId(byte? mesgId_)
  84. {
  85. SetFieldValue(1, 0, mesgId_, Fit.SubfieldIndexMainField);
  86. }
  87. /// <summary>
  88. ///
  89. /// </summary>
  90. /// <returns>returns number of elements in field MesgData</returns>
  91. public int GetNumMesgData()
  92. {
  93. return GetNumFieldValues(2, Fit.SubfieldIndexMainField);
  94. }
  95. ///<summary>
  96. /// Retrieves the MesgData field</summary>
  97. /// <param name="index">0 based index of MesgData element to retrieve</param>
  98. /// <returns>Returns nullable byte representing the MesgData field</returns>
  99. public byte? GetMesgData(int index)
  100. {
  101. return (byte?)GetFieldValue(2, index, Fit.SubfieldIndexMainField);
  102. }
  103. /// <summary>
  104. /// Set MesgData field</summary>
  105. /// <param name="index">0 based index of mesg_data</param>
  106. /// <param name="mesgData_">Nullable field value to be set</param>
  107. public void SetMesgData(int index, byte? mesgData_)
  108. {
  109. SetFieldValue(2, index, mesgData_, Fit.SubfieldIndexMainField);
  110. }
  111. ///<summary>
  112. /// Retrieves the ChannelNumber field</summary>
  113. /// <returns>Returns nullable byte representing the ChannelNumber field</returns>
  114. public byte? GetChannelNumber()
  115. {
  116. return (byte?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  117. }
  118. /// <summary>
  119. /// Set ChannelNumber field</summary>
  120. /// <param name="channelNumber_">Nullable field value to be set</param>
  121. public void SetChannelNumber(byte? channelNumber_)
  122. {
  123. SetFieldValue(3, 0, channelNumber_, Fit.SubfieldIndexMainField);
  124. }
  125. /// <summary>
  126. ///
  127. /// </summary>
  128. /// <returns>returns number of elements in field Data</returns>
  129. public int GetNumData()
  130. {
  131. return GetNumFieldValues(4, Fit.SubfieldIndexMainField);
  132. }
  133. ///<summary>
  134. /// Retrieves the Data field</summary>
  135. /// <param name="index">0 based index of Data element to retrieve</param>
  136. /// <returns>Returns nullable byte representing the Data field</returns>
  137. public byte? GetData(int index)
  138. {
  139. return (byte?)GetFieldValue(4, index, Fit.SubfieldIndexMainField);
  140. }
  141. /// <summary>
  142. /// Set Data field</summary>
  143. /// <param name="index">0 based index of data</param>
  144. /// <param name="data_">Nullable field value to be set</param>
  145. public void SetData(int index, byte? data_)
  146. {
  147. SetFieldValue(4, index, data_, Fit.SubfieldIndexMainField);
  148. }
  149. #endregion // Methods
  150. } // Class
  151. } // namespace