WorkoutMesg.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 Workout profile message.
  27. /// </summary>
  28. public class WorkoutMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public WorkoutMesg() : base(Profile.GetMesg(MesgNum.Workout))
  34. {
  35. }
  36. public WorkoutMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the Sport field</summary>
  43. /// <returns>Returns nullable Sport enum representing the Sport field</returns>
  44. public Sport? GetSport()
  45. {
  46. object obj = GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  47. Sport? value = obj == null ? (Sport?)null : (Sport)obj;
  48. return value;
  49. }
  50. /// <summary>
  51. /// Set Sport field</summary>
  52. /// <param name="sport_">Nullable field value to be set</param>
  53. public void SetSport(Sport? sport_)
  54. {
  55. SetFieldValue(4, 0, sport_, Fit.SubfieldIndexMainField);
  56. }
  57. ///<summary>
  58. /// Retrieves the Capabilities field</summary>
  59. /// <returns>Returns nullable uint representing the Capabilities field</returns>
  60. public uint? GetCapabilities()
  61. {
  62. return (uint?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
  63. }
  64. /// <summary>
  65. /// Set Capabilities field</summary>
  66. /// <param name="capabilities_">Nullable field value to be set</param>
  67. public void SetCapabilities(uint? capabilities_)
  68. {
  69. SetFieldValue(5, 0, capabilities_, Fit.SubfieldIndexMainField);
  70. }
  71. ///<summary>
  72. /// Retrieves the NumValidSteps field
  73. /// Comment: number of valid steps</summary>
  74. /// <returns>Returns nullable ushort representing the NumValidSteps field</returns>
  75. public ushort? GetNumValidSteps()
  76. {
  77. return (ushort?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
  78. }
  79. /// <summary>
  80. /// Set NumValidSteps field
  81. /// Comment: number of valid steps</summary>
  82. /// <param name="numValidSteps_">Nullable field value to be set</param>
  83. public void SetNumValidSteps(ushort? numValidSteps_)
  84. {
  85. SetFieldValue(6, 0, numValidSteps_, Fit.SubfieldIndexMainField);
  86. }
  87. ///<summary>
  88. /// Retrieves the WktName field</summary>
  89. /// <returns>Returns byte[] representing the WktName field</returns>
  90. public byte[] GetWktName()
  91. {
  92. return (byte[])GetFieldValue(8, 0, Fit.SubfieldIndexMainField);
  93. }
  94. ///<summary>
  95. /// Retrieves the WktName field</summary>
  96. /// <returns>Returns String representing the WktName field</returns>
  97. public String GetWktNameAsString()
  98. {
  99. return Encoding.UTF8.GetString((byte[])GetFieldValue(8, 0, Fit.SubfieldIndexMainField));
  100. }
  101. ///<summary>
  102. /// Set WktName field</summary>
  103. /// <param name="wktName_"> field value to be set</param>
  104. public void SetWktName(String wktName_)
  105. {
  106. SetFieldValue(8, 0, System.Text.Encoding.UTF8.GetBytes(wktName_), Fit.SubfieldIndexMainField);
  107. }
  108. /// <summary>
  109. /// Set WktName field</summary>
  110. /// <param name="wktName_">field value to be set</param>
  111. public void SetWktName(byte[] wktName_)
  112. {
  113. SetFieldValue(8, 0, wktName_, Fit.SubfieldIndexMainField);
  114. }
  115. #endregion // Methods
  116. } // Class
  117. } // namespace