MesgCapabilitiesMesg.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 MesgCapabilities profile message.
  27. /// </summary>
  28. public class MesgCapabilitiesMesg : Mesg
  29. {
  30. #region Fields
  31. static class CountSubfield
  32. {
  33. public static ushort NumPerFile = 0;
  34. public static ushort MaxPerFile = 1;
  35. public static ushort MaxPerFileType = 2;
  36. public static ushort Subfields = 3;
  37. public static ushort Active = Fit.SubfieldIndexActiveSubfield;
  38. public static ushort MainField = Fit.SubfieldIndexMainField;
  39. }
  40. #endregion
  41. #region Constructors
  42. public MesgCapabilitiesMesg() : base(Profile.GetMesg(MesgNum.MesgCapabilities))
  43. {
  44. }
  45. public MesgCapabilitiesMesg(Mesg mesg) : base(mesg)
  46. {
  47. }
  48. #endregion // Constructors
  49. #region Methods
  50. ///<summary>
  51. /// Retrieves the MessageIndex field</summary>
  52. /// <returns>Returns nullable ushort representing the MessageIndex field</returns>
  53. public ushort? GetMessageIndex()
  54. {
  55. return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
  56. }
  57. /// <summary>
  58. /// Set MessageIndex field</summary>
  59. /// <param name="messageIndex_">Nullable field value to be set</param>
  60. public void SetMessageIndex(ushort? messageIndex_)
  61. {
  62. SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
  63. }
  64. ///<summary>
  65. /// Retrieves the File field</summary>
  66. /// <returns>Returns nullable File enum representing the File field</returns>
  67. public File? GetFile()
  68. {
  69. object obj = GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  70. File? value = obj == null ? (File?)null : (File)obj;
  71. return value;
  72. }
  73. /// <summary>
  74. /// Set File field</summary>
  75. /// <param name="file_">Nullable field value to be set</param>
  76. public void SetFile(File? file_)
  77. {
  78. SetFieldValue(0, 0, file_, Fit.SubfieldIndexMainField);
  79. }
  80. ///<summary>
  81. /// Retrieves the MesgNum field</summary>
  82. /// <returns>Returns nullable ushort representing the MesgNum field</returns>
  83. public ushort? GetMesgNum()
  84. {
  85. return (ushort?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  86. }
  87. /// <summary>
  88. /// Set MesgNum field</summary>
  89. /// <param name="mesgNum_">Nullable field value to be set</param>
  90. public void SetMesgNum(ushort? mesgNum_)
  91. {
  92. SetFieldValue(1, 0, mesgNum_, Fit.SubfieldIndexMainField);
  93. }
  94. ///<summary>
  95. /// Retrieves the CountType field</summary>
  96. /// <returns>Returns nullable MesgCount enum representing the CountType field</returns>
  97. public MesgCount? GetCountType()
  98. {
  99. object obj = GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  100. MesgCount? value = obj == null ? (MesgCount?)null : (MesgCount)obj;
  101. return value;
  102. }
  103. /// <summary>
  104. /// Set CountType field</summary>
  105. /// <param name="countType_">Nullable field value to be set</param>
  106. public void SetCountType(MesgCount? countType_)
  107. {
  108. SetFieldValue(2, 0, countType_, Fit.SubfieldIndexMainField);
  109. }
  110. ///<summary>
  111. /// Retrieves the Count field</summary>
  112. /// <returns>Returns nullable ushort representing the Count field</returns>
  113. public ushort? GetCount()
  114. {
  115. return (ushort?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  116. }
  117. /// <summary>
  118. /// Set Count field</summary>
  119. /// <param name="count_">Nullable field value to be set</param>
  120. public void SetCount(ushort? count_)
  121. {
  122. SetFieldValue(3, 0, count_, Fit.SubfieldIndexMainField);
  123. }
  124. /// <summary>
  125. /// Retrieves the NumPerFile subfield</summary>
  126. /// <returns>Nullable ushort representing the NumPerFile subfield</returns>
  127. public ushort? GetNumPerFile()
  128. {
  129. return (ushort?)GetFieldValue(3, 0, CountSubfield.NumPerFile);
  130. }
  131. /// <summary>
  132. ///
  133. /// Set NumPerFile subfield</summary>
  134. /// <param name="numPerFile">Subfield value to be set</param>
  135. public void SetNumPerFile(ushort? numPerFile)
  136. {
  137. SetFieldValue(3, 0, numPerFile, CountSubfield.NumPerFile);
  138. }
  139. /// <summary>
  140. /// Retrieves the MaxPerFile subfield</summary>
  141. /// <returns>Nullable ushort representing the MaxPerFile subfield</returns>
  142. public ushort? GetMaxPerFile()
  143. {
  144. return (ushort?)GetFieldValue(3, 0, CountSubfield.MaxPerFile);
  145. }
  146. /// <summary>
  147. ///
  148. /// Set MaxPerFile subfield</summary>
  149. /// <param name="maxPerFile">Subfield value to be set</param>
  150. public void SetMaxPerFile(ushort? maxPerFile)
  151. {
  152. SetFieldValue(3, 0, maxPerFile, CountSubfield.MaxPerFile);
  153. }
  154. /// <summary>
  155. /// Retrieves the MaxPerFileType subfield</summary>
  156. /// <returns>Nullable ushort representing the MaxPerFileType subfield</returns>
  157. public ushort? GetMaxPerFileType()
  158. {
  159. return (ushort?)GetFieldValue(3, 0, CountSubfield.MaxPerFileType);
  160. }
  161. /// <summary>
  162. ///
  163. /// Set MaxPerFileType subfield</summary>
  164. /// <param name="maxPerFileType">Subfield value to be set</param>
  165. public void SetMaxPerFileType(ushort? maxPerFileType)
  166. {
  167. SetFieldValue(3, 0, maxPerFileType, CountSubfield.MaxPerFileType);
  168. }
  169. #endregion // Methods
  170. } // Class
  171. } // namespace