FileCapabilitiesMesg.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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 FileCapabilities profile message.
  27. /// </summary>
  28. public class FileCapabilitiesMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public FileCapabilitiesMesg() : base(Profile.GetMesg(MesgNum.FileCapabilities))
  34. {
  35. }
  36. public FileCapabilitiesMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the MessageIndex field</summary>
  43. /// <returns>Returns nullable ushort representing the MessageIndex field</returns>
  44. public ushort? GetMessageIndex()
  45. {
  46. return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
  47. }
  48. /// <summary>
  49. /// Set MessageIndex field</summary>
  50. /// <param name="messageIndex_">Nullable field value to be set</param>
  51. public void SetMessageIndex(ushort? messageIndex_)
  52. {
  53. SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
  54. }
  55. ///<summary>
  56. /// Retrieves the Type field</summary>
  57. /// <returns>Returns nullable File enum representing the Type field</returns>
  58. new public File? GetType()
  59. {
  60. object obj = GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  61. File? value = obj == null ? (File?)null : (File)obj;
  62. return value;
  63. }
  64. /// <summary>
  65. /// Set Type field</summary>
  66. /// <param name="type_">Nullable field value to be set</param>
  67. public void SetType(File? type_)
  68. {
  69. SetFieldValue(0, 0, type_, Fit.SubfieldIndexMainField);
  70. }
  71. ///<summary>
  72. /// Retrieves the Flags field</summary>
  73. /// <returns>Returns nullable byte representing the Flags field</returns>
  74. public byte? GetFlags()
  75. {
  76. return (byte?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  77. }
  78. /// <summary>
  79. /// Set Flags field</summary>
  80. /// <param name="flags_">Nullable field value to be set</param>
  81. public void SetFlags(byte? flags_)
  82. {
  83. SetFieldValue(1, 0, flags_, Fit.SubfieldIndexMainField);
  84. }
  85. ///<summary>
  86. /// Retrieves the Directory field</summary>
  87. /// <returns>Returns byte[] representing the Directory field</returns>
  88. public byte[] GetDirectory()
  89. {
  90. return (byte[])GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  91. }
  92. ///<summary>
  93. /// Retrieves the Directory field</summary>
  94. /// <returns>Returns String representing the Directory field</returns>
  95. public String GetDirectoryAsString()
  96. {
  97. return Encoding.UTF8.GetString((byte[])GetFieldValue(2, 0, Fit.SubfieldIndexMainField));
  98. }
  99. ///<summary>
  100. /// Set Directory field</summary>
  101. /// <param name="directory_"> field value to be set</param>
  102. public void SetDirectory(String directory_)
  103. {
  104. SetFieldValue(2, 0, System.Text.Encoding.UTF8.GetBytes(directory_), Fit.SubfieldIndexMainField);
  105. }
  106. /// <summary>
  107. /// Set Directory field</summary>
  108. /// <param name="directory_">field value to be set</param>
  109. public void SetDirectory(byte[] directory_)
  110. {
  111. SetFieldValue(2, 0, directory_, Fit.SubfieldIndexMainField);
  112. }
  113. ///<summary>
  114. /// Retrieves the MaxCount field</summary>
  115. /// <returns>Returns nullable ushort representing the MaxCount field</returns>
  116. public ushort? GetMaxCount()
  117. {
  118. return (ushort?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  119. }
  120. /// <summary>
  121. /// Set MaxCount field</summary>
  122. /// <param name="maxCount_">Nullable field value to be set</param>
  123. public void SetMaxCount(ushort? maxCount_)
  124. {
  125. SetFieldValue(3, 0, maxCount_, Fit.SubfieldIndexMainField);
  126. }
  127. ///<summary>
  128. /// Retrieves the MaxSize field
  129. /// Units: bytes</summary>
  130. /// <returns>Returns nullable uint representing the MaxSize field</returns>
  131. public uint? GetMaxSize()
  132. {
  133. return (uint?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  134. }
  135. /// <summary>
  136. /// Set MaxSize field
  137. /// Units: bytes</summary>
  138. /// <param name="maxSize_">Nullable field value to be set</param>
  139. public void SetMaxSize(uint? maxSize_)
  140. {
  141. SetFieldValue(4, 0, maxSize_, Fit.SubfieldIndexMainField);
  142. }
  143. #endregion // Methods
  144. } // Class
  145. } // namespace