DeviceSettingsMesg.cs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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 DeviceSettings profile message.
  27. /// </summary>
  28. public class DeviceSettingsMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public DeviceSettingsMesg() : base(Profile.GetMesg(MesgNum.DeviceSettings))
  34. {
  35. }
  36. public DeviceSettingsMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the ActiveTimeZone field
  43. /// Comment: Index into time zone arrays.</summary>
  44. /// <returns>Returns nullable byte representing the ActiveTimeZone field</returns>
  45. public byte? GetActiveTimeZone()
  46. {
  47. return (byte?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  48. }
  49. /// <summary>
  50. /// Set ActiveTimeZone field
  51. /// Comment: Index into time zone arrays.</summary>
  52. /// <param name="activeTimeZone_">Nullable field value to be set</param>
  53. public void SetActiveTimeZone(byte? activeTimeZone_)
  54. {
  55. SetFieldValue(0, 0, activeTimeZone_, Fit.SubfieldIndexMainField);
  56. }
  57. ///<summary>
  58. /// Retrieves the UtcOffset field
  59. /// Comment: Offset from system time. Required to convert timestamp from system time to UTC.</summary>
  60. /// <returns>Returns nullable uint representing the UtcOffset field</returns>
  61. public uint? GetUtcOffset()
  62. {
  63. return (uint?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  64. }
  65. /// <summary>
  66. /// Set UtcOffset field
  67. /// Comment: Offset from system time. Required to convert timestamp from system time to UTC.</summary>
  68. /// <param name="utcOffset_">Nullable field value to be set</param>
  69. public void SetUtcOffset(uint? utcOffset_)
  70. {
  71. SetFieldValue(1, 0, utcOffset_, Fit.SubfieldIndexMainField);
  72. }
  73. /// <summary>
  74. ///
  75. /// </summary>
  76. /// <returns>returns number of elements in field TimeOffset</returns>
  77. public int GetNumTimeOffset()
  78. {
  79. return GetNumFieldValues(2, Fit.SubfieldIndexMainField);
  80. }
  81. ///<summary>
  82. /// Retrieves the TimeOffset field
  83. /// Units: s
  84. /// Comment: Offset from system time.</summary>
  85. /// <param name="index">0 based index of TimeOffset element to retrieve</param>
  86. /// <returns>Returns nullable uint representing the TimeOffset field</returns>
  87. public uint? GetTimeOffset(int index)
  88. {
  89. return (uint?)GetFieldValue(2, index, Fit.SubfieldIndexMainField);
  90. }
  91. /// <summary>
  92. /// Set TimeOffset field
  93. /// Units: s
  94. /// Comment: Offset from system time.</summary>
  95. /// <param name="index">0 based index of time_offset</param>
  96. /// <param name="timeOffset_">Nullable field value to be set</param>
  97. public void SetTimeOffset(int index, uint? timeOffset_)
  98. {
  99. SetFieldValue(2, index, timeOffset_, Fit.SubfieldIndexMainField);
  100. }
  101. /// <summary>
  102. ///
  103. /// </summary>
  104. /// <returns>returns number of elements in field TimeZoneOffset</returns>
  105. public int GetNumTimeZoneOffset()
  106. {
  107. return GetNumFieldValues(5, Fit.SubfieldIndexMainField);
  108. }
  109. ///<summary>
  110. /// Retrieves the TimeZoneOffset field
  111. /// Units: hr
  112. /// Comment: timezone offset in 1/4 hour increments</summary>
  113. /// <param name="index">0 based index of TimeZoneOffset element to retrieve</param>
  114. /// <returns>Returns nullable float representing the TimeZoneOffset field</returns>
  115. public float? GetTimeZoneOffset(int index)
  116. {
  117. return (float?)GetFieldValue(5, index, Fit.SubfieldIndexMainField);
  118. }
  119. /// <summary>
  120. /// Set TimeZoneOffset field
  121. /// Units: hr
  122. /// Comment: timezone offset in 1/4 hour increments</summary>
  123. /// <param name="index">0 based index of time_zone_offset</param>
  124. /// <param name="timeZoneOffset_">Nullable field value to be set</param>
  125. public void SetTimeZoneOffset(int index, float? timeZoneOffset_)
  126. {
  127. SetFieldValue(5, index, timeZoneOffset_, Fit.SubfieldIndexMainField);
  128. }
  129. #endregion // Methods
  130. } // Class
  131. } // namespace