SlaveDeviceMesg.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 SlaveDevice profile message.
  27. /// </summary>
  28. public class SlaveDeviceMesg : Mesg
  29. {
  30. #region Fields
  31. static class ProductSubfield
  32. {
  33. public static ushort GarminProduct = 0;
  34. public static ushort Subfields = 1;
  35. public static ushort Active = Fit.SubfieldIndexActiveSubfield;
  36. public static ushort MainField = Fit.SubfieldIndexMainField;
  37. }
  38. #endregion
  39. #region Constructors
  40. public SlaveDeviceMesg() : base(Profile.GetMesg(MesgNum.SlaveDevice))
  41. {
  42. }
  43. public SlaveDeviceMesg(Mesg mesg) : base(mesg)
  44. {
  45. }
  46. #endregion // Constructors
  47. #region Methods
  48. ///<summary>
  49. /// Retrieves the Manufacturer field</summary>
  50. /// <returns>Returns nullable ushort representing the Manufacturer field</returns>
  51. public ushort? GetManufacturer()
  52. {
  53. return (ushort?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  54. }
  55. /// <summary>
  56. /// Set Manufacturer field</summary>
  57. /// <param name="manufacturer_">Nullable field value to be set</param>
  58. public void SetManufacturer(ushort? manufacturer_)
  59. {
  60. SetFieldValue(0, 0, manufacturer_, Fit.SubfieldIndexMainField);
  61. }
  62. ///<summary>
  63. /// Retrieves the Product field</summary>
  64. /// <returns>Returns nullable ushort representing the Product field</returns>
  65. public ushort? GetProduct()
  66. {
  67. return (ushort?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  68. }
  69. /// <summary>
  70. /// Set Product field</summary>
  71. /// <param name="product_">Nullable field value to be set</param>
  72. public void SetProduct(ushort? product_)
  73. {
  74. SetFieldValue(1, 0, product_, Fit.SubfieldIndexMainField);
  75. }
  76. /// <summary>
  77. /// Retrieves the GarminProduct subfield</summary>
  78. /// <returns>Nullable ushort representing the GarminProduct subfield</returns>
  79. public ushort? GetGarminProduct()
  80. {
  81. return (ushort?)GetFieldValue(1, 0, ProductSubfield.GarminProduct);
  82. }
  83. /// <summary>
  84. ///
  85. /// Set GarminProduct subfield</summary>
  86. /// <param name="garminProduct">Subfield value to be set</param>
  87. public void SetGarminProduct(ushort? garminProduct)
  88. {
  89. SetFieldValue(1, 0, garminProduct, ProductSubfield.GarminProduct);
  90. }
  91. #endregion // Methods
  92. } // Class
  93. } // namespace