VideoTitleMesg.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 VideoTitle profile message.
  27. /// </summary>
  28. public class VideoTitleMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public VideoTitleMesg() : base(Profile.GetMesg(MesgNum.VideoTitle))
  34. {
  35. }
  36. public VideoTitleMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the MessageIndex field
  43. /// Comment: Long titles will be split into multiple parts</summary>
  44. /// <returns>Returns nullable ushort representing the MessageIndex field</returns>
  45. public ushort? GetMessageIndex()
  46. {
  47. return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
  48. }
  49. /// <summary>
  50. /// Set MessageIndex field
  51. /// Comment: Long titles will be split into multiple parts</summary>
  52. /// <param name="messageIndex_">Nullable field value to be set</param>
  53. public void SetMessageIndex(ushort? messageIndex_)
  54. {
  55. SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
  56. }
  57. ///<summary>
  58. /// Retrieves the MessageCount field
  59. /// Comment: Total number of title parts</summary>
  60. /// <returns>Returns nullable ushort representing the MessageCount field</returns>
  61. public ushort? GetMessageCount()
  62. {
  63. return (ushort?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  64. }
  65. /// <summary>
  66. /// Set MessageCount field
  67. /// Comment: Total number of title parts</summary>
  68. /// <param name="messageCount_">Nullable field value to be set</param>
  69. public void SetMessageCount(ushort? messageCount_)
  70. {
  71. SetFieldValue(0, 0, messageCount_, Fit.SubfieldIndexMainField);
  72. }
  73. ///<summary>
  74. /// Retrieves the Text field</summary>
  75. /// <returns>Returns byte[] representing the Text field</returns>
  76. public byte[] GetText()
  77. {
  78. return (byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  79. }
  80. ///<summary>
  81. /// Retrieves the Text field</summary>
  82. /// <returns>Returns String representing the Text field</returns>
  83. public String GetTextAsString()
  84. {
  85. return Encoding.UTF8.GetString((byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField));
  86. }
  87. ///<summary>
  88. /// Set Text field</summary>
  89. /// <param name="text_"> field value to be set</param>
  90. public void SetText(String text_)
  91. {
  92. SetFieldValue(1, 0, System.Text.Encoding.UTF8.GetBytes(text_), Fit.SubfieldIndexMainField);
  93. }
  94. /// <summary>
  95. /// Set Text field</summary>
  96. /// <param name="text_">field value to be set</param>
  97. public void SetText(byte[] text_)
  98. {
  99. SetFieldValue(1, 0, text_, Fit.SubfieldIndexMainField);
  100. }
  101. #endregion // Methods
  102. } // Class
  103. } // namespace